@codat/lending 4.2.0 → 4.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +36 -1
- package/dist/sdk/companies.d.ts +22 -7
- package/dist/sdk/companies.js +22 -7
- package/dist/sdk/models/operations/getcreateoperation.d.ts +1 -1
- package/dist/sdk/models/shared/accountingbillcreditnote.d.ts +2 -2
- package/dist/sdk/models/shared/accountingbillcreditnote.js +3 -3
- package/dist/sdk/models/shared/accountingcreateaccountresponse.d.ts +171 -34
- package/dist/sdk/models/shared/accountingcreateaccountresponse.js +194 -4
- package/dist/sdk/models/shared/accountingcreatebankaccountresponse.d.ts +116 -22
- package/dist/sdk/models/shared/accountingcreatebankaccountresponse.js +118 -4
- package/dist/sdk/models/shared/accountingcreatebanktransactionsresponse.d.ts +12 -2
- package/dist/sdk/models/shared/accountingcreatebanktransactionsresponse.js +26 -4
- package/dist/sdk/models/shared/accountingcreatedirectcostresponse.d.ts +165 -18
- package/dist/sdk/models/shared/accountingcreatedirectcostresponse.js +150 -4
- package/dist/sdk/models/shared/accountingcreatepaymentresponse.d.ts +797 -675
- package/dist/sdk/models/shared/accountingcreatepaymentresponse.js +782 -4
- package/dist/sdk/models/shared/accountingcreatesupplierresponse.d.ts +69 -11
- package/dist/sdk/models/shared/accountingcreatesupplierresponse.js +99 -4
- package/dist/sdk/models/shared/accountingcreatetransferresponse.d.ts +81 -9
- package/dist/sdk/models/shared/accountingcreatetransferresponse.js +93 -4
- package/dist/sdk/models/shared/accountingcreditnote.d.ts +2 -2
- package/dist/sdk/models/shared/accountingcreditnote.js +3 -3
- package/dist/sdk/models/shared/accountingdirectcost.d.ts +11 -5
- package/dist/sdk/models/shared/accountingdirectcost.js +18 -11
- package/dist/sdk/models/shared/accountinginvoice.d.ts +10 -5
- package/dist/sdk/models/shared/accountinginvoice.js +11 -5
- package/dist/sdk/models/shared/accountingjournalentry.d.ts +3 -7
- package/dist/sdk/models/shared/accountingjournalentry.js +3 -3
- package/dist/sdk/models/shared/accounttransactionline.d.ts +3 -7
- package/dist/sdk/models/shared/accounttransactionline.js +3 -3
- package/dist/sdk/models/shared/accounttransactionlinerecordref.d.ts +30 -0
- package/dist/sdk/models/shared/accounttransactionlinerecordref.js +70 -0
- package/dist/sdk/models/shared/bankingtransactioncategory.d.ts +5 -1
- package/dist/sdk/models/shared/bankingtransactioncategory.js +5 -1
- package/dist/sdk/models/shared/company.d.ts +10 -0
- package/dist/sdk/models/shared/company.js +20 -1
- package/dist/sdk/models/shared/companyrequestbody.d.ts +5 -0
- package/dist/sdk/models/shared/companyrequestbody.js +7 -0
- package/dist/sdk/models/shared/connection.d.ts +2 -0
- package/dist/sdk/models/shared/connection.js +2 -0
- package/dist/sdk/models/shared/contactref.d.ts +9 -3
- package/dist/sdk/models/shared/contactref.js +9 -2
- package/dist/sdk/models/shared/directcostprototype.d.ts +11 -5
- package/dist/sdk/models/shared/directcostprototype.js +18 -11
- package/dist/sdk/models/shared/errormessage.d.ts +5 -0
- package/dist/sdk/models/shared/errormessage.js +7 -0
- package/dist/sdk/models/shared/errorvalidation.d.ts +9 -0
- package/dist/sdk/models/shared/errorvalidation.js +56 -0
- package/dist/sdk/models/shared/errorvalidationitem.d.ts +15 -0
- package/dist/sdk/models/shared/errorvalidationitem.js +55 -0
- package/dist/sdk/models/shared/index.d.ts +6 -0
- package/dist/sdk/models/shared/index.js +6 -0
- package/dist/sdk/models/shared/invoicelineitem.d.ts +0 -2
- package/dist/sdk/models/shared/items.d.ts +2 -6
- package/dist/sdk/models/shared/items.js +2 -7
- package/dist/sdk/models/shared/journalentryrecordref.d.ts +30 -0
- package/dist/sdk/models/shared/journalentryrecordref.js +70 -0
- package/dist/sdk/models/shared/journalline.d.ts +2 -2
- package/dist/sdk/models/shared/journalline.js +3 -3
- package/dist/sdk/models/shared/tracking.d.ts +2 -1
- package/dist/sdk/models/shared/tracking.js +3 -2
- package/dist/sdk/models/shared/trackingrecordref.d.ts +22 -0
- package/dist/sdk/models/shared/trackingrecordref.js +62 -0
- package/dist/sdk/models/shared/withholdingtaxitems.d.ts +11 -0
- package/dist/sdk/models/shared/withholdingtaxitems.js +50 -0
- package/dist/sdk/sdk.js +3 -3
- package/docs/sdk/models/operations/createcompanyresponse.md +7 -7
- package/docs/sdk/models/operations/createconnectionresponse.md +7 -7
- package/docs/sdk/models/operations/createsupplierrequest.md +7 -7
- package/docs/sdk/models/operations/getaccountingagedcreditorsreportresponse.md +7 -7
- package/docs/sdk/models/operations/getaccountingageddebtorsreportresponse.md +7 -7
- package/docs/sdk/models/operations/getaccountingbillcreditnoteresponse.md +7 -7
- package/docs/sdk/models/operations/getaccountingbillpaymentresponse.md +7 -7
- package/docs/sdk/models/operations/getaccountingcreditnoteresponse.md +7 -7
- package/docs/sdk/models/operations/getaccountingprofileresponse.md +7 -7
- package/docs/sdk/models/operations/getaccountingsupplierresponse.md +7 -7
- package/docs/sdk/models/operations/getbankingaccountresponse.md +7 -7
- package/docs/sdk/models/operations/getbankingtransactioncategoryresponse.md +7 -7
- package/docs/sdk/models/operations/getbankingtransactionresponse.md +7 -7
- package/docs/sdk/models/operations/getcategorizedbalancesheetstatementresponse.md +7 -7
- package/docs/sdk/models/operations/getcategorizedprofitandlossstatementresponse.md +7 -7
- package/docs/sdk/models/operations/getcommercecustomerresponse.md +7 -7
- package/docs/sdk/models/operations/getcommercedisputeresponse.md +7 -7
- package/docs/sdk/models/operations/getcommercelocationresponse.md +7 -7
- package/docs/sdk/models/operations/getcommerceorderresponse.md +7 -7
- package/docs/sdk/models/operations/getcommerceproductcategoryresponse.md +7 -7
- package/docs/sdk/models/operations/getcompanyresponse.md +7 -7
- package/docs/sdk/models/operations/getconnectionresponse.md +7 -7
- package/docs/sdk/models/operations/getcreateoperationrequest.md +4 -4
- package/docs/sdk/models/operations/getloansummaryresponse.md +7 -7
- package/docs/sdk/models/operations/getpulloperationresponse.md +7 -7
- package/docs/sdk/models/operations/listaccountingaccountsresponse.md +7 -7
- package/docs/sdk/models/operations/listaccountingaccounttransactionsresponse.md +7 -7
- package/docs/sdk/models/operations/listaccountingbankaccountsresponse.md +7 -7
- package/docs/sdk/models/operations/listaccountingbankaccounttransactionsresponse.md +7 -7
- package/docs/sdk/models/operations/listaccountingbillcreditnotesresponse.md +7 -7
- package/docs/sdk/models/operations/listaccountingbillpaymentsresponse.md +7 -7
- package/docs/sdk/models/operations/listaccountingbillsresponse.md +7 -7
- package/docs/sdk/models/operations/listaccountingcreditnotesresponse.md +7 -7
- package/docs/sdk/models/operations/listaccountingcustomersresponse.md +7 -7
- package/docs/sdk/models/operations/listaccountingdirectcostsresponse.md +7 -7
- package/docs/sdk/models/operations/listaccountingdirectincomesresponse.md +7 -7
- package/docs/sdk/models/operations/listaccountinginvoicesresponse.md +7 -7
- package/docs/sdk/models/operations/listaccountingjournalentriesresponse.md +7 -7
- package/docs/sdk/models/operations/listaccountingjournalsresponse.md +7 -7
- package/docs/sdk/models/operations/listaccountingpaymentsresponse.md +7 -7
- package/docs/sdk/models/operations/listaccountingsuppliersresponse.md +7 -7
- package/docs/sdk/models/operations/listaccountingtransfersresponse.md +7 -7
- package/docs/sdk/models/operations/listbankingaccountbalancesresponse.md +7 -7
- package/docs/sdk/models/operations/listbankingaccountsresponse.md +7 -7
- package/docs/sdk/models/operations/listbankingtransactioncategoriesresponse.md +7 -7
- package/docs/sdk/models/operations/listbankingtransactionsresponse.md +7 -7
- package/docs/sdk/models/operations/listcommercecustomersresponse.md +7 -7
- package/docs/sdk/models/operations/listcommercedisputesresponse.md +7 -7
- package/docs/sdk/models/operations/listcommercelocationsresponse.md +7 -7
- package/docs/sdk/models/operations/listcommerceordersresponse.md +7 -7
- package/docs/sdk/models/operations/listcommercepaymentmethodsresponse.md +7 -7
- package/docs/sdk/models/operations/listcommercepaymentsresponse.md +7 -7
- package/docs/sdk/models/operations/listcommerceproductcategoriesresponse.md +7 -7
- package/docs/sdk/models/operations/listcommerceproductsresponse.md +7 -7
- package/docs/sdk/models/operations/listcommercetransactionsresponse.md +7 -7
- package/docs/sdk/models/operations/listcompaniesresponse.md +7 -7
- package/docs/sdk/models/operations/listconnectionsresponse.md +7 -7
- package/docs/sdk/models/operations/listcreateoperationsresponse.md +7 -7
- package/docs/sdk/models/operations/listdataintegritydetailsresponse.md +7 -7
- package/docs/sdk/models/operations/listloantransactionsresponse.md +7 -7
- package/docs/sdk/models/operations/listpulloperationsresponse.md +7 -7
- package/docs/sdk/models/operations/refreshdatatyperesponse.md +7 -7
- package/docs/sdk/models/operations/unlinkconnectionresponse.md +7 -7
- package/docs/sdk/models/operations/updatecompanyresponse.md +7 -7
- package/docs/sdk/models/shared/accountingaccounts.md +7 -7
- package/docs/sdk/models/shared/accountingaccounttransactions.md +7 -7
- package/docs/sdk/models/shared/accountingbankaccounts.md +7 -7
- package/docs/sdk/models/shared/accountingbanktransactions.md +7 -7
- package/docs/sdk/models/shared/accountingbillcreditnote.md +1 -1
- package/docs/sdk/models/shared/accountingbillcreditnotes.md +7 -7
- package/docs/sdk/models/shared/accountingbillpayment.md +1 -1
- package/docs/sdk/models/shared/accountingbillpayments.md +7 -7
- package/docs/sdk/models/shared/accountingbills.md +7 -7
- package/docs/sdk/models/shared/accountingcreateaccountresponse.md +16 -16
- package/docs/sdk/models/shared/accountingcreateaccountresponseaccountingaccount.md +54 -0
- package/docs/sdk/models/shared/accountingcreateaccountresponsevaliddatatypelinks.md +50 -0
- package/docs/sdk/models/shared/accountingcreatebankaccountresponse.md +16 -16
- package/docs/sdk/models/shared/accountingcreatebankaccountresponseaccountingbankaccount.md +42 -0
- package/docs/sdk/models/shared/accountingcreatebankaccounttransactions.md +11 -0
- package/docs/sdk/models/shared/accountingcreatebanktransactionsresponse.md +1 -1
- package/docs/sdk/models/shared/accountingcreatedirectcostresponse.md +16 -16
- package/docs/sdk/models/shared/accountingcreatedirectcostresponseaccountingdirectcost.md +41 -0
- package/docs/sdk/models/shared/accountingcreatedirectcostresponsecontactreference.md +11 -0
- package/docs/sdk/models/shared/accountingcreatedirectcostresponsedatatype.md +11 -0
- package/docs/sdk/models/shared/accountingcreatepaymentresponse.md +16 -16
- package/docs/sdk/models/shared/accountingcreatepaymentresponseaccountingpayment.md +703 -0
- package/docs/sdk/models/shared/accountingcreatesupplierresponse.md +1 -1
- package/docs/sdk/models/shared/accountingcreatesupplierresponseaccountingsupplier.md +29 -0
- package/docs/sdk/models/shared/accountingcreatetransferresponse.md +1 -1
- package/docs/sdk/models/shared/accountingcreatetransferresponseaccountingtransfer.md +25 -0
- package/docs/sdk/models/shared/accountingcreditnote.md +1 -1
- package/docs/sdk/models/shared/accountingcreditnotes.md +7 -7
- package/docs/sdk/models/shared/accountingcustomers.md +7 -7
- package/docs/sdk/models/shared/accountingdirectcost.md +1 -1
- package/docs/sdk/models/shared/accountingdirectcostcontactreference.md +11 -0
- package/docs/sdk/models/shared/accountingdirectcostdatatype.md +11 -0
- package/docs/sdk/models/shared/accountingdirectcosts.md +7 -7
- package/docs/sdk/models/shared/accountingdirectincomes.md +7 -7
- package/docs/sdk/models/shared/accountinginvoice.md +1 -1
- package/docs/sdk/models/shared/accountinginvoicedatatype.md +10 -0
- package/docs/sdk/models/shared/accountinginvoices.md +7 -7
- package/docs/sdk/models/shared/accountingjournalentries.md +7 -7
- package/docs/sdk/models/shared/accountingjournalentry.md +1 -1
- package/docs/sdk/models/shared/accountingjournals.md +7 -7
- package/docs/sdk/models/shared/accountingpayment.md +1 -1
- package/docs/sdk/models/shared/accountingpayments.md +7 -7
- package/docs/sdk/models/shared/accountingsuppliers.md +7 -7
- package/docs/sdk/models/shared/accountingtransfers.md +7 -7
- package/docs/sdk/models/shared/accounts.md +1 -1
- package/docs/sdk/models/shared/accounttransactionline.md +5 -5
- package/docs/sdk/models/shared/accounttransactionlinerecordref.md +11 -0
- package/docs/sdk/models/shared/accounttransactionlinerecordrefdatatype.md +20 -0
- package/docs/sdk/models/shared/bankingaccountbalances.md +7 -7
- package/docs/sdk/models/shared/bankingaccounts.md +7 -7
- package/docs/sdk/models/shared/bankingtransactioncategories.md +7 -7
- package/docs/sdk/models/shared/bankingtransactioncategory.md +3 -1
- package/docs/sdk/models/shared/bankingtransactions.md +7 -7
- package/docs/sdk/models/shared/commercecustomers.md +7 -7
- package/docs/sdk/models/shared/commercedisputes.md +7 -7
- package/docs/sdk/models/shared/commercelocations.md +7 -7
- package/docs/sdk/models/shared/commerceorders.md +7 -7
- package/docs/sdk/models/shared/commercepayment.md +1 -1
- package/docs/sdk/models/shared/commercepaymentmethods.md +7 -7
- package/docs/sdk/models/shared/commercepayments.md +7 -7
- package/docs/sdk/models/shared/commerceproductcategories.md +7 -7
- package/docs/sdk/models/shared/commerceproducts.md +7 -7
- package/docs/sdk/models/shared/commercetransactions.md +7 -7
- package/docs/sdk/models/shared/companies.md +7 -7
- package/docs/sdk/models/shared/company.md +1 -0
- package/docs/sdk/models/shared/companyrequestbody.md +1 -0
- package/docs/sdk/models/shared/connections.md +7 -7
- package/docs/sdk/models/shared/contactref.md +4 -4
- package/docs/sdk/models/shared/contactrefdatatype.md +11 -0
- package/docs/sdk/models/shared/contactreference.md +11 -0
- package/docs/sdk/models/shared/dataintegritydetails.md +7 -7
- package/docs/sdk/models/shared/directcostprototype.md +1 -1
- package/docs/sdk/models/shared/directcostprototypedatatype.md +11 -0
- package/docs/sdk/models/shared/enhancedcashflowtransaction.md +2 -2
- package/docs/sdk/models/shared/enhancedcashflowtransactions.md +5 -5
- package/docs/sdk/models/shared/enhancedinvoicesreport.md +4 -4
- package/docs/sdk/models/shared/errormessage.md +9 -8
- package/docs/sdk/models/shared/errorvalidation.md +11 -0
- package/docs/sdk/models/shared/errorvalidationitem.md +10 -0
- package/docs/sdk/models/shared/groupreference.md +8 -0
- package/docs/sdk/models/shared/invoicelineitem.md +1 -1
- package/docs/sdk/models/shared/items.md +3 -4
- package/docs/sdk/models/shared/journalentryrecordref.md +11 -0
- package/docs/sdk/models/shared/journalentryrecordrefdatatype.md +20 -0
- package/docs/sdk/models/shared/journallinetracking.md +3 -3
- package/docs/sdk/models/shared/pulloperations.md +7 -7
- package/docs/sdk/models/shared/pushoperations.md +7 -7
- package/docs/sdk/models/shared/salesorderreference.md +4 -4
- package/docs/sdk/models/shared/sourcetype.md +2 -0
- package/docs/sdk/models/shared/tracking.md +1 -1
- package/docs/sdk/models/shared/trackingrecordref.md +11 -0
- package/docs/sdk/models/shared/trackingrecordrefdatatype.md +12 -0
- package/docs/sdk/models/shared/withholdingtaxitems.md +9 -0
- package/docs/sdks/accountbalances/README.md +1 -1
- package/docs/sdks/accounts/README.md +2 -2
- package/docs/sdks/accounttransactions/README.md +2 -2
- package/docs/sdks/balancesheet/README.md +2 -2
- package/docs/sdks/bankaccounts/README.md +2 -2
- package/docs/sdks/banktransactions/README.md +2 -2
- package/docs/sdks/billcreditnotes/README.md +2 -2
- package/docs/sdks/billpayments/README.md +2 -2
- package/docs/sdks/bills/README.md +5 -5
- package/docs/sdks/cashflow/README.md +1 -1
- package/docs/sdks/categorizedstatement/README.md +1 -1
- package/docs/sdks/codatlendingaccountingbankdata/README.md +1 -1
- package/docs/sdks/codatlendingaccounts/README.md +2 -2
- package/docs/sdks/codatlendingbankingtransactions/README.md +2 -2
- package/docs/sdks/codatlendingcustomers/README.md +2 -2
- package/docs/sdks/codatlendingdirectcosts/README.md +5 -5
- package/docs/sdks/codatlendingfinancialstatementsaccounts/README.md +2 -2
- package/docs/sdks/codatlendingloanwritebackaccounts/README.md +2 -2
- package/docs/sdks/codatlendingpayments/README.md +4 -3
- package/docs/sdks/codatlendingreports/README.md +2 -2
- package/docs/sdks/codatlendingsalespayments/README.md +2 -2
- package/docs/sdks/codatlendingsuppliers/README.md +26 -7
- package/docs/sdks/codatlendingtransactions/README.md +2 -2
- package/docs/sdks/codatlendingtransfers/README.md +2 -2
- package/docs/sdks/companies/README.md +38 -13
- package/docs/sdks/companyinfo/README.md +2 -2
- package/docs/sdks/connections/README.md +5 -5
- package/docs/sdks/createoperations/README.md +2 -2
- package/docs/sdks/creditnotes/README.md +2 -2
- package/docs/sdks/customers/README.md +5 -5
- package/docs/sdks/dataintegrity/README.md +3 -3
- package/docs/sdks/directcosts/README.md +10 -11
- package/docs/sdks/directincomes/README.md +5 -5
- package/docs/sdks/disputes/README.md +2 -2
- package/docs/sdks/excelreports/README.md +3 -3
- package/docs/sdks/fileupload/README.md +3 -3
- package/docs/sdks/invoices/README.md +7 -7
- package/docs/sdks/journalentries/README.md +2 -2
- package/docs/sdks/journals/README.md +2 -2
- package/docs/sdks/liabilities/README.md +4 -4
- package/docs/sdks/locations/README.md +2 -2
- package/docs/sdks/managedata/README.md +1 -1
- package/docs/sdks/metrics/README.md +3 -3
- package/docs/sdks/orders/README.md +2 -2
- package/docs/sdks/paymentmethods/README.md +2 -2
- package/docs/sdks/payments/README.md +2 -2
- package/docs/sdks/productcategories/README.md +2 -2
- package/docs/sdks/products/README.md +2 -2
- package/docs/sdks/profitandloss/README.md +2 -2
- package/docs/sdks/pulloperations/README.md +2 -2
- package/docs/sdks/refresh/README.md +2 -2
- package/docs/sdks/reports/README.md +4 -4
- package/docs/sdks/suppliers/README.md +5 -5
- package/docs/sdks/transactioncategories/README.md +2 -2
- package/docs/sdks/transfers/README.md +3 -4
- package/package.json +1 -1
- package/docs/sdk/models/shared/accountingdirectcostcontactref.md +0 -11
- package/docs/sdk/models/shared/directcostprototypecontactref.md +0 -11
package/README.md
CHANGED
|
@@ -38,6 +38,11 @@ async function run() {
|
|
|
38
38
|
|
|
39
39
|
const res = await sdk.companies.create({
|
|
40
40
|
description: "Requested early access to the new financing scheme.",
|
|
41
|
+
groups: [
|
|
42
|
+
{
|
|
43
|
+
id: "60d2fa12-8a04-11ee-b9d1-0242ac120002",
|
|
44
|
+
},
|
|
45
|
+
],
|
|
41
46
|
name: "Bank of Dave",
|
|
42
47
|
});
|
|
43
48
|
|
|
@@ -387,6 +392,11 @@ async function run() {
|
|
|
387
392
|
const res = await sdk.companies.create(
|
|
388
393
|
{
|
|
389
394
|
description: "Requested early access to the new financing scheme.",
|
|
395
|
+
groups: [
|
|
396
|
+
{
|
|
397
|
+
id: "60d2fa12-8a04-11ee-b9d1-0242ac120002",
|
|
398
|
+
},
|
|
399
|
+
],
|
|
390
400
|
name: "Bank of Dave",
|
|
391
401
|
},
|
|
392
402
|
{
|
|
@@ -433,6 +443,11 @@ async function run() {
|
|
|
433
443
|
|
|
434
444
|
const res = await sdk.companies.create({
|
|
435
445
|
description: "Requested early access to the new financing scheme.",
|
|
446
|
+
groups: [
|
|
447
|
+
{
|
|
448
|
+
id: "60d2fa12-8a04-11ee-b9d1-0242ac120002",
|
|
449
|
+
},
|
|
450
|
+
],
|
|
436
451
|
name: "Bank of Dave",
|
|
437
452
|
});
|
|
438
453
|
|
|
@@ -453,7 +468,7 @@ Handling errors in this SDK should largely match your expectations. All operati
|
|
|
453
468
|
|
|
454
469
|
| Error Object | Status Code | Content Type |
|
|
455
470
|
| --------------- | --------------- | --------------- |
|
|
456
|
-
| errors.SDKError |
|
|
471
|
+
| errors.SDKError | 4xx-5xx | */* |
|
|
457
472
|
|
|
458
473
|
Example
|
|
459
474
|
|
|
@@ -471,6 +486,11 @@ async function run() {
|
|
|
471
486
|
try {
|
|
472
487
|
res = await sdk.companies.create({
|
|
473
488
|
description: "Requested early access to the new financing scheme.",
|
|
489
|
+
groups: [
|
|
490
|
+
{
|
|
491
|
+
id: "60d2fa12-8a04-11ee-b9d1-0242ac120002",
|
|
492
|
+
},
|
|
493
|
+
],
|
|
474
494
|
name: "Bank of Dave",
|
|
475
495
|
});
|
|
476
496
|
} catch (err) {
|
|
@@ -516,6 +536,11 @@ async function run() {
|
|
|
516
536
|
|
|
517
537
|
const res = await sdk.companies.create({
|
|
518
538
|
description: "Requested early access to the new financing scheme.",
|
|
539
|
+
groups: [
|
|
540
|
+
{
|
|
541
|
+
id: "60d2fa12-8a04-11ee-b9d1-0242ac120002",
|
|
542
|
+
},
|
|
543
|
+
],
|
|
519
544
|
name: "Bank of Dave",
|
|
520
545
|
});
|
|
521
546
|
|
|
@@ -545,6 +570,11 @@ async function run() {
|
|
|
545
570
|
|
|
546
571
|
const res = await sdk.companies.create({
|
|
547
572
|
description: "Requested early access to the new financing scheme.",
|
|
573
|
+
groups: [
|
|
574
|
+
{
|
|
575
|
+
id: "60d2fa12-8a04-11ee-b9d1-0242ac120002",
|
|
576
|
+
},
|
|
577
|
+
],
|
|
548
578
|
name: "Bank of Dave",
|
|
549
579
|
});
|
|
550
580
|
|
|
@@ -601,6 +631,11 @@ async function run() {
|
|
|
601
631
|
|
|
602
632
|
const res = await sdk.companies.create({
|
|
603
633
|
description: "Requested early access to the new financing scheme.",
|
|
634
|
+
groups: [
|
|
635
|
+
{
|
|
636
|
+
id: "60d2fa12-8a04-11ee-b9d1-0242ac120002",
|
|
637
|
+
},
|
|
638
|
+
],
|
|
604
639
|
name: "Bank of Dave",
|
|
605
640
|
});
|
|
606
641
|
|
package/dist/sdk/companies.d.ts
CHANGED
|
@@ -13,40 +13,55 @@ export declare class Companies {
|
|
|
13
13
|
* Create company
|
|
14
14
|
*
|
|
15
15
|
* @remarks
|
|
16
|
-
*
|
|
17
|
-
*
|
|
18
|
-
* 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`.
|
|
16
|
+
* Use the *Create company* endpoint to create a new [company](https://docs.codat.io/lending-api#/schemas/Company) that represents your customer in Codat.
|
|
19
17
|
*
|
|
18
|
+
* A [company](https://docs.codat.io/lending-api#/schemas/Company) represents a business sharing access to their data.
|
|
19
|
+
* 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.
|
|
20
20
|
*
|
|
21
|
+
* 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`.
|
|
21
22
|
*/
|
|
22
23
|
create(req: shared.CompanyRequestBody, retries?: utils.RetryConfig, config?: AxiosRequestConfig): Promise<operations.CreateCompanyResponse>;
|
|
23
24
|
/**
|
|
24
25
|
* Delete a company
|
|
25
26
|
*
|
|
26
27
|
* @remarks
|
|
28
|
+
* 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.
|
|
29
|
+
*
|
|
30
|
+
* A [company](https://docs.codat.io/lending-api#/schemas/Company) represents a business sharing access to their data.
|
|
31
|
+
* 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.
|
|
27
32
|
*
|
|
28
|
-
* Permanently deletes a company, its connections and any cached data. This operation is irreversible. If the company ID does not exist an error is returned.
|
|
29
33
|
*/
|
|
30
34
|
delete(req: operations.DeleteCompanyRequest, retries?: utils.RetryConfig, config?: AxiosRequestConfig): Promise<operations.DeleteCompanyResponse>;
|
|
31
35
|
/**
|
|
32
36
|
* Get company
|
|
33
37
|
*
|
|
34
38
|
* @remarks
|
|
35
|
-
*
|
|
39
|
+
* The *Get company* endpoint returns a single company for a given `companyId`.
|
|
40
|
+
*
|
|
41
|
+
* A [company](https://docs.codat.io/lending-api#/schemas/Company) represents a business sharing access to their data.
|
|
42
|
+
* 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.
|
|
43
|
+
*
|
|
36
44
|
*/
|
|
37
45
|
get(req: operations.GetCompanyRequest, retries?: utils.RetryConfig, config?: AxiosRequestConfig): Promise<operations.GetCompanyResponse>;
|
|
38
46
|
/**
|
|
39
47
|
* List companies
|
|
40
48
|
*
|
|
41
49
|
* @remarks
|
|
42
|
-
*
|
|
50
|
+
* The *List companies* endpoint returns a list of [companies] associated to your instances.
|
|
51
|
+
*
|
|
52
|
+
* A [company](https://docs.codat.io/lending-api#/schemas/Company) represents a business sharing access to their data.
|
|
53
|
+
* 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.
|
|
43
54
|
*/
|
|
44
55
|
list(req: operations.ListCompaniesRequest, retries?: utils.RetryConfig, config?: AxiosRequestConfig): Promise<operations.ListCompaniesResponse>;
|
|
45
56
|
/**
|
|
46
57
|
* Update company
|
|
47
58
|
*
|
|
48
59
|
* @remarks
|
|
49
|
-
*
|
|
60
|
+
* Use the *Update company* endpoint to update both the name and description of the company.
|
|
61
|
+
* If you use [groups](https://docs.codat.io/lending-api#/schemas/Group) to manage a set of companies, use the [Add company](https://docs.codat.io/lending-api#/operations/add-company-to-group) or [Remove company](https://docs.codat.io/lending-api#/operations/remove-company-from-group) endpoints to add or remove a company from a group.
|
|
62
|
+
*
|
|
63
|
+
* A [company](https://docs.codat.io/lending-api#/schemas/Company) represents a business sharing access to their data.
|
|
64
|
+
* 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.
|
|
50
65
|
*/
|
|
51
66
|
update(req: operations.UpdateCompanyRequest, retries?: utils.RetryConfig, config?: AxiosRequestConfig): Promise<operations.UpdateCompanyResponse>;
|
|
52
67
|
}
|
package/dist/sdk/companies.js
CHANGED
|
@@ -105,11 +105,12 @@ var Companies = /** @class */ (function () {
|
|
|
105
105
|
* Create company
|
|
106
106
|
*
|
|
107
107
|
* @remarks
|
|
108
|
-
*
|
|
109
|
-
*
|
|
110
|
-
* 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`.
|
|
108
|
+
* Use the *Create company* endpoint to create a new [company](https://docs.codat.io/lending-api#/schemas/Company) that represents your customer in Codat.
|
|
111
109
|
*
|
|
110
|
+
* A [company](https://docs.codat.io/lending-api#/schemas/Company) represents a business sharing access to their data.
|
|
111
|
+
* 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.
|
|
112
112
|
*
|
|
113
|
+
* 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`.
|
|
113
114
|
*/
|
|
114
115
|
Companies.prototype.create = function (req, retries, config) {
|
|
115
116
|
var _a, _b;
|
|
@@ -200,8 +201,11 @@ var Companies = /** @class */ (function () {
|
|
|
200
201
|
* Delete a company
|
|
201
202
|
*
|
|
202
203
|
* @remarks
|
|
204
|
+
* 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.
|
|
205
|
+
*
|
|
206
|
+
* A [company](https://docs.codat.io/lending-api#/schemas/Company) represents a business sharing access to their data.
|
|
207
|
+
* 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.
|
|
203
208
|
*
|
|
204
|
-
* Permanently deletes a company, its connections and any cached data. This operation is irreversible. If the company ID does not exist an error is returned.
|
|
205
209
|
*/
|
|
206
210
|
Companies.prototype.delete = function (req, retries, config) {
|
|
207
211
|
var _a, _b;
|
|
@@ -276,7 +280,11 @@ var Companies = /** @class */ (function () {
|
|
|
276
280
|
* Get company
|
|
277
281
|
*
|
|
278
282
|
* @remarks
|
|
279
|
-
*
|
|
283
|
+
* The *Get company* endpoint returns a single company for a given `companyId`.
|
|
284
|
+
*
|
|
285
|
+
* A [company](https://docs.codat.io/lending-api#/schemas/Company) represents a business sharing access to their data.
|
|
286
|
+
* 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.
|
|
287
|
+
*
|
|
280
288
|
*/
|
|
281
289
|
Companies.prototype.get = function (req, retries, config) {
|
|
282
290
|
var _a, _b;
|
|
@@ -357,7 +365,10 @@ var Companies = /** @class */ (function () {
|
|
|
357
365
|
* List companies
|
|
358
366
|
*
|
|
359
367
|
* @remarks
|
|
360
|
-
*
|
|
368
|
+
* The *List companies* endpoint returns a list of [companies] associated to your instances.
|
|
369
|
+
*
|
|
370
|
+
* A [company](https://docs.codat.io/lending-api#/schemas/Company) represents a business sharing access to their data.
|
|
371
|
+
* 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.
|
|
361
372
|
*/
|
|
362
373
|
Companies.prototype.list = function (req, retries, config) {
|
|
363
374
|
var _a, _b;
|
|
@@ -439,7 +450,11 @@ var Companies = /** @class */ (function () {
|
|
|
439
450
|
* Update company
|
|
440
451
|
*
|
|
441
452
|
* @remarks
|
|
442
|
-
*
|
|
453
|
+
* Use the *Update company* endpoint to update both the name and description of the company.
|
|
454
|
+
* If you use [groups](https://docs.codat.io/lending-api#/schemas/Group) to manage a set of companies, use the [Add company](https://docs.codat.io/lending-api#/operations/add-company-to-group) or [Remove company](https://docs.codat.io/lending-api#/operations/remove-company-from-group) endpoints to add or remove a company from a group.
|
|
455
|
+
*
|
|
456
|
+
* A [company](https://docs.codat.io/lending-api#/schemas/Company) represents a business sharing access to their data.
|
|
457
|
+
* 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.
|
|
443
458
|
*/
|
|
444
459
|
Companies.prototype.update = function (req, retries, config) {
|
|
445
460
|
var _a, _b;
|
|
@@ -2,10 +2,10 @@ import { SpeakeasyBase } from "../../../internal/utils";
|
|
|
2
2
|
import { AccountingPaymentAllocation } from "./accountingpaymentallocation";
|
|
3
3
|
import { BillCreditNoteLineItem } from "./billcreditnotelineitem";
|
|
4
4
|
import { BillCreditNoteStatus } from "./billcreditnotestatus";
|
|
5
|
-
import { Items } from "./items";
|
|
6
5
|
import { Metadata } from "./metadata";
|
|
7
6
|
import { SupplementalData } from "./supplementaldata";
|
|
8
7
|
import { SupplierRef } from "./supplierref";
|
|
8
|
+
import { WithholdingTaxItems } from "./withholdingtaxitems";
|
|
9
9
|
/**
|
|
10
10
|
* > **Bill credit notes or credit notes?**
|
|
11
11
|
*
|
|
@@ -187,5 +187,5 @@ export declare class AccountingBillCreditNote extends SpeakeasyBase {
|
|
|
187
187
|
* Amount of tax included in the bill credit note.
|
|
188
188
|
*/
|
|
189
189
|
totalTaxAmount: number;
|
|
190
|
-
withholdingTax?:
|
|
190
|
+
withholdingTax?: WithholdingTaxItems[];
|
|
191
191
|
}
|
|
@@ -32,10 +32,10 @@ var utils_1 = require("../../../internal/utils");
|
|
|
32
32
|
var accountingpaymentallocation_1 = require("./accountingpaymentallocation");
|
|
33
33
|
var billcreditnotelineitem_1 = require("./billcreditnotelineitem");
|
|
34
34
|
var billcreditnotestatus_1 = require("./billcreditnotestatus");
|
|
35
|
-
var items_1 = require("./items");
|
|
36
35
|
var metadata_1 = require("./metadata");
|
|
37
36
|
var supplementaldata_1 = require("./supplementaldata");
|
|
38
37
|
var supplierref_1 = require("./supplierref");
|
|
38
|
+
var withholdingtaxitems_1 = require("./withholdingtaxitems");
|
|
39
39
|
var class_transformer_1 = require("class-transformer");
|
|
40
40
|
/**
|
|
41
41
|
* > **Bill credit notes or credit notes?**
|
|
@@ -173,9 +173,9 @@ var AccountingBillCreditNote = /** @class */ (function (_super) {
|
|
|
173
173
|
__metadata("design:type", Number)
|
|
174
174
|
], AccountingBillCreditNote.prototype, "totalTaxAmount", void 0);
|
|
175
175
|
__decorate([
|
|
176
|
-
(0, utils_1.SpeakeasyMetadata)({ elemType:
|
|
176
|
+
(0, utils_1.SpeakeasyMetadata)({ elemType: withholdingtaxitems_1.WithholdingTaxItems }),
|
|
177
177
|
(0, class_transformer_1.Expose)({ name: "withholdingTax" }),
|
|
178
|
-
(0, class_transformer_1.Type)(function () { return
|
|
178
|
+
(0, class_transformer_1.Type)(function () { return withholdingtaxitems_1.WithholdingTaxItems; }),
|
|
179
179
|
__metadata("design:type", Array)
|
|
180
180
|
], AccountingBillCreditNote.prototype, "withholdingTax", void 0);
|
|
181
181
|
return AccountingBillCreditNote;
|
|
@@ -1,9 +1,178 @@
|
|
|
1
1
|
import { SpeakeasyBase } from "../../../internal/utils";
|
|
2
|
-
import {
|
|
2
|
+
import { AccountStatus } from "./accountstatus";
|
|
3
|
+
import { AccountType } from "./accounttype";
|
|
3
4
|
import { DataType } from "./datatype";
|
|
5
|
+
import { Metadata } from "./metadata";
|
|
4
6
|
import { PushOperationChange } from "./pushoperationchange";
|
|
5
7
|
import { PushOperationStatus } from "./pushoperationstatus";
|
|
8
|
+
import { SupplementalData } from "./supplementaldata";
|
|
6
9
|
import { Validation } from "./validation";
|
|
10
|
+
/**
|
|
11
|
+
* 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.
|
|
12
|
+
*
|
|
13
|
+
* @remarks
|
|
14
|
+
*
|
|
15
|
+
* For example, `validDatatypeLinks` might indicate the following references:
|
|
16
|
+
*
|
|
17
|
+
* - Which tax rates are valid to use on the line item of a bill.
|
|
18
|
+
* - Which items can be used when creating an invoice.
|
|
19
|
+
*
|
|
20
|
+
* You can use `validDatatypeLinks` to present your SMB customers with only valid choices when selecting objects from a list, for example.
|
|
21
|
+
*
|
|
22
|
+
* ## `validDatatypeLinks` example
|
|
23
|
+
*
|
|
24
|
+
* 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.
|
|
25
|
+
*
|
|
26
|
+
* ```json validDatatypeLinks for an account
|
|
27
|
+
* {
|
|
28
|
+
* "id": "bd9e85e0-0478-433d-ae9f-0b3c4f04bfe4",
|
|
29
|
+
* "nominalCode": "090",
|
|
30
|
+
* "name": "Business Bank Account",
|
|
31
|
+
* #...
|
|
32
|
+
* "validDatatypeLinks": [
|
|
33
|
+
* {
|
|
34
|
+
* "property": "Id",
|
|
35
|
+
* "links": [
|
|
36
|
+
* "Payment.AccountRef.Id",
|
|
37
|
+
* "BillPayment.AccountRef.Id",
|
|
38
|
+
* "DirectIncome.LineItems.AccountRef.Id",
|
|
39
|
+
* "DirectCost.LineItems.AccountRef.Id"
|
|
40
|
+
* ]
|
|
41
|
+
* }
|
|
42
|
+
* ]
|
|
43
|
+
* }
|
|
44
|
+
* ```
|
|
45
|
+
*
|
|
46
|
+
*
|
|
47
|
+
*
|
|
48
|
+
* ## Support for `validDatatypeLinks`
|
|
49
|
+
*
|
|
50
|
+
* Codat currently supports `validDatatypeLinks` for some data types on our Xero, QuickBooks Online, QuickBooks Desktop, Exact (NL), and Sage Business Cloud integrations.
|
|
51
|
+
*
|
|
52
|
+
* If you'd like us to extend support to more data types or integrations, suggest or vote for this on our <a href="https://portal.productboard.com/codat/5-product-roadmap">Product Roadmap</a>.
|
|
53
|
+
*/
|
|
54
|
+
export declare class AccountingCreateAccountResponseValidDataTypeLinks extends SpeakeasyBase {
|
|
55
|
+
/**
|
|
56
|
+
* Supported `dataTypes` that the record can be linked to.
|
|
57
|
+
*/
|
|
58
|
+
links?: string[];
|
|
59
|
+
/**
|
|
60
|
+
* The property from the account that can be linked.
|
|
61
|
+
*/
|
|
62
|
+
property?: string;
|
|
63
|
+
}
|
|
64
|
+
/**
|
|
65
|
+
* > **Language tip:** Accounts are also referred to as **chart of accounts**, **nominal accounts**, and **general ledger**.
|
|
66
|
+
*
|
|
67
|
+
* @remarks
|
|
68
|
+
*
|
|
69
|
+
* View the coverage for accounts in the <a className="external" href="https://knowledge.codat.io/supported-features/accounting?view=tab-by-data-type&dataType=chartOfAccounts" target="_blank">Data coverage explorer</a>.
|
|
70
|
+
*
|
|
71
|
+
* ## Overview
|
|
72
|
+
*
|
|
73
|
+
* 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.
|
|
74
|
+
*
|
|
75
|
+
* The categories for an account include:
|
|
76
|
+
* * Asset
|
|
77
|
+
* * Expense
|
|
78
|
+
* * Income
|
|
79
|
+
* * Liability
|
|
80
|
+
* * Equity.
|
|
81
|
+
*
|
|
82
|
+
* 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.
|
|
83
|
+
*
|
|
84
|
+
* 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.
|
|
85
|
+
*
|
|
86
|
+
* To determine the list of allowed categories for a specific integration, you can:
|
|
87
|
+
* - 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).
|
|
88
|
+
* - Refer to the integration's own documentation.
|
|
89
|
+
*
|
|
90
|
+
* > **Accounts with no category**
|
|
91
|
+
* >
|
|
92
|
+
* > 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`.
|
|
93
|
+
* >
|
|
94
|
+
* > 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.
|
|
95
|
+
*
|
|
96
|
+
* @deprecated class: This will be removed in a future release, please migrate away from it as soon as possible.
|
|
97
|
+
*/
|
|
98
|
+
export declare class AccountingCreateAccountResponseAccountingAccount extends SpeakeasyBase {
|
|
99
|
+
/**
|
|
100
|
+
* The currency data type in Codat is the [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) currency code, e.g. _GBP_.
|
|
101
|
+
*
|
|
102
|
+
* @remarks
|
|
103
|
+
*
|
|
104
|
+
* ## Unknown currencies
|
|
105
|
+
*
|
|
106
|
+
* In line with the ISO 4217 specification, the code _XXX_ is used when the data source does not return a currency for a transaction.
|
|
107
|
+
*
|
|
108
|
+
* There are only a very small number of edge cases where this currency code is returned by the Codat system.
|
|
109
|
+
*/
|
|
110
|
+
currency?: string;
|
|
111
|
+
/**
|
|
112
|
+
* Current balance in the account.
|
|
113
|
+
*/
|
|
114
|
+
currentBalance?: number;
|
|
115
|
+
/**
|
|
116
|
+
* Description for the account.
|
|
117
|
+
*/
|
|
118
|
+
description?: string;
|
|
119
|
+
/**
|
|
120
|
+
* Full category of the account.
|
|
121
|
+
*
|
|
122
|
+
* @remarks
|
|
123
|
+
*
|
|
124
|
+
* 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.
|
|
125
|
+
*/
|
|
126
|
+
fullyQualifiedCategory?: string;
|
|
127
|
+
/**
|
|
128
|
+
* Full name of the account, for example:
|
|
129
|
+
*
|
|
130
|
+
* @remarks
|
|
131
|
+
* - `Cash On Hand`
|
|
132
|
+
* - `Rents Held In Trust`
|
|
133
|
+
* - `Fixed Asset`
|
|
134
|
+
*/
|
|
135
|
+
fullyQualifiedName?: string;
|
|
136
|
+
/**
|
|
137
|
+
* Identifier for the account, unique for the company.
|
|
138
|
+
*/
|
|
139
|
+
id?: string;
|
|
140
|
+
/**
|
|
141
|
+
* Confirms whether the account is a bank account or not.
|
|
142
|
+
*/
|
|
143
|
+
isBankAccount?: boolean;
|
|
144
|
+
metadata?: Metadata;
|
|
145
|
+
modifiedDate?: string;
|
|
146
|
+
/**
|
|
147
|
+
* Name of the account.
|
|
148
|
+
*/
|
|
149
|
+
name?: string;
|
|
150
|
+
/**
|
|
151
|
+
* 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.
|
|
152
|
+
*/
|
|
153
|
+
nominalCode?: string;
|
|
154
|
+
sourceModifiedDate?: string;
|
|
155
|
+
/**
|
|
156
|
+
* Status of the account
|
|
157
|
+
*/
|
|
158
|
+
status?: AccountStatus;
|
|
159
|
+
/**
|
|
160
|
+
* Supplemental data is additional data you can include in our standard data types.
|
|
161
|
+
*
|
|
162
|
+
* @remarks
|
|
163
|
+
*
|
|
164
|
+
* It is referenced as a configured dynamic key value pair that is unique to the accounting platform. [Learn more](https://docs.codat.io/using-the-api/supplemental-data/overview) about supplemental data.
|
|
165
|
+
*/
|
|
166
|
+
supplementalData?: SupplementalData;
|
|
167
|
+
/**
|
|
168
|
+
* Type of account
|
|
169
|
+
*/
|
|
170
|
+
type?: AccountType;
|
|
171
|
+
/**
|
|
172
|
+
* 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).
|
|
173
|
+
*/
|
|
174
|
+
validDatatypeLinks?: AccountingCreateAccountResponseValidDataTypeLinks[];
|
|
175
|
+
}
|
|
7
176
|
export declare class AccountingCreateAccountResponse extends SpeakeasyBase {
|
|
8
177
|
/**
|
|
9
178
|
* Contains a single entry that communicates which record has changed and the manner in which it changed.
|
|
@@ -37,39 +206,7 @@ export declare class AccountingCreateAccountResponse extends SpeakeasyBase {
|
|
|
37
206
|
* > Where it is not available from the underlying platform, Codat will return these as times local to the business whose data has been synced.
|
|
38
207
|
*/
|
|
39
208
|
completedOnUtc?: string;
|
|
40
|
-
|
|
41
|
-
* > **Language tip:** Accounts are also referred to as **chart of accounts**, **nominal accounts**, and **general ledger**.
|
|
42
|
-
*
|
|
43
|
-
* @remarks
|
|
44
|
-
*
|
|
45
|
-
* View the coverage for accounts in the <a className="external" href="https://knowledge.codat.io/supported-features/accounting?view=tab-by-data-type&dataType=chartOfAccounts" target="_blank">Data coverage explorer</a>.
|
|
46
|
-
*
|
|
47
|
-
* ## Overview
|
|
48
|
-
*
|
|
49
|
-
* 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.
|
|
50
|
-
*
|
|
51
|
-
* The categories for an account include:
|
|
52
|
-
* * Asset
|
|
53
|
-
* * Expense
|
|
54
|
-
* * Income
|
|
55
|
-
* * Liability
|
|
56
|
-
* * Equity.
|
|
57
|
-
*
|
|
58
|
-
* 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.
|
|
59
|
-
*
|
|
60
|
-
* 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.
|
|
61
|
-
*
|
|
62
|
-
* To determine the list of allowed categories for a specific integration, you can:
|
|
63
|
-
* - 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).
|
|
64
|
-
* - Refer to the integration's own documentation.
|
|
65
|
-
*
|
|
66
|
-
* > **Accounts with no category**
|
|
67
|
-
* >
|
|
68
|
-
* > 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`.
|
|
69
|
-
* >
|
|
70
|
-
* > 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.
|
|
71
|
-
*/
|
|
72
|
-
data?: AccountingAccount;
|
|
209
|
+
data?: AccountingCreateAccountResponseAccountingAccount;
|
|
73
210
|
/**
|
|
74
211
|
* Unique identifier for a company's data connection.
|
|
75
212
|
*/
|