Skip to content

Commit

Permalink
Merge pull request #11 from mxenabled/openapi-generator-0.4.3
Browse files Browse the repository at this point in the history
Generated version 0.4.3
  • Loading branch information
brettmortensen authored Jan 28, 2022
2 parents c20c036 + 546303b commit e79ecdd
Show file tree
Hide file tree
Showing 8 changed files with 266 additions and 5 deletions.
98 changes: 98 additions & 0 deletions docs/MxPlatformApi.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ Method | HTTP request | Description
[**list_default_categories_by_user**](MxPlatformApi.md#list_default_categories_by_user) | **GET** /users/{user_guid}/categories/default | List default categories by user
[**list_favorite_institutions**](MxPlatformApi.md#list_favorite_institutions) | **GET** /institutions/favorites | List favorite institutions
[**list_holdings**](MxPlatformApi.md#list_holdings) | **GET** /users/{user_guid}/holdings | List holdings
[**list_holdings_by_account**](MxPlatformApi.md#list_holdings_by_account) | **GET** /users/{user_guid}/accounts/{account_guid}/holdings | List holdings by account
[**list_holdings_by_member**](MxPlatformApi.md#list_holdings_by_member) | **GET** /users/{user_guid}/members/{member_guid}/holdings | List holdings by member
[**list_institution_credentials**](MxPlatformApi.md#list_institution_credentials) | **GET** /institutions/{institution_code}/credentials | List institution credentials
[**list_institutions**](MxPlatformApi.md#list_institutions) | **GET** /institutions | List institutions
Expand Down Expand Up @@ -2920,6 +2921,103 @@ Name | Type | Description | Notes
- **Accept**: application/vnd.mx.api.v1+json


### HTTP response details

| Status code | Description | Response headers |
|-------------|-------------|------------------|
**200** | OK | - |

[[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)

# **list_holdings_by_account**
> HoldingsResponseBody list_holdings_by_account(account_guid, user_guid)
List holdings by account

This endpoint returns all holdings associated with the specified `account`.

### Example

* Basic Authentication (basicAuth):

```python
import time
import mx_platform_python
from mx_platform_python.api import mx_platform_api
from mx_platform_python.model.holdings_response_body import HoldingsResponseBody
from pprint import pprint
# Defining the host is optional and defaults to https://api.mx.com
# See configuration.py for a list of all supported configuration parameters.
configuration = mx_platform_python.Configuration(
host = "https://api.mx.com"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure HTTP basic authorization: basicAuth
configuration = mx_platform_python.Configuration(
username = 'YOUR_USERNAME',
password = 'YOUR_PASSWORD'
)

# Enter a context with an instance of the API client
with mx_platform_python.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = mx_platform_api.MxPlatformApi(api_client)
account_guid = "ACT-7c6f361b-e582-15b6-60c0-358f12466b4b" # str | The unique id for the `account`.
user_guid = "USR-fa7537f3-48aa-a683-a02a-b18940482f54" # str | The unique id for the `user`.
from_date = "2015-09-20" # str | Filter holdings from this date. (optional)
page = 1 # int | Specify current page. (optional)
records_per_page = 10 # int | Specify records per page. (optional)
to_date = "2019-10-20" # str | Filter holdings to this date. (optional)

# example passing only required values which don't have defaults set
try:
# List holdings by account
api_response = api_instance.list_holdings_by_account(account_guid, user_guid)
pprint(api_response)
except mx_platform_python.ApiException as e:
print("Exception when calling MxPlatformApi->list_holdings_by_account: %s\n" % e)

# example passing only required values which don't have defaults set
# and optional values
try:
# List holdings by account
api_response = api_instance.list_holdings_by_account(account_guid, user_guid, from_date=from_date, page=page, records_per_page=records_per_page, to_date=to_date)
pprint(api_response)
except mx_platform_python.ApiException as e:
print("Exception when calling MxPlatformApi->list_holdings_by_account: %s\n" % e)
```


### Parameters

Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**account_guid** | **str**| The unique id for the `account`. |
**user_guid** | **str**| The unique id for the `user`. |
**from_date** | **str**| Filter holdings from this date. | [optional]
**page** | **int**| Specify current page. | [optional]
**records_per_page** | **int**| Specify records per page. | [optional]
**to_date** | **str**| Filter holdings to this date. | [optional]

### Return type

[**HoldingsResponseBody**](HoldingsResponseBody.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 |
Expand Down
2 changes: 1 addition & 1 deletion mx_platform_python/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"""


__version__ = "0.4.2"
__version__ = "0.4.3"

# import ApiClient
from mx_platform_python.api_client import ApiClient
Expand Down
156 changes: 156 additions & 0 deletions mx_platform_python/api/mx_platform_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -2023,6 +2023,83 @@ def __init__(self, api_client=None):
},
api_client=api_client
)
self.list_holdings_by_account_endpoint = _Endpoint(
settings={
'response_type': (HoldingsResponseBody,),
'auth': [
'basicAuth'
],
'endpoint_path': '/users/{user_guid}/accounts/{account_guid}/holdings',
'operation_id': 'list_holdings_by_account',
'http_method': 'GET',
'servers': None,
},
params_map={
'all': [
'account_guid',
'user_guid',
'from_date',
'page',
'records_per_page',
'to_date',
],
'required': [
'account_guid',
'user_guid',
],
'nullable': [
],
'enum': [
],
'validation': [
]
},
root_map={
'validations': {
},
'allowed_values': {
},
'openapi_types': {
'account_guid':
(str,),
'user_guid':
(str,),
'from_date':
(str,),
'page':
(int,),
'records_per_page':
(int,),
'to_date':
(str,),
},
'attribute_map': {
'account_guid': 'account_guid',
'user_guid': 'user_guid',
'from_date': 'from_date',
'page': 'page',
'records_per_page': 'records_per_page',
'to_date': 'to_date',
},
'location_map': {
'account_guid': 'path',
'user_guid': 'path',
'from_date': 'query',
'page': 'query',
'records_per_page': 'query',
'to_date': 'query',
},
'collection_format_map': {
}
},
headers_map={
'accept': [
'application/vnd.mx.api.v1+json'
],
'content_type': [],
},
api_client=api_client
)
self.list_holdings_by_member_endpoint = _Endpoint(
settings={
'response_type': (HoldingsResponseBody,),
Expand Down Expand Up @@ -7926,6 +8003,85 @@ def list_holdings(
user_guid
return self.list_holdings_endpoint.call_with_http_info(**kwargs)

def list_holdings_by_account(
self,
account_guid,
user_guid,
**kwargs
):
"""List holdings by account # noqa: E501
This endpoint returns all holdings associated with the specified `account`. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.list_holdings_by_account(account_guid, user_guid, async_req=True)
>>> result = thread.get()
Args:
account_guid (str): The unique id for the `account`.
user_guid (str): The unique id for the `user`.
Keyword Args:
from_date (str): Filter holdings from this date.. [optional]
page (int): Specify current page.. [optional]
records_per_page (int): Specify records per page.. [optional]
to_date (str): Filter holdings to this date.. [optional]
_return_http_data_only (bool): response data without head status
code and headers. Default is True.
_preload_content (bool): if False, the urllib3.HTTPResponse object
will be returned without reading/decoding response data.
Default is True.
_request_timeout (int/float/tuple): timeout setting for this request. If
one number provided, it will be total request timeout. It can also
be a pair (tuple) of (connection, read) timeouts.
Default is None.
_check_input_type (bool): specifies if type checking
should be done one the data sent to the server.
Default is True.
_check_return_type (bool): specifies if type checking
should be done one the data received from the server.
Default is True.
_content_type (str/None): force body content-type.
Default is None and content-type will be predicted by allowed
content-types and body.
_host_index (int/None): specifies the index of the server
that we want to use.
Default is read from the configuration.
async_req (bool): execute request asynchronously
Returns:
HoldingsResponseBody
If the method is called asynchronously, returns the request
thread.
"""
kwargs['async_req'] = kwargs.get(
'async_req', False
)
kwargs['_return_http_data_only'] = kwargs.get(
'_return_http_data_only', True
)
kwargs['_preload_content'] = kwargs.get(
'_preload_content', True
)
kwargs['_request_timeout'] = kwargs.get(
'_request_timeout', None
)
kwargs['_check_input_type'] = kwargs.get(
'_check_input_type', True
)
kwargs['_check_return_type'] = kwargs.get(
'_check_return_type', True
)
kwargs['_content_type'] = kwargs.get(
'_content_type')
kwargs['_host_index'] = kwargs.get('_host_index')
kwargs['account_guid'] = \
account_guid
kwargs['user_guid'] = \
user_guid
return self.list_holdings_by_account_endpoint.call_with_http_info(**kwargs)

def list_holdings_by_member(
self,
member_guid,
Expand Down
2 changes: 1 addition & 1 deletion mx_platform_python/api_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ def __init__(self, configuration=None, header_name=None, header_value=None,
self.default_headers[header_name] = header_value
self.cookie = cookie
# Set default User-Agent.
self.user_agent = 'OpenAPI-Generator/0.4.2/python'
self.user_agent = 'OpenAPI-Generator/0.4.3/python'

def __enter__(self):
return self
Expand Down
2 changes: 1 addition & 1 deletion mx_platform_python/configuration.py
Original file line number Diff line number Diff line change
Expand Up @@ -404,7 +404,7 @@ def to_debug_report(self):
"OS: {env}\n"\
"Python Version: {pyversion}\n"\
"Version of the API: 0.1.0\n"\
"SDK Package Version: 0.4.2".\
"SDK Package Version: 0.4.3".\
format(env=sys.platform, pyversion=sys.version)

def get_host_settings(self):
Expand Down
2 changes: 1 addition & 1 deletion openapi/config.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
packageName: mx_platform_python
packageUrl: https://pypi.org/project/mx-platform-python
packageVersion: 0.4.2
packageVersion: 0.4.3
projectName: mx-platform-python
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
from setuptools import setup, find_packages # noqa: H301

NAME = "mx-platform-python"
VERSION = "0.4.2"
VERSION = "0.4.3"
# To install the library, run the following
#
# python setup.py install
Expand Down
7 changes: 7 additions & 0 deletions test/test_mx_platform_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -254,6 +254,13 @@ def test_list_holdings(self):
"""
pass

def test_list_holdings_by_account(self):
"""Test case for list_holdings_by_account
List holdings by account # noqa: E501
"""
pass

def test_list_holdings_by_member(self):
"""Test case for list_holdings_by_member
Expand Down

0 comments on commit e79ecdd

Please sign in to comment.