def next_with_http_info(self, scope, code, **kwargs): # noqa: E501 """[EXPERIMENTAL] Next: Get next values from sequence # noqa: E501 Get the next set of values from a specified sequence # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.next_with_http_info(scope, code, async_req=True) >>> result = thread.get() :param scope: Scope of the sequence. (required) :type scope: str :param code: Code of the sequence. This together with stated scope uniquely identifies the sequence. (required) :type code: str :param batch: Number of sequences items to return for the specified sequence. Default to 1 if not specified. :type batch: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: 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. :param _request_auth: set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request. :type _request_auth: dict, optional :return: Returns the result object, the HTTP status code, and the headers. If the method is called asynchronously, returns the request thread. :rtype: (NextValueInSequenceResponse, int, HTTPHeaderDict) """ local_var_params = locals() all_params = ['scope', 'code', 'batch'] all_params.extend([ 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout', '_request_auth' ]) for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: raise ApiTypeError("Got an unexpected keyword argument '%s'" " to method next" % key) local_var_params[key] = val del local_var_params['kwargs'] if self.api_client.client_side_validation and ( 'scope' in local_var_params and # noqa: E501 len(local_var_params['scope']) > 64): # noqa: E501 raise ApiValueError( "Invalid value for parameter `scope` when calling `next`, length must be less than or equal to `64`" ) # noqa: E501 if self.api_client.client_side_validation and ( 'scope' in local_var_params and # noqa: E501 len(local_var_params['scope']) < 1): # noqa: E501 raise ApiValueError( "Invalid value for parameter `scope` when calling `next`, length must be greater than or equal to `1`" ) # noqa: E501 if self.api_client.client_side_validation and 'scope' in local_var_params and not re.search( r'^[a-zA-Z0-9\-_]+$', local_var_params['scope']): # noqa: E501 raise ApiValueError( "Invalid value for parameter `scope` when calling `next`, must conform to the pattern `/^[a-zA-Z0-9\-_]+$/`" ) # noqa: E501 if self.api_client.client_side_validation and ( 'code' in local_var_params and # noqa: E501 len(local_var_params['code']) > 64): # noqa: E501 raise ApiValueError( "Invalid value for parameter `code` when calling `next`, length must be less than or equal to `64`" ) # noqa: E501 if self.api_client.client_side_validation and ( 'code' in local_var_params and # noqa: E501 len(local_var_params['code']) < 1): # noqa: E501 raise ApiValueError( "Invalid value for parameter `code` when calling `next`, length must be greater than or equal to `1`" ) # noqa: E501 if self.api_client.client_side_validation and 'code' in local_var_params and not re.search( r'^[a-zA-Z0-9\-_]+$', local_var_params['code']): # noqa: E501 raise ApiValueError( "Invalid value for parameter `code` when calling `next`, must conform to the pattern `/^[a-zA-Z0-9\-_]+$/`" ) # noqa: E501 if self.api_client.client_side_validation and 'batch' in local_var_params and local_var_params[ 'batch'] > 5000: # noqa: E501 raise ApiValueError( "Invalid value for parameter `batch` when calling `next`, must be a value less than or equal to `5000`" ) # noqa: E501 if self.api_client.client_side_validation and 'batch' in local_var_params and local_var_params[ 'batch'] < 1: # noqa: E501 raise ApiValueError( "Invalid value for parameter `batch` when calling `next`, must be a value greater than or equal to `1`" ) # noqa: E501 collection_formats = {} path_params = {} if 'scope' in local_var_params: path_params['scope'] = local_var_params['scope'] # noqa: E501 if 'code' in local_var_params: path_params['code'] = local_var_params['code'] # noqa: E501 query_params = [] if 'batch' in local_var_params and local_var_params[ 'batch'] is not None: # noqa: E501 query_params.append( ('batch', local_var_params['batch'])) # noqa: E501 header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['text/plain', 'application/json', 'text/json']) # noqa: E501 header_params['Accept-Encoding'] = "gzip, deflate, br" # set the LUSID header header_params['X-LUSID-SDK-Language'] = 'Python' header_params['X-LUSID-SDK-Version'] = '0.11.3906' # Authentication setting auth_settings = ['oauth2'] # noqa: E501 response_types_map = { 200: "NextValueInSequenceResponse", 400: "LusidValidationProblemDetails", } return self.api_client.call_api( '/api/sequences/{scope}/{code}/next', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get( '_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, _request_auth=local_var_params.get('_request_auth'))
def get_person_relations_with_http_info(self, id_type_scope, id_type_code, code, **kwargs): # noqa: E501 """[DEPRECATED] Get Relations for Person # noqa: E501 Get relations for the specified person. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_person_relations_with_http_info(id_type_scope, id_type_code, code, async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously :param str id_type_scope: Scope of the person identifier type. (required) :param str id_type_code: Code of the person identifier type. (required) :param str code: Code of the person under specified identifier type's scope and code. This together with stated identifier type uniquely identifies the person. (required) :param str effective_at: The effective datetime or cut label at which to get relations. Defaults to the current LUSID system datetime if not specified. :param datetime as_at: The asAt datetime at which to retrieve the person's relations. Defaults to return the latest LUSID AsAt time if not specified. :param str filter: Expression to filter the relations. Users should provide null or empty string for this field until further notice. :param list[str] identifier_types: Identifiers types (as property keys) used for referencing Persons or Legal Entities. These take the format {domain}/{scope}/{code} e.g. \"Person/CompanyDetails/Role\". They must be from the \"Person\" or \"LegalEntity\" domain. Only identifier types stated will be used to look up relevant entities in relations. If not applicable, provide an empty array. :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: 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. :return: tuple(ResourceListOfRelation, status_code(int), headers(HTTPHeaderDict)) If the method is called asynchronously, returns the request thread. """ local_var_params = locals() all_params = [ 'id_type_scope', 'id_type_code', 'code', 'effective_at', 'as_at', 'filter', 'identifier_types' ] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: raise ApiTypeError("Got an unexpected keyword argument '%s'" " to method get_person_relations" % key) local_var_params[key] = val del local_var_params['kwargs'] if ('code' in local_var_params and len(local_var_params['code']) > 64): raise ApiValueError( "Invalid value for parameter `code` when calling `get_person_relations`, length must be less than or equal to `64`" ) # noqa: E501 if ('code' in local_var_params and len(local_var_params['code']) < 1): raise ApiValueError( "Invalid value for parameter `code` when calling `get_person_relations`, length must be greater than or equal to `1`" ) # noqa: E501 if 'code' in local_var_params and not re.search( r'^[a-zA-Z0-9\-_]+$', local_var_params['code']): # noqa: E501 raise ApiValueError( "Invalid value for parameter `code` when calling `get_person_relations`, must conform to the pattern `/^[a-zA-Z0-9\-_]+$/`" ) # noqa: E501 collection_formats = {} path_params = {} if 'id_type_scope' in local_var_params: path_params['idTypeScope'] = local_var_params[ 'id_type_scope'] # noqa: E501 if 'id_type_code' in local_var_params: path_params['idTypeCode'] = local_var_params[ 'id_type_code'] # noqa: E501 if 'code' in local_var_params: path_params['code'] = local_var_params['code'] # noqa: E501 query_params = [] if 'effective_at' in local_var_params: query_params.append( ('effectiveAt', local_var_params['effective_at'])) # noqa: E501 if 'as_at' in local_var_params: query_params.append( ('asAt', local_var_params['as_at'])) # noqa: E501 if 'filter' in local_var_params: query_params.append( ('filter', local_var_params['filter'])) # noqa: E501 if 'identifier_types' in local_var_params: query_params.append( ('identifierTypes', local_var_params['identifier_types'])) # noqa: E501 collection_formats['identifierTypes'] = 'multi' # noqa: E501 header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['text/plain', 'application/json', 'text/json']) # noqa: E501 # Authentication setting auth_settings = ['oauth2'] # noqa: E501 # set the LUSID header header_params['X-LUSID-SDK-Language'] = 'Python' header_params['X-LUSID-SDK-Version'] = '0.11.2808' return self.api_client.call_api( '/api/persons/{idTypeScope}/{idTypeCode}/{code}/relations', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='ResourceListOfRelation', # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get( '_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats)
def upsert_orders_with_http_info(self, **kwargs): # noqa: E501 """[EARLY ACCESS] UpsertOrders: Upsert Order # noqa: E501 Upsert; update existing orders with given ids, or create new orders otherwise. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.upsert_orders_with_http_info(async_req=True) >>> result = thread.get() :param order_set_request: The collection of order requests. :type order_set_request: OrderSetRequest :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: 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. :param _request_auth: set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request. :type _request_auth: dict, optional :return: Returns the result object, the HTTP status code, and the headers. If the method is called asynchronously, returns the request thread. :rtype: (ResourceListOfOrder, int, HTTPHeaderDict) """ local_var_params = locals() all_params = ['order_set_request'] all_params.extend([ 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout', '_request_auth', '_headers' ]) for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: raise ApiTypeError("Got an unexpected keyword argument '%s'" " to method upsert_orders" % key) local_var_params[key] = val del local_var_params['kwargs'] collection_formats = {} path_params = {} query_params = [] header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} body_params = None if 'order_set_request' in local_var_params: body_params = local_var_params['order_set_request'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['text/plain', 'application/json', 'text/json']) # noqa: E501 header_params['Accept-Encoding'] = "gzip, deflate, br" # HTTP header `Content-Type` header_params[ 'Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 [ 'application/json-patch+json', 'application/json', 'text/json', 'application/*+json' ]) # noqa: E501 # set the LUSID header header_params['X-LUSID-SDK-Language'] = 'Python' header_params['X-LUSID-SDK-Version'] = '0.11.4385' # Authentication setting auth_settings = ['oauth2'] # noqa: E501 response_types_map = { 201: "ResourceListOfOrder", 400: "LusidValidationProblemDetails", } return self.api_client.call_api( '/api/orders', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get( '_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, _request_auth=local_var_params.get('_request_auth'))
def list_scopes_with_http_info(self, **kwargs): # noqa: E501 """[EARLY ACCESS] List scopes # noqa: E501 List all the scopes that contain data. # 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_scopes_with_http_info(async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously :param str filter: Expression to filter the result set. Read more about filtering results from LUSID here https://support.lusid.com/filtering-results-from-lusid. :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: 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. :return: tuple(ResourceListOfScopeDefinition, status_code(int), headers(HTTPHeaderDict)) If the method is called asynchronously, returns the request thread. """ local_var_params = locals() all_params = ['filter'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: raise ApiTypeError("Got an unexpected keyword argument '%s'" " to method list_scopes" % key) local_var_params[key] = val del local_var_params['kwargs'] collection_formats = {} path_params = {} query_params = [] if 'filter' in local_var_params: query_params.append( ('filter', local_var_params['filter'])) # noqa: E501 header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['text/plain', 'application/json', 'text/json']) # noqa: E501 # Authentication setting auth_settings = ['oauth2'] # noqa: E501 # set the LUSID header header_params['X-LUSID-SDK-Language'] = 'Python' header_params['X-LUSID-SDK-Version'] = '0.10.739' return self.api_client.call_api( '/api/scopes', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='ResourceListOfScopeDefinition', # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get( '_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats)
def get_package_with_http_info(self, scope, code, **kwargs): # noqa: E501 """[EXPERIMENTAL] GetPackage: Get Package # noqa: E501 Fetch a Package that matches the specified identifier # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_package_with_http_info(scope, code, async_req=True) >>> result = thread.get() :param scope: The scope to which the package belongs. (required) :type scope: str :param code: The package's unique identifier. (required) :type code: str :param as_at: The asAt datetime at which to retrieve the package. Defaults to return the latest version of the package if not specified. :type as_at: datetime :param property_keys: A list of property keys from the \"Package\" domain to decorate onto the package. These take the format {domain}/{scope}/{code} e.g. \"Package/system/Name\". :type property_keys: list[str] :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: 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. :param _request_auth: set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request. :type _request_auth: dict, optional :return: Returns the result object, the HTTP status code, and the headers. If the method is called asynchronously, returns the request thread. :rtype: (Package, int, HTTPHeaderDict) """ local_var_params = locals() all_params = ['scope', 'code', 'as_at', 'property_keys'] all_params.extend([ 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout', '_request_auth' ]) for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: raise ApiTypeError("Got an unexpected keyword argument '%s'" " to method get_package" % key) local_var_params[key] = val del local_var_params['kwargs'] if self.api_client.client_side_validation and ( 'scope' in local_var_params and # noqa: E501 len(local_var_params['scope']) > 64): # noqa: E501 raise ApiValueError( "Invalid value for parameter `scope` when calling `get_package`, length must be less than or equal to `64`" ) # noqa: E501 if self.api_client.client_side_validation and ( 'scope' in local_var_params and # noqa: E501 len(local_var_params['scope']) < 1): # noqa: E501 raise ApiValueError( "Invalid value for parameter `scope` when calling `get_package`, length must be greater than or equal to `1`" ) # noqa: E501 if self.api_client.client_side_validation and 'scope' in local_var_params and not re.search( r'^[a-zA-Z0-9\-_]+$', local_var_params['scope']): # noqa: E501 raise ApiValueError( "Invalid value for parameter `scope` when calling `get_package`, must conform to the pattern `/^[a-zA-Z0-9\-_]+$/`" ) # noqa: E501 if self.api_client.client_side_validation and ( 'code' in local_var_params and # noqa: E501 len(local_var_params['code']) > 64): # noqa: E501 raise ApiValueError( "Invalid value for parameter `code` when calling `get_package`, length must be less than or equal to `64`" ) # noqa: E501 if self.api_client.client_side_validation and ( 'code' in local_var_params and # noqa: E501 len(local_var_params['code']) < 1): # noqa: E501 raise ApiValueError( "Invalid value for parameter `code` when calling `get_package`, length must be greater than or equal to `1`" ) # noqa: E501 if self.api_client.client_side_validation and 'code' in local_var_params and not re.search( r'^[a-zA-Z0-9\-_]+$', local_var_params['code']): # noqa: E501 raise ApiValueError( "Invalid value for parameter `code` when calling `get_package`, must conform to the pattern `/^[a-zA-Z0-9\-_]+$/`" ) # noqa: E501 collection_formats = {} path_params = {} if 'scope' in local_var_params: path_params['scope'] = local_var_params['scope'] # noqa: E501 if 'code' in local_var_params: path_params['code'] = local_var_params['code'] # noqa: E501 query_params = [] if 'as_at' in local_var_params and local_var_params[ 'as_at'] is not None: # noqa: E501 query_params.append( ('asAt', local_var_params['as_at'])) # noqa: E501 if 'property_keys' in local_var_params and local_var_params[ 'property_keys'] is not None: # noqa: E501 query_params.append( ('propertyKeys', local_var_params['property_keys'])) # noqa: E501 collection_formats['propertyKeys'] = 'multi' # noqa: E501 header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['text/plain', 'application/json', 'text/json']) # noqa: E501 header_params['Accept-Encoding'] = "gzip, deflate, br" # set the LUSID header header_params['X-LUSID-SDK-Language'] = 'Python' header_params['X-LUSID-SDK-Version'] = '0.11.3906' # Authentication setting auth_settings = ['oauth2'] # noqa: E501 response_types_map = { 200: "Package", 400: "LusidValidationProblemDetails", } return self.api_client.call_api( '/api/packages/{scope}/{code}', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get( '_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, _request_auth=local_var_params.get('_request_auth'))
def set_configuration_transaction_types_with_http_info(self, **kwargs): # noqa: E501 """[EXPERIMENTAL] Set transaction types # noqa: E501 Set all transaction types to be used by the movements engine, for the organisation WARNING! Changing these mappings will have a material impact on how data, new and old, is processed and aggregated by LUSID. This will affect your whole organisation. Only change if you are fully aware of the implications of the change. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.set_configuration_transaction_types_with_http_info(async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously :param TransactionSetConfigurationDataRequest types: The complete set of transaction type definitions :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: 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. :return: tuple(TransactionSetConfigurationData, status_code(int), headers(HTTPHeaderDict)) If the method is called asynchronously, returns the request thread. """ local_var_params = locals() all_params = ['types'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method set_configuration_transaction_types" % key ) local_var_params[key] = val del local_var_params['kwargs'] collection_formats = {} path_params = {} query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None if 'types' in local_var_params: body_params = local_var_params['types'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['text/plain', 'application/json', 'text/json']) # noqa: E501 # Authentication setting auth_settings = ['oauth2'] # noqa: E501 # set the LUSID header header_params['X-LUSID-SDK-Language'] = 'Python' header_params['X-LUSID-SDK-Version'] = '0.10.1282' return self.api_client.call_api( '/api/systemconfiguration/transactions', 'PUT', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='TransactionSetConfigurationData', # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats)
def upsert_results_with_http_info(self, **kwargs): # noqa: E501 """[EXPERIMENTAL] Upsert results # noqa: E501 Upsert pre-calculated results against a specified combination of key parameters defined in the CreateResults request. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.upsert_results_with_http_info(async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously :param CreateResults request: The details of what to upsert :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: 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. :return: tuple(Results, status_code(int), headers(HTTPHeaderDict)) If the method is called asynchronously, returns the request thread. """ local_var_params = locals() all_params = ['request'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: raise ApiTypeError("Got an unexpected keyword argument '%s'" " to method upsert_results" % key) local_var_params[key] = val del local_var_params['kwargs'] collection_formats = {} path_params = {} query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None if 'request' in local_var_params: body_params = local_var_params['request'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['text/plain', 'application/json', 'text/json']) # noqa: E501 # Authentication setting auth_settings = ['oauth2'] # noqa: E501 # set the LUSID header header_params['X-LUSID-SDK-Language'] = 'Python' header_params['X-LUSID-SDK-Version'] = '0.10.1327' return self.api_client.call_api( '/api/results', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='Results', # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get( '_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats)
def upsert_configuration_recipe_with_http_info(self, upsert_recipe_request, **kwargs): # noqa: E501 """[EXPERIMENTAL] UpsertConfigurationRecipe: Upsert a Configuration Recipe. This creates or updates the data in Lusid. # noqa: E501 Update or insert one Configuration Recipe in a single scope. An item will be updated if it already exists and inserted if it does not. The response will return the successfully updated or inserted Configuration Recipe or failure message if unsuccessful It is important to always check to verify success (or failure). # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.upsert_configuration_recipe_with_http_info(upsert_recipe_request, async_req=True) >>> result = thread.get() :param upsert_recipe_request: The Configuration Recipe to update or insert (required) :type upsert_recipe_request: UpsertRecipeRequest :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: 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. :param _request_auth: set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request. :type _request_auth: dict, optional :return: Returns the result object, the HTTP status code, and the headers. If the method is called asynchronously, returns the request thread. :rtype: (UpsertSingleStructuredDataResponse, int, HTTPHeaderDict) """ local_var_params = locals() all_params = [ 'upsert_recipe_request' ] all_params.extend( [ 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout', '_request_auth' ] ) for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method upsert_configuration_recipe" % key ) local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'upsert_recipe_request' is set if self.api_client.client_side_validation and ('upsert_recipe_request' not in local_var_params or # noqa: E501 local_var_params['upsert_recipe_request'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `upsert_recipe_request` when calling `upsert_configuration_recipe`") # noqa: E501 collection_formats = {} path_params = {} query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None if 'upsert_recipe_request' in local_var_params: body_params = local_var_params['upsert_recipe_request'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['text/plain', 'application/json', 'text/json']) # noqa: E501 header_params['Accept-Encoding'] = "gzip, deflate, br" # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json-patch+json', 'application/json', 'text/json', 'application/*+json']) # noqa: E501 # set the LUSID header header_params['X-LUSID-SDK-Language'] = 'Python' header_params['X-LUSID-SDK-Version'] = '0.11.3906' # Authentication setting auth_settings = ['oauth2'] # noqa: E501 response_types_map = { 200: "UpsertSingleStructuredDataResponse", 400: "LusidValidationProblemDetails", } return self.api_client.call_api( '/api/recipes', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, _request_auth=local_var_params.get('_request_auth'))
def delete_derived_portfolio_details_with_http_info( self, scope, code, **kwargs): # noqa: E501 """[EARLY ACCESS] Delete portfolio details # noqa: E501 Deletes the portfolio details for the specified derived transaction portfolio # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.delete_derived_portfolio_details_with_http_info(scope, code, async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously :param str scope: The scope of the portfolio (required) :param str code: The code of the portfolio (required) :param str effective_at: The effective date of the change :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: 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. :return: tuple(DeletedEntityResponse, status_code(int), headers(HTTPHeaderDict)) If the method is called asynchronously, returns the request thread. """ local_var_params = locals() all_params = ['scope', 'code', 'effective_at'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method delete_derived_portfolio_details" % key) local_var_params[key] = val del local_var_params['kwargs'] if ('scope' in local_var_params and len(local_var_params['scope']) > 64): raise ApiValueError( "Invalid value for parameter `scope` when calling `delete_derived_portfolio_details`, length must be less than or equal to `64`" ) # noqa: E501 if ('scope' in local_var_params and len(local_var_params['scope']) < 1): raise ApiValueError( "Invalid value for parameter `scope` when calling `delete_derived_portfolio_details`, length must be greater than or equal to `1`" ) # noqa: E501 if 'scope' in local_var_params and not re.search( r'^[a-zA-Z0-9\-_]+$', local_var_params['scope']): # noqa: E501 raise ApiValueError( "Invalid value for parameter `scope` when calling `delete_derived_portfolio_details`, must conform to the pattern `/^[a-zA-Z0-9\-_]+$/`" ) # noqa: E501 if ('code' in local_var_params and len(local_var_params['code']) > 64): raise ApiValueError( "Invalid value for parameter `code` when calling `delete_derived_portfolio_details`, length must be less than or equal to `64`" ) # noqa: E501 if ('code' in local_var_params and len(local_var_params['code']) < 1): raise ApiValueError( "Invalid value for parameter `code` when calling `delete_derived_portfolio_details`, length must be greater than or equal to `1`" ) # noqa: E501 if 'code' in local_var_params and not re.search( r'^[a-zA-Z0-9\-_]+$', local_var_params['code']): # noqa: E501 raise ApiValueError( "Invalid value for parameter `code` when calling `delete_derived_portfolio_details`, must conform to the pattern `/^[a-zA-Z0-9\-_]+$/`" ) # noqa: E501 if ('effective_at' in local_var_params and len(local_var_params['effective_at']) > 256): raise ApiValueError( "Invalid value for parameter `effective_at` when calling `delete_derived_portfolio_details`, length must be less than or equal to `256`" ) # noqa: E501 if ('effective_at' in local_var_params and len(local_var_params['effective_at']) < 0): raise ApiValueError( "Invalid value for parameter `effective_at` when calling `delete_derived_portfolio_details`, length must be greater than or equal to `0`" ) # noqa: E501 if 'effective_at' in local_var_params and not re.search( r'^[a-zA-Z0-9\-_\+:\.]+$', local_var_params['effective_at']): # noqa: E501 raise ApiValueError( "Invalid value for parameter `effective_at` when calling `delete_derived_portfolio_details`, must conform to the pattern `/^[a-zA-Z0-9\-_\+:\.]+$/`" ) # noqa: E501 collection_formats = {} path_params = {} if 'scope' in local_var_params: path_params['scope'] = local_var_params['scope'] # noqa: E501 if 'code' in local_var_params: path_params['code'] = local_var_params['code'] # noqa: E501 query_params = [] if 'effective_at' in local_var_params: query_params.append( ('effectiveAt', local_var_params['effective_at'])) # noqa: E501 header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['text/plain', 'application/json', 'text/json']) # noqa: E501 # Authentication setting auth_settings = ['oauth2'] # noqa: E501 # set the LUSID header header_params['X-LUSID-SDK-Language'] = 'Python' header_params['X-LUSID-SDK-Version'] = '0.11.2808' return self.api_client.call_api( '/api/derivedtransactionportfolios/{scope}/{code}/details', 'DELETE', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='DeletedEntityResponse', # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get( '_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats)
def get_allocation_with_http_info(self, scope, code, **kwargs): # noqa: E501 """[EXPERIMENTAL] Fetch a given allocation. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_allocation_with_http_info(scope, code, async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously :param str scope: The scope to which the allocation belongs. (required) :param str code: The allocation's unique identifier. (required) :param datetime as_at: The asAt datetime at which to retrieve the allocation. Defaults to return the latest version of the allocation if not specified. :param list[str] property_keys: A list of property keys from the \"Allocations\" domain to decorate onto the allocation. These take the format {domain}/{scope}/{code} e.g. \"Allocations/system/Name\". :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: 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. :return: tuple(Allocation, status_code(int), headers(HTTPHeaderDict)) If the method is called asynchronously, returns the request thread. """ local_var_params = locals() all_params = ['scope', 'code', 'as_at', 'property_keys'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: raise ApiTypeError("Got an unexpected keyword argument '%s'" " to method get_allocation" % key) local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'scope' is set if ('scope' not in local_var_params or local_var_params['scope'] is None): raise ApiValueError( "Missing the required parameter `scope` when calling `get_allocation`" ) # noqa: E501 # verify the required parameter 'code' is set if ('code' not in local_var_params or local_var_params['code'] is None): raise ApiValueError( "Missing the required parameter `code` when calling `get_allocation`" ) # noqa: E501 collection_formats = {} path_params = {} if 'scope' in local_var_params: path_params['scope'] = local_var_params['scope'] # noqa: E501 if 'code' in local_var_params: path_params['code'] = local_var_params['code'] # noqa: E501 query_params = [] if 'as_at' in local_var_params: query_params.append( ('asAt', local_var_params['as_at'])) # noqa: E501 if 'property_keys' in local_var_params: query_params.append( ('propertyKeys', local_var_params['property_keys'])) # noqa: E501 collection_formats['propertyKeys'] = 'multi' # noqa: E501 header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['text/plain', 'application/json', 'text/json']) # noqa: E501 # Authentication setting auth_settings = ['oauth2'] # noqa: E501 # set the LUSID header header_params['X-LUSID-SDK-Language'] = 'Python' header_params['X-LUSID-SDK-Version'] = '0.10.1327' return self.api_client.call_api( '/api/allocations/{scope}/{code}', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='Allocation', # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get( '_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats)
def get_portfolio_changes_with_http_info(self, scope, effective_at, **kwargs): # noqa: E501 """[EARLY ACCESS] Get the next change to each portfolio in a scope. # noqa: E501 Gets the time of the next (earliest effective at) modification (correction and/or amendment) to each portfolio in a scope relative to a point in bitemporal time. Includes changes from parent portfolios in different scopes. Excludes changes from subcriptions (e.g corporate actions). # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_portfolio_changes_with_http_info(scope, effective_at, async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously :param str scope: The scope (required) :param str effective_at: The effective date of the origin. (required) :param datetime as_at: The as-at date of the origin. :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: 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. :return: tuple(ResourceListOfChange, status_code(int), headers(HTTPHeaderDict)) If the method is called asynchronously, returns the request thread. """ local_var_params = locals() all_params = ['scope', 'effective_at', 'as_at'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: raise ApiTypeError("Got an unexpected keyword argument '%s'" " to method get_portfolio_changes" % key) local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'scope' is set if ('scope' not in local_var_params or local_var_params['scope'] is None): raise ApiValueError( "Missing the required parameter `scope` when calling `get_portfolio_changes`" ) # noqa: E501 # verify the required parameter 'effective_at' is set if ('effective_at' not in local_var_params or local_var_params['effective_at'] is None): raise ApiValueError( "Missing the required parameter `effective_at` when calling `get_portfolio_changes`" ) # noqa: E501 if ('scope' in local_var_params and len(local_var_params['scope']) > 64): raise ApiValueError( "Invalid value for parameter `scope` when calling `get_portfolio_changes`, length must be less than or equal to `64`" ) # noqa: E501 if ('scope' in local_var_params and len(local_var_params['scope']) < 1): raise ApiValueError( "Invalid value for parameter `scope` when calling `get_portfolio_changes`, length must be greater than or equal to `1`" ) # noqa: E501 if 'scope' in local_var_params and not re.search( r'^[a-zA-Z0-9\-_]+$', local_var_params['scope']): # noqa: E501 raise ApiValueError( "Invalid value for parameter `scope` when calling `get_portfolio_changes`, must conform to the pattern `/^[a-zA-Z0-9\-_]+$/`" ) # noqa: E501 if ('effective_at' in local_var_params and len(local_var_params['effective_at']) > 256): raise ApiValueError( "Invalid value for parameter `effective_at` when calling `get_portfolio_changes`, length must be less than or equal to `256`" ) # noqa: E501 if ('effective_at' in local_var_params and len(local_var_params['effective_at']) < 0): raise ApiValueError( "Invalid value for parameter `effective_at` when calling `get_portfolio_changes`, length must be greater than or equal to `0`" ) # noqa: E501 if 'effective_at' in local_var_params and not re.search( r'^[a-zA-Z0-9\-_\+:\.]+$', local_var_params['effective_at']): # noqa: E501 raise ApiValueError( "Invalid value for parameter `effective_at` when calling `get_portfolio_changes`, must conform to the pattern `/^[a-zA-Z0-9\-_\+:\.]+$/`" ) # noqa: E501 collection_formats = {} path_params = {} query_params = [] if 'scope' in local_var_params: query_params.append( ('scope', local_var_params['scope'])) # noqa: E501 if 'effective_at' in local_var_params: query_params.append( ('effectiveAt', local_var_params['effective_at'])) # noqa: E501 if 'as_at' in local_var_params: query_params.append( ('asAt', local_var_params['as_at'])) # noqa: E501 header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['text/plain', 'application/json', 'text/json']) # noqa: E501 # Authentication setting auth_settings = ['oauth2'] # noqa: E501 # set the LUSID header header_params['X-LUSID-SDK-Language'] = 'Python' header_params['X-LUSID-SDK-Version'] = '0.11.2863' return self.api_client.call_api( '/api/entities/changes/portfolios', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='ResourceListOfChange', # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get( '_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats)
def list_allocations_with_http_info(self, **kwargs): # noqa: E501 """[EXPERIMENTAL] Fetch the last pre-AsAt date version of each allocation in scope (does not fetch the entire history). # 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_allocations_with_http_info(async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously :param datetime as_at: The asAt datetime at which to retrieve the allocation. Defaults to return the latest version of the allocation if not specified. :param str page: The pagination token to use to continue listing allocations from a previous call to list allocations. This value is returned from the previous call. If a pagination token is provided the sortBy, filter, effectiveAt, and asAt fields must not have changed since the original request. Also, if set, a start value cannot be provided. :param list[str] sort_by: Allocation the results by these fields. Use use the '-' sign to denote descending allocation e.g. -MyFieldName. :param int start: When paginating, skip this number of results. :param int limit: When paginating, limit the number of returned results to this many. :param str filter: Expression to filter the result set. Currently Allocations can be filtered by Id (e.g. \"Id eq 'ALLOC001'), Allocated Order Id (e.g. AllocatedOrderId eq 'ORD001'), Quantity (e.g. \"Quantity lt 100\"), LUSID Instrument Id (e.g. \"LusidInstrumentId eq 'LUID_12345678'\") or by Property (Read more about filtering results from LUSID here: https://support.lusid.com/filtering-results-from-lusid). :param list[str] property_keys: A list of property keys from the \"Allocations\" domain to decorate onto each allocation. These take the format {domain}/{scope}/{code} e.g. \"Allocations/system/Name\". :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: 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. :return: tuple(PagedResourceListOfAllocation, status_code(int), headers(HTTPHeaderDict)) If the method is called asynchronously, returns the request thread. """ local_var_params = locals() all_params = [ 'as_at', 'page', 'sort_by', 'start', 'limit', 'filter', 'property_keys' ] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: raise ApiTypeError("Got an unexpected keyword argument '%s'" " to method list_allocations" % key) local_var_params[key] = val del local_var_params['kwargs'] collection_formats = {} path_params = {} query_params = [] if 'as_at' in local_var_params: query_params.append( ('asAt', local_var_params['as_at'])) # noqa: E501 if 'page' in local_var_params: query_params.append( ('page', local_var_params['page'])) # noqa: E501 if 'sort_by' in local_var_params: query_params.append( ('sortBy', local_var_params['sort_by'])) # noqa: E501 collection_formats['sortBy'] = 'multi' # noqa: E501 if 'start' in local_var_params: query_params.append( ('start', local_var_params['start'])) # noqa: E501 if 'limit' in local_var_params: query_params.append( ('limit', local_var_params['limit'])) # noqa: E501 if 'filter' in local_var_params: query_params.append( ('filter', local_var_params['filter'])) # noqa: E501 if 'property_keys' in local_var_params: query_params.append( ('propertyKeys', local_var_params['property_keys'])) # noqa: E501 collection_formats['propertyKeys'] = 'multi' # noqa: E501 header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['text/plain', 'application/json', 'text/json']) # noqa: E501 # Authentication setting auth_settings = ['oauth2'] # noqa: E501 # set the LUSID header header_params['X-LUSID-SDK-Language'] = 'Python' header_params['X-LUSID-SDK-Version'] = '0.10.1327' return self.api_client.call_api( '/api/allocations', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='PagedResourceListOfAllocation', # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get( '_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats)
def update_cut_label_definition_with_http_info(self, code, **kwargs): # noqa: E501 """[EARLY ACCESS] Update a Cut Label # noqa: E501 Update a specified cut label # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.update_cut_label_definition_with_http_info(code, async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously :param str code: The Code of the Cut Label that is being updated (required) :param UpdateCutLabelDefinitionRequest update_cut_label_definition_request: The cut label update definition :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: 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. :return: tuple(CutLabelDefinition, status_code(int), headers(HTTPHeaderDict)) If the method is called asynchronously, returns the request thread. """ local_var_params = locals() all_params = ['code', 'update_cut_label_definition_request'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method update_cut_label_definition" % key ) local_var_params[key] = val del local_var_params['kwargs'] if ('code' in local_var_params and len(local_var_params['code']) > 64): raise ApiValueError("Invalid value for parameter `code` when calling `update_cut_label_definition`, length must be less than or equal to `64`") # noqa: E501 if ('code' in local_var_params and len(local_var_params['code']) < 1): raise ApiValueError("Invalid value for parameter `code` when calling `update_cut_label_definition`, length must be greater than or equal to `1`") # noqa: E501 if 'code' in local_var_params and not re.search(r'^[a-zA-Z0-9\-_]+$', local_var_params['code']): # noqa: E501 raise ApiValueError("Invalid value for parameter `code` when calling `update_cut_label_definition`, must conform to the pattern `/^[a-zA-Z0-9\-_]+$/`") # noqa: E501 collection_formats = {} path_params = {} if 'code' in local_var_params: path_params['code'] = local_var_params['code'] # noqa: E501 query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None if 'update_cut_label_definition_request' in local_var_params: body_params = local_var_params['update_cut_label_definition_request'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['text/plain', 'application/json', 'text/json']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json-patch+json', 'application/json', 'text/json', 'application/*+json']) # noqa: E501 # Authentication setting auth_settings = ['oauth2'] # noqa: E501 # set the LUSID header header_params['X-LUSID-SDK-Language'] = 'Python' header_params['X-LUSID-SDK-Version'] = '0.11.2342' return self.api_client.call_api( '/api/systemconfiguration/cutlabels/{code}', 'PUT', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='CutLabelDefinition', # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats)
def list_cut_label_definitions_with_http_info(self, **kwargs): # noqa: E501 """[EARLY ACCESS] List Existing Cut Labels # noqa: E501 List all the Cut Label Definitions that are valid at the given AsAt time # 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_cut_label_definitions_with_http_info(async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously :param datetime as_at: Optional. The As At time at which listed Cut Labels are valid :param list[str] sort_by: Optional. Order the results by these fields. Use use the '-' sign to denote descending order e.g. -MyFieldName :param int start: Optional. When paginating, skip this number of results :param int limit: Optional. When paginating, limit the number of returned results to this many. :param str filter: Optional. Expression to filter the result set. For example, to filter on code, use \"code eq 'string'\" Read more about filtering results from LUSID here https://support.lusid.com/filtering-results-from-lusid. :param str page: The pagination token to use to continue listing cut labels from a previous call This value is returned from the previous call. If a pagination token is provided the sortBy, filter, and asAt fields must not have changed since the original request. Also, if set, a start value cannot be provided. :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: 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. :return: tuple(PagedResourceListOfCutLabelDefinition, status_code(int), headers(HTTPHeaderDict)) If the method is called asynchronously, returns the request thread. """ local_var_params = locals() all_params = ['as_at', 'sort_by', 'start', 'limit', 'filter', 'page'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method list_cut_label_definitions" % key ) local_var_params[key] = val del local_var_params['kwargs'] collection_formats = {} path_params = {} query_params = [] if 'as_at' in local_var_params: query_params.append(('asAt', local_var_params['as_at'])) # noqa: E501 if 'sort_by' in local_var_params: query_params.append(('sortBy', local_var_params['sort_by'])) # noqa: E501 collection_formats['sortBy'] = 'multi' # noqa: E501 if 'start' in local_var_params: query_params.append(('start', local_var_params['start'])) # noqa: E501 if 'limit' in local_var_params: query_params.append(('limit', local_var_params['limit'])) # noqa: E501 if 'filter' in local_var_params: query_params.append(('filter', local_var_params['filter'])) # noqa: E501 if 'page' in local_var_params: query_params.append(('page', local_var_params['page'])) # noqa: E501 header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['text/plain', 'application/json', 'text/json']) # noqa: E501 # Authentication setting auth_settings = ['oauth2'] # noqa: E501 # set the LUSID header header_params['X-LUSID-SDK-Language'] = 'Python' header_params['X-LUSID-SDK-Version'] = '0.11.2342' return self.api_client.call_api( '/api/systemconfiguration/cutlabels', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='PagedResourceListOfCutLabelDefinition', # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats)
def get_value_types_with_http_info(self, **kwargs): # noqa: E501 """[BETA] Get value types # noqa: E501 Gets the available value types for which a schema is available. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_value_types_with_http_info(async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously :param list[str] sort_by: Optional. Order the results by these fields. Use use the '-' sign to denote descending order e.g. -MyFieldName :param int start: Optional. When paginating, skip this number of results :param int limit: Optional. When paginating, limit the number of returned results to this many. :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: 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. :return: tuple(ResourceListOfValueType, status_code(int), headers(HTTPHeaderDict)) If the method is called asynchronously, returns the request thread. """ local_var_params = locals() all_params = ['sort_by', 'start', 'limit'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: raise ApiTypeError("Got an unexpected keyword argument '%s'" " to method get_value_types" % key) local_var_params[key] = val del local_var_params['kwargs'] collection_formats = {} path_params = {} query_params = [] if 'sort_by' in local_var_params: query_params.append( ('sortBy', local_var_params['sort_by'])) # noqa: E501 collection_formats['sortBy'] = 'multi' # noqa: E501 if 'start' in local_var_params: query_params.append( ('start', local_var_params['start'])) # noqa: E501 if 'limit' in local_var_params: query_params.append( ('limit', local_var_params['limit'])) # noqa: E501 header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['text/plain', 'application/json', 'text/json']) # noqa: E501 # Authentication setting auth_settings = ['oauth2'] # noqa: E501 # set the LUSID header header_params['X-LUSID-SDK-Language'] = 'Python' header_params['X-LUSID-SDK-Version'] = '0.11.2863' return self.api_client.call_api( '/api/schemas/types', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='ResourceListOfValueType', # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get( '_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats)
def create_derived_portfolio_with_http_info(self, scope, **kwargs): # noqa: E501 """[EARLY ACCESS] Create derived transaction portfolio # noqa: E501 Creates a transaction portfolio that derives from an existing transaction portfolio. In a derived portfolio, parts of the portfolio can either be specific to this portfolio, or can be inherited from a \"parent\". Different parts of the portfolio (e.g. transactions or properties) are combined in different ways. The portfolio details are either overridden in entirety, or not at all. The same is true for properties. Transactions on a derived portfolio are merged with its parent portfolio's transactions. If the parent portfolio is itself a derived portfolio, transactions from that parent are also merged (and that parent's portfolio's, if it is also a derived portfolio, and so on). # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.create_derived_portfolio_with_http_info(scope, async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously :param str scope: The scope into which to create the new derived portfolio (required) :param CreateDerivedTransactionPortfolioRequest create_derived_transaction_portfolio_request: The root object of the new derived portfolio, containing a populated reference portfolio id and reference scope :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: 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. :return: tuple(Portfolio, status_code(int), headers(HTTPHeaderDict)) If the method is called asynchronously, returns the request thread. """ local_var_params = locals() all_params = ['scope', 'create_derived_transaction_portfolio_request' ] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: raise ApiTypeError("Got an unexpected keyword argument '%s'" " to method create_derived_portfolio" % key) local_var_params[key] = val del local_var_params['kwargs'] if ('scope' in local_var_params and len(local_var_params['scope']) > 64): raise ApiValueError( "Invalid value for parameter `scope` when calling `create_derived_portfolio`, length must be less than or equal to `64`" ) # noqa: E501 if ('scope' in local_var_params and len(local_var_params['scope']) < 1): raise ApiValueError( "Invalid value for parameter `scope` when calling `create_derived_portfolio`, length must be greater than or equal to `1`" ) # noqa: E501 if 'scope' in local_var_params and not re.search( r'^[a-zA-Z0-9\-_]+$', local_var_params['scope']): # noqa: E501 raise ApiValueError( "Invalid value for parameter `scope` when calling `create_derived_portfolio`, must conform to the pattern `/^[a-zA-Z0-9\-_]+$/`" ) # noqa: E501 collection_formats = {} path_params = {} if 'scope' in local_var_params: path_params['scope'] = local_var_params['scope'] # noqa: E501 query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None if 'create_derived_transaction_portfolio_request' in local_var_params: body_params = local_var_params[ 'create_derived_transaction_portfolio_request'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['text/plain', 'application/json', 'text/json']) # noqa: E501 # HTTP header `Content-Type` header_params[ 'Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 [ 'application/json-patch+json', 'application/json', 'text/json', 'application/*+json' ]) # noqa: E501 # Authentication setting auth_settings = ['oauth2'] # noqa: E501 # set the LUSID header header_params['X-LUSID-SDK-Language'] = 'Python' header_params['X-LUSID-SDK-Version'] = '0.11.2808' return self.api_client.call_api( '/api/derivedtransactionportfolios/{scope}', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='Portfolio', # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get( '_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats)
def get_entity_schema_with_http_info(self, entity, **kwargs): # noqa: E501 """[BETA] Get schema # noqa: E501 Gets the schema and meta-data for a given entity # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_entity_schema_with_http_info(entity, async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously :param str entity: The name of a valid entity (required) :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: 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. :return: tuple(Schema, status_code(int), headers(HTTPHeaderDict)) If the method is called asynchronously, returns the request thread. """ local_var_params = locals() all_params = ['entity'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: raise ApiTypeError("Got an unexpected keyword argument '%s'" " to method get_entity_schema" % key) local_var_params[key] = val del local_var_params['kwargs'] if ('entity' in local_var_params and len(local_var_params['entity']) > 6000): raise ApiValueError( "Invalid value for parameter `entity` when calling `get_entity_schema`, length must be less than or equal to `6000`" ) # noqa: E501 if ('entity' in local_var_params and len(local_var_params['entity']) < 0): raise ApiValueError( "Invalid value for parameter `entity` when calling `get_entity_schema`, length must be greater than or equal to `0`" ) # noqa: E501 if 'entity' in local_var_params and not re.search( r'^[a-zA-Z0-9\-_]+$', local_var_params['entity']): # noqa: E501 raise ApiValueError( "Invalid value for parameter `entity` when calling `get_entity_schema`, must conform to the pattern `/^[a-zA-Z0-9\-_]+$/`" ) # noqa: E501 collection_formats = {} path_params = {} if 'entity' in local_var_params: path_params['entity'] = local_var_params['entity'] # noqa: E501 query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['text/plain', 'application/json', 'text/json']) # noqa: E501 # Authentication setting auth_settings = ['oauth2'] # noqa: E501 # set the LUSID header header_params['X-LUSID-SDK-Language'] = 'Python' header_params['X-LUSID-SDK-Version'] = '0.11.2863' return self.api_client.call_api( '/api/schemas/entities/{entity}', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='Schema', # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get( '_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats)
def get_relation_definition_with_http_info(self, scope, code, **kwargs): # noqa: E501 """[DEPRECATED] Get relation definition # noqa: E501 Retrieve the definition of a specified relation. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_relation_definition_with_http_info(scope, code, async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously :param str scope: The scope of the specified relation. (required) :param str code: The code of the specified relation. Together with the domain and scope this uniquely identifies the relation. (required) :param datetime as_at: The asAt datetime at which to retrieve the relation definition. Defaults to return the latest version of the definition if not specified. :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: 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. :return: tuple(RelationDefinition, status_code(int), headers(HTTPHeaderDict)) If the method is called asynchronously, returns the request thread. """ local_var_params = locals() all_params = ['scope', 'code', 'as_at'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: raise ApiTypeError("Got an unexpected keyword argument '%s'" " to method get_relation_definition" % key) local_var_params[key] = val del local_var_params['kwargs'] if ('scope' in local_var_params and len(local_var_params['scope']) > 64): raise ApiValueError( "Invalid value for parameter `scope` when calling `get_relation_definition`, length must be less than or equal to `64`" ) # noqa: E501 if ('scope' in local_var_params and len(local_var_params['scope']) < 1): raise ApiValueError( "Invalid value for parameter `scope` when calling `get_relation_definition`, length must be greater than or equal to `1`" ) # noqa: E501 if 'scope' in local_var_params and not re.search( r'^[a-zA-Z0-9\-_]+$', local_var_params['scope']): # noqa: E501 raise ApiValueError( "Invalid value for parameter `scope` when calling `get_relation_definition`, must conform to the pattern `/^[a-zA-Z0-9\-_]+$/`" ) # noqa: E501 if ('code' in local_var_params and len(local_var_params['code']) > 64): raise ApiValueError( "Invalid value for parameter `code` when calling `get_relation_definition`, length must be less than or equal to `64`" ) # noqa: E501 if ('code' in local_var_params and len(local_var_params['code']) < 1): raise ApiValueError( "Invalid value for parameter `code` when calling `get_relation_definition`, length must be greater than or equal to `1`" ) # noqa: E501 if 'code' in local_var_params and not re.search( r'^[a-zA-Z0-9\-_]+$', local_var_params['code']): # noqa: E501 raise ApiValueError( "Invalid value for parameter `code` when calling `get_relation_definition`, must conform to the pattern `/^[a-zA-Z0-9\-_]+$/`" ) # noqa: E501 collection_formats = {} path_params = {} if 'scope' in local_var_params: path_params['scope'] = local_var_params['scope'] # noqa: E501 if 'code' in local_var_params: path_params['code'] = local_var_params['code'] # noqa: E501 query_params = [] if 'as_at' in local_var_params: query_params.append( ('asAt', local_var_params['as_at'])) # noqa: E501 header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['text/plain', 'application/json', 'text/json']) # noqa: E501 # Authentication setting auth_settings = ['oauth2'] # noqa: E501 # set the LUSID header header_params['X-LUSID-SDK-Language'] = 'Python' header_params['X-LUSID-SDK-Version'] = '0.11.2808' return self.api_client.call_api( '/api/relationdefinitions/{scope}/{code}', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='RelationDefinition', # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get( '_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats)
def create_configuration_transaction_type_with_http_info(self, **kwargs): # noqa: E501 """[EARLY ACCESS] Create transaction type # noqa: E501 Create a new transaction type by specifying a definition and the mappings to movements # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.create_configuration_transaction_type_with_http_info(async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously :param TransactionConfigurationDataRequest type: A transaction type definition :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: 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. :return: tuple(TransactionSetConfigurationData, status_code(int), headers(HTTPHeaderDict)) If the method is called asynchronously, returns the request thread. """ local_var_params = locals() all_params = ['type'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method create_configuration_transaction_type" % key ) local_var_params[key] = val del local_var_params['kwargs'] collection_formats = {} path_params = {} query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None if 'type' in local_var_params: body_params = local_var_params['type'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['text/plain', 'application/json', 'text/json']) # noqa: E501 # Authentication setting auth_settings = ['oauth2'] # noqa: E501 # set the LUSID header header_params['X-LUSID-SDK-Language'] = 'Python' header_params['X-LUSID-SDK-Version'] = '0.10.1282' return self.api_client.call_api( '/api/systemconfiguration/transactions/type', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='TransactionSetConfigurationData', # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats)
def create_relation_definition_with_http_info( self, create_relation_definition_request, **kwargs): # noqa: E501 """[DEPRECATED] Create a relation definition # noqa: E501 Define a new relation. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.create_relation_definition_with_http_info(create_relation_definition_request, async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously :param CreateRelationDefinitionRequest create_relation_definition_request: The definition of the new relation. (required) :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: 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. :return: tuple(RelationDefinition, status_code(int), headers(HTTPHeaderDict)) If the method is called asynchronously, returns the request thread. """ local_var_params = locals() all_params = ['create_relation_definition_request'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: raise ApiTypeError("Got an unexpected keyword argument '%s'" " to method create_relation_definition" % key) local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'create_relation_definition_request' is set if ('create_relation_definition_request' not in local_var_params or local_var_params['create_relation_definition_request'] is None): raise ApiValueError( "Missing the required parameter `create_relation_definition_request` when calling `create_relation_definition`" ) # noqa: E501 collection_formats = {} path_params = {} query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None if 'create_relation_definition_request' in local_var_params: body_params = local_var_params[ 'create_relation_definition_request'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['text/plain', 'application/json', 'text/json']) # noqa: E501 # HTTP header `Content-Type` header_params[ 'Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 [ 'application/json-patch+json', 'application/json', 'text/json', 'application/*+json' ]) # noqa: E501 # Authentication setting auth_settings = ['oauth2'] # noqa: E501 # set the LUSID header header_params['X-LUSID-SDK-Language'] = 'Python' header_params['X-LUSID-SDK-Version'] = '0.11.2808' return self.api_client.call_api( '/api/relationdefinitions', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='RelationDefinition', # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get( '_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats)
def get_results_with_http_info(self, entity_scope, entity_code, calculation_scope, calculation_code, effective_at, **kwargs): # noqa: E501 """[EXPERIMENTAL] Retrieve a page of results all keyed by the provided parameters. The result store is not bi-temporal; a single date addressed the market effectiveAt. # noqa: E501 Retrieve pre-calculated results that have been stored in LUSID. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_results_with_http_info(entity_scope, entity_code, calculation_scope, calculation_code, effective_at, async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously :param str entity_scope: The scope of the data or entity being stored (required) :param str entity_code: The identifier for the data or results entity being stored (required) :param str calculation_scope: The identifying scope for the calculation that produced the result (required) :param str calculation_code: The identifying calculation name for the results (required) :param datetime effective_at: The market date for which the data is stored (required) :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: 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. :return: tuple(Results, status_code(int), headers(HTTPHeaderDict)) If the method is called asynchronously, returns the request thread. """ local_var_params = locals() all_params = [ 'entity_scope', 'entity_code', 'calculation_scope', 'calculation_code', 'effective_at' ] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: raise ApiTypeError("Got an unexpected keyword argument '%s'" " to method get_results" % key) local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'entity_scope' is set if ('entity_scope' not in local_var_params or local_var_params['entity_scope'] is None): raise ApiValueError( "Missing the required parameter `entity_scope` when calling `get_results`" ) # noqa: E501 # verify the required parameter 'entity_code' is set if ('entity_code' not in local_var_params or local_var_params['entity_code'] is None): raise ApiValueError( "Missing the required parameter `entity_code` when calling `get_results`" ) # noqa: E501 # verify the required parameter 'calculation_scope' is set if ('calculation_scope' not in local_var_params or local_var_params['calculation_scope'] is None): raise ApiValueError( "Missing the required parameter `calculation_scope` when calling `get_results`" ) # noqa: E501 # verify the required parameter 'calculation_code' is set if ('calculation_code' not in local_var_params or local_var_params['calculation_code'] is None): raise ApiValueError( "Missing the required parameter `calculation_code` when calling `get_results`" ) # noqa: E501 collection_formats = {} path_params = {} if 'entity_scope' in local_var_params: path_params['entityScope'] = local_var_params[ 'entity_scope'] # noqa: E501 if 'entity_code' in local_var_params: path_params['entityCode'] = local_var_params[ 'entity_code'] # noqa: E501 if 'calculation_scope' in local_var_params: path_params['calculationScope'] = local_var_params[ 'calculation_scope'] # noqa: E501 if 'calculation_code' in local_var_params: path_params['calculationCode'] = local_var_params[ 'calculation_code'] # noqa: E501 if 'effective_at' in local_var_params: path_params['effectiveAt'] = local_var_params[ 'effective_at'] # noqa: E501 query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['text/plain', 'application/json', 'text/json']) # noqa: E501 # Authentication setting auth_settings = ['oauth2'] # noqa: E501 # set the LUSID header header_params['X-LUSID-SDK-Language'] = 'Python' header_params['X-LUSID-SDK-Version'] = '0.10.1327' return self.api_client.call_api( '/api/results/{entityScope}/{entityCode}/{calculationScope}/{calculationCode}/{effectiveAt}', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='Results', # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get( '_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats)
def list_quotes_with_http_info(self, scope, **kwargs): # noqa: E501 """[DEPRECATED] List quotes # noqa: E501 List all the quotes from a single scope at the specified date/time Please use M:Finbourne.WebApi.Controllers.QuotesController.ListQuotesForScope(System.String,System.Nullable{System.DateTimeOffset},System.String,System.Nullable{System.Int32},System.Nullable{System.Int32},System.String) - the signature and behaviour of this endpoint will be changing to omit scope # 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_quotes_with_http_info(scope, async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously :param str scope: The scope of the quotes to list. (required) :param datetime as_at: The asAt datetime at which to list the quotes. Defaults to latest if not specified. :param str page: The pagination token to use to continue listing quotes from a previous call to list quotes. This value is returned from the previous call. If a pagination token is provided the sortBy, filter, effectiveAt, and asAt fields must not have changed since the original request. Also, if set, a start value cannot be provided. :param int start: When paginating, skip this number of results. :param int limit: When paginating, limit the number of returned results to this many. :param str filter: Expression to filter the result set. Read more about filtering results from LUSID here https://support.lusid.com/filtering-results-from-lusid. :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: 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. :return: tuple(ResourceListOfQuote, status_code(int), headers(HTTPHeaderDict)) If the method is called asynchronously, returns the request thread. """ local_var_params = locals() all_params = ['scope', 'as_at', 'page', 'start', 'limit', 'filter'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: raise ApiTypeError("Got an unexpected keyword argument '%s'" " to method list_quotes" % key) local_var_params[key] = val del local_var_params['kwargs'] collection_formats = {} path_params = {} if 'scope' in local_var_params: path_params['scope'] = local_var_params['scope'] # noqa: E501 query_params = [] if 'as_at' in local_var_params: query_params.append( ('asAt', local_var_params['as_at'])) # noqa: E501 if 'page' in local_var_params: query_params.append( ('page', local_var_params['page'])) # noqa: E501 if 'start' in local_var_params: query_params.append( ('start', local_var_params['start'])) # noqa: E501 if 'limit' in local_var_params: query_params.append( ('limit', local_var_params['limit'])) # noqa: E501 if 'filter' in local_var_params: query_params.append( ('filter', local_var_params['filter'])) # noqa: E501 header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['text/plain', 'application/json', 'text/json']) # noqa: E501 # Authentication setting auth_settings = ['oauth2'] # noqa: E501 # set the LUSID header header_params['X-LUSID-SDK-Language'] = 'Python' header_params['X-LUSID-SDK-Version'] = '0.11.2342' return self.api_client.call_api( '/api/quotes/{scope}/$deprecated', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='ResourceListOfQuote', # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get( '_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats)
def create_derived_portfolio_with_http_info(self, scope, **kwargs): # noqa: E501 """CreateDerivedPortfolio: Create derived portfolio # noqa: E501 Create a derived transaction portfolio from a parent transaction portfolio (which may itself be derived). # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.create_derived_portfolio_with_http_info(scope, async_req=True) >>> result = thread.get() :param scope: The scope in which to create the derived transaction portfolio. (required) :type scope: str :param create_derived_transaction_portfolio_request: The definition of the derived transaction portfolio. :type create_derived_transaction_portfolio_request: CreateDerivedTransactionPortfolioRequest :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: 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. :param _request_auth: set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request. :type _request_auth: dict, optional :return: Returns the result object, the HTTP status code, and the headers. If the method is called asynchronously, returns the request thread. :rtype: (Portfolio, int, HTTPHeaderDict) """ local_var_params = locals() all_params = [ 'scope', 'create_derived_transaction_portfolio_request' ] all_params.extend( [ 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout', '_request_auth', '_headers' ] ) for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method create_derived_portfolio" % key ) local_var_params[key] = val del local_var_params['kwargs'] if self.api_client.client_side_validation and ('scope' in local_var_params and # noqa: E501 len(local_var_params['scope']) > 64): # noqa: E501 raise ApiValueError("Invalid value for parameter `scope` when calling `create_derived_portfolio`, length must be less than or equal to `64`") # noqa: E501 if self.api_client.client_side_validation and ('scope' in local_var_params and # noqa: E501 len(local_var_params['scope']) < 1): # noqa: E501 raise ApiValueError("Invalid value for parameter `scope` when calling `create_derived_portfolio`, length must be greater than or equal to `1`") # noqa: E501 if self.api_client.client_side_validation and 'scope' in local_var_params and not re.search(r'^[a-zA-Z0-9\-_]+$', local_var_params['scope']): # noqa: E501 raise ApiValueError("Invalid value for parameter `scope` when calling `create_derived_portfolio`, must conform to the pattern `/^[a-zA-Z0-9\-_]+$/`") # noqa: E501 collection_formats = {} path_params = {} if 'scope' in local_var_params: path_params['scope'] = local_var_params['scope'] # noqa: E501 query_params = [] header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} body_params = None if 'create_derived_transaction_portfolio_request' in local_var_params: body_params = local_var_params['create_derived_transaction_portfolio_request'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['text/plain', 'application/json', 'text/json']) # noqa: E501 header_params['Accept-Encoding'] = "gzip, deflate, br" # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json-patch+json', 'application/json', 'text/json', 'application/*+json']) # noqa: E501 # set the LUSID header header_params['X-LUSID-SDK-Language'] = 'Python' header_params['X-LUSID-SDK-Version'] = '0.11.4385' # Authentication setting auth_settings = ['oauth2'] # noqa: E501 response_types_map = { 201: "Portfolio", 400: "LusidValidationProblemDetails", } return self.api_client.call_api( '/api/derivedtransactionportfolios/{scope}', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, _request_auth=local_var_params.get('_request_auth'))
def list_constituents_adjustments_with_http_info(self, scope, code, from_effective_at, to_effective_at, **kwargs): # noqa: E501 """ListConstituentsAdjustments: List constituents adjustments # noqa: E501 List adjustments made to constituents in a reference portfolio. # 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_constituents_adjustments_with_http_info(scope, code, from_effective_at, to_effective_at, async_req=True) >>> result = thread.get() :param scope: The scope of the reference portfolio. (required) :type scope: str :param code: The code of the reference portfolio. Together with the scope this uniquely identifies the reference portfolio. (required) :type code: str :param from_effective_at: Events between this time (inclusive) and the toEffectiveAt are returned. (required) :type from_effective_at: str :param to_effective_at: Events between this time (inclusive) and the fromEffectiveAt are returned. (required) :type to_effective_at: str :param as_at_time: The asAt time for which the result is valid. :type as_at_time: datetime :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: 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. :param _request_auth: set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request. :type _request_auth: dict, optional :return: Returns the result object, the HTTP status code, and the headers. If the method is called asynchronously, returns the request thread. :rtype: (ResourceListOfConstituentsAdjustmentHeader, int, HTTPHeaderDict) """ local_var_params = locals() all_params = [ 'scope', 'code', 'from_effective_at', 'to_effective_at', 'as_at_time' ] all_params.extend([ 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout', '_request_auth' ]) for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: raise ApiTypeError("Got an unexpected keyword argument '%s'" " to method list_constituents_adjustments" % key) local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'from_effective_at' is set if self.api_client.client_side_validation and ( 'from_effective_at' not in local_var_params or # noqa: E501 local_var_params['from_effective_at'] is None): # noqa: E501 raise ApiValueError( "Missing the required parameter `from_effective_at` when calling `list_constituents_adjustments`" ) # noqa: E501 # verify the required parameter 'to_effective_at' is set if self.api_client.client_side_validation and ( 'to_effective_at' not in local_var_params or # noqa: E501 local_var_params['to_effective_at'] is None): # noqa: E501 raise ApiValueError( "Missing the required parameter `to_effective_at` when calling `list_constituents_adjustments`" ) # noqa: E501 if self.api_client.client_side_validation and ( 'scope' in local_var_params and # noqa: E501 len(local_var_params['scope']) > 64): # noqa: E501 raise ApiValueError( "Invalid value for parameter `scope` when calling `list_constituents_adjustments`, length must be less than or equal to `64`" ) # noqa: E501 if self.api_client.client_side_validation and ( 'scope' in local_var_params and # noqa: E501 len(local_var_params['scope']) < 1): # noqa: E501 raise ApiValueError( "Invalid value for parameter `scope` when calling `list_constituents_adjustments`, length must be greater than or equal to `1`" ) # noqa: E501 if self.api_client.client_side_validation and 'scope' in local_var_params and not re.search( r'^[a-zA-Z0-9\-_]+$', local_var_params['scope']): # noqa: E501 raise ApiValueError( "Invalid value for parameter `scope` when calling `list_constituents_adjustments`, must conform to the pattern `/^[a-zA-Z0-9\-_]+$/`" ) # noqa: E501 if self.api_client.client_side_validation and ( 'code' in local_var_params and # noqa: E501 len(local_var_params['code']) > 64): # noqa: E501 raise ApiValueError( "Invalid value for parameter `code` when calling `list_constituents_adjustments`, length must be less than or equal to `64`" ) # noqa: E501 if self.api_client.client_side_validation and ( 'code' in local_var_params and # noqa: E501 len(local_var_params['code']) < 1): # noqa: E501 raise ApiValueError( "Invalid value for parameter `code` when calling `list_constituents_adjustments`, length must be greater than or equal to `1`" ) # noqa: E501 if self.api_client.client_side_validation and 'code' in local_var_params and not re.search( r'^[a-zA-Z0-9\-_]+$', local_var_params['code']): # noqa: E501 raise ApiValueError( "Invalid value for parameter `code` when calling `list_constituents_adjustments`, must conform to the pattern `/^[a-zA-Z0-9\-_]+$/`" ) # noqa: E501 collection_formats = {} path_params = {} if 'scope' in local_var_params: path_params['scope'] = local_var_params['scope'] # noqa: E501 if 'code' in local_var_params: path_params['code'] = local_var_params['code'] # noqa: E501 query_params = [] if 'from_effective_at' in local_var_params and local_var_params[ 'from_effective_at'] is not None: # noqa: E501 query_params.append( ('fromEffectiveAt', local_var_params['from_effective_at'])) # noqa: E501 if 'to_effective_at' in local_var_params and local_var_params[ 'to_effective_at'] is not None: # noqa: E501 query_params.append( ('toEffectiveAt', local_var_params['to_effective_at'])) # noqa: E501 if 'as_at_time' in local_var_params and local_var_params[ 'as_at_time'] is not None: # noqa: E501 query_params.append( ('asAtTime', local_var_params['as_at_time'])) # noqa: E501 header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['text/plain', 'application/json', 'text/json']) # noqa: E501 header_params['Accept-Encoding'] = "gzip, deflate, br" # set the LUSID header header_params['X-LUSID-SDK-Language'] = 'Python' header_params['X-LUSID-SDK-Version'] = '0.11.3906' # Authentication setting auth_settings = ['oauth2'] # noqa: E501 response_types_map = { 200: "ResourceListOfConstituentsAdjustmentHeader", 400: "LusidValidationProblemDetails", } return self.api_client.call_api( '/api/referenceportfolios/{scope}/{code}/constituentsadjustments', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get( '_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, _request_auth=local_var_params.get('_request_auth'))
def list_scopes_with_http_info(self, **kwargs): # noqa: E501 """ListScopes: List Scopes # noqa: E501 List all the scopes that contain data. # 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_scopes_with_http_info(async_req=True) >>> result = thread.get() :param filter: Expression to filter the result set. For example, to filter on the Scope, use \"scope eq 'string'\" Read more about filtering results from LUSID here https://support.lusid.com/filtering-results-from-lusid. :type filter: str :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: 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. :param _request_auth: set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request. :type _request_auth: dict, optional :return: Returns the result object, the HTTP status code, and the headers. If the method is called asynchronously, returns the request thread. :rtype: (ResourceListOfScopeDefinition, int, HTTPHeaderDict) """ local_var_params = locals() all_params = ['filter'] all_params.extend([ 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout', '_request_auth', '_headers' ]) for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: raise ApiTypeError("Got an unexpected keyword argument '%s'" " to method list_scopes" % key) local_var_params[key] = val del local_var_params['kwargs'] if self.api_client.client_side_validation and ( 'filter' in local_var_params and # noqa: E501 len(local_var_params['filter']) > 16384): # noqa: E501 raise ApiValueError( "Invalid value for parameter `filter` when calling `list_scopes`, length must be less than or equal to `16384`" ) # noqa: E501 if self.api_client.client_side_validation and ( 'filter' in local_var_params and # noqa: E501 len(local_var_params['filter']) < 0): # noqa: E501 raise ApiValueError( "Invalid value for parameter `filter` when calling `list_scopes`, length must be greater than or equal to `0`" ) # noqa: E501 if self.api_client.client_side_validation and 'filter' in local_var_params and not re.search( r'^[\s\S]*$', local_var_params['filter']): # noqa: E501 raise ApiValueError( "Invalid value for parameter `filter` when calling `list_scopes`, must conform to the pattern `/^[\s\S]*$/`" ) # noqa: E501 collection_formats = {} path_params = {} query_params = [] if 'filter' in local_var_params and local_var_params[ 'filter'] is not None: # noqa: E501 query_params.append( ('filter', local_var_params['filter'])) # noqa: E501 header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['text/plain', 'application/json', 'text/json']) # noqa: E501 header_params['Accept-Encoding'] = "gzip, deflate, br" # set the LUSID header header_params['X-LUSID-SDK-Language'] = 'Python' header_params['X-LUSID-SDK-Version'] = '0.11.4385' # Authentication setting auth_settings = ['oauth2'] # noqa: E501 response_types_map = { 200: "ResourceListOfScopeDefinition", 400: "LusidValidationProblemDetails", } return self.api_client.call_api( '/api/scopes', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get( '_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, _request_auth=local_var_params.get('_request_auth'))
def get_saml_identity_provider_id_with_http_info(self, domain, **kwargs): # noqa: E501 """Get SAML Identity Provider # noqa: E501 Get the unique identifier for the SAML 2.0 Identity Provider to be used for domain. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_saml_identity_provider_id_with_http_info(domain, async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously :param str domain: The domain that the user will be logging in to (required) :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: 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. :return: tuple(str, status_code(int), headers(HTTPHeaderDict)) If the method is called asynchronously, returns the request thread. """ local_var_params = locals() all_params = ['domain'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: raise ApiTypeError("Got an unexpected keyword argument '%s'" " to method get_saml_identity_provider_id" % key) local_var_params[key] = val del local_var_params['kwargs'] collection_formats = {} path_params = {} if 'domain' in local_var_params: path_params['domain'] = local_var_params['domain'] # noqa: E501 query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['text/plain', 'application/json', 'text/json']) # noqa: E501 # Authentication setting auth_settings = ['oauth2'] # noqa: E501 # set the LUSID header header_params['X-LUSID-SDK-Language'] = 'Python' header_params['X-LUSID-SDK-Version'] = '0.11.2275' return self.api_client.call_api( '/api/login/saml/{domain}', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='str', # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get( '_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats)
def list_orders_with_http_info(self, **kwargs): # noqa: E501 """[EARLY ACCESS] ListOrders: List Orders # noqa: E501 Fetch the last pre-AsAt date version of each order in scope (does not fetch the entire history). # 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_orders_with_http_info(async_req=True) >>> result = thread.get() :param as_at: The asAt datetime at which to retrieve the order. Defaults to return the latest version of the order if not specified. :type as_at: datetime :param page: The pagination token to use to continue listing orders from a previous call to list orders. This value is returned from the previous call. If a pagination token is provided the sortBy, filter, effectiveAt, and asAt fields must not have changed since the original request. Also, if set, a start value cannot be provided. :type page: str :param sort_by: Order the results by these fields. Use use the '-' sign to denote descending order e.g. -MyFieldName. :type sort_by: list[str] :param start: When paginating, skip this number of results. :type start: int :param limit: When paginating, limit the number of returned results to this many. :type limit: int :param filter: Expression to filter the result set. Read more about filtering results from LUSID here: https://support.lusid.com/filtering-results-from-lusid. :type filter: str :param property_keys: A list of property keys from the \"Orders\" domain to decorate onto each order. These take the format {domain}/{scope}/{code} e.g. \"Orders/system/Name\". :type property_keys: list[str] :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: 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. :param _request_auth: set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request. :type _request_auth: dict, optional :return: Returns the result object, the HTTP status code, and the headers. If the method is called asynchronously, returns the request thread. :rtype: (PagedResourceListOfOrder, int, HTTPHeaderDict) """ local_var_params = locals() all_params = [ 'as_at', 'page', 'sort_by', 'start', 'limit', 'filter', 'property_keys' ] all_params.extend([ 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout', '_request_auth', '_headers' ]) for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: raise ApiTypeError("Got an unexpected keyword argument '%s'" " to method list_orders" % key) local_var_params[key] = val del local_var_params['kwargs'] if self.api_client.client_side_validation and ( 'page' in local_var_params and # noqa: E501 len(local_var_params['page']) > 500): # noqa: E501 raise ApiValueError( "Invalid value for parameter `page` when calling `list_orders`, length must be less than or equal to `500`" ) # noqa: E501 if self.api_client.client_side_validation and ( 'page' in local_var_params and # noqa: E501 len(local_var_params['page']) < 1): # noqa: E501 raise ApiValueError( "Invalid value for parameter `page` when calling `list_orders`, length must be greater than or equal to `1`" ) # noqa: E501 if self.api_client.client_side_validation and 'page' in local_var_params and not re.search( r'^[a-zA-Z0-9\+\/]*={0,3}$', local_var_params['page']): # noqa: E501 raise ApiValueError( "Invalid value for parameter `page` when calling `list_orders`, must conform to the pattern `/^[a-zA-Z0-9\+\/]*={0,3}$/`" ) # noqa: E501 if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params[ 'limit'] > 5000: # noqa: E501 raise ApiValueError( "Invalid value for parameter `limit` when calling `list_orders`, must be a value less than or equal to `5000`" ) # noqa: E501 if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params[ 'limit'] < 1: # noqa: E501 raise ApiValueError( "Invalid value for parameter `limit` when calling `list_orders`, must be a value greater than or equal to `1`" ) # noqa: E501 if self.api_client.client_side_validation and ( 'filter' in local_var_params and # noqa: E501 len(local_var_params['filter']) > 16384): # noqa: E501 raise ApiValueError( "Invalid value for parameter `filter` when calling `list_orders`, length must be less than or equal to `16384`" ) # noqa: E501 if self.api_client.client_side_validation and ( 'filter' in local_var_params and # noqa: E501 len(local_var_params['filter']) < 0): # noqa: E501 raise ApiValueError( "Invalid value for parameter `filter` when calling `list_orders`, length must be greater than or equal to `0`" ) # noqa: E501 if self.api_client.client_side_validation and 'filter' in local_var_params and not re.search( r'^[\s\S]*$', local_var_params['filter']): # noqa: E501 raise ApiValueError( "Invalid value for parameter `filter` when calling `list_orders`, must conform to the pattern `/^[\s\S]*$/`" ) # noqa: E501 collection_formats = {} path_params = {} query_params = [] if 'as_at' in local_var_params and local_var_params[ 'as_at'] is not None: # noqa: E501 query_params.append( ('asAt', local_var_params['as_at'])) # noqa: E501 if 'page' in local_var_params and local_var_params[ 'page'] is not None: # noqa: E501 query_params.append( ('page', local_var_params['page'])) # noqa: E501 if 'sort_by' in local_var_params and local_var_params[ 'sort_by'] is not None: # noqa: E501 query_params.append( ('sortBy', local_var_params['sort_by'])) # noqa: E501 collection_formats['sortBy'] = 'multi' # noqa: E501 if 'start' in local_var_params and local_var_params[ 'start'] is not None: # noqa: E501 query_params.append( ('start', local_var_params['start'])) # noqa: E501 if 'limit' in local_var_params and local_var_params[ 'limit'] is not None: # noqa: E501 query_params.append( ('limit', local_var_params['limit'])) # noqa: E501 if 'filter' in local_var_params and local_var_params[ 'filter'] is not None: # noqa: E501 query_params.append( ('filter', local_var_params['filter'])) # noqa: E501 if 'property_keys' in local_var_params and local_var_params[ 'property_keys'] is not None: # noqa: E501 query_params.append( ('propertyKeys', local_var_params['property_keys'])) # noqa: E501 collection_formats['propertyKeys'] = 'multi' # noqa: E501 header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['text/plain', 'application/json', 'text/json']) # noqa: E501 header_params['Accept-Encoding'] = "gzip, deflate, br" # set the LUSID header header_params['X-LUSID-SDK-Language'] = 'Python' header_params['X-LUSID-SDK-Version'] = '0.11.4385' # Authentication setting auth_settings = ['oauth2'] # noqa: E501 response_types_map = { 200: "PagedResourceListOfOrder", 400: "LusidValidationProblemDetails", } return self.api_client.call_api( '/api/orders', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get( '_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, _request_auth=local_var_params.get('_request_auth'))
def get_property_schema_with_http_info(self, **kwargs): # noqa: E501 """[BETA] Get property schema # noqa: E501 Get the schemas for the provided list of property keys. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_property_schema_with_http_info(async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously :param list[str] property_keys: One or more property keys for which the schema is requested :param datetime as_at: Optional. The AsAt date of the data :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: 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. :return: tuple(PropertySchema, status_code(int), headers(HTTPHeaderDict)) If the method is called asynchronously, returns the request thread. """ local_var_params = locals() all_params = ['property_keys', 'as_at'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: raise ApiTypeError("Got an unexpected keyword argument '%s'" " to method get_property_schema" % key) local_var_params[key] = val del local_var_params['kwargs'] collection_formats = {} path_params = {} query_params = [] if 'property_keys' in local_var_params: query_params.append( ('propertyKeys', local_var_params['property_keys'])) # noqa: E501 collection_formats['propertyKeys'] = 'multi' # noqa: E501 if 'as_at' in local_var_params: query_params.append( ('asAt', local_var_params['as_at'])) # noqa: E501 header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['text/plain', 'application/json', 'text/json']) # noqa: E501 # Authentication setting auth_settings = ['oauth2'] # noqa: E501 # set the LUSID header header_params['X-LUSID-SDK-Language'] = 'Python' header_params['X-LUSID-SDK-Version'] = '0.11.2863' return self.api_client.call_api( '/api/schemas/properties', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='PropertySchema', # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get( '_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats)
def delete_order_with_http_info(self, scope, code, **kwargs): # noqa: E501 """[EARLY ACCESS] DeleteOrder: Delete order # noqa: E501 Delete an order. Deletion will be valid from the order's creation datetime. This means that the order will no longer exist at any effective datetime from the asAt datetime of deletion. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.delete_order_with_http_info(scope, code, async_req=True) >>> result = thread.get() :param scope: The order scope. (required) :type scope: str :param code: The order's code. This, together with the scope uniquely identifies the order to delete. (required) :type code: str :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: 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. :param _request_auth: set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request. :type _request_auth: dict, optional :return: Returns the result object, the HTTP status code, and the headers. If the method is called asynchronously, returns the request thread. :rtype: (DeletedEntityResponse, int, HTTPHeaderDict) """ local_var_params = locals() all_params = ['scope', 'code'] all_params.extend([ 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout', '_request_auth', '_headers' ]) for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: raise ApiTypeError("Got an unexpected keyword argument '%s'" " to method delete_order" % key) local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'scope' is set if self.api_client.client_side_validation and ( 'scope' not in local_var_params or # noqa: E501 local_var_params['scope'] is None): # noqa: E501 raise ApiValueError( "Missing the required parameter `scope` when calling `delete_order`" ) # noqa: E501 # verify the required parameter 'code' is set if self.api_client.client_side_validation and ( 'code' not in local_var_params or # noqa: E501 local_var_params['code'] is None): # noqa: E501 raise ApiValueError( "Missing the required parameter `code` when calling `delete_order`" ) # noqa: E501 if self.api_client.client_side_validation and ( 'scope' in local_var_params and # noqa: E501 len(local_var_params['scope']) > 64): # noqa: E501 raise ApiValueError( "Invalid value for parameter `scope` when calling `delete_order`, length must be less than or equal to `64`" ) # noqa: E501 if self.api_client.client_side_validation and ( 'scope' in local_var_params and # noqa: E501 len(local_var_params['scope']) < 1): # noqa: E501 raise ApiValueError( "Invalid value for parameter `scope` when calling `delete_order`, length must be greater than or equal to `1`" ) # noqa: E501 if self.api_client.client_side_validation and 'scope' in local_var_params and not re.search( r'^[a-zA-Z0-9\-_]+$', local_var_params['scope']): # noqa: E501 raise ApiValueError( "Invalid value for parameter `scope` when calling `delete_order`, must conform to the pattern `/^[a-zA-Z0-9\-_]+$/`" ) # noqa: E501 if self.api_client.client_side_validation and ( 'code' in local_var_params and # noqa: E501 len(local_var_params['code']) > 64): # noqa: E501 raise ApiValueError( "Invalid value for parameter `code` when calling `delete_order`, length must be less than or equal to `64`" ) # noqa: E501 if self.api_client.client_side_validation and ( 'code' in local_var_params and # noqa: E501 len(local_var_params['code']) < 1): # noqa: E501 raise ApiValueError( "Invalid value for parameter `code` when calling `delete_order`, length must be greater than or equal to `1`" ) # noqa: E501 if self.api_client.client_side_validation and 'code' in local_var_params and not re.search( r'^[a-zA-Z0-9\-_]+$', local_var_params['code']): # noqa: E501 raise ApiValueError( "Invalid value for parameter `code` when calling `delete_order`, must conform to the pattern `/^[a-zA-Z0-9\-_]+$/`" ) # noqa: E501 collection_formats = {} path_params = {} if 'scope' in local_var_params: path_params['scope'] = local_var_params['scope'] # noqa: E501 if 'code' in local_var_params: path_params['code'] = local_var_params['code'] # noqa: E501 query_params = [] header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['text/plain', 'application/json', 'text/json']) # noqa: E501 header_params['Accept-Encoding'] = "gzip, deflate, br" # set the LUSID header header_params['X-LUSID-SDK-Language'] = 'Python' header_params['X-LUSID-SDK-Version'] = '0.11.4385' # Authentication setting auth_settings = ['oauth2'] # noqa: E501 response_types_map = { 200: "DeletedEntityResponse", 400: "LusidValidationProblemDetails", } return self.api_client.call_api( '/api/orders/{scope}/{code}', 'DELETE', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get( '_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, _request_auth=local_var_params.get('_request_auth'))
def get_excel_addin_with_http_info(self, **kwargs): # noqa: E501 """[EARLY ACCESS] Download Excel Addin # noqa: E501 Download the LUSID Excel Addin for Microsoft Excel. Not providing a specific value will return the latest version being returned # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_excel_addin_with_http_info(async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously :param str version: The requested version of the Excel plugin :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: 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. :return: tuple(FileResponse, status_code(int), headers(HTTPHeaderDict)) If the method is called asynchronously, returns the request thread. """ local_var_params = locals() all_params = ['version'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method get_excel_addin" % key ) local_var_params[key] = val del local_var_params['kwargs'] collection_formats = {} path_params = {} query_params = [] if 'version' in local_var_params: query_params.append(('version', local_var_params['version'])) # noqa: E501 header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['text/plain', 'application/json', 'text/json']) # noqa: E501 # Authentication setting auth_settings = ['oauth2'] # noqa: E501 # set the LUSID header header_params['X-LUSID-SDK-Language'] = 'Python' header_params['X-LUSID-SDK-Version'] = '0.11.2275' return self.api_client.call_api( '/api/metadata/downloads/exceladdin', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='FileResponse', # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats)