# LoanAccountPlannedFeesApi

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

|Method | HTTP request | Description|
|------------- | ------------- | -------------|
|[**applyPlannedFees**](#applyplannedfees) | **POST** /loans/{loanAccountId}/plannedfees:apply | ApplY planned fees from the past installments, as backdated or from future installments, on the first pending installment|
|[**createPlannedFees**](#createplannedfees) | **POST** /loans/{loanAccountId}/plannedfees | Create planned fees|
|[**deletePlannedFees**](#deleteplannedfees) | **DELETE** /loans/{loanAccountId}/plannedfees/{plannedInstallmentFeeKey} | Delete planned fee|
|[**getAllPlannedFees**](#getallplannedfees) | **GET** /loans/{loanAccountId}/plannedfees | Get planned fees|
|[**updatePlannedFees**](#updateplannedfees) | **PUT** /loans/{loanAccountId}/plannedfees | Update planned fees|

# **applyPlannedFees**
> Array<LoanTransaction> applyPlannedFees(plannedFeeKeys)


### Example

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

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

let loanAccountId: string; //The ID or encoded key of the loan account. (default to undefined)
let plannedFeeKeys: PlannedFeeKeys; //List of all loan account\'s planned installment fees to be applied.
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.applyPlannedFees(
    loanAccountId,
    plannedFeeKeys,
    idempotencyKey
);
```

### Parameters

|Name | Type | Description  | Notes|
|------------- | ------------- | ------------- | -------------|
| **plannedFeeKeys** | **PlannedFeeKeys**| List of all loan account\&#39;s planned installment fees to be applied. | |
| **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<LoanTransaction>**

### 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** | Planned installment fees were applied on the loan account. |  -  |
|**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)

# **createPlannedFees**
> Array<PlannedInstallmentFee> createPlannedFees(plannedInstallmentFee)


### Example

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

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

let loanAccountId: string; //The ID or encoded key of the loan account. (default to undefined)
let plannedInstallmentFee: Array<PlannedInstallmentFee>; //List of all loan account\'s planned installment fees to be created.
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.createPlannedFees(
    loanAccountId,
    plannedInstallmentFee,
    idempotencyKey
);
```

### Parameters

|Name | Type | Description  | Notes|
|------------- | ------------- | ------------- | -------------|
| **plannedInstallmentFee** | **Array<PlannedInstallmentFee>**| List of all loan account\&#39;s planned installment fees to be created. | |
| **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<PlannedInstallmentFee>**

### 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** | Loan account planned installment fees were created. |  -  |
|**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)

# **deletePlannedFees**
> deletePlannedFees()


### Example

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

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

let loanAccountId: string; //The ID or encoded key of the loan account. (default to undefined)
let plannedInstallmentFeeKey: string; //The encoded key of the planned installment fee to be deleted. (default to undefined)

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

### Parameters

|Name | Type | Description  | Notes|
|------------- | ------------- | ------------- | -------------|
| **loanAccountId** | [**string**] | The ID or encoded key of the loan account. | defaults to undefined|
| **plannedInstallmentFeeKey** | [**string**] | The encoded key of the planned installment fee to be deleted. | 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** | Loan account planned installment fee was deleted. |  -  |
|**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)

# **getAllPlannedFees**
> Array<PlannedInstallmentFee> getAllPlannedFees()


### Example

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

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

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

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

### Parameters

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


### Return type

**Array<PlannedInstallmentFee>**

### 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 |
|-------------|-------------|------------------|
|**200** | Planned installment fees list was returned. |  -  |
|**400** | A validation error occurred |  -  |
|**401** | Unauthorized |  -  |
|**403** | Forbidden |  -  |

[[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)

# **updatePlannedFees**
> Array<PlannedInstallmentFee> updatePlannedFees(plannedInstallmentFee)


### Example

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

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

let loanAccountId: string; //The ID or encoded key of the loan account. (default to undefined)
let plannedInstallmentFee: Array<PlannedInstallmentFee>; //List of all loan account\'s planned installment fees to be updated. Installment key should be used for identification.

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

### Parameters

|Name | Type | Description  | Notes|
|------------- | ------------- | ------------- | -------------|
| **plannedInstallmentFee** | **Array<PlannedInstallmentFee>**| List of all loan account\&#39;s planned installment fees to be updated. Installment key should be used for identification. | |
| **loanAccountId** | [**string**] | The ID or encoded key of the loan account. | defaults to undefined|


### Return type

**Array<PlannedInstallmentFee>**

### 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** | Loan account planned installment fees were updated. |  -  |
|**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)

