# LoanAccountBalancesApi

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

|Method | HTTP request | Description|
|------------- | ------------- | -------------|
|[**applyBalanceInterest**](#applybalanceinterest) | **POST** /loans/{loanAccountId}/balances/{loanAccountBalance}:applyInterest | Apply interest on a loan account balance|
|[**getBalancesByLoanAccountId**](#getbalancesbyloanaccountid) | **GET** /loans/{loanAccountId}/balances | Get loan account balances|

# **applyBalanceInterest**
> LoanAccountBalanceChanges applyBalanceInterest()


### Example

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

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

let loanAccountId: string; //The ID or encoded key of the loan account. (default to undefined)
let loanAccountBalance: string; //Loan account balance to apply interest on (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)
let applyBalanceInterestInput: ApplyBalanceInterestInput; //Represents a request for applying the accrued interest on a loan account balance (optional)

const { status, data } = await apiInstance.applyBalanceInterest(
    loanAccountId,
    loanAccountBalance,
    idempotencyKey,
    applyBalanceInterestInput
);
```

### Parameters

|Name | Type | Description  | Notes|
|------------- | ------------- | ------------- | -------------|
| **applyBalanceInterestInput** | **ApplyBalanceInterestInput**| Represents a request for applying the accrued interest on a loan account balance | |
| **loanAccountId** | [**string**] | The ID or encoded key of the loan account. | defaults to undefined|
| **loanAccountBalance** | [**string**] | Loan account balance to apply interest on | 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

**LoanAccountBalanceChanges**

### 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** | Interest successfully applied, balance changes returned |  -  |
|**400** | A validation error occurred |  -  |
|**401** | Unauthorized |  -  |
|**403** | Forbidden |  -  |
|**404** | Loan account or loan account balance 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)

# **getBalancesByLoanAccountId**
> LoanAccountBalances getBalancesByLoanAccountId()


### Example

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

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

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

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

### Parameters

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


### Return type

**LoanAccountBalances**

### 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 returned. |  -  |
|**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)

