lusid-sdk 2.1.320__py3-none-any.whl → 2.1.347__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.
- lusid/__init__.py +10 -0
- lusid/api/entities_api.py +172 -0
- lusid/api/funds_api.py +212 -0
- lusid/api/order_management_api.py +160 -0
- lusid/configuration.py +1 -1
- lusid/models/__init__.py +10 -0
- lusid/models/data_type.py +8 -8
- lusid/models/data_type_entity.py +131 -0
- lusid/models/fund_configuration.py +6 -6
- lusid/models/fund_configuration_request.py +6 -6
- lusid/models/journal_entry_line.py +5 -3
- lusid/models/order_update_request.py +116 -0
- lusid/models/paged_resource_list_of_valuation_point_overview.py +113 -0
- lusid/models/posting_module_rule.py +7 -32
- lusid/models/quote_access_metadata_rule_id.py +2 -2
- lusid/models/quote_series_id.py +2 -2
- lusid/models/scrip_dividend_event.py +17 -3
- lusid/models/share_class_details.py +5 -3
- lusid/models/stock_split_event.py +18 -4
- lusid/models/update_orders_response.py +153 -0
- lusid/models/valuation_point_overview.py +125 -0
- {lusid_sdk-2.1.320.dist-info → lusid_sdk-2.1.347.dist-info}/METADATA +9 -1
- {lusid_sdk-2.1.320.dist-info → lusid_sdk-2.1.347.dist-info}/RECORD +24 -19
- {lusid_sdk-2.1.320.dist-info → lusid_sdk-2.1.347.dist-info}/WHEEL +0 -0
@@ -31,12 +31,14 @@ from lusid.models.book_transactions_response import BookTransactionsResponse
|
|
31
31
|
from lusid.models.cancel_orders_response import CancelOrdersResponse
|
32
32
|
from lusid.models.cancel_placements_response import CancelPlacementsResponse
|
33
33
|
from lusid.models.move_orders_to_different_blocks_request import MoveOrdersToDifferentBlocksRequest
|
34
|
+
from lusid.models.order_update_request import OrderUpdateRequest
|
34
35
|
from lusid.models.place_blocks_request import PlaceBlocksRequest
|
35
36
|
from lusid.models.placement_update_request import PlacementUpdateRequest
|
36
37
|
from lusid.models.resource_id import ResourceId
|
37
38
|
from lusid.models.resource_list_of_block_and_orders import ResourceListOfBlockAndOrders
|
38
39
|
from lusid.models.resource_list_of_moved_order_to_different_block_response import ResourceListOfMovedOrderToDifferentBlockResponse
|
39
40
|
from lusid.models.resource_list_of_placement import ResourceListOfPlacement
|
41
|
+
from lusid.models.update_orders_response import UpdateOrdersResponse
|
40
42
|
from lusid.models.update_placements_response import UpdatePlacementsResponse
|
41
43
|
|
42
44
|
from lusid.api_client import ApiClient
|
@@ -1181,6 +1183,164 @@ class OrderManagementApi:
|
|
1181
1183
|
collection_formats=_collection_formats,
|
1182
1184
|
_request_auth=_params.get('_request_auth'))
|
1183
1185
|
|
1186
|
+
@overload
|
1187
|
+
async def update_orders(self, request_body : Annotated[Dict[str, OrderUpdateRequest], Field(..., description="The request containing the orders to be updated.")], **kwargs) -> UpdateOrdersResponse: # noqa: E501
|
1188
|
+
...
|
1189
|
+
|
1190
|
+
@overload
|
1191
|
+
def update_orders(self, request_body : Annotated[Dict[str, OrderUpdateRequest], Field(..., description="The request containing the orders to be updated.")], async_req: Optional[bool]=True, **kwargs) -> UpdateOrdersResponse: # noqa: E501
|
1192
|
+
...
|
1193
|
+
|
1194
|
+
@validate_arguments
|
1195
|
+
def update_orders(self, request_body : Annotated[Dict[str, OrderUpdateRequest], Field(..., description="The request containing the orders to be updated.")], async_req: Optional[bool]=None, **kwargs) -> Union[UpdateOrdersResponse, Awaitable[UpdateOrdersResponse]]: # noqa: E501
|
1196
|
+
"""[EARLY ACCESS] UpdateOrders: Update existing orders # noqa: E501
|
1197
|
+
|
1198
|
+
The response returns both the collection of successfully updated orders, 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
|
1199
|
+
This method makes a synchronous HTTP request by default. To make an
|
1200
|
+
asynchronous HTTP request, please pass async_req=True
|
1201
|
+
|
1202
|
+
>>> thread = api.update_orders(request_body, async_req=True)
|
1203
|
+
>>> result = thread.get()
|
1204
|
+
|
1205
|
+
:param request_body: The request containing the orders to be updated. (required)
|
1206
|
+
:type request_body: Dict[str, OrderUpdateRequest]
|
1207
|
+
:param async_req: Whether to execute the request asynchronously.
|
1208
|
+
:type async_req: bool, optional
|
1209
|
+
:param _request_timeout: timeout setting for this request.
|
1210
|
+
If one number provided, it will be total request
|
1211
|
+
timeout. It can also be a pair (tuple) of
|
1212
|
+
(connection, read) timeouts.
|
1213
|
+
:return: Returns the result object.
|
1214
|
+
If the method is called asynchronously,
|
1215
|
+
returns the request thread.
|
1216
|
+
:rtype: UpdateOrdersResponse
|
1217
|
+
"""
|
1218
|
+
kwargs['_return_http_data_only'] = True
|
1219
|
+
if '_preload_content' in kwargs:
|
1220
|
+
message = "Error! Please call the update_orders_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501
|
1221
|
+
raise ValueError(message)
|
1222
|
+
if async_req is not None:
|
1223
|
+
kwargs['async_req'] = async_req
|
1224
|
+
return self.update_orders_with_http_info(request_body, **kwargs) # noqa: E501
|
1225
|
+
|
1226
|
+
@validate_arguments
|
1227
|
+
def update_orders_with_http_info(self, request_body : Annotated[Dict[str, OrderUpdateRequest], Field(..., description="The request containing the orders to be updated.")], **kwargs) -> ApiResponse: # noqa: E501
|
1228
|
+
"""[EARLY ACCESS] UpdateOrders: Update existing orders # noqa: E501
|
1229
|
+
|
1230
|
+
The response returns both the collection of successfully updated orders, 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
|
1231
|
+
This method makes a synchronous HTTP request by default. To make an
|
1232
|
+
asynchronous HTTP request, please pass async_req=True
|
1233
|
+
|
1234
|
+
>>> thread = api.update_orders_with_http_info(request_body, async_req=True)
|
1235
|
+
>>> result = thread.get()
|
1236
|
+
|
1237
|
+
:param request_body: The request containing the orders to be updated. (required)
|
1238
|
+
:type request_body: Dict[str, OrderUpdateRequest]
|
1239
|
+
:param async_req: Whether to execute the request asynchronously.
|
1240
|
+
:type async_req: bool, optional
|
1241
|
+
:param _preload_content: if False, the ApiResponse.data will
|
1242
|
+
be set to none and raw_data will store the
|
1243
|
+
HTTP response body without reading/decoding.
|
1244
|
+
Default is True.
|
1245
|
+
:type _preload_content: bool, optional
|
1246
|
+
:param _return_http_data_only: response data instead of ApiResponse
|
1247
|
+
object with status code, headers, etc
|
1248
|
+
:type _return_http_data_only: bool, optional
|
1249
|
+
:param _request_timeout: timeout setting for this request. If one
|
1250
|
+
number provided, it will be total request
|
1251
|
+
timeout. It can also be a pair (tuple) of
|
1252
|
+
(connection, read) timeouts.
|
1253
|
+
:param _request_auth: set to override the auth_settings for an a single
|
1254
|
+
request; this effectively ignores the authentication
|
1255
|
+
in the spec for a single request.
|
1256
|
+
:type _request_auth: dict, optional
|
1257
|
+
:type _content_type: string, optional: force content-type for the request
|
1258
|
+
:return: Returns the result object.
|
1259
|
+
If the method is called asynchronously,
|
1260
|
+
returns the request thread.
|
1261
|
+
:rtype: tuple(UpdateOrdersResponse, status_code(int), headers(HTTPHeaderDict))
|
1262
|
+
"""
|
1263
|
+
|
1264
|
+
_params = locals()
|
1265
|
+
|
1266
|
+
_all_params = [
|
1267
|
+
'request_body'
|
1268
|
+
]
|
1269
|
+
_all_params.extend(
|
1270
|
+
[
|
1271
|
+
'async_req',
|
1272
|
+
'_return_http_data_only',
|
1273
|
+
'_preload_content',
|
1274
|
+
'_request_timeout',
|
1275
|
+
'_request_auth',
|
1276
|
+
'_content_type',
|
1277
|
+
'_headers'
|
1278
|
+
]
|
1279
|
+
)
|
1280
|
+
|
1281
|
+
# validate the arguments
|
1282
|
+
for _key, _val in _params['kwargs'].items():
|
1283
|
+
if _key not in _all_params:
|
1284
|
+
raise ApiTypeError(
|
1285
|
+
"Got an unexpected keyword argument '%s'"
|
1286
|
+
" to method update_orders" % _key
|
1287
|
+
)
|
1288
|
+
_params[_key] = _val
|
1289
|
+
del _params['kwargs']
|
1290
|
+
|
1291
|
+
_collection_formats = {}
|
1292
|
+
|
1293
|
+
# process the path parameters
|
1294
|
+
_path_params = {}
|
1295
|
+
|
1296
|
+
# process the query parameters
|
1297
|
+
_query_params = []
|
1298
|
+
# process the header parameters
|
1299
|
+
_header_params = dict(_params.get('_headers', {}))
|
1300
|
+
# process the form parameters
|
1301
|
+
_form_params = []
|
1302
|
+
_files = {}
|
1303
|
+
# process the body parameter
|
1304
|
+
_body_params = None
|
1305
|
+
if _params['request_body'] is not None:
|
1306
|
+
_body_params = _params['request_body']
|
1307
|
+
|
1308
|
+
# set the HTTP header `Accept`
|
1309
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
1310
|
+
['text/plain', 'application/json', 'text/json']) # noqa: E501
|
1311
|
+
|
1312
|
+
# set the HTTP header `Content-Type`
|
1313
|
+
_content_types_list = _params.get('_content_type',
|
1314
|
+
self.api_client.select_header_content_type(
|
1315
|
+
['application/json-patch+json', 'application/json', 'text/json', 'application/*+json']))
|
1316
|
+
if _content_types_list:
|
1317
|
+
_header_params['Content-Type'] = _content_types_list
|
1318
|
+
|
1319
|
+
# authentication setting
|
1320
|
+
_auth_settings = ['oauth2'] # noqa: E501
|
1321
|
+
|
1322
|
+
_response_types_map = {
|
1323
|
+
'200': "UpdateOrdersResponse",
|
1324
|
+
'400': "LusidValidationProblemDetails",
|
1325
|
+
}
|
1326
|
+
|
1327
|
+
return self.api_client.call_api(
|
1328
|
+
'/api/ordermanagement/updateorders', 'POST',
|
1329
|
+
_path_params,
|
1330
|
+
_query_params,
|
1331
|
+
_header_params,
|
1332
|
+
body=_body_params,
|
1333
|
+
post_params=_form_params,
|
1334
|
+
files=_files,
|
1335
|
+
response_types_map=_response_types_map,
|
1336
|
+
auth_settings=_auth_settings,
|
1337
|
+
async_req=_params.get('async_req'),
|
1338
|
+
_return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501
|
1339
|
+
_preload_content=_params.get('_preload_content', True),
|
1340
|
+
_request_timeout=_params.get('_request_timeout'),
|
1341
|
+
collection_formats=_collection_formats,
|
1342
|
+
_request_auth=_params.get('_request_auth'))
|
1343
|
+
|
1184
1344
|
@overload
|
1185
1345
|
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
|
1186
1346
|
...
|
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.6778\n"\
|
377
377
|
"SDK Package Version: {package_version}".\
|
378
378
|
format(env=sys.platform, pyversion=sys.version, package_version=package_version)
|
379
379
|
|
lusid/models/__init__.py
CHANGED
@@ -254,6 +254,7 @@ from lusid.models.data_map_key import DataMapKey
|
|
254
254
|
from lusid.models.data_mapping import DataMapping
|
255
255
|
from lusid.models.data_scope import DataScope
|
256
256
|
from lusid.models.data_type import DataType
|
257
|
+
from lusid.models.data_type_entity import DataTypeEntity
|
257
258
|
from lusid.models.data_type_summary import DataTypeSummary
|
258
259
|
from lusid.models.data_type_value_range import DataTypeValueRange
|
259
260
|
from lusid.models.date_attributes import DateAttributes
|
@@ -551,6 +552,7 @@ from lusid.models.order_instruction_request import OrderInstructionRequest
|
|
551
552
|
from lusid.models.order_instruction_set_request import OrderInstructionSetRequest
|
552
553
|
from lusid.models.order_request import OrderRequest
|
553
554
|
from lusid.models.order_set_request import OrderSetRequest
|
555
|
+
from lusid.models.order_update_request import OrderUpdateRequest
|
554
556
|
from lusid.models.otc_confirmation import OtcConfirmation
|
555
557
|
from lusid.models.output_transaction import OutputTransaction
|
556
558
|
from lusid.models.output_transition import OutputTransition
|
@@ -615,6 +617,7 @@ from lusid.models.paged_resource_list_of_staging_rule_set import PagedResourceLi
|
|
615
617
|
from lusid.models.paged_resource_list_of_transaction_template import PagedResourceListOfTransactionTemplate
|
616
618
|
from lusid.models.paged_resource_list_of_transaction_template_specification import PagedResourceListOfTransactionTemplateSpecification
|
617
619
|
from lusid.models.paged_resource_list_of_translation_script_id import PagedResourceListOfTranslationScriptId
|
620
|
+
from lusid.models.paged_resource_list_of_valuation_point_overview import PagedResourceListOfValuationPointOverview
|
618
621
|
from lusid.models.paged_resource_list_of_virtual_row import PagedResourceListOfVirtualRow
|
619
622
|
from lusid.models.participation import Participation
|
620
623
|
from lusid.models.participation_request import ParticipationRequest
|
@@ -959,6 +962,7 @@ from lusid.models.update_data_type_request import UpdateDataTypeRequest
|
|
959
962
|
from lusid.models.update_derived_property_definition_request import UpdateDerivedPropertyDefinitionRequest
|
960
963
|
from lusid.models.update_fee_type_request import UpdateFeeTypeRequest
|
961
964
|
from lusid.models.update_instrument_identifier_request import UpdateInstrumentIdentifierRequest
|
965
|
+
from lusid.models.update_orders_response import UpdateOrdersResponse
|
962
966
|
from lusid.models.update_placements_response import UpdatePlacementsResponse
|
963
967
|
from lusid.models.update_portfolio_group_request import UpdatePortfolioGroupRequest
|
964
968
|
from lusid.models.update_portfolio_request import UpdatePortfolioRequest
|
@@ -1015,6 +1019,7 @@ from lusid.models.user import User
|
|
1015
1019
|
from lusid.models.valuation_point_data_query_parameters import ValuationPointDataQueryParameters
|
1016
1020
|
from lusid.models.valuation_point_data_request import ValuationPointDataRequest
|
1017
1021
|
from lusid.models.valuation_point_data_response import ValuationPointDataResponse
|
1022
|
+
from lusid.models.valuation_point_overview import ValuationPointOverview
|
1018
1023
|
from lusid.models.valuation_request import ValuationRequest
|
1019
1024
|
from lusid.models.valuation_schedule import ValuationSchedule
|
1020
1025
|
from lusid.models.valuations_reconciliation_request import ValuationsReconciliationRequest
|
@@ -1285,6 +1290,7 @@ __all__ = [
|
|
1285
1290
|
"DataMapping",
|
1286
1291
|
"DataScope",
|
1287
1292
|
"DataType",
|
1293
|
+
"DataTypeEntity",
|
1288
1294
|
"DataTypeSummary",
|
1289
1295
|
"DataTypeValueRange",
|
1290
1296
|
"DateAttributes",
|
@@ -1582,6 +1588,7 @@ __all__ = [
|
|
1582
1588
|
"OrderInstructionSetRequest",
|
1583
1589
|
"OrderRequest",
|
1584
1590
|
"OrderSetRequest",
|
1591
|
+
"OrderUpdateRequest",
|
1585
1592
|
"OtcConfirmation",
|
1586
1593
|
"OutputTransaction",
|
1587
1594
|
"OutputTransition",
|
@@ -1646,6 +1653,7 @@ __all__ = [
|
|
1646
1653
|
"PagedResourceListOfTransactionTemplate",
|
1647
1654
|
"PagedResourceListOfTransactionTemplateSpecification",
|
1648
1655
|
"PagedResourceListOfTranslationScriptId",
|
1656
|
+
"PagedResourceListOfValuationPointOverview",
|
1649
1657
|
"PagedResourceListOfVirtualRow",
|
1650
1658
|
"Participation",
|
1651
1659
|
"ParticipationRequest",
|
@@ -1990,6 +1998,7 @@ __all__ = [
|
|
1990
1998
|
"UpdateDerivedPropertyDefinitionRequest",
|
1991
1999
|
"UpdateFeeTypeRequest",
|
1992
2000
|
"UpdateInstrumentIdentifierRequest",
|
2001
|
+
"UpdateOrdersResponse",
|
1993
2002
|
"UpdatePlacementsResponse",
|
1994
2003
|
"UpdatePortfolioGroupRequest",
|
1995
2004
|
"UpdatePortfolioRequest",
|
@@ -2046,6 +2055,7 @@ __all__ = [
|
|
2046
2055
|
"ValuationPointDataQueryParameters",
|
2047
2056
|
"ValuationPointDataRequest",
|
2048
2057
|
"ValuationPointDataResponse",
|
2058
|
+
"ValuationPointOverview",
|
2049
2059
|
"ValuationRequest",
|
2050
2060
|
"ValuationSchedule",
|
2051
2061
|
"ValuationsReconciliationRequest",
|
lusid/models/data_type.py
CHANGED
@@ -30,7 +30,6 @@ class DataType(BaseModel):
|
|
30
30
|
"""
|
31
31
|
DataType
|
32
32
|
"""
|
33
|
-
href: Optional[StrictStr] = None
|
34
33
|
type_value_range: StrictStr = Field(..., alias="typeValueRange", description="The available values are: Open, Closed")
|
35
34
|
id: ResourceId = Field(...)
|
36
35
|
display_name: constr(strict=True, min_length=1) = Field(..., alias="displayName")
|
@@ -41,8 +40,9 @@ class DataType(BaseModel):
|
|
41
40
|
acceptable_units: Optional[conlist(IUnitDefinitionDto)] = Field(None, alias="acceptableUnits")
|
42
41
|
reference_data: Optional[ReferenceData] = Field(None, alias="referenceData")
|
43
42
|
version: Optional[Version] = None
|
43
|
+
href: Optional[StrictStr] = Field(None, description="The specific Uniform Resource Identifier (URI) for this resource at the requested effective and asAt datetime.")
|
44
44
|
links: Optional[conlist(Link)] = None
|
45
|
-
__properties = ["
|
45
|
+
__properties = ["typeValueRange", "id", "displayName", "description", "valueType", "acceptableValues", "unitSchema", "acceptableUnits", "referenceData", "version", "href", "links"]
|
46
46
|
|
47
47
|
@validator('type_value_range')
|
48
48
|
def type_value_range_validate_enum(cls, value):
|
@@ -115,11 +115,6 @@ class DataType(BaseModel):
|
|
115
115
|
if _item:
|
116
116
|
_items.append(_item.to_dict())
|
117
117
|
_dict['links'] = _items
|
118
|
-
# set to None if href (nullable) is None
|
119
|
-
# and __fields_set__ contains the field
|
120
|
-
if self.href is None and "href" in self.__fields_set__:
|
121
|
-
_dict['href'] = None
|
122
|
-
|
123
118
|
# set to None if acceptable_values (nullable) is None
|
124
119
|
# and __fields_set__ contains the field
|
125
120
|
if self.acceptable_values is None and "acceptable_values" in self.__fields_set__:
|
@@ -130,6 +125,11 @@ class DataType(BaseModel):
|
|
130
125
|
if self.acceptable_units is None and "acceptable_units" in self.__fields_set__:
|
131
126
|
_dict['acceptableUnits'] = None
|
132
127
|
|
128
|
+
# set to None if href (nullable) is None
|
129
|
+
# and __fields_set__ contains the field
|
130
|
+
if self.href is None and "href" in self.__fields_set__:
|
131
|
+
_dict['href'] = None
|
132
|
+
|
133
133
|
# set to None if links (nullable) is None
|
134
134
|
# and __fields_set__ contains the field
|
135
135
|
if self.links is None and "links" in self.__fields_set__:
|
@@ -147,7 +147,6 @@ class DataType(BaseModel):
|
|
147
147
|
return DataType.parse_obj(obj)
|
148
148
|
|
149
149
|
_obj = DataType.parse_obj({
|
150
|
-
"href": obj.get("href"),
|
151
150
|
"type_value_range": obj.get("typeValueRange"),
|
152
151
|
"id": ResourceId.from_dict(obj.get("id")) if obj.get("id") is not None else None,
|
153
152
|
"display_name": obj.get("displayName"),
|
@@ -158,6 +157,7 @@ class DataType(BaseModel):
|
|
158
157
|
"acceptable_units": [IUnitDefinitionDto.from_dict(_item) for _item in obj.get("acceptableUnits")] if obj.get("acceptableUnits") is not None else None,
|
159
158
|
"reference_data": ReferenceData.from_dict(obj.get("referenceData")) if obj.get("referenceData") is not None else None,
|
160
159
|
"version": Version.from_dict(obj.get("version")) if obj.get("version") is not None else None,
|
160
|
+
"href": obj.get("href"),
|
161
161
|
"links": [Link.from_dict(_item) for _item in obj.get("links")] if obj.get("links") is not None else None
|
162
162
|
})
|
163
163
|
return _obj
|
@@ -0,0 +1,131 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
|
3
|
+
"""
|
4
|
+
LUSID API
|
5
|
+
|
6
|
+
FINBOURNE Technology # noqa: E501
|
7
|
+
|
8
|
+
Contact: info@finbourne.com
|
9
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
10
|
+
|
11
|
+
Do not edit the class manually.
|
12
|
+
"""
|
13
|
+
|
14
|
+
|
15
|
+
from __future__ import annotations
|
16
|
+
import pprint
|
17
|
+
import re # noqa: F401
|
18
|
+
import json
|
19
|
+
|
20
|
+
from datetime import datetime
|
21
|
+
from typing import Any, Dict, Optional
|
22
|
+
from pydantic.v1 import BaseModel, Field, StrictInt, StrictStr, constr
|
23
|
+
from lusid.models.data_type import DataType
|
24
|
+
|
25
|
+
class DataTypeEntity(BaseModel):
|
26
|
+
"""
|
27
|
+
DataTypeEntity
|
28
|
+
"""
|
29
|
+
href: StrictStr = Field(..., description="The specific Uniform Resource Identifier (URI) for this resource at the requested effective and asAt datetime.")
|
30
|
+
entity_unique_id: constr(strict=True, min_length=1) = Field(..., alias="entityUniqueId", description="The unique id of the entity.")
|
31
|
+
as_at_version_number: Optional[StrictInt] = Field(None, alias="asAtVersionNumber", description="The integer version number for the entity (the entity was created at version 1)")
|
32
|
+
status: constr(strict=True, min_length=1) = Field(..., description="The status of the entity at the current time.")
|
33
|
+
as_at_deleted: Optional[datetime] = Field(None, alias="asAtDeleted", description="The asAt datetime at which the entity was deleted.")
|
34
|
+
user_id_deleted: Optional[StrictStr] = Field(None, alias="userIdDeleted", description="The unique id of the user who deleted the entity.")
|
35
|
+
request_id_deleted: Optional[StrictStr] = Field(None, alias="requestIdDeleted", description="The unique request id of the command that deleted the entity.")
|
36
|
+
effective_at_created: Optional[datetime] = Field(None, alias="effectiveAtCreated", description="The EffectiveAt this Entity is created, if entity does not currently exist in EffectiveAt.")
|
37
|
+
prevailing_data_type: Optional[DataType] = Field(None, alias="prevailingDataType")
|
38
|
+
deleted_data_type: Optional[DataType] = Field(None, alias="deletedDataType")
|
39
|
+
previewed_status: Optional[StrictStr] = Field(None, alias="previewedStatus", description="The status of the previewed entity.")
|
40
|
+
previewed_data_type: Optional[DataType] = Field(None, alias="previewedDataType")
|
41
|
+
__properties = ["href", "entityUniqueId", "asAtVersionNumber", "status", "asAtDeleted", "userIdDeleted", "requestIdDeleted", "effectiveAtCreated", "prevailingDataType", "deletedDataType", "previewedStatus", "previewedDataType"]
|
42
|
+
|
43
|
+
class Config:
|
44
|
+
"""Pydantic configuration"""
|
45
|
+
allow_population_by_field_name = True
|
46
|
+
validate_assignment = True
|
47
|
+
|
48
|
+
def to_str(self) -> str:
|
49
|
+
"""Returns the string representation of the model using alias"""
|
50
|
+
return pprint.pformat(self.dict(by_alias=True))
|
51
|
+
|
52
|
+
def to_json(self) -> str:
|
53
|
+
"""Returns the JSON representation of the model using alias"""
|
54
|
+
return json.dumps(self.to_dict())
|
55
|
+
|
56
|
+
@classmethod
|
57
|
+
def from_json(cls, json_str: str) -> DataTypeEntity:
|
58
|
+
"""Create an instance of DataTypeEntity from a JSON string"""
|
59
|
+
return cls.from_dict(json.loads(json_str))
|
60
|
+
|
61
|
+
def to_dict(self):
|
62
|
+
"""Returns the dictionary representation of the model using alias"""
|
63
|
+
_dict = self.dict(by_alias=True,
|
64
|
+
exclude={
|
65
|
+
},
|
66
|
+
exclude_none=True)
|
67
|
+
# override the default output from pydantic by calling `to_dict()` of prevailing_data_type
|
68
|
+
if self.prevailing_data_type:
|
69
|
+
_dict['prevailingDataType'] = self.prevailing_data_type.to_dict()
|
70
|
+
# override the default output from pydantic by calling `to_dict()` of deleted_data_type
|
71
|
+
if self.deleted_data_type:
|
72
|
+
_dict['deletedDataType'] = self.deleted_data_type.to_dict()
|
73
|
+
# override the default output from pydantic by calling `to_dict()` of previewed_data_type
|
74
|
+
if self.previewed_data_type:
|
75
|
+
_dict['previewedDataType'] = self.previewed_data_type.to_dict()
|
76
|
+
# set to None if as_at_version_number (nullable) is None
|
77
|
+
# and __fields_set__ contains the field
|
78
|
+
if self.as_at_version_number is None and "as_at_version_number" in self.__fields_set__:
|
79
|
+
_dict['asAtVersionNumber'] = None
|
80
|
+
|
81
|
+
# set to None if as_at_deleted (nullable) is None
|
82
|
+
# and __fields_set__ contains the field
|
83
|
+
if self.as_at_deleted is None and "as_at_deleted" in self.__fields_set__:
|
84
|
+
_dict['asAtDeleted'] = None
|
85
|
+
|
86
|
+
# set to None if user_id_deleted (nullable) is None
|
87
|
+
# and __fields_set__ contains the field
|
88
|
+
if self.user_id_deleted is None and "user_id_deleted" in self.__fields_set__:
|
89
|
+
_dict['userIdDeleted'] = None
|
90
|
+
|
91
|
+
# set to None if request_id_deleted (nullable) is None
|
92
|
+
# and __fields_set__ contains the field
|
93
|
+
if self.request_id_deleted is None and "request_id_deleted" in self.__fields_set__:
|
94
|
+
_dict['requestIdDeleted'] = None
|
95
|
+
|
96
|
+
# set to None if effective_at_created (nullable) is None
|
97
|
+
# and __fields_set__ contains the field
|
98
|
+
if self.effective_at_created is None and "effective_at_created" in self.__fields_set__:
|
99
|
+
_dict['effectiveAtCreated'] = None
|
100
|
+
|
101
|
+
# set to None if previewed_status (nullable) is None
|
102
|
+
# and __fields_set__ contains the field
|
103
|
+
if self.previewed_status is None and "previewed_status" in self.__fields_set__:
|
104
|
+
_dict['previewedStatus'] = None
|
105
|
+
|
106
|
+
return _dict
|
107
|
+
|
108
|
+
@classmethod
|
109
|
+
def from_dict(cls, obj: dict) -> DataTypeEntity:
|
110
|
+
"""Create an instance of DataTypeEntity from a dict"""
|
111
|
+
if obj is None:
|
112
|
+
return None
|
113
|
+
|
114
|
+
if not isinstance(obj, dict):
|
115
|
+
return DataTypeEntity.parse_obj(obj)
|
116
|
+
|
117
|
+
_obj = DataTypeEntity.parse_obj({
|
118
|
+
"href": obj.get("href"),
|
119
|
+
"entity_unique_id": obj.get("entityUniqueId"),
|
120
|
+
"as_at_version_number": obj.get("asAtVersionNumber"),
|
121
|
+
"status": obj.get("status"),
|
122
|
+
"as_at_deleted": obj.get("asAtDeleted"),
|
123
|
+
"user_id_deleted": obj.get("userIdDeleted"),
|
124
|
+
"request_id_deleted": obj.get("requestIdDeleted"),
|
125
|
+
"effective_at_created": obj.get("effectiveAtCreated"),
|
126
|
+
"prevailing_data_type": DataType.from_dict(obj.get("prevailingDataType")) if obj.get("prevailingDataType") is not None else None,
|
127
|
+
"deleted_data_type": DataType.from_dict(obj.get("deletedDataType")) if obj.get("deletedDataType") is not None else None,
|
128
|
+
"previewed_status": obj.get("previewedStatus"),
|
129
|
+
"previewed_data_type": DataType.from_dict(obj.get("previewedDataType")) if obj.get("previewedDataType") is not None else None
|
130
|
+
})
|
131
|
+
return _obj
|
@@ -35,12 +35,12 @@ class FundConfiguration(BaseModel):
|
|
35
35
|
display_name: Optional[StrictStr] = Field(None, alias="displayName", description="The name of the FundConfiguration.")
|
36
36
|
description: Optional[StrictStr] = Field(None, description="A description for the FundConfiguration.")
|
37
37
|
dealing_rule: Optional[ComponentRule] = Field(None, alias="dealingRule")
|
38
|
-
|
38
|
+
pnl_rule: Optional[ComponentRule] = Field(None, alias="pnlRule")
|
39
39
|
back_out_rule: Optional[ComponentRule] = Field(None, alias="backOutRule")
|
40
40
|
properties: Optional[Dict[str, ModelProperty]] = Field(None, description="A set of properties for the Fund Configuration.")
|
41
41
|
version: Optional[Version] = None
|
42
42
|
links: Optional[conlist(Link)] = None
|
43
|
-
__properties = ["href", "id", "displayName", "description", "dealingRule", "
|
43
|
+
__properties = ["href", "id", "displayName", "description", "dealingRule", "pnlRule", "backOutRule", "properties", "version", "links"]
|
44
44
|
|
45
45
|
class Config:
|
46
46
|
"""Pydantic configuration"""
|
@@ -72,9 +72,9 @@ class FundConfiguration(BaseModel):
|
|
72
72
|
# override the default output from pydantic by calling `to_dict()` of dealing_rule
|
73
73
|
if self.dealing_rule:
|
74
74
|
_dict['dealingRule'] = self.dealing_rule.to_dict()
|
75
|
-
# override the default output from pydantic by calling `to_dict()` of
|
76
|
-
if self.
|
77
|
-
_dict['
|
75
|
+
# override the default output from pydantic by calling `to_dict()` of pnl_rule
|
76
|
+
if self.pnl_rule:
|
77
|
+
_dict['pnlRule'] = self.pnl_rule.to_dict()
|
78
78
|
# override the default output from pydantic by calling `to_dict()` of back_out_rule
|
79
79
|
if self.back_out_rule:
|
80
80
|
_dict['backOutRule'] = self.back_out_rule.to_dict()
|
@@ -137,7 +137,7 @@ class FundConfiguration(BaseModel):
|
|
137
137
|
"display_name": obj.get("displayName"),
|
138
138
|
"description": obj.get("description"),
|
139
139
|
"dealing_rule": ComponentRule.from_dict(obj.get("dealingRule")) if obj.get("dealingRule") is not None else None,
|
140
|
-
"
|
140
|
+
"pnl_rule": ComponentRule.from_dict(obj.get("pnlRule")) if obj.get("pnlRule") is not None else None,
|
141
141
|
"back_out_rule": ComponentRule.from_dict(obj.get("backOutRule")) if obj.get("backOutRule") is not None else None,
|
142
142
|
"properties": dict(
|
143
143
|
(_k, ModelProperty.from_dict(_v))
|
@@ -31,10 +31,10 @@ class FundConfigurationRequest(BaseModel):
|
|
31
31
|
display_name: Optional[constr(strict=True, max_length=256, min_length=1)] = Field(None, alias="displayName", description="The name of the Fund.")
|
32
32
|
description: Optional[constr(strict=True, max_length=1024, min_length=0)] = Field(None, description="A description for the Fund.")
|
33
33
|
dealing_rule: ComponentRule = Field(..., alias="dealingRule")
|
34
|
-
|
34
|
+
pnl_rule: ComponentRule = Field(..., alias="pnlRule")
|
35
35
|
back_out_rule: ComponentRule = Field(..., alias="backOutRule")
|
36
36
|
properties: Optional[Dict[str, ModelProperty]] = Field(None, description="A set of properties for the Fund Configuration.")
|
37
|
-
__properties = ["code", "displayName", "description", "dealingRule", "
|
37
|
+
__properties = ["code", "displayName", "description", "dealingRule", "pnlRule", "backOutRule", "properties"]
|
38
38
|
|
39
39
|
@validator('code')
|
40
40
|
def code_validate_regular_expression(cls, value):
|
@@ -80,9 +80,9 @@ class FundConfigurationRequest(BaseModel):
|
|
80
80
|
# override the default output from pydantic by calling `to_dict()` of dealing_rule
|
81
81
|
if self.dealing_rule:
|
82
82
|
_dict['dealingRule'] = self.dealing_rule.to_dict()
|
83
|
-
# override the default output from pydantic by calling `to_dict()` of
|
84
|
-
if self.
|
85
|
-
_dict['
|
83
|
+
# override the default output from pydantic by calling `to_dict()` of pnl_rule
|
84
|
+
if self.pnl_rule:
|
85
|
+
_dict['pnlRule'] = self.pnl_rule.to_dict()
|
86
86
|
# override the default output from pydantic by calling `to_dict()` of back_out_rule
|
87
87
|
if self.back_out_rule:
|
88
88
|
_dict['backOutRule'] = self.back_out_rule.to_dict()
|
@@ -124,7 +124,7 @@ class FundConfigurationRequest(BaseModel):
|
|
124
124
|
"display_name": obj.get("displayName"),
|
125
125
|
"description": obj.get("description"),
|
126
126
|
"dealing_rule": ComponentRule.from_dict(obj.get("dealingRule")) if obj.get("dealingRule") is not None else None,
|
127
|
-
"
|
127
|
+
"pnl_rule": ComponentRule.from_dict(obj.get("pnlRule")) if obj.get("pnlRule") is not None else None,
|
128
128
|
"back_out_rule": ComponentRule.from_dict(obj.get("backOutRule")) if obj.get("backOutRule") is not None else None,
|
129
129
|
"properties": dict(
|
130
130
|
(_k, ModelProperty.from_dict(_v))
|
@@ -18,8 +18,8 @@ import re # noqa: F401
|
|
18
18
|
import json
|
19
19
|
|
20
20
|
from datetime import datetime
|
21
|
-
from typing import Any, Dict, List, Optional
|
22
|
-
from pydantic.v1 import BaseModel, Field, StrictStr, conlist, constr
|
21
|
+
from typing import Any, Dict, List, Optional, Union
|
22
|
+
from pydantic.v1 import BaseModel, Field, StrictFloat, StrictInt, StrictStr, conlist, constr
|
23
23
|
from lusid.models.currency_and_amount import CurrencyAndAmount
|
24
24
|
from lusid.models.link import Link
|
25
25
|
from lusid.models.model_property import ModelProperty
|
@@ -40,6 +40,7 @@ class JournalEntryLine(BaseModel):
|
|
40
40
|
general_ledger_account_code: constr(strict=True, min_length=1) = Field(..., alias="generalLedgerAccountCode", description="The code of the account in the general ledger the Journal Entry was posted to.")
|
41
41
|
local: CurrencyAndAmount = Field(...)
|
42
42
|
base: CurrencyAndAmount = Field(...)
|
43
|
+
units: Union[StrictFloat, StrictInt] = Field(..., description="Units held for the Journal Entry Line.")
|
43
44
|
posting_module_code: Optional[StrictStr] = Field(None, alias="postingModuleCode", description="The code of the posting module where the posting rules derived the Journal Entry lines.")
|
44
45
|
posting_rule: constr(strict=True, min_length=1) = Field(..., alias="postingRule", description="The rule generating the Journal Entry Line.")
|
45
46
|
as_at_date: datetime = Field(..., alias="asAtDate", description="The corresponding input date and time of the Transaction generating the Journal Entry Line.")
|
@@ -58,7 +59,7 @@ class JournalEntryLine(BaseModel):
|
|
58
59
|
ledger_column: Optional[StrictStr] = Field(None, alias="ledgerColumn", description="Indicates if the Journal Entry Line is credit or debit.")
|
59
60
|
journal_entry_line_type: Optional[StrictStr] = Field(None, alias="journalEntryLineType", description="Indicates the Journal Entry Line type")
|
60
61
|
links: Optional[conlist(Link)] = None
|
61
|
-
__properties = ["accountingDate", "activityDate", "portfolioId", "instrumentId", "instrumentScope", "subHoldingKeys", "taxLotId", "generalLedgerAccountCode", "local", "base", "postingModuleCode", "postingRule", "asAtDate", "activitiesDescription", "sourceType", "sourceId", "properties", "movementName", "holdingType", "economicBucket", "economicBucketComponent", "levels", "sourceLevels", "movementSign", "holdingSign", "ledgerColumn", "journalEntryLineType", "links"]
|
62
|
+
__properties = ["accountingDate", "activityDate", "portfolioId", "instrumentId", "instrumentScope", "subHoldingKeys", "taxLotId", "generalLedgerAccountCode", "local", "base", "units", "postingModuleCode", "postingRule", "asAtDate", "activitiesDescription", "sourceType", "sourceId", "properties", "movementName", "holdingType", "economicBucket", "economicBucketComponent", "levels", "sourceLevels", "movementSign", "holdingSign", "ledgerColumn", "journalEntryLineType", "links"]
|
62
63
|
|
63
64
|
class Config:
|
64
65
|
"""Pydantic configuration"""
|
@@ -211,6 +212,7 @@ class JournalEntryLine(BaseModel):
|
|
211
212
|
"general_ledger_account_code": obj.get("generalLedgerAccountCode"),
|
212
213
|
"local": CurrencyAndAmount.from_dict(obj.get("local")) if obj.get("local") is not None else None,
|
213
214
|
"base": CurrencyAndAmount.from_dict(obj.get("base")) if obj.get("base") is not None else None,
|
215
|
+
"units": obj.get("units"),
|
214
216
|
"posting_module_code": obj.get("postingModuleCode"),
|
215
217
|
"posting_rule": obj.get("postingRule"),
|
216
218
|
"as_at_date": obj.get("asAtDate"),
|