# LoanAccountTranchesApi

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

|Method | HTTP request | Description|
|------------- | ------------- | -------------|
|[**editTranches**](#edittranches) | **PUT** /loans/{loanAccountId}/tranches | Update loan account tranches list|
|[**getTranches**](#gettranches) | **GET** /loans/{loanAccountId}/tranches | Get loan account tranches list|

# **editTranches**
> Array<LoanTranche> editTranches(loanTranche)


### Example

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

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

let loanAccountId: string; //The ID or encoded key of the loan account. (default to undefined)
let loanTranche: Array<LoanTranche>; //The list of tranches to update the current loan account with.

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

### Parameters

|Name | Type | Description  | Notes|
|------------- | ------------- | ------------- | -------------|
| **loanTranche** | **Array<LoanTranche>**| The list of tranches to update the current loan account with. | |
| **loanAccountId** | [**string**] | The ID or encoded key of the loan account. | defaults to undefined|


### Return type

**Array<LoanTranche>**

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

# **getTranches**
> Array<LoanTranche> getTranches()


### Example

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

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

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

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

### Parameters

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


### Return type

**Array<LoanTranche>**

### 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 accounts tranches list 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)

