Skip to content

Commit

Permalink
Include updates to OpenAPI spec
Browse files Browse the repository at this point in the history
Regenerates the library to pull in recent changes to our OpenAPI spec.
  • Loading branch information
brettmortensen committed Jan 4, 2022
1 parent 26c2a8e commit 632cb90
Show file tree
Hide file tree
Showing 10 changed files with 451 additions and 37 deletions.
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2021 MX Technologies Inc.
Copyright (c) 2022 MX Technologies Inc.

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ mvn clean package
```

Then manually install the following JARs:
- `target/mx-platform-java-0.3.4.jar`
- `target/mx-platform-java-0.4.0.jar`
- `target/lib/*.jar`

### Maven users
Expand All @@ -35,7 +35,7 @@ Add this dependency to your project's POM:
<dependency>
<groupId>com.mx</groupId>
<artifactId>mx-platform-java</artifactId>
<version>0.3.4</version>
<version>0.4.0</version>
<scope>compile</scope>
</dependency>
```
Expand Down
156 changes: 149 additions & 7 deletions docs/MxPlatformApi.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,8 @@ Method | HTTP request | Description
[**listAccountNumbersByMember**](MxPlatformApi.md#listAccountNumbersByMember) | **GET** /users/{user_guid}/members/{member_guid}/account_numbers | List account numbers by member
[**listAccountOwnersByMember**](MxPlatformApi.md#listAccountOwnersByMember) | **GET** /users/{user_guid}/members/{member_guid}/account_owners | List account owners by member
[**listCategories**](MxPlatformApi.md#listCategories) | **GET** /users/{user_guid}/categories | List categories
[**listDefaultCategories**](MxPlatformApi.md#listDefaultCategories) | **GET** /users/{user_guid}/categories/default | List default categories
[**listDefaultCategories**](MxPlatformApi.md#listDefaultCategories) | **GET** /categories/default | List default categories
[**listDefaultCategoriesByUser**](MxPlatformApi.md#listDefaultCategoriesByUser) | **GET** /users/{user_guid}/categories/default | List default categories by user
[**listFavoriteInstitutions**](MxPlatformApi.md#listFavoriteInstitutions) | **GET** /institutions/favorites | List favorite institutions
[**listHoldings**](MxPlatformApi.md#listHoldings) | **GET** /users/{user_guid}/holdings | List holdings
[**listHoldingsByMember**](MxPlatformApi.md#listHoldingsByMember) | **GET** /users/{user_guid}/members/{member_guid}/holdings | List holdings by member
Expand All @@ -58,7 +59,8 @@ Method | HTTP request | Description
[**listUserAccounts**](MxPlatformApi.md#listUserAccounts) | **GET** /users/{user_guid}/accounts | List accounts
[**listUsers**](MxPlatformApi.md#listUsers) | **GET** /users | List users
[**readAccount**](MxPlatformApi.md#readAccount) | **GET** /users/{user_guid}/accounts/{account_guid} | Read account
[**readCategory**](MxPlatformApi.md#readCategory) | **GET** /users/{user_guid}/categories/{category_guid} | Read category
[**readCategory**](MxPlatformApi.md#readCategory) | **GET** /users/{user_guid}/categories/{category_guid} | Read a custom category
[**readDefaultCategory**](MxPlatformApi.md#readDefaultCategory) | **GET** /categories/{category_guid} | Read a default category
[**readHolding**](MxPlatformApi.md#readHolding) | **GET** /users/{user_guid}/holdings/{holding_guid} | Read holding
[**readInstitution**](MxPlatformApi.md#readInstitution) | **GET** /institutions/{institution_code} | Read institution
[**readManagedAccount**](MxPlatformApi.md#readManagedAccount) | **GET** /users/{user_guid}/managed_members/{member_guid}/accounts/{account_guid} | Read managed account
Expand Down Expand Up @@ -2133,11 +2135,11 @@ Name | Type | Description | Notes

<a name="listDefaultCategories"></a>
# **listDefaultCategories**
> CategoriesResponseBody listDefaultCategories(userGuid, page, recordsPerPage)
> CategoriesResponseBody listDefaultCategories(page, recordsPerPage)
List default categories

Use this endpoint to read the attributes of a specific user.
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.

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

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

### Parameters

Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**page** | **Integer**| Specify current page. | [optional]
**recordsPerPage** | **Integer**| Specify records per page. | [optional]

### Return type

[**CategoriesResponseBody**](CategoriesResponseBody.md)

### Authorization

[basicAuth](../README.md#basicAuth)

### HTTP request headers

- **Content-Type**: Not defined
- **Accept**: application/vnd.mx.api.v1+json

### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
**200** | OK | - |

<a name="listDefaultCategoriesByUser"></a>
# **listDefaultCategoriesByUser**
> CategoriesResponseBody listDefaultCategoriesByUser(userGuid, page, recordsPerPage)
List default categories by user

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.

### Example
```java
// Import classes:
import com.mx.client.ApiClient;
import com.mx.client.ApiException;
import com.mx.client.Configuration;
import com.mx.client.auth.*;
import com.mx.client.models.*;
import com.mx.client.mx_platform_api.MxPlatformApi;

public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("https://api.mx.com");

// Configure HTTP basic authorization: basicAuth
HttpBasicAuth basicAuth = (HttpBasicAuth) defaultClient.getAuthentication("basicAuth");
basicAuth.setUsername("YOUR USERNAME");
basicAuth.setPassword("YOUR PASSWORD");

MxPlatformApi apiInstance = new MxPlatformApi(defaultClient);
String userGuid = "USR-fa7537f3-48aa-a683-a02a-b18940482f54"; // String | The unique id for a `user`.
Integer page = 1; // Integer | Specify current page.
Integer recordsPerPage = 10; // Integer | Specify records per page.
try {
CategoriesResponseBody result = apiInstance.listDefaultCategoriesByUser(userGuid, page, recordsPerPage);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling MxPlatformApi#listDefaultCategoriesByUser");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}
```

### Parameters

Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**userGuid** | **String**| The unique id for a &#x60;user&#x60;. |
Expand Down Expand Up @@ -3975,7 +4047,7 @@ Name | Type | Description | Notes
# **readCategory**
> CategoryResponseBody readCategory(categoryGuid, userGuid)
Read category
Read a custom category

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

Expand Down Expand Up @@ -4041,6 +4113,76 @@ Name | Type | Description | Notes
|-------------|-------------|------------------|
**200** | OK | - |

<a name="readDefaultCategory"></a>
# **readDefaultCategory**
> CategoryResponseBody readDefaultCategory(categoryGuid, userGuid)
Read a default category

Use this endpoint to read the attributes of a default category.

### Example
```java
// Import classes:
import com.mx.client.ApiClient;
import com.mx.client.ApiException;
import com.mx.client.Configuration;
import com.mx.client.auth.*;
import com.mx.client.models.*;
import com.mx.client.mx_platform_api.MxPlatformApi;

public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("https://api.mx.com");

// Configure HTTP basic authorization: basicAuth
HttpBasicAuth basicAuth = (HttpBasicAuth) defaultClient.getAuthentication("basicAuth");
basicAuth.setUsername("YOUR USERNAME");
basicAuth.setPassword("YOUR PASSWORD");

MxPlatformApi apiInstance = new MxPlatformApi(defaultClient);
String categoryGuid = "CAT-7829f71c-2e8c-afa5-2f55-fa3634b89874"; // String | The unique id for a `category`.
String userGuid = "USR-fa7537f3-48aa-a683-a02a-b18940482f54"; // String | The unique id for a `user`.
try {
CategoryResponseBody result = apiInstance.readDefaultCategory(categoryGuid, userGuid);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling MxPlatformApi#readDefaultCategory");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}
```

### Parameters

Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**categoryGuid** | **String**| The unique id for a &#x60;category&#x60;. |
**userGuid** | **String**| The unique id for a &#x60;user&#x60;. |

### Return type

[**CategoryResponseBody**](CategoryResponseBody.md)

### Authorization

[basicAuth](../README.md#basicAuth)

### HTTP request headers

- **Content-Type**: Not defined
- **Accept**: application/vnd.mx.api.v1+json

### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
**200** | OK | - |

<a name="readHolding"></a>
# **readHolding**
> HoldingResponseBody readHolding(holdingGuid, userGuid)
Expand Down
2 changes: 1 addition & 1 deletion openapi/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apiPackage: "com.mx.client.mx-platform-api"
artifactDescription: "A Java library for the MX Platform API"
artifactId: "mx-platform-java"
artifactUrl: "https://github.com/mxenabled/mx-platform-java"
artifactVersion: 0.3.4
artifactVersion: 0.4.0
developerEmail: "[email protected]"
developerName: "MX"
developerOrganization: "MX Technologies Inc."
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/ma
<artifactId>mx-platform-java</artifactId>
<packaging>jar</packaging>
<name>mx-platform-java</name>
<version>0.3.4</version>
<version>0.4.0</version>
<url>https://github.com/mxenabled/mx-platform-java</url>
<description>A Java library for the MX Platform API</description>
<scm>
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/com/mx/client/ApiClient.java
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ private void init() {
json = new JSON();

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

authentications = new HashMap<String, Authentication>();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -549,7 +549,7 @@ public EnhanceTransactionResponse merchantCategoryCode(Integer merchantCategoryC
* @return merchantCategoryCode
**/
@javax.annotation.Nullable
@ApiModelProperty(example = "5411", value = "")
@ApiModelProperty(example = "4121", value = "")

public Integer getMerchantCategoryCode() {
return merchantCategoryCode;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ public EnhanceTransactionsRequest merchantCategoryCode(Integer merchantCategoryC
* @return merchantCategoryCode
**/
@javax.annotation.Nullable
@ApiModelProperty(example = "123", value = "")
@ApiModelProperty(example = "4121", value = "")

public Integer getMerchantCategoryCode() {
return merchantCategoryCode;
Expand Down
Loading

0 comments on commit 632cb90

Please sign in to comment.