diff --git a/docs/MxPlatformApi.md b/docs/MxPlatformApi.md index dd5424e..f6a3e6f 100644 --- a/docs/MxPlatformApi.md +++ b/docs/MxPlatformApi.md @@ -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 @@ -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 | diff --git a/mx_platform_python/__init__.py b/mx_platform_python/__init__.py index bb3d44a..3a5a53a 100644 --- a/mx_platform_python/__init__.py +++ b/mx_platform_python/__init__.py @@ -10,7 +10,7 @@ """ -__version__ = "0.4.2" +__version__ = "0.4.3" # import ApiClient from mx_platform_python.api_client import ApiClient diff --git a/mx_platform_python/api/mx_platform_api.py b/mx_platform_python/api/mx_platform_api.py index 2e35c15..0fe8605 100644 --- a/mx_platform_python/api/mx_platform_api.py +++ b/mx_platform_python/api/mx_platform_api.py @@ -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,), @@ -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, diff --git a/mx_platform_python/api_client.py b/mx_platform_python/api_client.py index 3250797..424218c 100644 --- a/mx_platform_python/api_client.py +++ b/mx_platform_python/api_client.py @@ -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 diff --git a/mx_platform_python/configuration.py b/mx_platform_python/configuration.py index ea27461..9b82499 100644 --- a/mx_platform_python/configuration.py +++ b/mx_platform_python/configuration.py @@ -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): diff --git a/openapi/config.yml b/openapi/config.yml index b2eef92..7d48b05 100644 --- a/openapi/config.yml +++ b/openapi/config.yml @@ -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 diff --git a/setup.py b/setup.py index 7c132f6..ec828e6 100644 --- a/setup.py +++ b/setup.py @@ -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 diff --git a/test/test_mx_platform_api.py b/test/test_mx_platform_api.py index 071cf8e..64263e5 100644 --- a/test/test_mx_platform_api.py +++ b/test/test_mx_platform_api.py @@ -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