Skip to content

Commit 7926c20

Browse files
Merge pull request #33 from mxenabled/openapi-generator-0.5.3
Generated version 0.5.3
2 parents 028c4d3 + fd5643e commit 7926c20

File tree

7 files changed

+274
-5
lines changed

7 files changed

+274
-5
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ mvn clean package
2424
```
2525

2626
Then manually install the following JARs:
27-
- `target/mx-platform-java-0.5.2.jar`
27+
- `target/mx-platform-java-0.5.3.jar`
2828
- `target/lib/*.jar`
2929

3030
### Maven users
@@ -35,7 +35,7 @@ Add this dependency to your project's POM:
3535
<dependency>
3636
<groupId>com.mx</groupId>
3737
<artifactId>mx-platform-java</artifactId>
38-
<version>0.5.2</version>
38+
<version>0.5.3</version>
3939
<scope>compile</scope>
4040
</dependency>
4141
```

docs/MxPlatformApi.md

Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ Method | HTTP request | Description
3737
[**listDefaultCategoriesByUser**](MxPlatformApi.md#listDefaultCategoriesByUser) | **GET** /users/{user_guid}/categories/default | List default categories by user
3838
[**listFavoriteInstitutions**](MxPlatformApi.md#listFavoriteInstitutions) | **GET** /institutions/favorites | List favorite institutions
3939
[**listHoldings**](MxPlatformApi.md#listHoldings) | **GET** /users/{user_guid}/holdings | List holdings
40+
[**listHoldingsByAccount**](MxPlatformApi.md#listHoldingsByAccount) | **GET** /users/{user_guid}/accounts/{account_guid}/holdings | List holdings by account
4041
[**listHoldingsByMember**](MxPlatformApi.md#listHoldingsByMember) | **GET** /users/{user_guid}/members/{member_guid}/holdings | List holdings by member
4142
[**listInstitutionCredentials**](MxPlatformApi.md#listInstitutionCredentials) | **GET** /institutions/{institution_code}/credentials | List institution credentials
4243
[**listInstitutions**](MxPlatformApi.md#listInstitutions) | **GET** /institutions | List institutions
@@ -2421,6 +2422,84 @@ Name | Type | Description | Notes
24212422
|-------------|-------------|------------------|
24222423
**200** | OK | - |
24232424

2425+
<a name="listHoldingsByAccount"></a>
2426+
# **listHoldingsByAccount**
2427+
> HoldingsResponseBody listHoldingsByAccount(accountGuid, userGuid, fromDate, page, recordsPerPage, toDate)
2428+
2429+
List holdings by account
2430+
2431+
This endpoint returns all holdings associated with the specified &#x60;account&#x60;.
2432+
2433+
### Example
2434+
```java
2435+
// Import classes:
2436+
import com.mx.client.ApiClient;
2437+
import com.mx.client.ApiException;
2438+
import com.mx.client.Configuration;
2439+
import com.mx.client.auth.*;
2440+
import com.mx.client.models.*;
2441+
import com.mx.client.mx_platform_api.MxPlatformApi;
2442+
2443+
public class Example {
2444+
public static void main(String[] args) {
2445+
ApiClient defaultClient = Configuration.getDefaultApiClient();
2446+
defaultClient.setBasePath("https://api.mx.com");
2447+
2448+
// Configure HTTP basic authorization: basicAuth
2449+
HttpBasicAuth basicAuth = (HttpBasicAuth) defaultClient.getAuthentication("basicAuth");
2450+
basicAuth.setUsername("YOUR USERNAME");
2451+
basicAuth.setPassword("YOUR PASSWORD");
2452+
2453+
MxPlatformApi apiInstance = new MxPlatformApi(defaultClient);
2454+
String accountGuid = "ACT-7c6f361b-e582-15b6-60c0-358f12466b4b"; // String | The unique id for the `account`.
2455+
String userGuid = "USR-fa7537f3-48aa-a683-a02a-b18940482f54"; // String | The unique id for the `user`.
2456+
String fromDate = "2015-09-20"; // String | Filter holdings from this date.
2457+
Integer page = 1; // Integer | Specify current page.
2458+
Integer recordsPerPage = 10; // Integer | Specify records per page.
2459+
String toDate = "2019-10-20"; // String | Filter holdings to this date.
2460+
try {
2461+
HoldingsResponseBody result = apiInstance.listHoldingsByAccount(accountGuid, userGuid, fromDate, page, recordsPerPage, toDate);
2462+
System.out.println(result);
2463+
} catch (ApiException e) {
2464+
System.err.println("Exception when calling MxPlatformApi#listHoldingsByAccount");
2465+
System.err.println("Status code: " + e.getCode());
2466+
System.err.println("Reason: " + e.getResponseBody());
2467+
System.err.println("Response headers: " + e.getResponseHeaders());
2468+
e.printStackTrace();
2469+
}
2470+
}
2471+
}
2472+
```
2473+
2474+
### Parameters
2475+
2476+
Name | Type | Description | Notes
2477+
------------- | ------------- | ------------- | -------------
2478+
**accountGuid** | **String**| The unique id for the &#x60;account&#x60;. |
2479+
**userGuid** | **String**| The unique id for the &#x60;user&#x60;. |
2480+
**fromDate** | **String**| Filter holdings from this date. | [optional]
2481+
**page** | **Integer**| Specify current page. | [optional]
2482+
**recordsPerPage** | **Integer**| Specify records per page. | [optional]
2483+
**toDate** | **String**| Filter holdings to this date. | [optional]
2484+
2485+
### Return type
2486+
2487+
[**HoldingsResponseBody**](HoldingsResponseBody.md)
2488+
2489+
### Authorization
2490+
2491+
[basicAuth](../README.md#basicAuth)
2492+
2493+
### HTTP request headers
2494+
2495+
- **Content-Type**: Not defined
2496+
- **Accept**: application/vnd.mx.api.v1+json
2497+
2498+
### HTTP response details
2499+
| Status code | Description | Response headers |
2500+
|-------------|-------------|------------------|
2501+
**200** | OK | - |
2502+
24242503
<a name="listHoldingsByMember"></a>
24252504
# **listHoldingsByMember**
24262505
> HoldingsResponseBody listHoldingsByMember(memberGuid, userGuid, fromDate, page, recordsPerPage, toDate)

openapi/config.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ apiPackage: com.mx.client.mx-platform-api
33
artifactDescription: A Java library for the MX Platform API
44
artifactId: mx-platform-java
55
artifactUrl: https://github.com/mxenabled/mx-platform-java
6-
artifactVersion: 0.5.2
6+
artifactVersion: 0.5.3
77
developerEmail: devexperience@mx.com
88
developerName: MX
99
developerOrganization: MX Technologies Inc.

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<artifactId>mx-platform-java</artifactId>
66
<packaging>jar</packaging>
77
<name>mx-platform-java</name>
8-
<version>0.5.2</version>
8+
<version>0.5.3</version>
99
<url>https://github.com/mxenabled/mx-platform-java</url>
1010
<description>A Java library for the MX Platform API</description>
1111
<scm>

src/main/java/com/mx/client/ApiClient.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ private void init() {
131131
json = new JSON();
132132

133133
// Set default User-Agent.
134-
setUserAgent("OpenAPI-Generator/0.5.2/java");
134+
setUserAgent("OpenAPI-Generator/0.5.3/java");
135135

136136
authentications = new HashMap<String, Authentication>();
137137
}

src/main/java/com/mx/client/mx_platform_api/MxPlatformApi.java

Lines changed: 170 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4732,6 +4732,176 @@ public okhttp3.Call listHoldingsAsync(String userGuid, String fromDate, Integer
47324732
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
47334733
return localVarCall;
47344734
}
4735+
/**
4736+
* Build call for listHoldingsByAccount
4737+
* @param accountGuid The unique id for the &#x60;account&#x60;. (required)
4738+
* @param userGuid The unique id for the &#x60;user&#x60;. (required)
4739+
* @param fromDate Filter holdings from this date. (optional)
4740+
* @param page Specify current page. (optional)
4741+
* @param recordsPerPage Specify records per page. (optional)
4742+
* @param toDate Filter holdings to this date. (optional)
4743+
* @param _callback Callback for upload/download progress
4744+
* @return Call to execute
4745+
* @throws ApiException If fail to serialize the request body object
4746+
* @http.response.details
4747+
<table summary="Response Details" border="1">
4748+
<tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
4749+
<tr><td> 200 </td><td> OK </td><td> - </td></tr>
4750+
</table>
4751+
*/
4752+
public okhttp3.Call listHoldingsByAccountCall(String accountGuid, String userGuid, String fromDate, Integer page, Integer recordsPerPage, String toDate, final ApiCallback _callback) throws ApiException {
4753+
String basePath = null;
4754+
4755+
// Operation Servers
4756+
String[] localBasePaths = new String[] { };
4757+
4758+
// Determine Base Path to Use
4759+
if (localCustomBaseUrl != null){
4760+
basePath = localCustomBaseUrl;
4761+
} else if ( localBasePaths.length > 0 ) {
4762+
basePath = localBasePaths[localHostIndex];
4763+
} else {
4764+
basePath = null;
4765+
}
4766+
4767+
Object localVarPostBody = null;
4768+
4769+
// create path and map variables
4770+
String localVarPath = "/users/{user_guid}/accounts/{account_guid}/holdings"
4771+
.replaceAll("\\{" + "account_guid" + "\\}", localVarApiClient.escapeString(accountGuid.toString()))
4772+
.replaceAll("\\{" + "user_guid" + "\\}", localVarApiClient.escapeString(userGuid.toString()));
4773+
4774+
List<Pair> localVarQueryParams = new ArrayList<Pair>();
4775+
List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>();
4776+
Map<String, String> localVarHeaderParams = new HashMap<String, String>();
4777+
Map<String, String> localVarCookieParams = new HashMap<String, String>();
4778+
Map<String, Object> localVarFormParams = new HashMap<String, Object>();
4779+
4780+
if (fromDate != null) {
4781+
localVarQueryParams.addAll(localVarApiClient.parameterToPair("from_date", fromDate));
4782+
}
4783+
4784+
if (page != null) {
4785+
localVarQueryParams.addAll(localVarApiClient.parameterToPair("page", page));
4786+
}
4787+
4788+
if (recordsPerPage != null) {
4789+
localVarQueryParams.addAll(localVarApiClient.parameterToPair("records_per_page", recordsPerPage));
4790+
}
4791+
4792+
if (toDate != null) {
4793+
localVarQueryParams.addAll(localVarApiClient.parameterToPair("to_date", toDate));
4794+
}
4795+
4796+
final String[] localVarAccepts = {
4797+
"application/vnd.mx.api.v1+json"
4798+
};
4799+
final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
4800+
if (localVarAccept != null) {
4801+
localVarHeaderParams.put("Accept", localVarAccept);
4802+
}
4803+
4804+
final String[] localVarContentTypes = {
4805+
4806+
};
4807+
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
4808+
if (localVarHeaderParams != null) {
4809+
localVarHeaderParams.put("Content-Type", localVarContentType);
4810+
}
4811+
4812+
String[] localVarAuthNames = new String[] { "basicAuth" };
4813+
return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback);
4814+
}
4815+
4816+
@SuppressWarnings("rawtypes")
4817+
private okhttp3.Call listHoldingsByAccountValidateBeforeCall(String accountGuid, String userGuid, String fromDate, Integer page, Integer recordsPerPage, String toDate, final ApiCallback _callback) throws ApiException {
4818+
4819+
// verify the required parameter 'accountGuid' is set
4820+
if (accountGuid == null) {
4821+
throw new ApiException("Missing the required parameter 'accountGuid' when calling listHoldingsByAccount(Async)");
4822+
}
4823+
4824+
// verify the required parameter 'userGuid' is set
4825+
if (userGuid == null) {
4826+
throw new ApiException("Missing the required parameter 'userGuid' when calling listHoldingsByAccount(Async)");
4827+
}
4828+
4829+
4830+
okhttp3.Call localVarCall = listHoldingsByAccountCall(accountGuid, userGuid, fromDate, page, recordsPerPage, toDate, _callback);
4831+
return localVarCall;
4832+
4833+
}
4834+
4835+
/**
4836+
* List holdings by account
4837+
* This endpoint returns all holdings associated with the specified &#x60;account&#x60;.
4838+
* @param accountGuid The unique id for the &#x60;account&#x60;. (required)
4839+
* @param userGuid The unique id for the &#x60;user&#x60;. (required)
4840+
* @param fromDate Filter holdings from this date. (optional)
4841+
* @param page Specify current page. (optional)
4842+
* @param recordsPerPage Specify records per page. (optional)
4843+
* @param toDate Filter holdings to this date. (optional)
4844+
* @return HoldingsResponseBody
4845+
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
4846+
* @http.response.details
4847+
<table summary="Response Details" border="1">
4848+
<tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
4849+
<tr><td> 200 </td><td> OK </td><td> - </td></tr>
4850+
</table>
4851+
*/
4852+
public HoldingsResponseBody listHoldingsByAccount(String accountGuid, String userGuid, String fromDate, Integer page, Integer recordsPerPage, String toDate) throws ApiException {
4853+
ApiResponse<HoldingsResponseBody> localVarResp = listHoldingsByAccountWithHttpInfo(accountGuid, userGuid, fromDate, page, recordsPerPage, toDate);
4854+
return localVarResp.getData();
4855+
}
4856+
4857+
/**
4858+
* List holdings by account
4859+
* This endpoint returns all holdings associated with the specified &#x60;account&#x60;.
4860+
* @param accountGuid The unique id for the &#x60;account&#x60;. (required)
4861+
* @param userGuid The unique id for the &#x60;user&#x60;. (required)
4862+
* @param fromDate Filter holdings from this date. (optional)
4863+
* @param page Specify current page. (optional)
4864+
* @param recordsPerPage Specify records per page. (optional)
4865+
* @param toDate Filter holdings to this date. (optional)
4866+
* @return ApiResponse&lt;HoldingsResponseBody&gt;
4867+
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
4868+
* @http.response.details
4869+
<table summary="Response Details" border="1">
4870+
<tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
4871+
<tr><td> 200 </td><td> OK </td><td> - </td></tr>
4872+
</table>
4873+
*/
4874+
public ApiResponse<HoldingsResponseBody> listHoldingsByAccountWithHttpInfo(String accountGuid, String userGuid, String fromDate, Integer page, Integer recordsPerPage, String toDate) throws ApiException {
4875+
okhttp3.Call localVarCall = listHoldingsByAccountValidateBeforeCall(accountGuid, userGuid, fromDate, page, recordsPerPage, toDate, null);
4876+
Type localVarReturnType = new TypeToken<HoldingsResponseBody>(){}.getType();
4877+
return localVarApiClient.execute(localVarCall, localVarReturnType);
4878+
}
4879+
4880+
/**
4881+
* List holdings by account (asynchronously)
4882+
* This endpoint returns all holdings associated with the specified &#x60;account&#x60;.
4883+
* @param accountGuid The unique id for the &#x60;account&#x60;. (required)
4884+
* @param userGuid The unique id for the &#x60;user&#x60;. (required)
4885+
* @param fromDate Filter holdings from this date. (optional)
4886+
* @param page Specify current page. (optional)
4887+
* @param recordsPerPage Specify records per page. (optional)
4888+
* @param toDate Filter holdings to this date. (optional)
4889+
* @param _callback The callback to be executed when the API call finishes
4890+
* @return The request call
4891+
* @throws ApiException If fail to process the API call, e.g. serializing the request body object
4892+
* @http.response.details
4893+
<table summary="Response Details" border="1">
4894+
<tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
4895+
<tr><td> 200 </td><td> OK </td><td> - </td></tr>
4896+
</table>
4897+
*/
4898+
public okhttp3.Call listHoldingsByAccountAsync(String accountGuid, String userGuid, String fromDate, Integer page, Integer recordsPerPage, String toDate, final ApiCallback<HoldingsResponseBody> _callback) throws ApiException {
4899+
4900+
okhttp3.Call localVarCall = listHoldingsByAccountValidateBeforeCall(accountGuid, userGuid, fromDate, page, recordsPerPage, toDate, _callback);
4901+
Type localVarReturnType = new TypeToken<HoldingsResponseBody>(){}.getType();
4902+
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
4903+
return localVarCall;
4904+
}
47354905
/**
47364906
* Build call for listHoldingsByMember
47374907
* @param memberGuid The unique id for a &#x60;member&#x60;. (required)

src/test/java/com/mx/client/mx_platform_api/MxPlatformApiTest.java

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -631,6 +631,26 @@ public void listHoldingsTest() throws ApiException {
631631
// TODO: test validations
632632
}
633633

634+
/**
635+
* List holdings by account
636+
*
637+
* This endpoint returns all holdings associated with the specified &#x60;account&#x60;.
638+
*
639+
* @throws ApiException
640+
* if the Api call fails
641+
*/
642+
@Test
643+
public void listHoldingsByAccountTest() throws ApiException {
644+
String accountGuid = null;
645+
String userGuid = null;
646+
String fromDate = null;
647+
Integer page = null;
648+
Integer recordsPerPage = null;
649+
String toDate = null;
650+
HoldingsResponseBody response = api.listHoldingsByAccount(accountGuid, userGuid, fromDate, page, recordsPerPage, toDate);
651+
// TODO: test validations
652+
}
653+
634654
/**
635655
* List holdings by member
636656
*

0 commit comments

Comments
 (0)