# LoanAccountScheduleApi

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

|Method | HTTP request | Description|
|------------- | ------------- | -------------|
|[**editSchedule**](#editschedule) | **PUT** /loans/{loanAccountId}/schedule | Update loan account schedule|
|[**getScheduleForLoanAccount**](#getscheduleforloanaccount) | **GET** /loans/{loanAccountId}/schedule | Get loan account schedule|
|[**previewProcessPMTTransactionally**](#previewprocesspmttransactionally) | **POST** /loans/{loanAccountId}/schedule/previewProcessPMTTransactionally | Preview loan account schedule using transactional processing for PMT.|
|[**previewSchedule**](#previewschedule) | **POST** /loans/schedule:preview | Preview loan account schedule for non-existent loan account|
|[**previewTranchesOnSchedule**](#previewtranchesonschedule) | **POST** /loans/{loanAccountId}/schedule:previewTranches | Preview loan account schedule for non-existent loan account|

# **editSchedule**
> LoanAccountSchedule editSchedule(installment)


### Example

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

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

let loanAccountId: string; //The ID or encoded key of the loan account. (default to undefined)
let installment: Array<Installment>; //The list of installments to update the current loan account schedule.

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

### Parameters

|Name | Type | Description  | Notes|
|------------- | ------------- | ------------- | -------------|
| **installment** | **Array<Installment>**| The list of installments to update the current loan account schedule. | |
| **loanAccountId** | [**string**] | The ID or encoded key of the loan account. | defaults to undefined|


### Return type

**LoanAccountSchedule**

### 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** | Updated loan account schedule. |  -  |
|**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)

# **getScheduleForLoanAccount**
> LoanAccountSchedule getScheduleForLoanAccount()


### Example

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

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

let loanAccountId: string; //The ID or encoded key of the loan account. (default to undefined)
let detailsLevel: 'BASIC' | 'FULL'; //The level of details to return: `FULL` means the full details of the object will be returned (custom field values, address, contact info, or any other related objects) and `BASIC` will return only the first level elements of the object. (optional) (default to undefined)

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

### Parameters

|Name | Type | Description  | Notes|
|------------- | ------------- | ------------- | -------------|
| **loanAccountId** | [**string**] | The ID or encoded key of the loan account. | defaults to undefined|
| **detailsLevel** | [**&#39;BASIC&#39; | &#39;FULL&#39;**]**Array<&#39;BASIC&#39; &#124; &#39;FULL&#39;>** | The level of details to return: &#x60;FULL&#x60; means the full details of the object will be returned (custom field values, address, contact info, or any other related objects) and &#x60;BASIC&#x60; will return only the first level elements of the object. | (optional) defaults to undefined|


### Return type

**LoanAccountSchedule**

### 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** | Loan account schedule returned by the loan account ID or encoded key. |  -  |
|**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)

# **previewProcessPMTTransactionally**
> LoanAccountPreviewProcessPMTTransactionally previewProcessPMTTransactionally()


### Example

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

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

let loanAccountId: string; //The ID or encoded key of the loan account. (default to undefined)
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.previewProcessPMTTransactionally(
    loanAccountId,
    idempotencyKey
);
```

### Parameters

|Name | Type | Description  | Notes|
|------------- | ------------- | ------------- | -------------|
| **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

**LoanAccountPreviewProcessPMTTransactionally**

### 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** | Loan account schedule preview is ready. |  -  |
|**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)

# **previewSchedule**
> LoanAccountSchedule previewSchedule(previewLoanAccountSchedule)


### Example

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

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

let previewLoanAccountSchedule: PreviewLoanAccountSchedule; //Loan account parameters for a schedule to be previewed.
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.previewSchedule(
    previewLoanAccountSchedule,
    idempotencyKey
);
```

### Parameters

|Name | Type | Description  | Notes|
|------------- | ------------- | ------------- | -------------|
| **previewLoanAccountSchedule** | **PreviewLoanAccountSchedule**| Loan account parameters for a schedule to be previewed. | |
| **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

**LoanAccountSchedule**

### 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 schedule preview is ready. |  -  |
|**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)

# **previewTranchesOnSchedule**
> LoanAccountSchedule previewTranchesOnSchedule(loanTranche)


### Example

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

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

let loanAccountId: string; //The ID or encoded key of the loan account. (default to undefined)
let loanTranche: Array<LoanTranche>; //List of tranches to be considered in the schedule preview.
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.previewTranchesOnSchedule(
    loanAccountId,
    loanTranche,
    idempotencyKey
);
```

### Parameters

|Name | Type | Description  | Notes|
|------------- | ------------- | ------------- | -------------|
| **loanTranche** | **Array<LoanTranche>**| List of tranches to be considered in the schedule preview. | |
| **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

**LoanAccountSchedule**

### 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 schedule preview is ready. |  -  |
|**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)

