@codat/lending 1.2.0 → 3.1.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 +57 -59
- package/dist/sdk/accountspayable.d.ts +0 -34
- package/dist/sdk/accountspayable.js +1 -260
- package/dist/sdk/accountspayablebills.d.ts +28 -0
- package/dist/sdk/accountspayablebills.js +183 -1
- 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/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/index.d.ts +9 -3
- package/dist/sdk/models/shared/index.js +9 -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/{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 +1 -4
- package/dist/sdk/sdk.js +3 -3
- 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/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/items.md +4 -4
- package/docs/models/shared/{accountingcompanyinfophone.md → phonenumber.md} +1 -1
- 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 -101
- package/docs/sdks/accountspayablebillcreditnotes/README.md +5 -5
- package/docs/sdks/accountspayablebillpayments/README.md +5 -5
- package/docs/sdks/accountspayablebills/README.md +103 -7
- package/docs/sdks/accountspayablesuppliers/README.md +11 -11
- 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 +2 -2
- package/docs/sdks/companyinfo/README.md +1 -1
- package/docs/sdks/connections/README.md +4 -4
- package/docs/sdks/dataintegrity/README.md +3 -3
- package/docs/sdks/excelreports/README.md +4 -4
- package/docs/sdks/fileupload/README.md +3 -3
- 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 +2 -2
- package/docs/sdks/managedata/README.md +1 -1
- package/docs/sdks/managedatapulloperations/README.md +3 -3
- package/docs/sdks/managedatarefresh/README.md +3 -3
- package/docs/sdks/sales/README.md +1 -1
- package/docs/sdks/salespaymentmethods/README.md +3 -3
- package/docs/sdks/salesproductcategories/README.md +3 -3
- package/docs/sdks/transactions/README.md +1 -1
- package/docs/sdks/transactionsaccounttransactions/README.md +3 -3
- package/docs/sdks/transactionsdirectcosts/README.md +6 -6
- package/docs/sdks/transactionsjournalentries/README.md +3 -3
- 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
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
#
|
|
1
|
+
# AccountingBankData.Accounts
|
|
2
2
|
|
|
3
3
|
### Available Operations
|
|
4
4
|
|
|
@@ -28,7 +28,7 @@ const sdk = new CodatLending({
|
|
|
28
28
|
},
|
|
29
29
|
});
|
|
30
30
|
|
|
31
|
-
sdk.
|
|
31
|
+
sdk.accountingBankData.accounts.get({
|
|
32
32
|
accountId: "unde",
|
|
33
33
|
companyId: "8a210b68-6988-11ed-a1eb-0242ac120002",
|
|
34
34
|
connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171",
|
|
@@ -74,7 +74,7 @@ const sdk = new CodatLending({
|
|
|
74
74
|
},
|
|
75
75
|
});
|
|
76
76
|
|
|
77
|
-
sdk.
|
|
77
|
+
sdk.accountingBankData.accounts.list({
|
|
78
78
|
companyId: "8a210b68-6988-11ed-a1eb-0242ac120002",
|
|
79
79
|
connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171",
|
|
80
80
|
orderBy: "-modifiedDate",
|
|
@@ -1,104 +1,4 @@
|
|
|
1
|
-
#
|
|
2
|
-
|
|
3
|
-
## Overview
|
|
4
|
-
|
|
5
|
-
Data from a linked accounting platform representing money the business owes money to its suppliers.
|
|
1
|
+
# AccountsPayable
|
|
6
2
|
|
|
7
3
|
### Available Operations
|
|
8
4
|
|
|
9
|
-
* [downloadBillAttachment](#downloadbillattachment) - Download bill attachment
|
|
10
|
-
* [getBillAttachment](#getbillattachment) - Get bill attachment
|
|
11
|
-
|
|
12
|
-
## downloadBillAttachment
|
|
13
|
-
|
|
14
|
-
The *Download bill attachment* endpoint downloads a specific attachment for a given `billId` and `attachmentId`.
|
|
15
|
-
|
|
16
|
-
[Bills](https://docs.codat.io/accounting-api#/schemas/Bill) are invoices that represent the SMB's financial obligations to their supplier for a purchase of goods or services.
|
|
17
|
-
|
|
18
|
-
Check out our [coverage explorer](https://knowledge.codat.io/supported-features/accounting?view=tab-by-data-type&dataType=bills) for integrations that support downloading a bill attachment.
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
### Example Usage
|
|
22
|
-
|
|
23
|
-
```typescript
|
|
24
|
-
import { CodatLending } from "@codat/lending";
|
|
25
|
-
import { DownloadAccountingBillAttachmentResponse } 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.accountsPayable.downloadBillAttachment({
|
|
34
|
-
attachmentId: "8a210b68-6988-11ed-a1eb-0242ac120002",
|
|
35
|
-
billId: "corrupti",
|
|
36
|
-
companyId: "8a210b68-6988-11ed-a1eb-0242ac120002",
|
|
37
|
-
connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171",
|
|
38
|
-
}).then((res: DownloadAccountingBillAttachmentResponse) => {
|
|
39
|
-
if (res.statusCode == 200) {
|
|
40
|
-
// handle response
|
|
41
|
-
}
|
|
42
|
-
});
|
|
43
|
-
```
|
|
44
|
-
|
|
45
|
-
### Parameters
|
|
46
|
-
|
|
47
|
-
| Parameter | Type | Required | Description |
|
|
48
|
-
| ------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------ |
|
|
49
|
-
| `request` | [operations.DownloadAccountingBillAttachmentRequest](../../models/operations/downloadaccountingbillattachmentrequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
|
50
|
-
| `retries` | [utils.RetryConfig](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. |
|
|
51
|
-
| `config` | [AxiosRequestConfig](https://axios-http.com/docs/req_config) | :heavy_minus_sign: | Available config options for making requests. |
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
### Response
|
|
55
|
-
|
|
56
|
-
**Promise<[operations.DownloadAccountingBillAttachmentResponse](../../models/operations/downloadaccountingbillattachmentresponse.md)>**
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
## getBillAttachment
|
|
60
|
-
|
|
61
|
-
The *Get bill attachment* endpoint returns a specific attachment for a given `billId` and `attachmentId`.
|
|
62
|
-
|
|
63
|
-
[Bills](https://docs.codat.io/accounting-api#/schemas/Bill) are invoices that represent the SMB's financial obligations to their supplier for a purchase of goods or services.
|
|
64
|
-
|
|
65
|
-
Check out our [coverage explorer](https://knowledge.codat.io/supported-features/accounting?view=tab-by-data-type&dataType=bills) for integrations that support getting a bill attachment.
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
### Example Usage
|
|
69
|
-
|
|
70
|
-
```typescript
|
|
71
|
-
import { CodatLending } from "@codat/lending";
|
|
72
|
-
import { GetAccountingBillAttachmentResponse } from "@codat/lending/dist/sdk/models/operations";
|
|
73
|
-
|
|
74
|
-
const sdk = new CodatLending({
|
|
75
|
-
security: {
|
|
76
|
-
authHeader: "Basic BASE_64_ENCODED(API_KEY)",
|
|
77
|
-
},
|
|
78
|
-
});
|
|
79
|
-
|
|
80
|
-
sdk.accountsPayable.getBillAttachment({
|
|
81
|
-
attachmentId: "8a210b68-6988-11ed-a1eb-0242ac120002",
|
|
82
|
-
billId: "illum",
|
|
83
|
-
companyId: "8a210b68-6988-11ed-a1eb-0242ac120002",
|
|
84
|
-
connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171",
|
|
85
|
-
}).then((res: GetAccountingBillAttachmentResponse) => {
|
|
86
|
-
if (res.statusCode == 200) {
|
|
87
|
-
// handle response
|
|
88
|
-
}
|
|
89
|
-
});
|
|
90
|
-
```
|
|
91
|
-
|
|
92
|
-
### Parameters
|
|
93
|
-
|
|
94
|
-
| Parameter | Type | Required | Description |
|
|
95
|
-
| -------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- |
|
|
96
|
-
| `request` | [operations.GetAccountingBillAttachmentRequest](../../models/operations/getaccountingbillattachmentrequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
|
97
|
-
| `retries` | [utils.RetryConfig](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. |
|
|
98
|
-
| `config` | [AxiosRequestConfig](https://axios-http.com/docs/req_config) | :heavy_minus_sign: | Available config options for making requests. |
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
### Response
|
|
102
|
-
|
|
103
|
-
**Promise<[operations.GetAccountingBillAttachmentResponse](../../models/operations/getaccountingbillattachmentresponse.md)>**
|
|
104
|
-
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
#
|
|
1
|
+
# AccountsPayable.BillCreditNotes
|
|
2
2
|
|
|
3
3
|
### Available Operations
|
|
4
4
|
|
|
@@ -28,8 +28,8 @@ const sdk = new CodatLending({
|
|
|
28
28
|
},
|
|
29
29
|
});
|
|
30
30
|
|
|
31
|
-
sdk.
|
|
32
|
-
billCreditNoteId: "
|
|
31
|
+
sdk.accountsPayable.billCreditNotes.get({
|
|
32
|
+
billCreditNoteId: "molestiae",
|
|
33
33
|
companyId: "8a210b68-6988-11ed-a1eb-0242ac120002",
|
|
34
34
|
}).then((res: GetAccountingBillCreditNoteResponse) => {
|
|
35
35
|
if (res.statusCode == 200) {
|
|
@@ -73,12 +73,12 @@ const sdk = new CodatLending({
|
|
|
73
73
|
},
|
|
74
74
|
});
|
|
75
75
|
|
|
76
|
-
sdk.
|
|
76
|
+
sdk.accountsPayable.billCreditNotes.list({
|
|
77
77
|
companyId: "8a210b68-6988-11ed-a1eb-0242ac120002",
|
|
78
78
|
orderBy: "-modifiedDate",
|
|
79
79
|
page: 1,
|
|
80
80
|
pageSize: 100,
|
|
81
|
-
query: "
|
|
81
|
+
query: "minus",
|
|
82
82
|
}).then((res: ListAccountingBillCreditNotesResponse) => {
|
|
83
83
|
if (res.statusCode == 200) {
|
|
84
84
|
// handle response
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
#
|
|
1
|
+
# AccountsPayable.BillPayments
|
|
2
2
|
|
|
3
3
|
### Available Operations
|
|
4
4
|
|
|
@@ -28,8 +28,8 @@ const sdk = new CodatLending({
|
|
|
28
28
|
},
|
|
29
29
|
});
|
|
30
30
|
|
|
31
|
-
sdk.
|
|
32
|
-
billPaymentId: "
|
|
31
|
+
sdk.accountsPayable.billPayments.get({
|
|
32
|
+
billPaymentId: "placeat",
|
|
33
33
|
companyId: "8a210b68-6988-11ed-a1eb-0242ac120002",
|
|
34
34
|
}).then((res: GetAccountingBillPaymentResponse) => {
|
|
35
35
|
if (res.statusCode == 200) {
|
|
@@ -73,12 +73,12 @@ const sdk = new CodatLending({
|
|
|
73
73
|
},
|
|
74
74
|
});
|
|
75
75
|
|
|
76
|
-
sdk.
|
|
76
|
+
sdk.accountsPayable.billPayments.list({
|
|
77
77
|
companyId: "8a210b68-6988-11ed-a1eb-0242ac120002",
|
|
78
78
|
orderBy: "-modifiedDate",
|
|
79
79
|
page: 1,
|
|
80
80
|
pageSize: 100,
|
|
81
|
-
query: "
|
|
81
|
+
query: "voluptatum",
|
|
82
82
|
}).then((res: ListAccountingBillPaymentsResponse) => {
|
|
83
83
|
if (res.statusCode == 200) {
|
|
84
84
|
// handle response
|
|
@@ -1,11 +1,60 @@
|
|
|
1
|
-
#
|
|
1
|
+
# AccountsPayable.Bills
|
|
2
2
|
|
|
3
3
|
### Available Operations
|
|
4
4
|
|
|
5
|
+
* [downloadAttachment](#downloadattachment) - Download bill attachment
|
|
5
6
|
* [get](#get) - Get bill
|
|
7
|
+
* [getAttachment](#getattachment) - Get bill attachment
|
|
6
8
|
* [list](#list) - List bills
|
|
7
9
|
* [listAttachments](#listattachments) - List bill attachments
|
|
8
10
|
|
|
11
|
+
## downloadAttachment
|
|
12
|
+
|
|
13
|
+
The *Download bill attachment* endpoint downloads a specific attachment for a given `billId` and `attachmentId`.
|
|
14
|
+
|
|
15
|
+
[Bills](https://docs.codat.io/accounting-api#/schemas/Bill) are invoices that represent the SMB's financial obligations to their supplier for a purchase of goods or services.
|
|
16
|
+
|
|
17
|
+
Check out our [coverage explorer](https://knowledge.codat.io/supported-features/accounting?view=tab-by-data-type&dataType=bills) for integrations that support downloading a bill attachment.
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
### Example Usage
|
|
21
|
+
|
|
22
|
+
```typescript
|
|
23
|
+
import { CodatLending } from "@codat/lending";
|
|
24
|
+
import { DownloadAccountingBillAttachmentResponse } from "@codat/lending/dist/sdk/models/operations";
|
|
25
|
+
|
|
26
|
+
const sdk = new CodatLending({
|
|
27
|
+
security: {
|
|
28
|
+
authHeader: "Basic BASE_64_ENCODED(API_KEY)",
|
|
29
|
+
},
|
|
30
|
+
});
|
|
31
|
+
|
|
32
|
+
sdk.accountsPayable.bills.downloadAttachment({
|
|
33
|
+
attachmentId: "8a210b68-6988-11ed-a1eb-0242ac120002",
|
|
34
|
+
billId: "iusto",
|
|
35
|
+
companyId: "8a210b68-6988-11ed-a1eb-0242ac120002",
|
|
36
|
+
connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171",
|
|
37
|
+
}).then((res: DownloadAccountingBillAttachmentResponse) => {
|
|
38
|
+
if (res.statusCode == 200) {
|
|
39
|
+
// handle response
|
|
40
|
+
}
|
|
41
|
+
});
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
### Parameters
|
|
45
|
+
|
|
46
|
+
| Parameter | Type | Required | Description |
|
|
47
|
+
| ------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------ |
|
|
48
|
+
| `request` | [operations.DownloadAccountingBillAttachmentRequest](../../models/operations/downloadaccountingbillattachmentrequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
|
49
|
+
| `retries` | [utils.RetryConfig](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. |
|
|
50
|
+
| `config` | [AxiosRequestConfig](https://axios-http.com/docs/req_config) | :heavy_minus_sign: | Available config options for making requests. |
|
|
51
|
+
|
|
52
|
+
|
|
53
|
+
### Response
|
|
54
|
+
|
|
55
|
+
**Promise<[operations.DownloadAccountingBillAttachmentResponse](../../models/operations/downloadaccountingbillattachmentresponse.md)>**
|
|
56
|
+
|
|
57
|
+
|
|
9
58
|
## get
|
|
10
59
|
|
|
11
60
|
The *Get bill* endpoint returns a single bill for a given billId.
|
|
@@ -29,8 +78,8 @@ const sdk = new CodatLending({
|
|
|
29
78
|
},
|
|
30
79
|
});
|
|
31
80
|
|
|
32
|
-
sdk.
|
|
33
|
-
billId: "
|
|
81
|
+
sdk.accountsPayable.bills.get({
|
|
82
|
+
billId: "excepturi",
|
|
34
83
|
companyId: "8a210b68-6988-11ed-a1eb-0242ac120002",
|
|
35
84
|
}).then((res: GetAccountingBillResponse) => {
|
|
36
85
|
if (res.statusCode == 200) {
|
|
@@ -53,6 +102,53 @@ sdk.accountsPayableBills.get({
|
|
|
53
102
|
**Promise<[operations.GetAccountingBillResponse](../../models/operations/getaccountingbillresponse.md)>**
|
|
54
103
|
|
|
55
104
|
|
|
105
|
+
## getAttachment
|
|
106
|
+
|
|
107
|
+
The *Get bill attachment* endpoint returns a specific attachment for a given `billId` and `attachmentId`.
|
|
108
|
+
|
|
109
|
+
[Bills](https://docs.codat.io/accounting-api#/schemas/Bill) are invoices that represent the SMB's financial obligations to their supplier for a purchase of goods or services.
|
|
110
|
+
|
|
111
|
+
Check out our [coverage explorer](https://knowledge.codat.io/supported-features/accounting?view=tab-by-data-type&dataType=bills) for integrations that support getting a bill attachment.
|
|
112
|
+
|
|
113
|
+
|
|
114
|
+
### Example Usage
|
|
115
|
+
|
|
116
|
+
```typescript
|
|
117
|
+
import { CodatLending } from "@codat/lending";
|
|
118
|
+
import { GetAccountingBillAttachmentResponse } from "@codat/lending/dist/sdk/models/operations";
|
|
119
|
+
|
|
120
|
+
const sdk = new CodatLending({
|
|
121
|
+
security: {
|
|
122
|
+
authHeader: "Basic BASE_64_ENCODED(API_KEY)",
|
|
123
|
+
},
|
|
124
|
+
});
|
|
125
|
+
|
|
126
|
+
sdk.accountsPayable.bills.getAttachment({
|
|
127
|
+
attachmentId: "8a210b68-6988-11ed-a1eb-0242ac120002",
|
|
128
|
+
billId: "nisi",
|
|
129
|
+
companyId: "8a210b68-6988-11ed-a1eb-0242ac120002",
|
|
130
|
+
connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171",
|
|
131
|
+
}).then((res: GetAccountingBillAttachmentResponse) => {
|
|
132
|
+
if (res.statusCode == 200) {
|
|
133
|
+
// handle response
|
|
134
|
+
}
|
|
135
|
+
});
|
|
136
|
+
```
|
|
137
|
+
|
|
138
|
+
### Parameters
|
|
139
|
+
|
|
140
|
+
| Parameter | Type | Required | Description |
|
|
141
|
+
| -------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- |
|
|
142
|
+
| `request` | [operations.GetAccountingBillAttachmentRequest](../../models/operations/getaccountingbillattachmentrequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
|
143
|
+
| `retries` | [utils.RetryConfig](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. |
|
|
144
|
+
| `config` | [AxiosRequestConfig](https://axios-http.com/docs/req_config) | :heavy_minus_sign: | Available config options for making requests. |
|
|
145
|
+
|
|
146
|
+
|
|
147
|
+
### Response
|
|
148
|
+
|
|
149
|
+
**Promise<[operations.GetAccountingBillAttachmentResponse](../../models/operations/getaccountingbillattachmentresponse.md)>**
|
|
150
|
+
|
|
151
|
+
|
|
56
152
|
## list
|
|
57
153
|
|
|
58
154
|
The *List bills* endpoint returns a list of [bills](https://docs.codat.io/accounting-api#/schemas/Bill) for a given company's connection.
|
|
@@ -74,12 +170,12 @@ const sdk = new CodatLending({
|
|
|
74
170
|
},
|
|
75
171
|
});
|
|
76
172
|
|
|
77
|
-
sdk.
|
|
173
|
+
sdk.accountsPayable.bills.list({
|
|
78
174
|
companyId: "8a210b68-6988-11ed-a1eb-0242ac120002",
|
|
79
175
|
orderBy: "-modifiedDate",
|
|
80
176
|
page: 1,
|
|
81
177
|
pageSize: 100,
|
|
82
|
-
query: "
|
|
178
|
+
query: "recusandae",
|
|
83
179
|
}).then((res: ListAccountingBillsResponse) => {
|
|
84
180
|
if (res.statusCode == 200) {
|
|
85
181
|
// handle response
|
|
@@ -122,8 +218,8 @@ const sdk = new CodatLending({
|
|
|
122
218
|
},
|
|
123
219
|
});
|
|
124
220
|
|
|
125
|
-
sdk.
|
|
126
|
-
billId: "
|
|
221
|
+
sdk.accountsPayable.bills.listAttachments({
|
|
222
|
+
billId: "temporibus",
|
|
127
223
|
companyId: "8a210b68-6988-11ed-a1eb-0242ac120002",
|
|
128
224
|
connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171",
|
|
129
225
|
}).then((res: ListAccountingBillAttachmentsResponse) => {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
#
|
|
1
|
+
# AccountsPayable.Suppliers
|
|
2
2
|
|
|
3
3
|
### Available Operations
|
|
4
4
|
|
|
@@ -29,11 +29,11 @@ const sdk = new CodatLending({
|
|
|
29
29
|
},
|
|
30
30
|
});
|
|
31
31
|
|
|
32
|
-
sdk.
|
|
32
|
+
sdk.accountsPayable.suppliers.downloadAttachment({
|
|
33
33
|
attachmentId: "8a210b68-6988-11ed-a1eb-0242ac120002",
|
|
34
34
|
companyId: "8a210b68-6988-11ed-a1eb-0242ac120002",
|
|
35
35
|
connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171",
|
|
36
|
-
supplierId: "
|
|
36
|
+
supplierId: "ab",
|
|
37
37
|
}).then((res: DownloadAccountingSupplierAttachmentResponse) => {
|
|
38
38
|
if (res.statusCode == 200) {
|
|
39
39
|
// handle response
|
|
@@ -78,9 +78,9 @@ const sdk = new CodatLending({
|
|
|
78
78
|
},
|
|
79
79
|
});
|
|
80
80
|
|
|
81
|
-
sdk.
|
|
81
|
+
sdk.accountsPayable.suppliers.get({
|
|
82
82
|
companyId: "8a210b68-6988-11ed-a1eb-0242ac120002",
|
|
83
|
-
supplierId: "
|
|
83
|
+
supplierId: "quis",
|
|
84
84
|
}).then((res: GetAccountingSupplierResponse) => {
|
|
85
85
|
if (res.statusCode == 200) {
|
|
86
86
|
// handle response
|
|
@@ -123,11 +123,11 @@ const sdk = new CodatLending({
|
|
|
123
123
|
},
|
|
124
124
|
});
|
|
125
125
|
|
|
126
|
-
sdk.
|
|
126
|
+
sdk.accountsPayable.suppliers.getAttachment({
|
|
127
127
|
attachmentId: "8a210b68-6988-11ed-a1eb-0242ac120002",
|
|
128
128
|
companyId: "8a210b68-6988-11ed-a1eb-0242ac120002",
|
|
129
129
|
connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171",
|
|
130
|
-
supplierId: "
|
|
130
|
+
supplierId: "veritatis",
|
|
131
131
|
}).then((res: GetAccountingSupplierAttachmentResponse) => {
|
|
132
132
|
if (res.statusCode == 200) {
|
|
133
133
|
// handle response
|
|
@@ -170,12 +170,12 @@ const sdk = new CodatLending({
|
|
|
170
170
|
},
|
|
171
171
|
});
|
|
172
172
|
|
|
173
|
-
sdk.
|
|
173
|
+
sdk.accountsPayable.suppliers.list({
|
|
174
174
|
companyId: "8a210b68-6988-11ed-a1eb-0242ac120002",
|
|
175
175
|
orderBy: "-modifiedDate",
|
|
176
176
|
page: 1,
|
|
177
177
|
pageSize: 100,
|
|
178
|
-
query: "
|
|
178
|
+
query: "deserunt",
|
|
179
179
|
}).then((res: ListAccountingSuppliersResponse) => {
|
|
180
180
|
if (res.statusCode == 200) {
|
|
181
181
|
// handle response
|
|
@@ -218,10 +218,10 @@ const sdk = new CodatLending({
|
|
|
218
218
|
},
|
|
219
219
|
});
|
|
220
220
|
|
|
221
|
-
sdk.
|
|
221
|
+
sdk.accountsPayable.suppliers.listAttachments({
|
|
222
222
|
companyId: "8a210b68-6988-11ed-a1eb-0242ac120002",
|
|
223
223
|
connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171",
|
|
224
|
-
supplierId: "
|
|
224
|
+
supplierId: "perferendis",
|
|
225
225
|
}).then((res: ListAccountingSupplierAttachmentsResponse) => {
|
|
226
226
|
if (res.statusCode == 200) {
|
|
227
227
|
// handle response
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
#
|
|
1
|
+
# AccountsReceivable.CreditNotes
|
|
2
2
|
|
|
3
3
|
### Available Operations
|
|
4
4
|
|
|
@@ -28,7 +28,7 @@ const sdk = new CodatLending({
|
|
|
28
28
|
},
|
|
29
29
|
});
|
|
30
30
|
|
|
31
|
-
sdk.
|
|
31
|
+
sdk.accountsReceivable.creditNotes.get({
|
|
32
32
|
companyId: "8a210b68-6988-11ed-a1eb-0242ac120002",
|
|
33
33
|
creditNoteId: "ipsam",
|
|
34
34
|
}).then((res: GetAccountingCreditNoteResponse) => {
|
|
@@ -73,7 +73,7 @@ const sdk = new CodatLending({
|
|
|
73
73
|
},
|
|
74
74
|
});
|
|
75
75
|
|
|
76
|
-
sdk.
|
|
76
|
+
sdk.accountsReceivable.creditNotes.list({
|
|
77
77
|
companyId: "8a210b68-6988-11ed-a1eb-0242ac120002",
|
|
78
78
|
orderBy: "-modifiedDate",
|
|
79
79
|
page: 1,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
#
|
|
1
|
+
# AccountsReceivable.Customers
|
|
2
2
|
|
|
3
3
|
### Available Operations
|
|
4
4
|
|
|
@@ -29,7 +29,7 @@ const sdk = new CodatLending({
|
|
|
29
29
|
},
|
|
30
30
|
});
|
|
31
31
|
|
|
32
|
-
sdk.
|
|
32
|
+
sdk.accountsReceivable.customers.downloadAttachment({
|
|
33
33
|
attachmentId: "8a210b68-6988-11ed-a1eb-0242ac120002",
|
|
34
34
|
companyId: "8a210b68-6988-11ed-a1eb-0242ac120002",
|
|
35
35
|
connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171",
|
|
@@ -78,7 +78,7 @@ const sdk = new CodatLending({
|
|
|
78
78
|
},
|
|
79
79
|
});
|
|
80
80
|
|
|
81
|
-
sdk.
|
|
81
|
+
sdk.accountsReceivable.customers.get({
|
|
82
82
|
companyId: "8a210b68-6988-11ed-a1eb-0242ac120002",
|
|
83
83
|
customerId: "quo",
|
|
84
84
|
}).then((res: GetAccountingCustomerResponse) => {
|
|
@@ -123,7 +123,7 @@ const sdk = new CodatLending({
|
|
|
123
123
|
},
|
|
124
124
|
});
|
|
125
125
|
|
|
126
|
-
sdk.
|
|
126
|
+
sdk.accountsReceivable.customers.getAttachment({
|
|
127
127
|
attachmentId: "8a210b68-6988-11ed-a1eb-0242ac120002",
|
|
128
128
|
companyId: "8a210b68-6988-11ed-a1eb-0242ac120002",
|
|
129
129
|
connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171",
|
|
@@ -170,7 +170,7 @@ const sdk = new CodatLending({
|
|
|
170
170
|
},
|
|
171
171
|
});
|
|
172
172
|
|
|
173
|
-
sdk.
|
|
173
|
+
sdk.accountsReceivable.customers.list({
|
|
174
174
|
companyId: "8a210b68-6988-11ed-a1eb-0242ac120002",
|
|
175
175
|
orderBy: "-modifiedDate",
|
|
176
176
|
page: 1,
|
|
@@ -218,7 +218,7 @@ const sdk = new CodatLending({
|
|
|
218
218
|
},
|
|
219
219
|
});
|
|
220
220
|
|
|
221
|
-
sdk.
|
|
221
|
+
sdk.accountsReceivable.customers.listAttachments({
|
|
222
222
|
companyId: "8a210b68-6988-11ed-a1eb-0242ac120002",
|
|
223
223
|
connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171",
|
|
224
224
|
customerId: "at",
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
#
|
|
1
|
+
# AccountsReceivable.DirectIncomes
|
|
2
2
|
|
|
3
3
|
### Available Operations
|
|
4
4
|
|
|
@@ -29,7 +29,7 @@ const sdk = new CodatLending({
|
|
|
29
29
|
},
|
|
30
30
|
});
|
|
31
31
|
|
|
32
|
-
sdk.
|
|
32
|
+
sdk.accountsReceivable.directIncomes.downloadAttachment({
|
|
33
33
|
attachmentId: "8a210b68-6988-11ed-a1eb-0242ac120002",
|
|
34
34
|
companyId: "8a210b68-6988-11ed-a1eb-0242ac120002",
|
|
35
35
|
connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171",
|
|
@@ -78,7 +78,7 @@ const sdk = new CodatLending({
|
|
|
78
78
|
},
|
|
79
79
|
});
|
|
80
80
|
|
|
81
|
-
sdk.
|
|
81
|
+
sdk.accountsReceivable.directIncomes.get({
|
|
82
82
|
companyId: "8a210b68-6988-11ed-a1eb-0242ac120002",
|
|
83
83
|
connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171",
|
|
84
84
|
directIncomeId: "molestiae",
|
|
@@ -124,7 +124,7 @@ const sdk = new CodatLending({
|
|
|
124
124
|
},
|
|
125
125
|
});
|
|
126
126
|
|
|
127
|
-
sdk.
|
|
127
|
+
sdk.accountsReceivable.directIncomes.getAttachment({
|
|
128
128
|
attachmentId: "8a210b68-6988-11ed-a1eb-0242ac120002",
|
|
129
129
|
companyId: "8a210b68-6988-11ed-a1eb-0242ac120002",
|
|
130
130
|
connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171",
|
|
@@ -172,7 +172,7 @@ const sdk = new CodatLending({
|
|
|
172
172
|
},
|
|
173
173
|
});
|
|
174
174
|
|
|
175
|
-
sdk.
|
|
175
|
+
sdk.accountsReceivable.directIncomes.list({
|
|
176
176
|
companyId: "8a210b68-6988-11ed-a1eb-0242ac120002",
|
|
177
177
|
connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171",
|
|
178
178
|
orderBy: "-modifiedDate",
|
|
@@ -221,7 +221,7 @@ const sdk = new CodatLending({
|
|
|
221
221
|
},
|
|
222
222
|
});
|
|
223
223
|
|
|
224
|
-
sdk.
|
|
224
|
+
sdk.accountsReceivable.directIncomes.listAttachments({
|
|
225
225
|
companyId: "8a210b68-6988-11ed-a1eb-0242ac120002",
|
|
226
226
|
connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171",
|
|
227
227
|
directIncomeId: "totam",
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
#
|
|
1
|
+
# AccountsReceivable.Invoices
|
|
2
2
|
|
|
3
3
|
### Available Operations
|
|
4
4
|
|
|
@@ -31,7 +31,7 @@ const sdk = new CodatLending({
|
|
|
31
31
|
},
|
|
32
32
|
});
|
|
33
33
|
|
|
34
|
-
sdk.
|
|
34
|
+
sdk.accountsReceivable.invoices.downloadAttachment({
|
|
35
35
|
attachmentId: "8a210b68-6988-11ed-a1eb-0242ac120002",
|
|
36
36
|
companyId: "8a210b68-6988-11ed-a1eb-0242ac120002",
|
|
37
37
|
connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171",
|
|
@@ -73,7 +73,7 @@ const sdk = new CodatLending({
|
|
|
73
73
|
},
|
|
74
74
|
});
|
|
75
75
|
|
|
76
|
-
sdk.
|
|
76
|
+
sdk.accountsReceivable.invoices.downloadPdf({
|
|
77
77
|
companyId: "8a210b68-6988-11ed-a1eb-0242ac120002",
|
|
78
78
|
invoiceId: "dolorum",
|
|
79
79
|
}).then((res: DownloadAccountingInvoicePdfResponse) => {
|
|
@@ -119,7 +119,7 @@ const sdk = new CodatLending({
|
|
|
119
119
|
},
|
|
120
120
|
});
|
|
121
121
|
|
|
122
|
-
sdk.
|
|
122
|
+
sdk.accountsReceivable.invoices.get({
|
|
123
123
|
companyId: "8a210b68-6988-11ed-a1eb-0242ac120002",
|
|
124
124
|
invoiceId: "dicta",
|
|
125
125
|
}).then((res: GetAccountingInvoiceResponse) => {
|
|
@@ -164,7 +164,7 @@ const sdk = new CodatLending({
|
|
|
164
164
|
},
|
|
165
165
|
});
|
|
166
166
|
|
|
167
|
-
sdk.
|
|
167
|
+
sdk.accountsReceivable.invoices.getAttachment({
|
|
168
168
|
attachmentId: "8a210b68-6988-11ed-a1eb-0242ac120002",
|
|
169
169
|
companyId: "8a210b68-6988-11ed-a1eb-0242ac120002",
|
|
170
170
|
connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171",
|
|
@@ -217,7 +217,7 @@ const sdk = new CodatLending({
|
|
|
217
217
|
},
|
|
218
218
|
});
|
|
219
219
|
|
|
220
|
-
sdk.
|
|
220
|
+
sdk.accountsReceivable.invoices.list({
|
|
221
221
|
companyId: "8a210b68-6988-11ed-a1eb-0242ac120002",
|
|
222
222
|
orderBy: "-modifiedDate",
|
|
223
223
|
page: 1,
|
|
@@ -265,7 +265,7 @@ const sdk = new CodatLending({
|
|
|
265
265
|
},
|
|
266
266
|
});
|
|
267
267
|
|
|
268
|
-
sdk.
|
|
268
|
+
sdk.accountsReceivable.invoices.listAttachments({
|
|
269
269
|
companyId: "8a210b68-6988-11ed-a1eb-0242ac120002",
|
|
270
270
|
connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171",
|
|
271
271
|
invoiceId: "occaecati",
|
|
@@ -306,7 +306,7 @@ const sdk = new CodatLending({
|
|
|
306
306
|
},
|
|
307
307
|
});
|
|
308
308
|
|
|
309
|
-
sdk.
|
|
309
|
+
sdk.accountsReceivable.invoices.listReconciled({
|
|
310
310
|
companyId: "8a210b68-6988-11ed-a1eb-0242ac120002",
|
|
311
311
|
page: 1,
|
|
312
312
|
pageSize: 100,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
#
|
|
1
|
+
# AccountsReceivable.Payments
|
|
2
2
|
|
|
3
3
|
### Available Operations
|
|
4
4
|
|
|
@@ -28,7 +28,7 @@ const sdk = new CodatLending({
|
|
|
28
28
|
},
|
|
29
29
|
});
|
|
30
30
|
|
|
31
|
-
sdk.
|
|
31
|
+
sdk.accountsReceivable.payments.get({
|
|
32
32
|
companyId: "8a210b68-6988-11ed-a1eb-0242ac120002",
|
|
33
33
|
paymentId: "deleniti",
|
|
34
34
|
}).then((res: GetAccountingPaymentResponse) => {
|
|
@@ -73,7 +73,7 @@ const sdk = new CodatLending({
|
|
|
73
73
|
},
|
|
74
74
|
});
|
|
75
75
|
|
|
76
|
-
sdk.
|
|
76
|
+
sdk.accountsReceivable.payments.list({
|
|
77
77
|
companyId: "8a210b68-6988-11ed-a1eb-0242ac120002",
|
|
78
78
|
orderBy: "-modifiedDate",
|
|
79
79
|
page: 1,
|