@codat/lending 2.1.0 → 3.2.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 +70 -34
- package/dist/sdk/companies.js +2 -2
- package/dist/sdk/connections.js +2 -2
- package/dist/sdk/fileupload.js +1 -1
- package/dist/sdk/loanwriteback.d.ts +19 -0
- package/dist/sdk/loanwriteback.js +27 -0
- package/dist/sdk/loanwritebackaccounts.d.ts +40 -0
- package/dist/sdk/loanwritebackaccounts.js +294 -0
- package/dist/sdk/loanwritebackbankaccounts.d.ts +39 -0
- package/dist/sdk/loanwritebackbankaccounts.js +293 -0
- package/dist/sdk/loanwritebackbanktransactions.d.ts +40 -0
- package/dist/sdk/loanwritebackbanktransactions.js +294 -0
- package/dist/sdk/loanwritebackcreateoperations.d.ts +22 -0
- package/dist/sdk/loanwritebackcreateoperations.js +250 -0
- package/dist/sdk/loanwritebackdirectcosts.d.ts +40 -0
- package/dist/sdk/loanwritebackdirectcosts.js +294 -0
- package/dist/sdk/loanwritebacksuppliers.d.ts +40 -0
- package/dist/sdk/loanwritebacksuppliers.js +294 -0
- package/dist/sdk/loanwritebacktransfers.d.ts +40 -0
- package/dist/sdk/loanwritebacktransfers.js +294 -0
- package/dist/sdk/models/operations/createaccount.d.ts +27 -0
- package/dist/sdk/models/operations/createaccount.js +115 -0
- package/dist/sdk/models/operations/createbankaccount.d.ts +27 -0
- package/dist/sdk/models/operations/createbankaccount.js +115 -0
- package/dist/sdk/models/operations/createbanktransactions.d.ts +31 -0
- package/dist/sdk/models/operations/createbanktransactions.js +119 -0
- package/dist/sdk/models/operations/createdirectcost.d.ts +27 -0
- package/dist/sdk/models/operations/createdirectcost.js +115 -0
- package/dist/sdk/models/operations/createsupplier.d.ts +27 -0
- package/dist/sdk/models/operations/createsupplier.js +115 -0
- package/dist/sdk/models/operations/createtransfer.d.ts +27 -0
- package/dist/sdk/models/operations/createtransfer.js +115 -0
- package/dist/sdk/models/operations/getcreatebanktransactionsmodel.d.ts +24 -0
- package/dist/sdk/models/operations/getcreatebanktransactionsmodel.js +103 -0
- package/dist/sdk/models/operations/getcreatechartofaccountsmodel.d.ts +20 -0
- package/dist/sdk/models/operations/getcreatechartofaccountsmodel.js +99 -0
- package/dist/sdk/models/operations/getcreatedirectcostsmodel.d.ts +20 -0
- package/dist/sdk/models/operations/getcreatedirectcostsmodel.js +99 -0
- package/dist/sdk/models/operations/getcreateoperation.d.ts +23 -0
- package/dist/sdk/models/operations/getcreateoperation.js +99 -0
- package/dist/sdk/models/operations/getcreatetransfersmodel.d.ts +20 -0
- package/dist/sdk/models/operations/getcreatetransfersmodel.js +99 -0
- package/dist/sdk/models/operations/getcreateupdatebankaccountsmodel.d.ts +20 -0
- package/dist/sdk/models/operations/getcreateupdatebankaccountsmodel.js +99 -0
- package/dist/sdk/models/operations/getcreateupdatesuppliersmodel.d.ts +20 -0
- package/dist/sdk/models/operations/getcreateupdatesuppliersmodel.js +99 -0
- package/dist/sdk/models/operations/index.d.ts +14 -0
- package/dist/sdk/models/operations/index.js +14 -0
- package/dist/sdk/models/operations/listcreateoperations.d.ts +35 -0
- package/dist/sdk/models/operations/listcreateoperations.js +111 -0
- package/dist/sdk/models/shared/accountcategoriesupdatedwebhook.d.ts +40 -0
- package/dist/sdk/models/shared/accountcategoriesupdatedwebhook.js +90 -0
- package/dist/sdk/models/shared/accountcategoriesupdatedwebhookdata.d.ts +7 -0
- package/dist/sdk/models/shared/accountcategoriesupdatedwebhookdata.js +45 -0
- package/dist/sdk/models/shared/{addressesitems.d.ts → accountingaddress.d.ts} +1 -1
- package/dist/sdk/models/shared/{addressesitems.js → accountingaddress.js} +13 -13
- package/dist/sdk/models/shared/accountingbillcreditnote.d.ts +2 -2
- package/dist/sdk/models/shared/accountingbillcreditnote.js +3 -3
- package/dist/sdk/models/shared/accountingcompanyinfo.d.ts +6 -66
- package/dist/sdk/models/shared/accountingcompanyinfo.js +10 -100
- package/dist/sdk/models/shared/accountingcreateaccountresponse.d.ts +124 -0
- package/dist/sdk/models/shared/accountingcreateaccountresponse.js +118 -0
- package/dist/sdk/models/shared/accountingcreatebankaccountresponse.d.ts +112 -0
- package/dist/sdk/models/shared/accountingcreatebankaccountresponse.js +118 -0
- package/dist/sdk/models/shared/accountingcreatebanktransactions.d.ts +6 -0
- package/dist/sdk/models/shared/accountingcreatebanktransactions.js +52 -0
- package/dist/sdk/models/shared/accountingcreatebanktransactionsresponse.d.ts +92 -0
- package/dist/sdk/models/shared/accountingcreatebanktransactionsresponse.js +118 -0
- package/dist/sdk/models/shared/accountingcreatedirectcostresponse.d.ts +111 -0
- package/dist/sdk/models/shared/accountingcreatedirectcostresponse.js +118 -0
- package/dist/sdk/models/shared/accountingcreatesupplierresponse.d.ts +101 -0
- package/dist/sdk/models/shared/accountingcreatesupplierresponse.js +118 -0
- package/dist/sdk/models/shared/accountingcreatetransferresponse.d.ts +99 -0
- package/dist/sdk/models/shared/accountingcreatetransferresponse.js +118 -0
- package/dist/sdk/models/shared/accountingcreditnote.d.ts +2 -2
- package/dist/sdk/models/shared/accountingcreditnote.js +3 -3
- package/dist/sdk/models/shared/accountingcustomer.d.ts +2 -2
- package/dist/sdk/models/shared/accountingcustomer.js +3 -3
- package/dist/sdk/models/shared/accountinginvoice.d.ts +2 -2
- package/dist/sdk/models/shared/accountinginvoice.js +3 -3
- package/dist/sdk/models/shared/accountingsupplier.d.ts +2 -2
- package/dist/sdk/models/shared/accountingsupplier.js +3 -3
- package/dist/sdk/models/shared/clientratelimitreachedwebhook.d.ts +32 -0
- package/dist/sdk/models/shared/clientratelimitreachedwebhook.js +80 -0
- package/dist/sdk/models/shared/clientratelimitreachedwebhookdata.d.ts +31 -0
- package/dist/sdk/models/shared/clientratelimitreachedwebhookdata.js +50 -0
- package/dist/sdk/models/shared/clientratelimitresetwebhook.d.ts +32 -0
- package/dist/sdk/models/shared/clientratelimitresetwebhook.js +80 -0
- package/dist/sdk/models/shared/clientratelimitresetwebhookdata.d.ts +39 -0
- package/dist/sdk/models/shared/clientratelimitresetwebhookdata.js +60 -0
- package/dist/sdk/models/shared/commercecompanyinfo.d.ts +4 -4
- package/dist/sdk/models/shared/commercecompanyinfo.js +6 -6
- package/dist/sdk/models/shared/contact.d.ts +4 -4
- package/dist/sdk/models/shared/contact.js +6 -6
- package/dist/sdk/models/shared/createbankaccounttransaction.d.ts +31 -0
- package/dist/sdk/models/shared/createbankaccounttransaction.js +65 -0
- package/dist/sdk/models/shared/index.d.ts +31 -3
- package/dist/sdk/models/shared/index.js +31 -3
- package/dist/sdk/models/shared/items.d.ts +2 -9
- package/dist/sdk/models/shared/items.js +5 -6
- package/dist/sdk/models/shared/phonenumber.d.ts +12 -0
- package/dist/sdk/models/shared/{withholdingtaxitems.js → phonenumber.js} +12 -11
- package/dist/sdk/models/shared/pushchangetype.d.ts +7 -0
- package/dist/sdk/models/shared/pushchangetype.js +14 -0
- package/dist/sdk/models/shared/pushfieldvalidation.d.ts +6 -0
- package/dist/sdk/models/shared/pushfieldvalidation.js +55 -0
- package/dist/sdk/models/shared/pushoperation.d.ts +90 -0
- package/dist/sdk/models/shared/pushoperation.js +111 -0
- package/dist/sdk/models/shared/pushoperationchange.d.ts +8 -0
- package/dist/sdk/models/shared/pushoperationchange.js +58 -0
- package/dist/sdk/models/shared/pushoperationref.d.ts +9 -0
- package/dist/sdk/models/shared/pushoperationref.js +51 -0
- package/dist/sdk/models/shared/pushoperations.d.ts +10 -0
- package/dist/sdk/models/shared/pushoperations.js +69 -0
- package/dist/sdk/models/shared/pushoperationstatus.d.ts +9 -0
- package/dist/sdk/models/shared/pushoperationstatus.js +16 -0
- package/dist/sdk/models/shared/pushoption.d.ts +14 -0
- package/dist/sdk/models/shared/pushoption.js +89 -0
- package/dist/sdk/models/shared/pushoptionchoice.d.ts +12 -0
- package/dist/sdk/models/shared/pushoptionchoice.js +66 -0
- package/dist/sdk/models/shared/pushoptionproperty.d.ts +13 -0
- package/dist/sdk/models/shared/pushoptionproperty.js +88 -0
- package/dist/sdk/models/shared/pushoptiontype.d.ts +10 -0
- package/dist/sdk/models/shared/pushoptiontype.js +17 -0
- package/dist/sdk/models/shared/pushvalidationinfo.d.ts +6 -0
- package/dist/sdk/models/shared/pushvalidationinfo.js +53 -0
- package/dist/sdk/models/shared/validation.d.ts +9 -0
- package/dist/sdk/models/shared/validation.js +56 -0
- package/dist/sdk/models/shared/validationitem.d.ts +6 -0
- package/dist/sdk/models/shared/validationitem.js +55 -0
- package/dist/sdk/models/shared/{weblinksitems.d.ts → weblink.d.ts} +3 -3
- package/dist/sdk/models/shared/{weblinksitems.js → weblink.js} +14 -14
- package/dist/sdk/models/webhooks/accountcategoriesupdated.d.ts +7 -0
- package/dist/sdk/models/webhooks/accountcategoriesupdated.js +51 -0
- package/dist/sdk/models/webhooks/clientratelimitreached.d.ts +7 -0
- package/dist/sdk/models/webhooks/clientratelimitreached.js +51 -0
- package/dist/sdk/models/webhooks/clientratelimitreset.d.ts +7 -0
- package/dist/sdk/models/webhooks/clientratelimitreset.js +51 -0
- package/dist/sdk/models/webhooks/index.d.ts +3 -0
- package/dist/sdk/models/webhooks/index.js +22 -0
- package/dist/sdk/sdk.d.ts +2 -0
- package/dist/sdk/sdk.js +4 -2
- package/docs/models/operations/createaccountrequest.md +13 -0
- package/docs/models/operations/createaccountresponse.md +12 -0
- package/docs/models/operations/createbankaccountrequest.md +13 -0
- package/docs/models/operations/createbankaccountresponse.md +12 -0
- package/docs/models/operations/createbanktransactionsrequest.md +14 -0
- package/docs/models/operations/createbanktransactionsresponse.md +12 -0
- package/docs/models/operations/createdirectcostrequest.md +13 -0
- package/docs/models/operations/createdirectcostresponse.md +12 -0
- package/docs/models/operations/createsupplierrequest.md +13 -0
- package/docs/models/operations/createsupplierresponse.md +12 -0
- package/docs/models/operations/createtransferrequest.md +13 -0
- package/docs/models/operations/createtransferresponse.md +12 -0
- package/docs/models/operations/getcreatebanktransactionsmodelrequest.md +10 -0
- package/docs/models/operations/getcreatebanktransactionsmodelresponse.md +12 -0
- package/docs/models/operations/getcreatechartofaccountsmodelrequest.md +9 -0
- package/docs/models/operations/getcreatechartofaccountsmodelresponse.md +12 -0
- package/docs/models/operations/getcreatedirectcostsmodelrequest.md +9 -0
- package/docs/models/operations/getcreatedirectcostsmodelresponse.md +12 -0
- package/docs/models/operations/getcreateoperationrequest.md +9 -0
- package/docs/models/operations/getcreateoperationresponse.md +12 -0
- package/docs/models/operations/getcreatetransfersmodelrequest.md +9 -0
- package/docs/models/operations/getcreatetransfersmodelresponse.md +12 -0
- package/docs/models/operations/getcreateupdatebankaccountsmodelrequest.md +9 -0
- package/docs/models/operations/getcreateupdatebankaccountsmodelresponse.md +12 -0
- package/docs/models/operations/getcreateupdatesuppliersmodelrequest.md +9 -0
- package/docs/models/operations/getcreateupdatesuppliersmodelresponse.md +12 -0
- package/docs/models/operations/listcreateoperationsrequest.md +12 -0
- package/docs/models/operations/listcreateoperationsresponse.md +12 -0
- package/docs/models/shared/accountcategoriesupdatedwebhook.md +18 -0
- package/docs/models/shared/accountcategoriesupdatedwebhookdata.md +8 -0
- package/docs/models/shared/{addressesitems.md → accountingaddress.md} +1 -1
- package/docs/models/shared/accountingbillcreditnote.md +1 -1
- package/docs/models/shared/accountingcompanyinfo.md +3 -3
- package/docs/models/shared/accountingcreateaccountresponse.md +21 -0
- package/docs/models/shared/accountingcreatebankaccountresponse.md +21 -0
- package/docs/models/shared/accountingcreatebanktransactions.md +9 -0
- package/docs/models/shared/accountingcreatebanktransactionsresponse.md +21 -0
- package/docs/models/shared/accountingcreatedirectcostresponse.md +21 -0
- package/docs/models/shared/accountingcreatesupplierresponse.md +21 -0
- package/docs/models/shared/accountingcreatetransferresponse.md +21 -0
- package/docs/models/shared/accountingcreditnote.md +1 -1
- package/docs/models/shared/accountingcustomer.md +1 -1
- package/docs/models/shared/accountinginvoice.md +1 -1
- package/docs/models/shared/accountingsupplier.md +1 -1
- package/docs/models/shared/clientratelimitreachedwebhook.md +16 -0
- package/docs/models/shared/clientratelimitreachedwebhookdata.md +9 -0
- package/docs/models/shared/clientratelimitresetwebhook.md +16 -0
- package/docs/models/shared/clientratelimitresetwebhookdata.md +11 -0
- package/docs/models/shared/commercecompanyinfo.md +2 -2
- package/docs/models/shared/contact.md +2 -2
- package/docs/models/shared/createbankaccounttransaction.md +12 -0
- package/docs/models/shared/items.md +4 -4
- package/docs/models/shared/{accountingcompanyinfophone.md → phonenumber.md} +1 -1
- package/docs/models/shared/pushchangetype.md +12 -0
- package/docs/models/shared/pushfieldvalidation.md +10 -0
- package/docs/models/shared/pushoperation.md +20 -0
- package/docs/models/shared/pushoperationchange.md +10 -0
- package/docs/models/shared/pushoperationref.md +9 -0
- package/docs/models/shared/pushoperations.md +12 -0
- package/docs/models/shared/pushoperationstatus.md +13 -0
- package/docs/models/shared/pushoption.md +14 -0
- package/docs/models/shared/pushoptionchoice.md +12 -0
- package/docs/models/shared/pushoptionproperty.md +14 -0
- package/docs/models/shared/pushoptiontype.md +15 -0
- package/docs/models/shared/pushvalidationinfo.md +9 -0
- package/docs/models/shared/validation.md +11 -0
- package/docs/models/shared/validationitem.md +10 -0
- package/docs/models/shared/weblink.md +11 -0
- package/docs/models/shared/{itemstype.md → weblinktype.md} +1 -1
- package/docs/models/webhooks/accountcategoriesupdatedresponse.md +10 -0
- package/docs/models/webhooks/clientratelimitreachedresponse.md +10 -0
- package/docs/models/webhooks/clientratelimitresetresponse.md +10 -0
- package/docs/sdks/accountingbankdata/README.md +1 -1
- package/docs/sdks/accountingbankdataaccounts/README.md +3 -3
- package/docs/sdks/accountspayable/README.md +1 -1
- package/docs/sdks/accountspayablebillcreditnotes/README.md +3 -3
- package/docs/sdks/accountspayablebillpayments/README.md +3 -3
- package/docs/sdks/accountspayablebills/README.md +6 -6
- package/docs/sdks/accountspayablesuppliers/README.md +6 -6
- package/docs/sdks/accountsreceivable/README.md +1 -1
- package/docs/sdks/accountsreceivablecreditnotes/README.md +3 -3
- package/docs/sdks/accountsreceivablecustomers/README.md +6 -6
- package/docs/sdks/accountsreceivabledirectincomes/README.md +6 -6
- package/docs/sdks/accountsreceivableinvoices/README.md +8 -8
- package/docs/sdks/accountsreceivablepayments/README.md +3 -3
- package/docs/sdks/accountsreceivablereports/README.md +5 -5
- package/docs/sdks/banking/README.md +1 -1
- package/docs/sdks/bankingaccountbalances/README.md +2 -2
- package/docs/sdks/bankingcategorizedstatement/README.md +2 -2
- package/docs/sdks/bankingtransactioncategories/README.md +3 -3
- package/docs/sdks/companies/README.md +1 -1
- package/docs/sdks/companyinfo/README.md +1 -1
- package/docs/sdks/connections/README.md +1 -1
- package/docs/sdks/dataintegrity/README.md +1 -1
- package/docs/sdks/excelreports/README.md +1 -1
- package/docs/sdks/fileupload/README.md +1 -1
- package/docs/sdks/financialstatements/README.md +1 -1
- package/docs/sdks/financialstatementsaccounts/README.md +3 -3
- package/docs/sdks/financialstatementsbalancesheet/README.md +3 -3
- package/docs/sdks/financialstatementscashflow/README.md +2 -2
- package/docs/sdks/financialstatementsprofitandloss/README.md +3 -3
- package/docs/sdks/liabilities/README.md +1 -1
- package/docs/sdks/loanwriteback/README.md +4 -0
- package/docs/sdks/loanwritebackaccounts/README.md +134 -0
- package/docs/sdks/loanwritebackbankaccounts/README.md +126 -0
- package/docs/sdks/loanwritebackbanktransactions/README.md +121 -0
- package/docs/sdks/loanwritebackcreateoperations/README.md +89 -0
- package/docs/sdks/loanwritebackdirectcosts/README.md +200 -0
- package/docs/sdks/loanwritebacksuppliers/README.md +142 -0
- package/docs/sdks/loanwritebacktransfers/README.md +156 -0
- package/docs/sdks/managedata/README.md +1 -1
- package/docs/sdks/managedatapulloperations/README.md +4 -4
- package/docs/sdks/managedatarefresh/README.md +4 -4
- package/docs/sdks/sales/README.md +1 -1
- package/docs/sdks/salescustomers/README.md +2 -2
- package/docs/sdks/salesdisputes/README.md +2 -2
- package/docs/sdks/saleslocations/README.md +1 -1
- package/docs/sdks/salesmetrics/README.md +9 -9
- package/docs/sdks/salesorders/README.md +2 -2
- package/docs/sdks/salespaymentmethods/README.md +5 -5
- package/docs/sdks/salespayments/README.md +2 -2
- package/docs/sdks/salesproductcategories/README.md +5 -5
- package/docs/sdks/salesproducts/README.md +2 -2
- package/docs/sdks/salesreports/README.md +5 -5
- package/docs/sdks/salestransactions/README.md +2 -2
- package/docs/sdks/transactions/README.md +1 -1
- package/docs/sdks/transactionsaccounttransactions/README.md +5 -5
- package/docs/sdks/transactionsdirectcosts/README.md +11 -11
- package/docs/sdks/transactionsjournalentries/README.md +5 -5
- package/docs/sdks/transactionsjournals/README.md +2 -2
- package/docs/sdks/transactionstransfers/README.md +2 -2
- package/package.json +1 -1
- package/dist/sdk/models/shared/withholdingtaxitems.d.ts +0 -5
- package/docs/models/shared/accountingcompanyinfoaccountingaddress.md +0 -14
- package/docs/models/shared/accountingcompanyinfoweblink.md +0 -11
- package/docs/models/shared/accountingcompanyinfoweblinktype.md +0 -12
- package/docs/models/shared/weblinksitems.md +0 -11
- package/docs/models/shared/withholdingtaxitems.md +0 -9
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
# LoanWriteback.BankAccounts
|
|
2
|
+
|
|
3
|
+
### Available Operations
|
|
4
|
+
|
|
5
|
+
* [create](#create) - Create bank account
|
|
6
|
+
* [getCreateUpdateModel](#getcreateupdatemodel) - Get create/update bank account model
|
|
7
|
+
|
|
8
|
+
## create
|
|
9
|
+
|
|
10
|
+
The *Create bank account* endpoint creates a new [bank account](https://docs.codat.io/accounting-api#/schemas/BankAccount) for a given company's connection.
|
|
11
|
+
|
|
12
|
+
[Bank accounts](https://docs.codat.io/accounting-api#/schemas/BankAccount) are financial accounts maintained by a bank or other financial institution.
|
|
13
|
+
|
|
14
|
+
**Integration-specific behaviour**
|
|
15
|
+
|
|
16
|
+
Required data may vary by integration. To see what data to post, first call [Get create/update bank account model](https://docs.codat.io/accounting-api#/operations/get-create-update-bankAccounts-model).
|
|
17
|
+
|
|
18
|
+
Check out our [coverage explorer](https://knowledge.codat.io/supported-features/accounting?view=tab-by-data-type&dataType=bankAccounts) for integrations that support creating an account.
|
|
19
|
+
|
|
20
|
+
### Example Usage
|
|
21
|
+
|
|
22
|
+
```typescript
|
|
23
|
+
import { CodatLending } from "@codat/lending";
|
|
24
|
+
import { CreateBankAccountResponse } from "@codat/lending/dist/sdk/models/operations";
|
|
25
|
+
import { AccountingBankAccountType } from "@codat/lending/dist/sdk/models/shared";
|
|
26
|
+
|
|
27
|
+
const sdk = new CodatLending({
|
|
28
|
+
security: {
|
|
29
|
+
authHeader: "Basic BASE_64_ENCODED(API_KEY)",
|
|
30
|
+
},
|
|
31
|
+
});
|
|
32
|
+
|
|
33
|
+
sdk.loanWriteback.bankAccounts.create({
|
|
34
|
+
accountingBankAccount: {
|
|
35
|
+
accountName: "saepe",
|
|
36
|
+
accountNumber: "fuga",
|
|
37
|
+
accountType: AccountingBankAccountType.Credit,
|
|
38
|
+
availableBalance: 3595.08,
|
|
39
|
+
balance: 6130.64,
|
|
40
|
+
currency: "USD",
|
|
41
|
+
iBan: "saepe",
|
|
42
|
+
id: "b10faaa2-352c-4595-9907-aff1a3a2fa94",
|
|
43
|
+
institution: "commodi",
|
|
44
|
+
metadata: {
|
|
45
|
+
isDeleted: false,
|
|
46
|
+
},
|
|
47
|
+
modifiedDate: "2022-10-23T00:00:00.000Z",
|
|
48
|
+
nominalCode: "molestiae",
|
|
49
|
+
overdraftLimit: 2444.25,
|
|
50
|
+
sortCode: "error",
|
|
51
|
+
sourceModifiedDate: "2022-10-23T00:00:00.000Z",
|
|
52
|
+
},
|
|
53
|
+
allowSyncOnPushComplete: false,
|
|
54
|
+
companyId: "8a210b68-6988-11ed-a1eb-0242ac120002",
|
|
55
|
+
connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171",
|
|
56
|
+
forceUpdate: false,
|
|
57
|
+
timeoutInMinutes: 338007,
|
|
58
|
+
}).then((res: CreateBankAccountResponse) => {
|
|
59
|
+
if (res.statusCode == 200) {
|
|
60
|
+
// handle response
|
|
61
|
+
}
|
|
62
|
+
});
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
### Parameters
|
|
66
|
+
|
|
67
|
+
| Parameter | Type | Required | Description |
|
|
68
|
+
| ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ |
|
|
69
|
+
| `request` | [operations.CreateBankAccountRequest](../../models/operations/createbankaccountrequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
|
70
|
+
| `retries` | [utils.RetryConfig](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. |
|
|
71
|
+
| `config` | [AxiosRequestConfig](https://axios-http.com/docs/req_config) | :heavy_minus_sign: | Available config options for making requests. |
|
|
72
|
+
|
|
73
|
+
|
|
74
|
+
### Response
|
|
75
|
+
|
|
76
|
+
**Promise<[operations.CreateBankAccountResponse](../../models/operations/createbankaccountresponse.md)>**
|
|
77
|
+
|
|
78
|
+
|
|
79
|
+
## getCreateUpdateModel
|
|
80
|
+
|
|
81
|
+
The *Get create/update bank account model* endpoint returns the expected data for the request payload when creating and updating a [bank account](https://docs.codat.io/accounting-api#/schemas/BankAccount) for a given company and integration.
|
|
82
|
+
|
|
83
|
+
[Bank accounts](https://docs.codat.io/accounting-api#/schemas/BankAccount) are financial accounts maintained by a bank or other financial institution.
|
|
84
|
+
|
|
85
|
+
**Integration-specific behaviour**
|
|
86
|
+
|
|
87
|
+
See the *response examples* for integration-specific indicative models.
|
|
88
|
+
|
|
89
|
+
Check out our [coverage explorer](https://knowledge.codat.io/supported-features/accounting?view=tab-by-data-type&dataType=bankAccounts) for integrations that support creating and updating a bank account.
|
|
90
|
+
|
|
91
|
+
|
|
92
|
+
### Example Usage
|
|
93
|
+
|
|
94
|
+
```typescript
|
|
95
|
+
import { CodatLending } from "@codat/lending";
|
|
96
|
+
import { GetCreateUpdateBankAccountsModelResponse } from "@codat/lending/dist/sdk/models/operations";
|
|
97
|
+
|
|
98
|
+
const sdk = new CodatLending({
|
|
99
|
+
security: {
|
|
100
|
+
authHeader: "Basic BASE_64_ENCODED(API_KEY)",
|
|
101
|
+
},
|
|
102
|
+
});
|
|
103
|
+
|
|
104
|
+
sdk.loanWriteback.bankAccounts.getCreateUpdateModel({
|
|
105
|
+
companyId: "8a210b68-6988-11ed-a1eb-0242ac120002",
|
|
106
|
+
connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171",
|
|
107
|
+
}).then((res: GetCreateUpdateBankAccountsModelResponse) => {
|
|
108
|
+
if (res.statusCode == 200) {
|
|
109
|
+
// handle response
|
|
110
|
+
}
|
|
111
|
+
});
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
### Parameters
|
|
115
|
+
|
|
116
|
+
| Parameter | Type | Required | Description |
|
|
117
|
+
| ------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------ |
|
|
118
|
+
| `request` | [operations.GetCreateUpdateBankAccountsModelRequest](../../models/operations/getcreateupdatebankaccountsmodelrequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
|
119
|
+
| `retries` | [utils.RetryConfig](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. |
|
|
120
|
+
| `config` | [AxiosRequestConfig](https://axios-http.com/docs/req_config) | :heavy_minus_sign: | Available config options for making requests. |
|
|
121
|
+
|
|
122
|
+
|
|
123
|
+
### Response
|
|
124
|
+
|
|
125
|
+
**Promise<[operations.GetCreateUpdateBankAccountsModelResponse](../../models/operations/getcreateupdatebankaccountsmodelresponse.md)>**
|
|
126
|
+
|
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
# LoanWriteback.BankTransactions
|
|
2
|
+
|
|
3
|
+
### Available Operations
|
|
4
|
+
|
|
5
|
+
* [create](#create) - Create bank account transactions
|
|
6
|
+
* [getCreateModel](#getcreatemodel) - Get create bank account transactions model
|
|
7
|
+
|
|
8
|
+
## create
|
|
9
|
+
|
|
10
|
+
The *Create bank account transactions* endpoint creates new [bank account transactions](https://docs.codat.io/accounting-api#/schemas/BankTransactions) for a given company's connection.
|
|
11
|
+
|
|
12
|
+
[Bank account transactions](https://docs.codat.io/accounting-api#/schemas/BankTransactions) are records of money that has moved in and out of an SMB's bank account.
|
|
13
|
+
|
|
14
|
+
**Integration-specific behaviour**
|
|
15
|
+
|
|
16
|
+
Required data may vary by integration. To see what data to post, first call [Get create bank transaction model](https://docs.codat.io/accounting-api#/operations/get-create-bankTransactions-model).
|
|
17
|
+
|
|
18
|
+
Check out our [coverage explorer](https://knowledge.codat.io/supported-features/accounting?view=tab-by-data-type&dataType=bankTransactions) for integrations that support creating a bank account transactions.
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
### Example Usage
|
|
22
|
+
|
|
23
|
+
```typescript
|
|
24
|
+
import { CodatLending } from "@codat/lending";
|
|
25
|
+
import { CreateBankTransactionsResponse } from "@codat/lending/dist/sdk/models/operations";
|
|
26
|
+
|
|
27
|
+
const sdk = new CodatLending({
|
|
28
|
+
security: {
|
|
29
|
+
authHeader: "Basic BASE_64_ENCODED(API_KEY)",
|
|
30
|
+
},
|
|
31
|
+
});
|
|
32
|
+
|
|
33
|
+
sdk.loanWriteback.bankTransactions.create({
|
|
34
|
+
accountingCreateBankTransactions: {
|
|
35
|
+
accountId: "vitae",
|
|
36
|
+
transactions: [
|
|
37
|
+
{
|
|
38
|
+
amount: 6747.52,
|
|
39
|
+
balance: 6563.3,
|
|
40
|
+
date: "2022-10-23T00:00:00.000Z",
|
|
41
|
+
description: "odit",
|
|
42
|
+
id: "c3f5ad01-9da1-4ffe-b8f0-97b0074f1547",
|
|
43
|
+
},
|
|
44
|
+
],
|
|
45
|
+
},
|
|
46
|
+
accountId: "dicta",
|
|
47
|
+
allowSyncOnPushComplete: false,
|
|
48
|
+
companyId: "8a210b68-6988-11ed-a1eb-0242ac120002",
|
|
49
|
+
connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171",
|
|
50
|
+
forceUpdate: false,
|
|
51
|
+
timeoutInMinutes: 688661,
|
|
52
|
+
}).then((res: CreateBankTransactionsResponse) => {
|
|
53
|
+
if (res.statusCode == 200) {
|
|
54
|
+
// handle response
|
|
55
|
+
}
|
|
56
|
+
});
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
### Parameters
|
|
60
|
+
|
|
61
|
+
| Parameter | Type | Required | Description |
|
|
62
|
+
| ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- |
|
|
63
|
+
| `request` | [operations.CreateBankTransactionsRequest](../../models/operations/createbanktransactionsrequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
|
64
|
+
| `retries` | [utils.RetryConfig](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. |
|
|
65
|
+
| `config` | [AxiosRequestConfig](https://axios-http.com/docs/req_config) | :heavy_minus_sign: | Available config options for making requests. |
|
|
66
|
+
|
|
67
|
+
|
|
68
|
+
### Response
|
|
69
|
+
|
|
70
|
+
**Promise<[operations.CreateBankTransactionsResponse](../../models/operations/createbanktransactionsresponse.md)>**
|
|
71
|
+
|
|
72
|
+
|
|
73
|
+
## getCreateModel
|
|
74
|
+
|
|
75
|
+
The *Get create bank account transactions model* endpoint returns the expected data for the request payload when creating [bank account transactions](https://docs.codat.io/accounting-api#/schemas/BankTransactions) for a given company and integration.
|
|
76
|
+
|
|
77
|
+
[Bank account transactions](https://docs.codat.io/accounting-api#/schemas/BankTransactions) are records of money that has moved in and out of an SMB's bank account.
|
|
78
|
+
|
|
79
|
+
**Integration-specific behaviour**
|
|
80
|
+
|
|
81
|
+
See the *response examples* for integration-specific indicative models.
|
|
82
|
+
|
|
83
|
+
Check out our [coverage explorer](https://knowledge.codat.io/supported-features/accounting?view=tab-by-data-type&dataType=bankTransactions) for integrations that support creating an bank transaction.
|
|
84
|
+
|
|
85
|
+
|
|
86
|
+
### Example Usage
|
|
87
|
+
|
|
88
|
+
```typescript
|
|
89
|
+
import { CodatLending } from "@codat/lending";
|
|
90
|
+
import { GetCreateBankTransactionsModelResponse } from "@codat/lending/dist/sdk/models/operations";
|
|
91
|
+
|
|
92
|
+
const sdk = new CodatLending({
|
|
93
|
+
security: {
|
|
94
|
+
authHeader: "Basic BASE_64_ENCODED(API_KEY)",
|
|
95
|
+
},
|
|
96
|
+
});
|
|
97
|
+
|
|
98
|
+
sdk.loanWriteback.bankTransactions.getCreateModel({
|
|
99
|
+
accountId: "enim",
|
|
100
|
+
companyId: "8a210b68-6988-11ed-a1eb-0242ac120002",
|
|
101
|
+
connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171",
|
|
102
|
+
}).then((res: GetCreateBankTransactionsModelResponse) => {
|
|
103
|
+
if (res.statusCode == 200) {
|
|
104
|
+
// handle response
|
|
105
|
+
}
|
|
106
|
+
});
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
### Parameters
|
|
110
|
+
|
|
111
|
+
| Parameter | Type | Required | Description |
|
|
112
|
+
| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- |
|
|
113
|
+
| `request` | [operations.GetCreateBankTransactionsModelRequest](../../models/operations/getcreatebanktransactionsmodelrequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
|
114
|
+
| `retries` | [utils.RetryConfig](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. |
|
|
115
|
+
| `config` | [AxiosRequestConfig](https://axios-http.com/docs/req_config) | :heavy_minus_sign: | Available config options for making requests. |
|
|
116
|
+
|
|
117
|
+
|
|
118
|
+
### Response
|
|
119
|
+
|
|
120
|
+
**Promise<[operations.GetCreateBankTransactionsModelResponse](../../models/operations/getcreatebanktransactionsmodelresponse.md)>**
|
|
121
|
+
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
# LoanWriteback.CreateOperations
|
|
2
|
+
|
|
3
|
+
### Available Operations
|
|
4
|
+
|
|
5
|
+
* [get](#get) - Get create operation
|
|
6
|
+
* [list](#list) - List create operations
|
|
7
|
+
|
|
8
|
+
## get
|
|
9
|
+
|
|
10
|
+
Retrieve create operation.
|
|
11
|
+
|
|
12
|
+
### Example Usage
|
|
13
|
+
|
|
14
|
+
```typescript
|
|
15
|
+
import { CodatLending } from "@codat/lending";
|
|
16
|
+
import { GetCreateOperationResponse } from "@codat/lending/dist/sdk/models/operations";
|
|
17
|
+
|
|
18
|
+
const sdk = new CodatLending({
|
|
19
|
+
security: {
|
|
20
|
+
authHeader: "Basic BASE_64_ENCODED(API_KEY)",
|
|
21
|
+
},
|
|
22
|
+
});
|
|
23
|
+
|
|
24
|
+
sdk.loanWriteback.createOperations.get({
|
|
25
|
+
companyId: "8a210b68-6988-11ed-a1eb-0242ac120002",
|
|
26
|
+
pushOperationKey: "e6e13b99-d488-4e1e-91e4-50ad2abd4426",
|
|
27
|
+
}).then((res: GetCreateOperationResponse) => {
|
|
28
|
+
if (res.statusCode == 200) {
|
|
29
|
+
// handle response
|
|
30
|
+
}
|
|
31
|
+
});
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
### Parameters
|
|
35
|
+
|
|
36
|
+
| Parameter | Type | Required | Description |
|
|
37
|
+
| -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- |
|
|
38
|
+
| `request` | [operations.GetCreateOperationRequest](../../models/operations/getcreateoperationrequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
|
39
|
+
| `retries` | [utils.RetryConfig](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. |
|
|
40
|
+
| `config` | [AxiosRequestConfig](https://axios-http.com/docs/req_config) | :heavy_minus_sign: | Available config options for making requests. |
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
### Response
|
|
44
|
+
|
|
45
|
+
**Promise<[operations.GetCreateOperationResponse](../../models/operations/getcreateoperationresponse.md)>**
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
## list
|
|
49
|
+
|
|
50
|
+
List create operations.
|
|
51
|
+
|
|
52
|
+
### Example Usage
|
|
53
|
+
|
|
54
|
+
```typescript
|
|
55
|
+
import { CodatLending } from "@codat/lending";
|
|
56
|
+
import { ListCreateOperationsResponse } from "@codat/lending/dist/sdk/models/operations";
|
|
57
|
+
|
|
58
|
+
const sdk = new CodatLending({
|
|
59
|
+
security: {
|
|
60
|
+
authHeader: "Basic BASE_64_ENCODED(API_KEY)",
|
|
61
|
+
},
|
|
62
|
+
});
|
|
63
|
+
|
|
64
|
+
sdk.loanWriteback.createOperations.list({
|
|
65
|
+
companyId: "8a210b68-6988-11ed-a1eb-0242ac120002",
|
|
66
|
+
orderBy: "-modifiedDate",
|
|
67
|
+
page: 1,
|
|
68
|
+
pageSize: 100,
|
|
69
|
+
query: "cupiditate",
|
|
70
|
+
}).then((res: ListCreateOperationsResponse) => {
|
|
71
|
+
if (res.statusCode == 200) {
|
|
72
|
+
// handle response
|
|
73
|
+
}
|
|
74
|
+
});
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
### Parameters
|
|
78
|
+
|
|
79
|
+
| Parameter | Type | Required | Description |
|
|
80
|
+
| ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ |
|
|
81
|
+
| `request` | [operations.ListCreateOperationsRequest](../../models/operations/listcreateoperationsrequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
|
82
|
+
| `retries` | [utils.RetryConfig](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. |
|
|
83
|
+
| `config` | [AxiosRequestConfig](https://axios-http.com/docs/req_config) | :heavy_minus_sign: | Available config options for making requests. |
|
|
84
|
+
|
|
85
|
+
|
|
86
|
+
### Response
|
|
87
|
+
|
|
88
|
+
**Promise<[operations.ListCreateOperationsResponse](../../models/operations/listcreateoperationsresponse.md)>**
|
|
89
|
+
|
|
@@ -0,0 +1,200 @@
|
|
|
1
|
+
# LoanWriteback.DirectCosts
|
|
2
|
+
|
|
3
|
+
### Available Operations
|
|
4
|
+
|
|
5
|
+
* [create](#create) - Create direct cost
|
|
6
|
+
* [getCreateModel](#getcreatemodel) - Get create direct cost model
|
|
7
|
+
|
|
8
|
+
## create
|
|
9
|
+
|
|
10
|
+
The *Create direct cost* endpoint creates a new [direct cost](https://docs.codat.io/accounting-api#/schemas/DirectCost) for a given company's connection.
|
|
11
|
+
|
|
12
|
+
[Direct costs](https://docs.codat.io/accounting-api#/schemas/DirectCost) are the expenses associated with a business' operations. For example, purchases of raw materials that are paid off at the point of the purchase and service fees are considered direct costs.
|
|
13
|
+
|
|
14
|
+
**Integration-specific behaviour**
|
|
15
|
+
|
|
16
|
+
Required data may vary by integration. To see what data to post, first call [Get create direct cost model](https://docs.codat.io/accounting-api#/operations/get-create-directCosts-model).
|
|
17
|
+
|
|
18
|
+
Check out our [coverage explorer](https://knowledge.codat.io/supported-features/accounting?view=tab-by-data-type&dataType=directCosts) for integrations that support creating an account.
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
### Example Usage
|
|
22
|
+
|
|
23
|
+
```typescript
|
|
24
|
+
import { CodatLending } from "@codat/lending";
|
|
25
|
+
import { CreateDirectCostResponse } from "@codat/lending/dist/sdk/models/operations";
|
|
26
|
+
|
|
27
|
+
const sdk = new CodatLending({
|
|
28
|
+
security: {
|
|
29
|
+
authHeader: "Basic BASE_64_ENCODED(API_KEY)",
|
|
30
|
+
},
|
|
31
|
+
});
|
|
32
|
+
|
|
33
|
+
sdk.loanWriteback.directCosts.create({
|
|
34
|
+
accountingDirectCost: {
|
|
35
|
+
contactRef: {
|
|
36
|
+
dataType: "quos",
|
|
37
|
+
id: "02d502a9-4bb4-4f63-8969-e9a3efa77dfb",
|
|
38
|
+
},
|
|
39
|
+
currency: "GBP",
|
|
40
|
+
currencyRate: 2974.37,
|
|
41
|
+
id: "cd66ae39-5efb-49ba-88f3-a66997074ba4",
|
|
42
|
+
issueDate: "2022-10-23T00:00:00.000Z",
|
|
43
|
+
lineItems: [
|
|
44
|
+
{
|
|
45
|
+
accountRef: {
|
|
46
|
+
id: "69b6e214-1959-4890-afa5-63e2516fe4c8",
|
|
47
|
+
name: "Dr. Arnold Bradtke",
|
|
48
|
+
},
|
|
49
|
+
description: "expedita",
|
|
50
|
+
discountAmount: 4692.49,
|
|
51
|
+
discountPercentage: 9988.48,
|
|
52
|
+
itemRef: {
|
|
53
|
+
id: "d2ed0289-21cd-4dc6-9260-1fb576b0d5f0",
|
|
54
|
+
name: "Vincent Anderson",
|
|
55
|
+
},
|
|
56
|
+
quantity: 9441.24,
|
|
57
|
+
subTotal: 7299.91,
|
|
58
|
+
taxAmount: 7499.99,
|
|
59
|
+
taxRateRef: {
|
|
60
|
+
effectiveTaxRate: 1716.29,
|
|
61
|
+
id: "58705320-2c73-4d5f-a9b9-0c28909b3fe4",
|
|
62
|
+
name: "Omar Leuschke",
|
|
63
|
+
},
|
|
64
|
+
totalAmount: 7508.44,
|
|
65
|
+
tracking: {
|
|
66
|
+
invoiceTo: {
|
|
67
|
+
dataType: "accountTransaction",
|
|
68
|
+
id: "f4863332-3f9b-477f-ba41-00674ebf6928",
|
|
69
|
+
},
|
|
70
|
+
recordRefs: [
|
|
71
|
+
{
|
|
72
|
+
dataType: "journalEntry",
|
|
73
|
+
id: "d1ba77a8-9ebf-4737-ae42-03ce5e6a95d8",
|
|
74
|
+
},
|
|
75
|
+
],
|
|
76
|
+
},
|
|
77
|
+
trackingCategoryRefs: [
|
|
78
|
+
{
|
|
79
|
+
id: "a0d446ce-2af7-4a73-8f3b-e453f870b326",
|
|
80
|
+
name: "Glen Oberbrunner",
|
|
81
|
+
},
|
|
82
|
+
],
|
|
83
|
+
unitAmount: 2776.28,
|
|
84
|
+
},
|
|
85
|
+
],
|
|
86
|
+
metadata: {
|
|
87
|
+
isDeleted: false,
|
|
88
|
+
},
|
|
89
|
+
modifiedDate: "2022-10-23T00:00:00.000Z",
|
|
90
|
+
note: "cupiditate",
|
|
91
|
+
paymentAllocations: [
|
|
92
|
+
{
|
|
93
|
+
allocation: {
|
|
94
|
+
allocatedOnDate: "2022-10-23T00:00:00.000Z",
|
|
95
|
+
currency: "EUR",
|
|
96
|
+
currencyRate: 7470.8,
|
|
97
|
+
totalAmount: 1175.31,
|
|
98
|
+
},
|
|
99
|
+
payment: {
|
|
100
|
+
accountRef: {
|
|
101
|
+
id: "a8422bb6-79d2-4322-b15b-f0cbb1e31b8b",
|
|
102
|
+
name: "Kevin Willms",
|
|
103
|
+
},
|
|
104
|
+
currency: "GBP",
|
|
105
|
+
currencyRate: 2408.29,
|
|
106
|
+
id: "a1108e0a-dcf4-4b92-9879-fce953f73ef7",
|
|
107
|
+
note: "hic",
|
|
108
|
+
paidOnDate: "2022-10-23T00:00:00.000Z",
|
|
109
|
+
reference: "quod",
|
|
110
|
+
totalAmount: 4861.6,
|
|
111
|
+
},
|
|
112
|
+
},
|
|
113
|
+
],
|
|
114
|
+
reference: "similique",
|
|
115
|
+
sourceModifiedDate: "2022-10-23T00:00:00.000Z",
|
|
116
|
+
subTotal: 8742.88,
|
|
117
|
+
supplementalData: {
|
|
118
|
+
content: {
|
|
119
|
+
"ducimus": {
|
|
120
|
+
"dolore": "quibusdam",
|
|
121
|
+
},
|
|
122
|
+
},
|
|
123
|
+
},
|
|
124
|
+
taxAmount: 8489.44,
|
|
125
|
+
totalAmount: 1943.42,
|
|
126
|
+
},
|
|
127
|
+
allowSyncOnPushComplete: false,
|
|
128
|
+
companyId: "8a210b68-6988-11ed-a1eb-0242ac120002",
|
|
129
|
+
connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171",
|
|
130
|
+
forceUpdate: false,
|
|
131
|
+
timeoutInMinutes: 617877,
|
|
132
|
+
}).then((res: CreateDirectCostResponse) => {
|
|
133
|
+
if (res.statusCode == 200) {
|
|
134
|
+
// handle response
|
|
135
|
+
}
|
|
136
|
+
});
|
|
137
|
+
```
|
|
138
|
+
|
|
139
|
+
### Parameters
|
|
140
|
+
|
|
141
|
+
| Parameter | Type | Required | Description |
|
|
142
|
+
| ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- |
|
|
143
|
+
| `request` | [operations.CreateDirectCostRequest](../../models/operations/createdirectcostrequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
|
144
|
+
| `retries` | [utils.RetryConfig](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. |
|
|
145
|
+
| `config` | [AxiosRequestConfig](https://axios-http.com/docs/req_config) | :heavy_minus_sign: | Available config options for making requests. |
|
|
146
|
+
|
|
147
|
+
|
|
148
|
+
### Response
|
|
149
|
+
|
|
150
|
+
**Promise<[operations.CreateDirectCostResponse](../../models/operations/createdirectcostresponse.md)>**
|
|
151
|
+
|
|
152
|
+
|
|
153
|
+
## getCreateModel
|
|
154
|
+
|
|
155
|
+
The *Get create direct cost model* endpoint returns the expected data for the request payload when creating a [direct cost](https://docs.codat.io/accounting-api#/schemas/DirectCost) for a given company and integration.
|
|
156
|
+
|
|
157
|
+
[Direct costs](https://docs.codat.io/accounting-api#/schemas/DirectCost) are purchases of items that are paid off at the point of the purchase.
|
|
158
|
+
|
|
159
|
+
**Integration-specific behaviour**
|
|
160
|
+
|
|
161
|
+
See the *response examples* for integration-specific indicative models.
|
|
162
|
+
|
|
163
|
+
Check out our [coverage explorer](https://knowledge.codat.io/supported-features/accounting?view=tab-by-data-type&dataType=directCosts) for integrations that support creating a direct cost.
|
|
164
|
+
|
|
165
|
+
|
|
166
|
+
### Example Usage
|
|
167
|
+
|
|
168
|
+
```typescript
|
|
169
|
+
import { CodatLending } from "@codat/lending";
|
|
170
|
+
import { GetCreateDirectCostsModelResponse } from "@codat/lending/dist/sdk/models/operations";
|
|
171
|
+
|
|
172
|
+
const sdk = new CodatLending({
|
|
173
|
+
security: {
|
|
174
|
+
authHeader: "Basic BASE_64_ENCODED(API_KEY)",
|
|
175
|
+
},
|
|
176
|
+
});
|
|
177
|
+
|
|
178
|
+
sdk.loanWriteback.directCosts.getCreateModel({
|
|
179
|
+
companyId: "8a210b68-6988-11ed-a1eb-0242ac120002",
|
|
180
|
+
connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171",
|
|
181
|
+
}).then((res: GetCreateDirectCostsModelResponse) => {
|
|
182
|
+
if (res.statusCode == 200) {
|
|
183
|
+
// handle response
|
|
184
|
+
}
|
|
185
|
+
});
|
|
186
|
+
```
|
|
187
|
+
|
|
188
|
+
### Parameters
|
|
189
|
+
|
|
190
|
+
| Parameter | Type | Required | Description |
|
|
191
|
+
| ---------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- |
|
|
192
|
+
| `request` | [operations.GetCreateDirectCostsModelRequest](../../models/operations/getcreatedirectcostsmodelrequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
|
193
|
+
| `retries` | [utils.RetryConfig](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. |
|
|
194
|
+
| `config` | [AxiosRequestConfig](https://axios-http.com/docs/req_config) | :heavy_minus_sign: | Available config options for making requests. |
|
|
195
|
+
|
|
196
|
+
|
|
197
|
+
### Response
|
|
198
|
+
|
|
199
|
+
**Promise<[operations.GetCreateDirectCostsModelResponse](../../models/operations/getcreatedirectcostsmodelresponse.md)>**
|
|
200
|
+
|