lusid-sdk 2.1.242__py3-none-any.whl → 2.1.246__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of lusid-sdk might be problematic. Click here for more details.
- lusid/__init__.py +8 -0
- lusid/api/entities_api.py +360 -0
- lusid/api/order_management_api.py +161 -1
- lusid/configuration.py +1 -1
- lusid/models/__init__.py +8 -0
- lusid/models/dependency_source_filter.py +9 -2
- lusid/models/instrument_entity.py +146 -0
- lusid/models/placement_update_request.py +116 -0
- lusid/models/property_definition_entity.py +146 -0
- lusid/models/update_placements_response.py +153 -0
- {lusid_sdk-2.1.242.dist-info → lusid_sdk-2.1.246.dist-info}/METADATA +10 -3
- {lusid_sdk-2.1.242.dist-info → lusid_sdk-2.1.246.dist-info}/RECORD +13 -9
- {lusid_sdk-2.1.242.dist-info → lusid_sdk-2.1.246.dist-info}/WHEEL +0 -0
lusid/__init__.py
CHANGED
|
@@ -495,6 +495,7 @@ from lusid.models.instrument_cash_flow import InstrumentCashFlow
|
|
|
495
495
|
from lusid.models.instrument_definition import InstrumentDefinition
|
|
496
496
|
from lusid.models.instrument_definition_format import InstrumentDefinitionFormat
|
|
497
497
|
from lusid.models.instrument_delete_modes import InstrumentDeleteModes
|
|
498
|
+
from lusid.models.instrument_entity import InstrumentEntity
|
|
498
499
|
from lusid.models.instrument_event import InstrumentEvent
|
|
499
500
|
from lusid.models.instrument_event_configuration import InstrumentEventConfiguration
|
|
500
501
|
from lusid.models.instrument_event_holder import InstrumentEventHolder
|
|
@@ -691,6 +692,7 @@ from lusid.models.place_blocks_request import PlaceBlocksRequest
|
|
|
691
692
|
from lusid.models.placement import Placement
|
|
692
693
|
from lusid.models.placement_request import PlacementRequest
|
|
693
694
|
from lusid.models.placement_set_request import PlacementSetRequest
|
|
695
|
+
from lusid.models.placement_update_request import PlacementUpdateRequest
|
|
694
696
|
from lusid.models.portfolio import Portfolio
|
|
695
697
|
from lusid.models.portfolio_cash_flow import PortfolioCashFlow
|
|
696
698
|
from lusid.models.portfolio_cash_ladder import PortfolioCashLadder
|
|
@@ -727,6 +729,7 @@ from lusid.models.pricing_model import PricingModel
|
|
|
727
729
|
from lusid.models.pricing_options import PricingOptions
|
|
728
730
|
from lusid.models.processed_command import ProcessedCommand
|
|
729
731
|
from lusid.models.property_definition import PropertyDefinition
|
|
732
|
+
from lusid.models.property_definition_entity import PropertyDefinitionEntity
|
|
730
733
|
from lusid.models.property_definition_search_result import PropertyDefinitionSearchResult
|
|
731
734
|
from lusid.models.property_definition_type import PropertyDefinitionType
|
|
732
735
|
from lusid.models.property_domain import PropertyDomain
|
|
@@ -1006,6 +1009,7 @@ from lusid.models.update_data_type_request import UpdateDataTypeRequest
|
|
|
1006
1009
|
from lusid.models.update_derived_property_definition_request import UpdateDerivedPropertyDefinitionRequest
|
|
1007
1010
|
from lusid.models.update_fee_type_request import UpdateFeeTypeRequest
|
|
1008
1011
|
from lusid.models.update_instrument_identifier_request import UpdateInstrumentIdentifierRequest
|
|
1012
|
+
from lusid.models.update_placements_response import UpdatePlacementsResponse
|
|
1009
1013
|
from lusid.models.update_portfolio_group_request import UpdatePortfolioGroupRequest
|
|
1010
1014
|
from lusid.models.update_portfolio_request import UpdatePortfolioRequest
|
|
1011
1015
|
from lusid.models.update_property_definition_request import UpdatePropertyDefinitionRequest
|
|
@@ -1571,6 +1575,7 @@ __all__ = [
|
|
|
1571
1575
|
"InstrumentDefinition",
|
|
1572
1576
|
"InstrumentDefinitionFormat",
|
|
1573
1577
|
"InstrumentDeleteModes",
|
|
1578
|
+
"InstrumentEntity",
|
|
1574
1579
|
"InstrumentEvent",
|
|
1575
1580
|
"InstrumentEventConfiguration",
|
|
1576
1581
|
"InstrumentEventHolder",
|
|
@@ -1767,6 +1772,7 @@ __all__ = [
|
|
|
1767
1772
|
"Placement",
|
|
1768
1773
|
"PlacementRequest",
|
|
1769
1774
|
"PlacementSetRequest",
|
|
1775
|
+
"PlacementUpdateRequest",
|
|
1770
1776
|
"Portfolio",
|
|
1771
1777
|
"PortfolioCashFlow",
|
|
1772
1778
|
"PortfolioCashLadder",
|
|
@@ -1803,6 +1809,7 @@ __all__ = [
|
|
|
1803
1809
|
"PricingOptions",
|
|
1804
1810
|
"ProcessedCommand",
|
|
1805
1811
|
"PropertyDefinition",
|
|
1812
|
+
"PropertyDefinitionEntity",
|
|
1806
1813
|
"PropertyDefinitionSearchResult",
|
|
1807
1814
|
"PropertyDefinitionType",
|
|
1808
1815
|
"PropertyDomain",
|
|
@@ -2082,6 +2089,7 @@ __all__ = [
|
|
|
2082
2089
|
"UpdateDerivedPropertyDefinitionRequest",
|
|
2083
2090
|
"UpdateFeeTypeRequest",
|
|
2084
2091
|
"UpdateInstrumentIdentifierRequest",
|
|
2092
|
+
"UpdatePlacementsResponse",
|
|
2085
2093
|
"UpdatePortfolioGroupRequest",
|
|
2086
2094
|
"UpdatePortfolioRequest",
|
|
2087
2095
|
"UpdatePropertyDefinitionRequest",
|
lusid/api/entities_api.py
CHANGED
|
@@ -26,7 +26,9 @@ from pydantic.v1 import Field, StrictStr, conlist, constr, validator
|
|
|
26
26
|
|
|
27
27
|
from typing import Optional
|
|
28
28
|
|
|
29
|
+
from lusid.models.instrument_entity import InstrumentEntity
|
|
29
30
|
from lusid.models.portfolio_entity import PortfolioEntity
|
|
31
|
+
from lusid.models.property_definition_entity import PropertyDefinitionEntity
|
|
30
32
|
from lusid.models.resource_list_of_change import ResourceListOfChange
|
|
31
33
|
|
|
32
34
|
from lusid.api_client import ApiClient
|
|
@@ -49,6 +51,185 @@ class EntitiesApi:
|
|
|
49
51
|
api_client = ApiClient.get_default()
|
|
50
52
|
self.api_client = api_client
|
|
51
53
|
|
|
54
|
+
@overload
|
|
55
|
+
async def get_instrument_by_entity_unique_id(self, entity_unique_id : Annotated[constr(strict=True, max_length=40, min_length=30), Field(..., description="The universally unique identifier of the instrument definition.")], effective_at : Annotated[Optional[StrictStr], Field(description="The effective datetime or cut label at which to retrieve the Instrument definition. Defaults to the current LUSID system datetime if not specified.")] = None, as_at : Annotated[Optional[datetime], Field(description="The asAt datetime at which to retrieve the instrument definition. Defaults to returning the latest version of the instrument definition if not specified.")] = None, previews : Annotated[Optional[conlist(StrictStr)], Field(description="The ids of the staged modifications to be previewed in the response.")] = None, **kwargs) -> InstrumentEntity: # noqa: E501
|
|
56
|
+
...
|
|
57
|
+
|
|
58
|
+
@overload
|
|
59
|
+
def get_instrument_by_entity_unique_id(self, entity_unique_id : Annotated[constr(strict=True, max_length=40, min_length=30), Field(..., description="The universally unique identifier of the instrument definition.")], effective_at : Annotated[Optional[StrictStr], Field(description="The effective datetime or cut label at which to retrieve the Instrument definition. Defaults to the current LUSID system datetime if not specified.")] = None, as_at : Annotated[Optional[datetime], Field(description="The asAt datetime at which to retrieve the instrument definition. Defaults to returning the latest version of the instrument definition if not specified.")] = None, previews : Annotated[Optional[conlist(StrictStr)], Field(description="The ids of the staged modifications to be previewed in the response.")] = None, async_req: Optional[bool]=True, **kwargs) -> InstrumentEntity: # noqa: E501
|
|
60
|
+
...
|
|
61
|
+
|
|
62
|
+
@validate_arguments
|
|
63
|
+
def get_instrument_by_entity_unique_id(self, entity_unique_id : Annotated[constr(strict=True, max_length=40, min_length=30), Field(..., description="The universally unique identifier of the instrument definition.")], effective_at : Annotated[Optional[StrictStr], Field(description="The effective datetime or cut label at which to retrieve the Instrument definition. Defaults to the current LUSID system datetime if not specified.")] = None, as_at : Annotated[Optional[datetime], Field(description="The asAt datetime at which to retrieve the instrument definition. Defaults to returning the latest version of the instrument definition if not specified.")] = None, previews : Annotated[Optional[conlist(StrictStr)], Field(description="The ids of the staged modifications to be previewed in the response.")] = None, async_req: Optional[bool]=None, **kwargs) -> Union[InstrumentEntity, Awaitable[InstrumentEntity]]: # noqa: E501
|
|
64
|
+
"""[EXPERIMENTAL] GetInstrumentByEntityUniqueId: Get instrument by EntityUniqueId # noqa: E501
|
|
65
|
+
|
|
66
|
+
Retrieve the definition of a particular instrument. If the instrument is deleted, this will return the state of the instrument immediately prior to deletion. # noqa: E501
|
|
67
|
+
This method makes a synchronous HTTP request by default. To make an
|
|
68
|
+
asynchronous HTTP request, please pass async_req=True
|
|
69
|
+
|
|
70
|
+
>>> thread = api.get_instrument_by_entity_unique_id(entity_unique_id, effective_at, as_at, previews, async_req=True)
|
|
71
|
+
>>> result = thread.get()
|
|
72
|
+
|
|
73
|
+
:param entity_unique_id: The universally unique identifier of the instrument definition. (required)
|
|
74
|
+
:type entity_unique_id: str
|
|
75
|
+
:param effective_at: The effective datetime or cut label at which to retrieve the Instrument definition. Defaults to the current LUSID system datetime if not specified.
|
|
76
|
+
:type effective_at: str
|
|
77
|
+
:param as_at: The asAt datetime at which to retrieve the instrument definition. Defaults to returning the latest version of the instrument definition if not specified.
|
|
78
|
+
:type as_at: datetime
|
|
79
|
+
:param previews: The ids of the staged modifications to be previewed in the response.
|
|
80
|
+
:type previews: List[str]
|
|
81
|
+
:param async_req: Whether to execute the request asynchronously.
|
|
82
|
+
:type async_req: bool, optional
|
|
83
|
+
:param _request_timeout: timeout setting for this request.
|
|
84
|
+
If one number provided, it will be total request
|
|
85
|
+
timeout. It can also be a pair (tuple) of
|
|
86
|
+
(connection, read) timeouts.
|
|
87
|
+
:return: Returns the result object.
|
|
88
|
+
If the method is called asynchronously,
|
|
89
|
+
returns the request thread.
|
|
90
|
+
:rtype: InstrumentEntity
|
|
91
|
+
"""
|
|
92
|
+
kwargs['_return_http_data_only'] = True
|
|
93
|
+
if '_preload_content' in kwargs:
|
|
94
|
+
message = "Error! Please call the get_instrument_by_entity_unique_id_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501
|
|
95
|
+
raise ValueError(message)
|
|
96
|
+
if async_req is not None:
|
|
97
|
+
kwargs['async_req'] = async_req
|
|
98
|
+
return self.get_instrument_by_entity_unique_id_with_http_info(entity_unique_id, effective_at, as_at, previews, **kwargs) # noqa: E501
|
|
99
|
+
|
|
100
|
+
@validate_arguments
|
|
101
|
+
def get_instrument_by_entity_unique_id_with_http_info(self, entity_unique_id : Annotated[constr(strict=True, max_length=40, min_length=30), Field(..., description="The universally unique identifier of the instrument definition.")], effective_at : Annotated[Optional[StrictStr], Field(description="The effective datetime or cut label at which to retrieve the Instrument definition. Defaults to the current LUSID system datetime if not specified.")] = None, as_at : Annotated[Optional[datetime], Field(description="The asAt datetime at which to retrieve the instrument definition. Defaults to returning the latest version of the instrument definition if not specified.")] = None, previews : Annotated[Optional[conlist(StrictStr)], Field(description="The ids of the staged modifications to be previewed in the response.")] = None, **kwargs) -> ApiResponse: # noqa: E501
|
|
102
|
+
"""[EXPERIMENTAL] GetInstrumentByEntityUniqueId: Get instrument by EntityUniqueId # noqa: E501
|
|
103
|
+
|
|
104
|
+
Retrieve the definition of a particular instrument. If the instrument is deleted, this will return the state of the instrument immediately prior to deletion. # noqa: E501
|
|
105
|
+
This method makes a synchronous HTTP request by default. To make an
|
|
106
|
+
asynchronous HTTP request, please pass async_req=True
|
|
107
|
+
|
|
108
|
+
>>> thread = api.get_instrument_by_entity_unique_id_with_http_info(entity_unique_id, effective_at, as_at, previews, async_req=True)
|
|
109
|
+
>>> result = thread.get()
|
|
110
|
+
|
|
111
|
+
:param entity_unique_id: The universally unique identifier of the instrument definition. (required)
|
|
112
|
+
:type entity_unique_id: str
|
|
113
|
+
:param effective_at: The effective datetime or cut label at which to retrieve the Instrument definition. Defaults to the current LUSID system datetime if not specified.
|
|
114
|
+
:type effective_at: str
|
|
115
|
+
:param as_at: The asAt datetime at which to retrieve the instrument definition. Defaults to returning the latest version of the instrument definition if not specified.
|
|
116
|
+
:type as_at: datetime
|
|
117
|
+
:param previews: The ids of the staged modifications to be previewed in the response.
|
|
118
|
+
:type previews: List[str]
|
|
119
|
+
:param async_req: Whether to execute the request asynchronously.
|
|
120
|
+
:type async_req: bool, optional
|
|
121
|
+
:param _preload_content: if False, the ApiResponse.data will
|
|
122
|
+
be set to none and raw_data will store the
|
|
123
|
+
HTTP response body without reading/decoding.
|
|
124
|
+
Default is True.
|
|
125
|
+
:type _preload_content: bool, optional
|
|
126
|
+
:param _return_http_data_only: response data instead of ApiResponse
|
|
127
|
+
object with status code, headers, etc
|
|
128
|
+
:type _return_http_data_only: bool, optional
|
|
129
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
130
|
+
number provided, it will be total request
|
|
131
|
+
timeout. It can also be a pair (tuple) of
|
|
132
|
+
(connection, read) timeouts.
|
|
133
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
134
|
+
request; this effectively ignores the authentication
|
|
135
|
+
in the spec for a single request.
|
|
136
|
+
:type _request_auth: dict, optional
|
|
137
|
+
:type _content_type: string, optional: force content-type for the request
|
|
138
|
+
:return: Returns the result object.
|
|
139
|
+
If the method is called asynchronously,
|
|
140
|
+
returns the request thread.
|
|
141
|
+
:rtype: tuple(InstrumentEntity, status_code(int), headers(HTTPHeaderDict))
|
|
142
|
+
"""
|
|
143
|
+
|
|
144
|
+
_params = locals()
|
|
145
|
+
|
|
146
|
+
_all_params = [
|
|
147
|
+
'entity_unique_id',
|
|
148
|
+
'effective_at',
|
|
149
|
+
'as_at',
|
|
150
|
+
'previews'
|
|
151
|
+
]
|
|
152
|
+
_all_params.extend(
|
|
153
|
+
[
|
|
154
|
+
'async_req',
|
|
155
|
+
'_return_http_data_only',
|
|
156
|
+
'_preload_content',
|
|
157
|
+
'_request_timeout',
|
|
158
|
+
'_request_auth',
|
|
159
|
+
'_content_type',
|
|
160
|
+
'_headers'
|
|
161
|
+
]
|
|
162
|
+
)
|
|
163
|
+
|
|
164
|
+
# validate the arguments
|
|
165
|
+
for _key, _val in _params['kwargs'].items():
|
|
166
|
+
if _key not in _all_params:
|
|
167
|
+
raise ApiTypeError(
|
|
168
|
+
"Got an unexpected keyword argument '%s'"
|
|
169
|
+
" to method get_instrument_by_entity_unique_id" % _key
|
|
170
|
+
)
|
|
171
|
+
_params[_key] = _val
|
|
172
|
+
del _params['kwargs']
|
|
173
|
+
|
|
174
|
+
_collection_formats = {}
|
|
175
|
+
|
|
176
|
+
# process the path parameters
|
|
177
|
+
_path_params = {}
|
|
178
|
+
if _params['entity_unique_id']:
|
|
179
|
+
_path_params['entityUniqueId'] = _params['entity_unique_id']
|
|
180
|
+
|
|
181
|
+
|
|
182
|
+
# process the query parameters
|
|
183
|
+
_query_params = []
|
|
184
|
+
if _params.get('effective_at') is not None: # noqa: E501
|
|
185
|
+
_query_params.append(('effectiveAt', _params['effective_at']))
|
|
186
|
+
|
|
187
|
+
if _params.get('as_at') is not None: # noqa: E501
|
|
188
|
+
if isinstance(_params['as_at'], datetime):
|
|
189
|
+
_query_params.append(('asAt', _params['as_at'].strftime(self.api_client.configuration.datetime_format)))
|
|
190
|
+
else:
|
|
191
|
+
_query_params.append(('asAt', _params['as_at']))
|
|
192
|
+
|
|
193
|
+
if _params.get('previews') is not None: # noqa: E501
|
|
194
|
+
_query_params.append(('previews', _params['previews']))
|
|
195
|
+
_collection_formats['previews'] = 'multi'
|
|
196
|
+
|
|
197
|
+
# process the header parameters
|
|
198
|
+
_header_params = dict(_params.get('_headers', {}))
|
|
199
|
+
# process the form parameters
|
|
200
|
+
_form_params = []
|
|
201
|
+
_files = {}
|
|
202
|
+
# process the body parameter
|
|
203
|
+
_body_params = None
|
|
204
|
+
# set the HTTP header `Accept`
|
|
205
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
206
|
+
['text/plain', 'application/json', 'text/json']) # noqa: E501
|
|
207
|
+
|
|
208
|
+
# authentication setting
|
|
209
|
+
_auth_settings = ['oauth2'] # noqa: E501
|
|
210
|
+
|
|
211
|
+
_response_types_map = {
|
|
212
|
+
'200': "InstrumentEntity",
|
|
213
|
+
'400': "LusidValidationProblemDetails",
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
return self.api_client.call_api(
|
|
217
|
+
'/api/entities/instruments/{entityUniqueId}', 'GET',
|
|
218
|
+
_path_params,
|
|
219
|
+
_query_params,
|
|
220
|
+
_header_params,
|
|
221
|
+
body=_body_params,
|
|
222
|
+
post_params=_form_params,
|
|
223
|
+
files=_files,
|
|
224
|
+
response_types_map=_response_types_map,
|
|
225
|
+
auth_settings=_auth_settings,
|
|
226
|
+
async_req=_params.get('async_req'),
|
|
227
|
+
_return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501
|
|
228
|
+
_preload_content=_params.get('_preload_content', True),
|
|
229
|
+
_request_timeout=_params.get('_request_timeout'),
|
|
230
|
+
collection_formats=_collection_formats,
|
|
231
|
+
_request_auth=_params.get('_request_auth'))
|
|
232
|
+
|
|
52
233
|
@overload
|
|
53
234
|
async def get_portfolio_by_entity_unique_id(self, entity_unique_id : Annotated[constr(strict=True, max_length=40, min_length=30), Field(..., description="The universally unique identifier of the portfolio definition.")], effective_at : Annotated[Optional[StrictStr], Field(description="The effective datetime or cut label at which to retrieve the portfolio definition. Defaults to the current LUSID system datetime if not specified.")] = None, as_at : Annotated[Optional[datetime], Field(description="The asAt datetime at which to retrieve the portfolio definition. Defaults to returning the latest version of the portfolio definition if not specified.")] = None, previews : Annotated[Optional[conlist(StrictStr)], Field(description="The ids of the staged modifications to be previewed in the response.")] = None, **kwargs) -> PortfolioEntity: # noqa: E501
|
|
54
235
|
...
|
|
@@ -397,3 +578,182 @@ class EntitiesApi:
|
|
|
397
578
|
_request_timeout=_params.get('_request_timeout'),
|
|
398
579
|
collection_formats=_collection_formats,
|
|
399
580
|
_request_auth=_params.get('_request_auth'))
|
|
581
|
+
|
|
582
|
+
@overload
|
|
583
|
+
async def get_property_definition_by_entity_unique_id(self, entity_unique_id : Annotated[constr(strict=True, max_length=40, min_length=30), Field(..., description="The universally unique identifier of the property definition.")], effective_at : Annotated[Optional[StrictStr], Field(description="The effective datetime at which to retrieve the property definition. Defaults to the current LUSID system datetime if not specified.")] = None, as_at : Annotated[Optional[datetime], Field(description="The asAt datetime at which to retrieve the property definition. Defaults to returning the latest version of the property definition if not specified.")] = None, previews : Annotated[Optional[conlist(StrictStr)], Field(description="The ids of the staged modifications to be previewed in the response.")] = None, **kwargs) -> PropertyDefinitionEntity: # noqa: E501
|
|
584
|
+
...
|
|
585
|
+
|
|
586
|
+
@overload
|
|
587
|
+
def get_property_definition_by_entity_unique_id(self, entity_unique_id : Annotated[constr(strict=True, max_length=40, min_length=30), Field(..., description="The universally unique identifier of the property definition.")], effective_at : Annotated[Optional[StrictStr], Field(description="The effective datetime at which to retrieve the property definition. Defaults to the current LUSID system datetime if not specified.")] = None, as_at : Annotated[Optional[datetime], Field(description="The asAt datetime at which to retrieve the property definition. Defaults to returning the latest version of the property definition if not specified.")] = None, previews : Annotated[Optional[conlist(StrictStr)], Field(description="The ids of the staged modifications to be previewed in the response.")] = None, async_req: Optional[bool]=True, **kwargs) -> PropertyDefinitionEntity: # noqa: E501
|
|
588
|
+
...
|
|
589
|
+
|
|
590
|
+
@validate_arguments
|
|
591
|
+
def get_property_definition_by_entity_unique_id(self, entity_unique_id : Annotated[constr(strict=True, max_length=40, min_length=30), Field(..., description="The universally unique identifier of the property definition.")], effective_at : Annotated[Optional[StrictStr], Field(description="The effective datetime at which to retrieve the property definition. Defaults to the current LUSID system datetime if not specified.")] = None, as_at : Annotated[Optional[datetime], Field(description="The asAt datetime at which to retrieve the property definition. Defaults to returning the latest version of the property definition if not specified.")] = None, previews : Annotated[Optional[conlist(StrictStr)], Field(description="The ids of the staged modifications to be previewed in the response.")] = None, async_req: Optional[bool]=None, **kwargs) -> Union[PropertyDefinitionEntity, Awaitable[PropertyDefinitionEntity]]: # noqa: E501
|
|
592
|
+
"""[EXPERIMENTAL] GetPropertyDefinitionByEntityUniqueId: Get property definition by EntityUniqueId # noqa: E501
|
|
593
|
+
|
|
594
|
+
Retrieve a particular property definition. If the property definition is deleted, this will return the state of the property definition immediately prior to deletion. # noqa: E501
|
|
595
|
+
This method makes a synchronous HTTP request by default. To make an
|
|
596
|
+
asynchronous HTTP request, please pass async_req=True
|
|
597
|
+
|
|
598
|
+
>>> thread = api.get_property_definition_by_entity_unique_id(entity_unique_id, effective_at, as_at, previews, async_req=True)
|
|
599
|
+
>>> result = thread.get()
|
|
600
|
+
|
|
601
|
+
:param entity_unique_id: The universally unique identifier of the property definition. (required)
|
|
602
|
+
:type entity_unique_id: str
|
|
603
|
+
:param effective_at: The effective datetime at which to retrieve the property definition. Defaults to the current LUSID system datetime if not specified.
|
|
604
|
+
:type effective_at: str
|
|
605
|
+
:param as_at: The asAt datetime at which to retrieve the property definition. Defaults to returning the latest version of the property definition if not specified.
|
|
606
|
+
:type as_at: datetime
|
|
607
|
+
:param previews: The ids of the staged modifications to be previewed in the response.
|
|
608
|
+
:type previews: List[str]
|
|
609
|
+
:param async_req: Whether to execute the request asynchronously.
|
|
610
|
+
:type async_req: bool, optional
|
|
611
|
+
:param _request_timeout: timeout setting for this request.
|
|
612
|
+
If one number provided, it will be total request
|
|
613
|
+
timeout. It can also be a pair (tuple) of
|
|
614
|
+
(connection, read) timeouts.
|
|
615
|
+
:return: Returns the result object.
|
|
616
|
+
If the method is called asynchronously,
|
|
617
|
+
returns the request thread.
|
|
618
|
+
:rtype: PropertyDefinitionEntity
|
|
619
|
+
"""
|
|
620
|
+
kwargs['_return_http_data_only'] = True
|
|
621
|
+
if '_preload_content' in kwargs:
|
|
622
|
+
message = "Error! Please call the get_property_definition_by_entity_unique_id_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501
|
|
623
|
+
raise ValueError(message)
|
|
624
|
+
if async_req is not None:
|
|
625
|
+
kwargs['async_req'] = async_req
|
|
626
|
+
return self.get_property_definition_by_entity_unique_id_with_http_info(entity_unique_id, effective_at, as_at, previews, **kwargs) # noqa: E501
|
|
627
|
+
|
|
628
|
+
@validate_arguments
|
|
629
|
+
def get_property_definition_by_entity_unique_id_with_http_info(self, entity_unique_id : Annotated[constr(strict=True, max_length=40, min_length=30), Field(..., description="The universally unique identifier of the property definition.")], effective_at : Annotated[Optional[StrictStr], Field(description="The effective datetime at which to retrieve the property definition. Defaults to the current LUSID system datetime if not specified.")] = None, as_at : Annotated[Optional[datetime], Field(description="The asAt datetime at which to retrieve the property definition. Defaults to returning the latest version of the property definition if not specified.")] = None, previews : Annotated[Optional[conlist(StrictStr)], Field(description="The ids of the staged modifications to be previewed in the response.")] = None, **kwargs) -> ApiResponse: # noqa: E501
|
|
630
|
+
"""[EXPERIMENTAL] GetPropertyDefinitionByEntityUniqueId: Get property definition by EntityUniqueId # noqa: E501
|
|
631
|
+
|
|
632
|
+
Retrieve a particular property definition. If the property definition is deleted, this will return the state of the property definition immediately prior to deletion. # noqa: E501
|
|
633
|
+
This method makes a synchronous HTTP request by default. To make an
|
|
634
|
+
asynchronous HTTP request, please pass async_req=True
|
|
635
|
+
|
|
636
|
+
>>> thread = api.get_property_definition_by_entity_unique_id_with_http_info(entity_unique_id, effective_at, as_at, previews, async_req=True)
|
|
637
|
+
>>> result = thread.get()
|
|
638
|
+
|
|
639
|
+
:param entity_unique_id: The universally unique identifier of the property definition. (required)
|
|
640
|
+
:type entity_unique_id: str
|
|
641
|
+
:param effective_at: The effective datetime at which to retrieve the property definition. Defaults to the current LUSID system datetime if not specified.
|
|
642
|
+
:type effective_at: str
|
|
643
|
+
:param as_at: The asAt datetime at which to retrieve the property definition. Defaults to returning the latest version of the property definition if not specified.
|
|
644
|
+
:type as_at: datetime
|
|
645
|
+
:param previews: The ids of the staged modifications to be previewed in the response.
|
|
646
|
+
:type previews: List[str]
|
|
647
|
+
:param async_req: Whether to execute the request asynchronously.
|
|
648
|
+
:type async_req: bool, optional
|
|
649
|
+
:param _preload_content: if False, the ApiResponse.data will
|
|
650
|
+
be set to none and raw_data will store the
|
|
651
|
+
HTTP response body without reading/decoding.
|
|
652
|
+
Default is True.
|
|
653
|
+
:type _preload_content: bool, optional
|
|
654
|
+
:param _return_http_data_only: response data instead of ApiResponse
|
|
655
|
+
object with status code, headers, etc
|
|
656
|
+
:type _return_http_data_only: bool, optional
|
|
657
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
658
|
+
number provided, it will be total request
|
|
659
|
+
timeout. It can also be a pair (tuple) of
|
|
660
|
+
(connection, read) timeouts.
|
|
661
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
662
|
+
request; this effectively ignores the authentication
|
|
663
|
+
in the spec for a single request.
|
|
664
|
+
:type _request_auth: dict, optional
|
|
665
|
+
:type _content_type: string, optional: force content-type for the request
|
|
666
|
+
:return: Returns the result object.
|
|
667
|
+
If the method is called asynchronously,
|
|
668
|
+
returns the request thread.
|
|
669
|
+
:rtype: tuple(PropertyDefinitionEntity, status_code(int), headers(HTTPHeaderDict))
|
|
670
|
+
"""
|
|
671
|
+
|
|
672
|
+
_params = locals()
|
|
673
|
+
|
|
674
|
+
_all_params = [
|
|
675
|
+
'entity_unique_id',
|
|
676
|
+
'effective_at',
|
|
677
|
+
'as_at',
|
|
678
|
+
'previews'
|
|
679
|
+
]
|
|
680
|
+
_all_params.extend(
|
|
681
|
+
[
|
|
682
|
+
'async_req',
|
|
683
|
+
'_return_http_data_only',
|
|
684
|
+
'_preload_content',
|
|
685
|
+
'_request_timeout',
|
|
686
|
+
'_request_auth',
|
|
687
|
+
'_content_type',
|
|
688
|
+
'_headers'
|
|
689
|
+
]
|
|
690
|
+
)
|
|
691
|
+
|
|
692
|
+
# validate the arguments
|
|
693
|
+
for _key, _val in _params['kwargs'].items():
|
|
694
|
+
if _key not in _all_params:
|
|
695
|
+
raise ApiTypeError(
|
|
696
|
+
"Got an unexpected keyword argument '%s'"
|
|
697
|
+
" to method get_property_definition_by_entity_unique_id" % _key
|
|
698
|
+
)
|
|
699
|
+
_params[_key] = _val
|
|
700
|
+
del _params['kwargs']
|
|
701
|
+
|
|
702
|
+
_collection_formats = {}
|
|
703
|
+
|
|
704
|
+
# process the path parameters
|
|
705
|
+
_path_params = {}
|
|
706
|
+
if _params['entity_unique_id']:
|
|
707
|
+
_path_params['entityUniqueId'] = _params['entity_unique_id']
|
|
708
|
+
|
|
709
|
+
|
|
710
|
+
# process the query parameters
|
|
711
|
+
_query_params = []
|
|
712
|
+
if _params.get('effective_at') is not None: # noqa: E501
|
|
713
|
+
_query_params.append(('effectiveAt', _params['effective_at']))
|
|
714
|
+
|
|
715
|
+
if _params.get('as_at') is not None: # noqa: E501
|
|
716
|
+
if isinstance(_params['as_at'], datetime):
|
|
717
|
+
_query_params.append(('asAt', _params['as_at'].strftime(self.api_client.configuration.datetime_format)))
|
|
718
|
+
else:
|
|
719
|
+
_query_params.append(('asAt', _params['as_at']))
|
|
720
|
+
|
|
721
|
+
if _params.get('previews') is not None: # noqa: E501
|
|
722
|
+
_query_params.append(('previews', _params['previews']))
|
|
723
|
+
_collection_formats['previews'] = 'multi'
|
|
724
|
+
|
|
725
|
+
# process the header parameters
|
|
726
|
+
_header_params = dict(_params.get('_headers', {}))
|
|
727
|
+
# process the form parameters
|
|
728
|
+
_form_params = []
|
|
729
|
+
_files = {}
|
|
730
|
+
# process the body parameter
|
|
731
|
+
_body_params = None
|
|
732
|
+
# set the HTTP header `Accept`
|
|
733
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
734
|
+
['text/plain', 'application/json', 'text/json']) # noqa: E501
|
|
735
|
+
|
|
736
|
+
# authentication setting
|
|
737
|
+
_auth_settings = ['oauth2'] # noqa: E501
|
|
738
|
+
|
|
739
|
+
_response_types_map = {
|
|
740
|
+
'200': "PropertyDefinitionEntity",
|
|
741
|
+
'400': "LusidValidationProblemDetails",
|
|
742
|
+
}
|
|
743
|
+
|
|
744
|
+
return self.api_client.call_api(
|
|
745
|
+
'/api/entities/propertydefinitions/{entityUniqueId}', 'GET',
|
|
746
|
+
_path_params,
|
|
747
|
+
_query_params,
|
|
748
|
+
_header_params,
|
|
749
|
+
body=_body_params,
|
|
750
|
+
post_params=_form_params,
|
|
751
|
+
files=_files,
|
|
752
|
+
response_types_map=_response_types_map,
|
|
753
|
+
auth_settings=_auth_settings,
|
|
754
|
+
async_req=_params.get('async_req'),
|
|
755
|
+
_return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501
|
|
756
|
+
_preload_content=_params.get('_preload_content', True),
|
|
757
|
+
_request_timeout=_params.get('_request_timeout'),
|
|
758
|
+
collection_formats=_collection_formats,
|
|
759
|
+
_request_auth=_params.get('_request_auth'))
|
|
@@ -22,7 +22,7 @@ from typing import overload, Optional, Union, Awaitable
|
|
|
22
22
|
from typing_extensions import Annotated
|
|
23
23
|
from pydantic.v1 import Field, StrictBool, conlist, constr, validator
|
|
24
24
|
|
|
25
|
-
from typing import Optional
|
|
25
|
+
from typing import Dict, Optional
|
|
26
26
|
|
|
27
27
|
from lusid.models.allocation_service_run_response import AllocationServiceRunResponse
|
|
28
28
|
from lusid.models.block_and_orders_create_request import BlockAndOrdersCreateRequest
|
|
@@ -30,10 +30,12 @@ from lusid.models.book_transactions_request import BookTransactionsRequest
|
|
|
30
30
|
from lusid.models.book_transactions_response import BookTransactionsResponse
|
|
31
31
|
from lusid.models.move_orders_to_different_blocks_request import MoveOrdersToDifferentBlocksRequest
|
|
32
32
|
from lusid.models.place_blocks_request import PlaceBlocksRequest
|
|
33
|
+
from lusid.models.placement_update_request import PlacementUpdateRequest
|
|
33
34
|
from lusid.models.resource_id import ResourceId
|
|
34
35
|
from lusid.models.resource_list_of_block_and_orders import ResourceListOfBlockAndOrders
|
|
35
36
|
from lusid.models.resource_list_of_moved_order_to_different_block_response import ResourceListOfMovedOrderToDifferentBlockResponse
|
|
36
37
|
from lusid.models.resource_list_of_placement import ResourceListOfPlacement
|
|
38
|
+
from lusid.models.update_placements_response import UpdatePlacementsResponse
|
|
37
39
|
|
|
38
40
|
from lusid.api_client import ApiClient
|
|
39
41
|
from lusid.api_response import ApiResponse
|
|
@@ -860,3 +862,161 @@ class OrderManagementApi:
|
|
|
860
862
|
_request_timeout=_params.get('_request_timeout'),
|
|
861
863
|
collection_formats=_collection_formats,
|
|
862
864
|
_request_auth=_params.get('_request_auth'))
|
|
865
|
+
|
|
866
|
+
@overload
|
|
867
|
+
async def update_placements(self, request_body : Annotated[Dict[str, PlacementUpdateRequest], Field(..., description="The request containing the placements to be updated.")], **kwargs) -> UpdatePlacementsResponse: # noqa: E501
|
|
868
|
+
...
|
|
869
|
+
|
|
870
|
+
@overload
|
|
871
|
+
def update_placements(self, request_body : Annotated[Dict[str, PlacementUpdateRequest], Field(..., description="The request containing the placements to be updated.")], async_req: Optional[bool]=True, **kwargs) -> UpdatePlacementsResponse: # noqa: E501
|
|
872
|
+
...
|
|
873
|
+
|
|
874
|
+
@validate_arguments
|
|
875
|
+
def update_placements(self, request_body : Annotated[Dict[str, PlacementUpdateRequest], Field(..., description="The request containing the placements to be updated.")], async_req: Optional[bool]=None, **kwargs) -> Union[UpdatePlacementsResponse, Awaitable[UpdatePlacementsResponse]]: # noqa: E501
|
|
876
|
+
"""[EARLY ACCESS] UpdatePlacements: Update existing placements # noqa: E501
|
|
877
|
+
|
|
878
|
+
The response returns both the collection of successfully created or updated instruments, as well as those that failed. For each failure, a reason is provided. It is important to check the failed set for unsuccessful results. # noqa: E501
|
|
879
|
+
This method makes a synchronous HTTP request by default. To make an
|
|
880
|
+
asynchronous HTTP request, please pass async_req=True
|
|
881
|
+
|
|
882
|
+
>>> thread = api.update_placements(request_body, async_req=True)
|
|
883
|
+
>>> result = thread.get()
|
|
884
|
+
|
|
885
|
+
:param request_body: The request containing the placements to be updated. (required)
|
|
886
|
+
:type request_body: Dict[str, PlacementUpdateRequest]
|
|
887
|
+
:param async_req: Whether to execute the request asynchronously.
|
|
888
|
+
:type async_req: bool, optional
|
|
889
|
+
:param _request_timeout: timeout setting for this request.
|
|
890
|
+
If one number provided, it will be total request
|
|
891
|
+
timeout. It can also be a pair (tuple) of
|
|
892
|
+
(connection, read) timeouts.
|
|
893
|
+
:return: Returns the result object.
|
|
894
|
+
If the method is called asynchronously,
|
|
895
|
+
returns the request thread.
|
|
896
|
+
:rtype: UpdatePlacementsResponse
|
|
897
|
+
"""
|
|
898
|
+
kwargs['_return_http_data_only'] = True
|
|
899
|
+
if '_preload_content' in kwargs:
|
|
900
|
+
message = "Error! Please call the update_placements_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501
|
|
901
|
+
raise ValueError(message)
|
|
902
|
+
if async_req is not None:
|
|
903
|
+
kwargs['async_req'] = async_req
|
|
904
|
+
return self.update_placements_with_http_info(request_body, **kwargs) # noqa: E501
|
|
905
|
+
|
|
906
|
+
@validate_arguments
|
|
907
|
+
def update_placements_with_http_info(self, request_body : Annotated[Dict[str, PlacementUpdateRequest], Field(..., description="The request containing the placements to be updated.")], **kwargs) -> ApiResponse: # noqa: E501
|
|
908
|
+
"""[EARLY ACCESS] UpdatePlacements: Update existing placements # noqa: E501
|
|
909
|
+
|
|
910
|
+
The response returns both the collection of successfully created or updated instruments, as well as those that failed. For each failure, a reason is provided. It is important to check the failed set for unsuccessful results. # noqa: E501
|
|
911
|
+
This method makes a synchronous HTTP request by default. To make an
|
|
912
|
+
asynchronous HTTP request, please pass async_req=True
|
|
913
|
+
|
|
914
|
+
>>> thread = api.update_placements_with_http_info(request_body, async_req=True)
|
|
915
|
+
>>> result = thread.get()
|
|
916
|
+
|
|
917
|
+
:param request_body: The request containing the placements to be updated. (required)
|
|
918
|
+
:type request_body: Dict[str, PlacementUpdateRequest]
|
|
919
|
+
:param async_req: Whether to execute the request asynchronously.
|
|
920
|
+
:type async_req: bool, optional
|
|
921
|
+
:param _preload_content: if False, the ApiResponse.data will
|
|
922
|
+
be set to none and raw_data will store the
|
|
923
|
+
HTTP response body without reading/decoding.
|
|
924
|
+
Default is True.
|
|
925
|
+
:type _preload_content: bool, optional
|
|
926
|
+
:param _return_http_data_only: response data instead of ApiResponse
|
|
927
|
+
object with status code, headers, etc
|
|
928
|
+
:type _return_http_data_only: bool, optional
|
|
929
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
930
|
+
number provided, it will be total request
|
|
931
|
+
timeout. It can also be a pair (tuple) of
|
|
932
|
+
(connection, read) timeouts.
|
|
933
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
934
|
+
request; this effectively ignores the authentication
|
|
935
|
+
in the spec for a single request.
|
|
936
|
+
:type _request_auth: dict, optional
|
|
937
|
+
:type _content_type: string, optional: force content-type for the request
|
|
938
|
+
:return: Returns the result object.
|
|
939
|
+
If the method is called asynchronously,
|
|
940
|
+
returns the request thread.
|
|
941
|
+
:rtype: tuple(UpdatePlacementsResponse, status_code(int), headers(HTTPHeaderDict))
|
|
942
|
+
"""
|
|
943
|
+
|
|
944
|
+
_params = locals()
|
|
945
|
+
|
|
946
|
+
_all_params = [
|
|
947
|
+
'request_body'
|
|
948
|
+
]
|
|
949
|
+
_all_params.extend(
|
|
950
|
+
[
|
|
951
|
+
'async_req',
|
|
952
|
+
'_return_http_data_only',
|
|
953
|
+
'_preload_content',
|
|
954
|
+
'_request_timeout',
|
|
955
|
+
'_request_auth',
|
|
956
|
+
'_content_type',
|
|
957
|
+
'_headers'
|
|
958
|
+
]
|
|
959
|
+
)
|
|
960
|
+
|
|
961
|
+
# validate the arguments
|
|
962
|
+
for _key, _val in _params['kwargs'].items():
|
|
963
|
+
if _key not in _all_params:
|
|
964
|
+
raise ApiTypeError(
|
|
965
|
+
"Got an unexpected keyword argument '%s'"
|
|
966
|
+
" to method update_placements" % _key
|
|
967
|
+
)
|
|
968
|
+
_params[_key] = _val
|
|
969
|
+
del _params['kwargs']
|
|
970
|
+
|
|
971
|
+
_collection_formats = {}
|
|
972
|
+
|
|
973
|
+
# process the path parameters
|
|
974
|
+
_path_params = {}
|
|
975
|
+
|
|
976
|
+
# process the query parameters
|
|
977
|
+
_query_params = []
|
|
978
|
+
# process the header parameters
|
|
979
|
+
_header_params = dict(_params.get('_headers', {}))
|
|
980
|
+
# process the form parameters
|
|
981
|
+
_form_params = []
|
|
982
|
+
_files = {}
|
|
983
|
+
# process the body parameter
|
|
984
|
+
_body_params = None
|
|
985
|
+
if _params['request_body'] is not None:
|
|
986
|
+
_body_params = _params['request_body']
|
|
987
|
+
|
|
988
|
+
# set the HTTP header `Accept`
|
|
989
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
990
|
+
['text/plain', 'application/json', 'text/json']) # noqa: E501
|
|
991
|
+
|
|
992
|
+
# set the HTTP header `Content-Type`
|
|
993
|
+
_content_types_list = _params.get('_content_type',
|
|
994
|
+
self.api_client.select_header_content_type(
|
|
995
|
+
['application/json-patch+json', 'application/json', 'text/json', 'application/*+json']))
|
|
996
|
+
if _content_types_list:
|
|
997
|
+
_header_params['Content-Type'] = _content_types_list
|
|
998
|
+
|
|
999
|
+
# authentication setting
|
|
1000
|
+
_auth_settings = ['oauth2'] # noqa: E501
|
|
1001
|
+
|
|
1002
|
+
_response_types_map = {
|
|
1003
|
+
'200': "UpdatePlacementsResponse",
|
|
1004
|
+
'400': "LusidValidationProblemDetails",
|
|
1005
|
+
}
|
|
1006
|
+
|
|
1007
|
+
return self.api_client.call_api(
|
|
1008
|
+
'/api/ordermanagement/$updateplacements', 'POST',
|
|
1009
|
+
_path_params,
|
|
1010
|
+
_query_params,
|
|
1011
|
+
_header_params,
|
|
1012
|
+
body=_body_params,
|
|
1013
|
+
post_params=_form_params,
|
|
1014
|
+
files=_files,
|
|
1015
|
+
response_types_map=_response_types_map,
|
|
1016
|
+
auth_settings=_auth_settings,
|
|
1017
|
+
async_req=_params.get('async_req'),
|
|
1018
|
+
_return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501
|
|
1019
|
+
_preload_content=_params.get('_preload_content', True),
|
|
1020
|
+
_request_timeout=_params.get('_request_timeout'),
|
|
1021
|
+
collection_formats=_collection_formats,
|
|
1022
|
+
_request_auth=_params.get('_request_auth'))
|
lusid/configuration.py
CHANGED
|
@@ -373,7 +373,7 @@ class Configuration:
|
|
|
373
373
|
return "Python SDK Debug Report:\n"\
|
|
374
374
|
"OS: {env}\n"\
|
|
375
375
|
"Python Version: {pyversion}\n"\
|
|
376
|
-
"Version of the API: 0.11.
|
|
376
|
+
"Version of the API: 0.11.6679\n"\
|
|
377
377
|
"SDK Package Version: {package_version}".\
|
|
378
378
|
format(env=sys.platform, pyversion=sys.version, package_version=package_version)
|
|
379
379
|
|