# LoanAccountFundingApi

All URIs are relative to *http://localhost:8889/api*

|Method | HTTP request | Description|
|------------- | ------------- | -------------|
|[**createLoanAccountFundingSources**](#createloanaccountfundingsources) | **POST** /loans/{loanAccountId}/funding | Create funding sources for a loan account|
|[**deleteFundingSources**](#deletefundingsources) | **DELETE** /loans/{loanAccountId}/funding | Delete loan account funding sources|
|[**deleteSingleFundingSource**](#deletesinglefundingsource) | **DELETE** /loans/{loanAccountId}/funding/{fundEncodedKey} | Delete loan account funding source|
|[**patchFundingSource**](#patchfundingsource) | **PATCH** /loans/{loanAccountId}/funding/{fundEncodedKey} | Update loan account funding source|
|[**updateLoanAccountFundingSources**](#updateloanaccountfundingsources) | **PUT** /loans/{loanAccountId}/funding | Update loan account funding sources|

# **createLoanAccountFundingSources**
> Array<InvestorFund> createLoanAccountFundingSources(investorFund)


### Example

```typescript
import {
    LoanAccountFundingApi,
    Configuration
} from './api';

const configuration = new Configuration();
const apiInstance = new LoanAccountFundingApi(configuration);

let loanAccountId: string; //The ID or encoded key of the loan account. (default to undefined)
let investorFund: Array<InvestorFund>; //The funding sources to create for loan account.
let idempotencyKey: string; //Key that can be used to support idempotency on this POST. Must be a valid UUID(version 4 is recommended) string and can only be used with the exact same request. Can be used in retry mechanisms to prevent double posting. (optional) (default to undefined)

const { status, data } = await apiInstance.createLoanAccountFundingSources(
    loanAccountId,
    investorFund,
    idempotencyKey
);
```

### Parameters

|Name | Type | Description  | Notes|
|------------- | ------------- | ------------- | -------------|
| **investorFund** | **Array<InvestorFund>**| The funding sources to create for loan account. | |
| **loanAccountId** | [**string**] | The ID or encoded key of the loan account. | defaults to undefined|
| **idempotencyKey** | [**string**] | Key that can be used to support idempotency on this POST. Must be a valid UUID(version 4 is recommended) string and can only be used with the exact same request. Can be used in retry mechanisms to prevent double posting. | (optional) defaults to undefined|


### Return type

**Array<InvestorFund>**

### Authorization

[basic](../README.md#basic)

### HTTP request headers

 - **Content-Type**: application/json
 - **Accept**: application/vnd.mambu.v2+json


### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
|**102** | Your idempotent request was already submitted and is currently being processed, try again later. |  -  |
|**201** | Created list of the loan account funding sources. |  -  |
|**400** | A validation error occurred |  -  |
|**401** | Unauthorized |  -  |
|**403** | Forbidden |  -  |
|**404** | Loan account not found. |  -  |

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)

# **deleteFundingSources**
> deleteFundingSources()


### Example

```typescript
import {
    LoanAccountFundingApi,
    Configuration
} from './api';

const configuration = new Configuration();
const apiInstance = new LoanAccountFundingApi(configuration);

let loanAccountId: string; //The ID or encoded key of the loan account. (default to undefined)

const { status, data } = await apiInstance.deleteFundingSources(
    loanAccountId
);
```

### Parameters

|Name | Type | Description  | Notes|
|------------- | ------------- | ------------- | -------------|
| **loanAccountId** | [**string**] | The ID or encoded key of the loan account. | defaults to undefined|


### Return type

void (empty response body)

### Authorization

[basic](../README.md#basic)

### HTTP request headers

 - **Content-Type**: Not defined
 - **Accept**: application/vnd.mambu.v2+json


### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
|**204** | Deleted all loan account funding sources. |  -  |
|**400** | A validation error occurred |  -  |
|**401** | Unauthorized |  -  |
|**403** | Forbidden |  -  |
|**404** | Loan account not found. |  -  |

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)

# **deleteSingleFundingSource**
> deleteSingleFundingSource()


### Example

```typescript
import {
    LoanAccountFundingApi,
    Configuration
} from './api';

const configuration = new Configuration();
const apiInstance = new LoanAccountFundingApi(configuration);

let loanAccountId: string; //The ID or encoded key of the loan account. (default to undefined)
let fundEncodedKey: string; //The encoded key of the funding source. (default to undefined)

const { status, data } = await apiInstance.deleteSingleFundingSource(
    loanAccountId,
    fundEncodedKey
);
```

### Parameters

|Name | Type | Description  | Notes|
|------------- | ------------- | ------------- | -------------|
| **loanAccountId** | [**string**] | The ID or encoded key of the loan account. | defaults to undefined|
| **fundEncodedKey** | [**string**] | The encoded key of the funding source. | defaults to undefined|


### Return type

void (empty response body)

### Authorization

[basic](../README.md#basic)

### HTTP request headers

 - **Content-Type**: Not defined
 - **Accept**: application/vnd.mambu.v2+json


### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
|**204** | Deleted loan account funding source. |  -  |
|**400** | A validation error occurred |  -  |
|**401** | Unauthorized |  -  |
|**403** | Forbidden |  -  |
|**404** | Loan account not found. |  -  |

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)

# **patchFundingSource**
> patchFundingSource(patchOperation)


### Example

```typescript
import {
    LoanAccountFundingApi,
    Configuration
} from './api';

const configuration = new Configuration();
const apiInstance = new LoanAccountFundingApi(configuration);

let loanAccountId: string; //The ID or encoded key of the loan account. (default to undefined)
let fundEncodedKey: string; //The encoded key of the funding source. (default to undefined)
let patchOperation: Array<PatchOperation>; //Patch operations to be applied to a resource.

const { status, data } = await apiInstance.patchFundingSource(
    loanAccountId,
    fundEncodedKey,
    patchOperation
);
```

### Parameters

|Name | Type | Description  | Notes|
|------------- | ------------- | ------------- | -------------|
| **patchOperation** | **Array<PatchOperation>**| Patch operations to be applied to a resource. | |
| **loanAccountId** | [**string**] | The ID or encoded key of the loan account. | defaults to undefined|
| **fundEncodedKey** | [**string**] | The encoded key of the funding source. | defaults to undefined|


### Return type

void (empty response body)

### Authorization

[basic](../README.md#basic)

### HTTP request headers

 - **Content-Type**: application/json
 - **Accept**: application/vnd.mambu.v2+json


### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
|**204** | Funding source patched. |  -  |
|**400** | A validation error occurred |  -  |
|**401** | Unauthorized |  -  |
|**403** | Forbidden |  -  |
|**404** | Loan account not found. |  -  |

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)

# **updateLoanAccountFundingSources**
> Array<InvestorFund> updateLoanAccountFundingSources(investorFund)


### Example

```typescript
import {
    LoanAccountFundingApi,
    Configuration
} from './api';

const configuration = new Configuration();
const apiInstance = new LoanAccountFundingApi(configuration);

let loanAccountId: string; //The ID or encoded key of the loan account. (default to undefined)
let investorFund: Array<InvestorFund>; //The funding sources to update the loan account with.

const { status, data } = await apiInstance.updateLoanAccountFundingSources(
    loanAccountId,
    investorFund
);
```

### Parameters

|Name | Type | Description  | Notes|
|------------- | ------------- | ------------- | -------------|
| **investorFund** | **Array<InvestorFund>**| The funding sources to update the loan account with. | |
| **loanAccountId** | [**string**] | The ID or encoded key of the loan account. | defaults to undefined|


### Return type

**Array<InvestorFund>**

### Authorization

[basic](../README.md#basic)

### HTTP request headers

 - **Content-Type**: application/json
 - **Accept**: application/vnd.mambu.v2+json


### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
|**200** | The updated list of the loan account funding sources. |  -  |
|**400** | A validation error occurred |  -  |
|**401** | Unauthorized |  -  |
|**403** | Forbidden |  -  |
|**404** | Loan account not found. |  -  |

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)

