Skip to content

Commit e79ecdd

Browse files
Merge pull request #11 from mxenabled/openapi-generator-0.4.3
Generated version 0.4.3
2 parents c20c036 + 546303b commit e79ecdd

File tree

8 files changed

+266
-5
lines changed

8 files changed

+266
-5
lines changed

docs/MxPlatformApi.md

Lines changed: 98 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ Method | HTTP request | Description
3737
[**list_default_categories_by_user**](MxPlatformApi.md#list_default_categories_by_user) | **GET** /users/{user_guid}/categories/default | List default categories by user
3838
[**list_favorite_institutions**](MxPlatformApi.md#list_favorite_institutions) | **GET** /institutions/favorites | List favorite institutions
3939
[**list_holdings**](MxPlatformApi.md#list_holdings) | **GET** /users/{user_guid}/holdings | List holdings
40+
[**list_holdings_by_account**](MxPlatformApi.md#list_holdings_by_account) | **GET** /users/{user_guid}/accounts/{account_guid}/holdings | List holdings by account
4041
[**list_holdings_by_member**](MxPlatformApi.md#list_holdings_by_member) | **GET** /users/{user_guid}/members/{member_guid}/holdings | List holdings by member
4142
[**list_institution_credentials**](MxPlatformApi.md#list_institution_credentials) | **GET** /institutions/{institution_code}/credentials | List institution credentials
4243
[**list_institutions**](MxPlatformApi.md#list_institutions) | **GET** /institutions | List institutions
@@ -2920,6 +2921,103 @@ Name | Type | Description | Notes
29202921
- **Accept**: application/vnd.mx.api.v1+json
29212922

29222923

2924+
### HTTP response details
2925+
2926+
| Status code | Description | Response headers |
2927+
|-------------|-------------|------------------|
2928+
**200** | OK | - |
2929+
2930+
[[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)
2931+
2932+
# **list_holdings_by_account**
2933+
> HoldingsResponseBody list_holdings_by_account(account_guid, user_guid)
2934+
2935+
List holdings by account
2936+
2937+
This endpoint returns all holdings associated with the specified `account`.
2938+
2939+
### Example
2940+
2941+
* Basic Authentication (basicAuth):
2942+
2943+
```python
2944+
import time
2945+
import mx_platform_python
2946+
from mx_platform_python.api import mx_platform_api
2947+
from mx_platform_python.model.holdings_response_body import HoldingsResponseBody
2948+
from pprint import pprint
2949+
# Defining the host is optional and defaults to https://api.mx.com
2950+
# See configuration.py for a list of all supported configuration parameters.
2951+
configuration = mx_platform_python.Configuration(
2952+
host = "https://api.mx.com"
2953+
)
2954+
2955+
# The client must configure the authentication and authorization parameters
2956+
# in accordance with the API server security policy.
2957+
# Examples for each auth method are provided below, use the example that
2958+
# satisfies your auth use case.
2959+
2960+
# Configure HTTP basic authorization: basicAuth
2961+
configuration = mx_platform_python.Configuration(
2962+
username = 'YOUR_USERNAME',
2963+
password = 'YOUR_PASSWORD'
2964+
)
2965+
2966+
# Enter a context with an instance of the API client
2967+
with mx_platform_python.ApiClient(configuration) as api_client:
2968+
# Create an instance of the API class
2969+
api_instance = mx_platform_api.MxPlatformApi(api_client)
2970+
account_guid = "ACT-7c6f361b-e582-15b6-60c0-358f12466b4b" # str | The unique id for the `account`.
2971+
user_guid = "USR-fa7537f3-48aa-a683-a02a-b18940482f54" # str | The unique id for the `user`.
2972+
from_date = "2015-09-20" # str | Filter holdings from this date. (optional)
2973+
page = 1 # int | Specify current page. (optional)
2974+
records_per_page = 10 # int | Specify records per page. (optional)
2975+
to_date = "2019-10-20" # str | Filter holdings to this date. (optional)
2976+
2977+
# example passing only required values which don't have defaults set
2978+
try:
2979+
# List holdings by account
2980+
api_response = api_instance.list_holdings_by_account(account_guid, user_guid)
2981+
pprint(api_response)
2982+
except mx_platform_python.ApiException as e:
2983+
print("Exception when calling MxPlatformApi->list_holdings_by_account: %s\n" % e)
2984+
2985+
# example passing only required values which don't have defaults set
2986+
# and optional values
2987+
try:
2988+
# List holdings by account
2989+
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)
2990+
pprint(api_response)
2991+
except mx_platform_python.ApiException as e:
2992+
print("Exception when calling MxPlatformApi->list_holdings_by_account: %s\n" % e)
2993+
```
2994+
2995+
2996+
### Parameters
2997+
2998+
Name | Type | Description | Notes
2999+
------------- | ------------- | ------------- | -------------
3000+
**account_guid** | **str**| The unique id for the `account`. |
3001+
**user_guid** | **str**| The unique id for the `user`. |
3002+
**from_date** | **str**| Filter holdings from this date. | [optional]
3003+
**page** | **int**| Specify current page. | [optional]
3004+
**records_per_page** | **int**| Specify records per page. | [optional]
3005+
**to_date** | **str**| Filter holdings to this date. | [optional]
3006+
3007+
### Return type
3008+
3009+
[**HoldingsResponseBody**](HoldingsResponseBody.md)
3010+
3011+
### Authorization
3012+
3013+
[basicAuth](../README.md#basicAuth)
3014+
3015+
### HTTP request headers
3016+
3017+
- **Content-Type**: Not defined
3018+
- **Accept**: application/vnd.mx.api.v1+json
3019+
3020+
29233021
### HTTP response details
29243022

29253023
| Status code | Description | Response headers |

mx_platform_python/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
"""
1111

1212

13-
__version__ = "0.4.2"
13+
__version__ = "0.4.3"
1414

1515
# import ApiClient
1616
from mx_platform_python.api_client import ApiClient

mx_platform_python/api/mx_platform_api.py

Lines changed: 156 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2023,6 +2023,83 @@ def __init__(self, api_client=None):
20232023
},
20242024
api_client=api_client
20252025
)
2026+
self.list_holdings_by_account_endpoint = _Endpoint(
2027+
settings={
2028+
'response_type': (HoldingsResponseBody,),
2029+
'auth': [
2030+
'basicAuth'
2031+
],
2032+
'endpoint_path': '/users/{user_guid}/accounts/{account_guid}/holdings',
2033+
'operation_id': 'list_holdings_by_account',
2034+
'http_method': 'GET',
2035+
'servers': None,
2036+
},
2037+
params_map={
2038+
'all': [
2039+
'account_guid',
2040+
'user_guid',
2041+
'from_date',
2042+
'page',
2043+
'records_per_page',
2044+
'to_date',
2045+
],
2046+
'required': [
2047+
'account_guid',
2048+
'user_guid',
2049+
],
2050+
'nullable': [
2051+
],
2052+
'enum': [
2053+
],
2054+
'validation': [
2055+
]
2056+
},
2057+
root_map={
2058+
'validations': {
2059+
},
2060+
'allowed_values': {
2061+
},
2062+
'openapi_types': {
2063+
'account_guid':
2064+
(str,),
2065+
'user_guid':
2066+
(str,),
2067+
'from_date':
2068+
(str,),
2069+
'page':
2070+
(int,),
2071+
'records_per_page':
2072+
(int,),
2073+
'to_date':
2074+
(str,),
2075+
},
2076+
'attribute_map': {
2077+
'account_guid': 'account_guid',
2078+
'user_guid': 'user_guid',
2079+
'from_date': 'from_date',
2080+
'page': 'page',
2081+
'records_per_page': 'records_per_page',
2082+
'to_date': 'to_date',
2083+
},
2084+
'location_map': {
2085+
'account_guid': 'path',
2086+
'user_guid': 'path',
2087+
'from_date': 'query',
2088+
'page': 'query',
2089+
'records_per_page': 'query',
2090+
'to_date': 'query',
2091+
},
2092+
'collection_format_map': {
2093+
}
2094+
},
2095+
headers_map={
2096+
'accept': [
2097+
'application/vnd.mx.api.v1+json'
2098+
],
2099+
'content_type': [],
2100+
},
2101+
api_client=api_client
2102+
)
20262103
self.list_holdings_by_member_endpoint = _Endpoint(
20272104
settings={
20282105
'response_type': (HoldingsResponseBody,),
@@ -7926,6 +8003,85 @@ def list_holdings(
79268003
user_guid
79278004
return self.list_holdings_endpoint.call_with_http_info(**kwargs)
79288005

8006+
def list_holdings_by_account(
8007+
self,
8008+
account_guid,
8009+
user_guid,
8010+
**kwargs
8011+
):
8012+
"""List holdings by account # noqa: E501
8013+
8014+
This endpoint returns all holdings associated with the specified `account`. # noqa: E501
8015+
This method makes a synchronous HTTP request by default. To make an
8016+
asynchronous HTTP request, please pass async_req=True
8017+
8018+
>>> thread = api.list_holdings_by_account(account_guid, user_guid, async_req=True)
8019+
>>> result = thread.get()
8020+
8021+
Args:
8022+
account_guid (str): The unique id for the `account`.
8023+
user_guid (str): The unique id for the `user`.
8024+
8025+
Keyword Args:
8026+
from_date (str): Filter holdings from this date.. [optional]
8027+
page (int): Specify current page.. [optional]
8028+
records_per_page (int): Specify records per page.. [optional]
8029+
to_date (str): Filter holdings to this date.. [optional]
8030+
_return_http_data_only (bool): response data without head status
8031+
code and headers. Default is True.
8032+
_preload_content (bool): if False, the urllib3.HTTPResponse object
8033+
will be returned without reading/decoding response data.
8034+
Default is True.
8035+
_request_timeout (int/float/tuple): timeout setting for this request. If
8036+
one number provided, it will be total request timeout. It can also
8037+
be a pair (tuple) of (connection, read) timeouts.
8038+
Default is None.
8039+
_check_input_type (bool): specifies if type checking
8040+
should be done one the data sent to the server.
8041+
Default is True.
8042+
_check_return_type (bool): specifies if type checking
8043+
should be done one the data received from the server.
8044+
Default is True.
8045+
_content_type (str/None): force body content-type.
8046+
Default is None and content-type will be predicted by allowed
8047+
content-types and body.
8048+
_host_index (int/None): specifies the index of the server
8049+
that we want to use.
8050+
Default is read from the configuration.
8051+
async_req (bool): execute request asynchronously
8052+
8053+
Returns:
8054+
HoldingsResponseBody
8055+
If the method is called asynchronously, returns the request
8056+
thread.
8057+
"""
8058+
kwargs['async_req'] = kwargs.get(
8059+
'async_req', False
8060+
)
8061+
kwargs['_return_http_data_only'] = kwargs.get(
8062+
'_return_http_data_only', True
8063+
)
8064+
kwargs['_preload_content'] = kwargs.get(
8065+
'_preload_content', True
8066+
)
8067+
kwargs['_request_timeout'] = kwargs.get(
8068+
'_request_timeout', None
8069+
)
8070+
kwargs['_check_input_type'] = kwargs.get(
8071+
'_check_input_type', True
8072+
)
8073+
kwargs['_check_return_type'] = kwargs.get(
8074+
'_check_return_type', True
8075+
)
8076+
kwargs['_content_type'] = kwargs.get(
8077+
'_content_type')
8078+
kwargs['_host_index'] = kwargs.get('_host_index')
8079+
kwargs['account_guid'] = \
8080+
account_guid
8081+
kwargs['user_guid'] = \
8082+
user_guid
8083+
return self.list_holdings_by_account_endpoint.call_with_http_info(**kwargs)
8084+
79298085
def list_holdings_by_member(
79308086
self,
79318087
member_guid,

mx_platform_python/api_client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ def __init__(self, configuration=None, header_name=None, header_value=None,
7676
self.default_headers[header_name] = header_value
7777
self.cookie = cookie
7878
# Set default User-Agent.
79-
self.user_agent = 'OpenAPI-Generator/0.4.2/python'
79+
self.user_agent = 'OpenAPI-Generator/0.4.3/python'
8080

8181
def __enter__(self):
8282
return self

mx_platform_python/configuration.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -404,7 +404,7 @@ def to_debug_report(self):
404404
"OS: {env}\n"\
405405
"Python Version: {pyversion}\n"\
406406
"Version of the API: 0.1.0\n"\
407-
"SDK Package Version: 0.4.2".\
407+
"SDK Package Version: 0.4.3".\
408408
format(env=sys.platform, pyversion=sys.version)
409409

410410
def get_host_settings(self):

openapi/config.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
22
packageName: mx_platform_python
33
packageUrl: https://pypi.org/project/mx-platform-python
4-
packageVersion: 0.4.2
4+
packageVersion: 0.4.3
55
projectName: mx-platform-python

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
from setuptools import setup, find_packages # noqa: H301
1212

1313
NAME = "mx-platform-python"
14-
VERSION = "0.4.2"
14+
VERSION = "0.4.3"
1515
# To install the library, run the following
1616
#
1717
# python setup.py install

test/test_mx_platform_api.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -254,6 +254,13 @@ def test_list_holdings(self):
254254
"""
255255
pass
256256

257+
def test_list_holdings_by_account(self):
258+
"""Test case for list_holdings_by_account
259+
260+
List holdings by account # noqa: E501
261+
"""
262+
pass
263+
257264
def test_list_holdings_by_member(self):
258265
"""Test case for list_holdings_by_member
259266

0 commit comments

Comments
 (0)