Skip to content

Commit 592c8a6

Browse files
Merge pull request #24 from mxenabled/bm/openapi_update
Include updates to OpenAPI spec
2 parents 26c2a8e + 632cb90 commit 592c8a6

File tree

10 files changed

+451
-37
lines changed

10 files changed

+451
-37
lines changed

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
MIT License
22

3-
Copyright (c) 2021 MX Technologies Inc.
3+
Copyright (c) 2022 MX Technologies Inc.
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

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.3.4.jar`
27+
- `target/mx-platform-java-0.4.0.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.3.4</version>
38+
<version>0.4.0</version>
3939
<scope>compile</scope>
4040
</dependency>
4141
```

docs/MxPlatformApi.md

Lines changed: 149 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,8 @@ Method | HTTP request | Description
3333
[**listAccountNumbersByMember**](MxPlatformApi.md#listAccountNumbersByMember) | **GET** /users/{user_guid}/members/{member_guid}/account_numbers | List account numbers by member
3434
[**listAccountOwnersByMember**](MxPlatformApi.md#listAccountOwnersByMember) | **GET** /users/{user_guid}/members/{member_guid}/account_owners | List account owners by member
3535
[**listCategories**](MxPlatformApi.md#listCategories) | **GET** /users/{user_guid}/categories | List categories
36-
[**listDefaultCategories**](MxPlatformApi.md#listDefaultCategories) | **GET** /users/{user_guid}/categories/default | List default categories
36+
[**listDefaultCategories**](MxPlatformApi.md#listDefaultCategories) | **GET** /categories/default | List default categories
37+
[**listDefaultCategoriesByUser**](MxPlatformApi.md#listDefaultCategoriesByUser) | **GET** /users/{user_guid}/categories/default | List default categories by user
3738
[**listFavoriteInstitutions**](MxPlatformApi.md#listFavoriteInstitutions) | **GET** /institutions/favorites | List favorite institutions
3839
[**listHoldings**](MxPlatformApi.md#listHoldings) | **GET** /users/{user_guid}/holdings | List holdings
3940
[**listHoldingsByMember**](MxPlatformApi.md#listHoldingsByMember) | **GET** /users/{user_guid}/members/{member_guid}/holdings | List holdings by member
@@ -58,7 +59,8 @@ Method | HTTP request | Description
5859
[**listUserAccounts**](MxPlatformApi.md#listUserAccounts) | **GET** /users/{user_guid}/accounts | List accounts
5960
[**listUsers**](MxPlatformApi.md#listUsers) | **GET** /users | List users
6061
[**readAccount**](MxPlatformApi.md#readAccount) | **GET** /users/{user_guid}/accounts/{account_guid} | Read account
61-
[**readCategory**](MxPlatformApi.md#readCategory) | **GET** /users/{user_guid}/categories/{category_guid} | Read category
62+
[**readCategory**](MxPlatformApi.md#readCategory) | **GET** /users/{user_guid}/categories/{category_guid} | Read a custom category
63+
[**readDefaultCategory**](MxPlatformApi.md#readDefaultCategory) | **GET** /categories/{category_guid} | Read a default category
6264
[**readHolding**](MxPlatformApi.md#readHolding) | **GET** /users/{user_guid}/holdings/{holding_guid} | Read holding
6365
[**readInstitution**](MxPlatformApi.md#readInstitution) | **GET** /institutions/{institution_code} | Read institution
6466
[**readManagedAccount**](MxPlatformApi.md#readManagedAccount) | **GET** /users/{user_guid}/managed_members/{member_guid}/accounts/{account_guid} | Read managed account
@@ -2133,11 +2135,11 @@ Name | Type | Description | Notes
21332135

21342136
<a name="listDefaultCategories"></a>
21352137
# **listDefaultCategories**
2136-
> CategoriesResponseBody listDefaultCategories(userGuid, page, recordsPerPage)
2138+
> CategoriesResponseBody listDefaultCategories(page, recordsPerPage)
21372139
21382140
List default categories
21392141

2140-
Use this endpoint to read the attributes of a specific user.
2142+
Use this endpoint to retrieve a list of all the default categories and subcategories offered within the MX Platform API. In other words, each item in the returned list will have its &#x60;is_default&#x60; field set to &#x60;true&#x60;. There are currently 119 default categories and subcategories. Both the _list default categories_ and _list default categories by user_ endpoints return the same results. The different routes are provided for convenience.
21412143

21422144
### Example
21432145
```java
@@ -2160,11 +2162,10 @@ public class Example {
21602162
basicAuth.setPassword("YOUR PASSWORD");
21612163

21622164
MxPlatformApi apiInstance = new MxPlatformApi(defaultClient);
2163-
String userGuid = "USR-fa7537f3-48aa-a683-a02a-b18940482f54"; // String | The unique id for a `user`.
21642165
Integer page = 1; // Integer | Specify current page.
21652166
Integer recordsPerPage = 10; // Integer | Specify records per page.
21662167
try {
2167-
CategoriesResponseBody result = apiInstance.listDefaultCategories(userGuid, page, recordsPerPage);
2168+
CategoriesResponseBody result = apiInstance.listDefaultCategories(page, recordsPerPage);
21682169
System.out.println(result);
21692170
} catch (ApiException e) {
21702171
System.err.println("Exception when calling MxPlatformApi#listDefaultCategories");
@@ -2179,6 +2180,77 @@ public class Example {
21792180

21802181
### Parameters
21812182

2183+
Name | Type | Description | Notes
2184+
------------- | ------------- | ------------- | -------------
2185+
**page** | **Integer**| Specify current page. | [optional]
2186+
**recordsPerPage** | **Integer**| Specify records per page. | [optional]
2187+
2188+
### Return type
2189+
2190+
[**CategoriesResponseBody**](CategoriesResponseBody.md)
2191+
2192+
### Authorization
2193+
2194+
[basicAuth](../README.md#basicAuth)
2195+
2196+
### HTTP request headers
2197+
2198+
- **Content-Type**: Not defined
2199+
- **Accept**: application/vnd.mx.api.v1+json
2200+
2201+
### HTTP response details
2202+
| Status code | Description | Response headers |
2203+
|-------------|-------------|------------------|
2204+
**200** | OK | - |
2205+
2206+
<a name="listDefaultCategoriesByUser"></a>
2207+
# **listDefaultCategoriesByUser**
2208+
> CategoriesResponseBody listDefaultCategoriesByUser(userGuid, page, recordsPerPage)
2209+
2210+
List default categories by user
2211+
2212+
Use this endpoint to retrieve a list of all the default categories and subcategories, scoped by user, offered within the MX Platform API. In other words, each item in the returned list will have its &#x60;is_default&#x60; field set to &#x60;true&#x60;. There are currently 119 default categories and subcategories. Both the _list default categories_ and _list default categories by user_ endpoints return the same results. The different routes are provided for convenience.
2213+
2214+
### Example
2215+
```java
2216+
// Import classes:
2217+
import com.mx.client.ApiClient;
2218+
import com.mx.client.ApiException;
2219+
import com.mx.client.Configuration;
2220+
import com.mx.client.auth.*;
2221+
import com.mx.client.models.*;
2222+
import com.mx.client.mx_platform_api.MxPlatformApi;
2223+
2224+
public class Example {
2225+
public static void main(String[] args) {
2226+
ApiClient defaultClient = Configuration.getDefaultApiClient();
2227+
defaultClient.setBasePath("https://api.mx.com");
2228+
2229+
// Configure HTTP basic authorization: basicAuth
2230+
HttpBasicAuth basicAuth = (HttpBasicAuth) defaultClient.getAuthentication("basicAuth");
2231+
basicAuth.setUsername("YOUR USERNAME");
2232+
basicAuth.setPassword("YOUR PASSWORD");
2233+
2234+
MxPlatformApi apiInstance = new MxPlatformApi(defaultClient);
2235+
String userGuid = "USR-fa7537f3-48aa-a683-a02a-b18940482f54"; // String | The unique id for a `user`.
2236+
Integer page = 1; // Integer | Specify current page.
2237+
Integer recordsPerPage = 10; // Integer | Specify records per page.
2238+
try {
2239+
CategoriesResponseBody result = apiInstance.listDefaultCategoriesByUser(userGuid, page, recordsPerPage);
2240+
System.out.println(result);
2241+
} catch (ApiException e) {
2242+
System.err.println("Exception when calling MxPlatformApi#listDefaultCategoriesByUser");
2243+
System.err.println("Status code: " + e.getCode());
2244+
System.err.println("Reason: " + e.getResponseBody());
2245+
System.err.println("Response headers: " + e.getResponseHeaders());
2246+
e.printStackTrace();
2247+
}
2248+
}
2249+
}
2250+
```
2251+
2252+
### Parameters
2253+
21822254
Name | Type | Description | Notes
21832255
------------- | ------------- | ------------- | -------------
21842256
**userGuid** | **String**| The unique id for a &#x60;user&#x60;. |
@@ -3975,7 +4047,7 @@ Name | Type | Description | Notes
39754047
# **readCategory**
39764048
> CategoryResponseBody readCategory(categoryGuid, userGuid)
39774049
3978-
Read category
4050+
Read a custom category
39794051

39804052
Use this endpoint to read the attributes of either a default category or a custom category.
39814053

@@ -4041,6 +4113,76 @@ Name | Type | Description | Notes
40414113
|-------------|-------------|------------------|
40424114
**200** | OK | - |
40434115

4116+
<a name="readDefaultCategory"></a>
4117+
# **readDefaultCategory**
4118+
> CategoryResponseBody readDefaultCategory(categoryGuid, userGuid)
4119+
4120+
Read a default category
4121+
4122+
Use this endpoint to read the attributes of a default category.
4123+
4124+
### Example
4125+
```java
4126+
// Import classes:
4127+
import com.mx.client.ApiClient;
4128+
import com.mx.client.ApiException;
4129+
import com.mx.client.Configuration;
4130+
import com.mx.client.auth.*;
4131+
import com.mx.client.models.*;
4132+
import com.mx.client.mx_platform_api.MxPlatformApi;
4133+
4134+
public class Example {
4135+
public static void main(String[] args) {
4136+
ApiClient defaultClient = Configuration.getDefaultApiClient();
4137+
defaultClient.setBasePath("https://api.mx.com");
4138+
4139+
// Configure HTTP basic authorization: basicAuth
4140+
HttpBasicAuth basicAuth = (HttpBasicAuth) defaultClient.getAuthentication("basicAuth");
4141+
basicAuth.setUsername("YOUR USERNAME");
4142+
basicAuth.setPassword("YOUR PASSWORD");
4143+
4144+
MxPlatformApi apiInstance = new MxPlatformApi(defaultClient);
4145+
String categoryGuid = "CAT-7829f71c-2e8c-afa5-2f55-fa3634b89874"; // String | The unique id for a `category`.
4146+
String userGuid = "USR-fa7537f3-48aa-a683-a02a-b18940482f54"; // String | The unique id for a `user`.
4147+
try {
4148+
CategoryResponseBody result = apiInstance.readDefaultCategory(categoryGuid, userGuid);
4149+
System.out.println(result);
4150+
} catch (ApiException e) {
4151+
System.err.println("Exception when calling MxPlatformApi#readDefaultCategory");
4152+
System.err.println("Status code: " + e.getCode());
4153+
System.err.println("Reason: " + e.getResponseBody());
4154+
System.err.println("Response headers: " + e.getResponseHeaders());
4155+
e.printStackTrace();
4156+
}
4157+
}
4158+
}
4159+
```
4160+
4161+
### Parameters
4162+
4163+
Name | Type | Description | Notes
4164+
------------- | ------------- | ------------- | -------------
4165+
**categoryGuid** | **String**| The unique id for a &#x60;category&#x60;. |
4166+
**userGuid** | **String**| The unique id for a &#x60;user&#x60;. |
4167+
4168+
### Return type
4169+
4170+
[**CategoryResponseBody**](CategoryResponseBody.md)
4171+
4172+
### Authorization
4173+
4174+
[basicAuth](../README.md#basicAuth)
4175+
4176+
### HTTP request headers
4177+
4178+
- **Content-Type**: Not defined
4179+
- **Accept**: application/vnd.mx.api.v1+json
4180+
4181+
### HTTP response details
4182+
| Status code | Description | Response headers |
4183+
|-------------|-------------|------------------|
4184+
**200** | OK | - |
4185+
40444186
<a name="readHolding"></a>
40454187
# **readHolding**
40464188
> HoldingResponseBody readHolding(holdingGuid, userGuid)

openapi/config.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ apiPackage: "com.mx.client.mx-platform-api"
22
artifactDescription: "A Java library for the MX Platform API"
33
artifactId: "mx-platform-java"
44
artifactUrl: "https://github.com/mxenabled/mx-platform-java"
5-
artifactVersion: 0.3.4
5+
artifactVersion: 0.4.0
66
developerEmail: "devexperience@mx.com"
77
developerName: "MX"
88
developerOrganization: "MX Technologies Inc."

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/ma
55
<artifactId>mx-platform-java</artifactId>
66
<packaging>jar</packaging>
77
<name>mx-platform-java</name>
8-
<version>0.3.4</version>
8+
<version>0.4.0</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
@@ -125,7 +125,7 @@ private void init() {
125125
json = new JSON();
126126

127127
// Set default User-Agent.
128-
setUserAgent("OpenAPI-Generator/0.3.4/java");
128+
setUserAgent("OpenAPI-Generator/0.4.0/java");
129129

130130
authentications = new HashMap<String, Authentication>();
131131
}

src/main/java/com/mx/client/model/EnhanceTransactionResponse.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -549,7 +549,7 @@ public EnhanceTransactionResponse merchantCategoryCode(Integer merchantCategoryC
549549
* @return merchantCategoryCode
550550
**/
551551
@javax.annotation.Nullable
552-
@ApiModelProperty(example = "5411", value = "")
552+
@ApiModelProperty(example = "4121", value = "")
553553

554554
public Integer getMerchantCategoryCode() {
555555
return merchantCategoryCode;

src/main/java/com/mx/client/model/EnhanceTransactionsRequest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,7 @@ public EnhanceTransactionsRequest merchantCategoryCode(Integer merchantCategoryC
185185
* @return merchantCategoryCode
186186
**/
187187
@javax.annotation.Nullable
188-
@ApiModelProperty(example = "123", value = "")
188+
@ApiModelProperty(example = "4121", value = "")
189189

190190
public Integer getMerchantCategoryCode() {
191191
return merchantCategoryCode;

0 commit comments

Comments
 (0)