lusid-sdk 2.1.322__py3-none-any.whl → 2.1.351__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 +30 -0
- lusid/api/__init__.py +3 -1
- lusid/api/data_types_api.py +160 -0
- lusid/api/entities_api.py +172 -0
- lusid/api/funds_api.py +212 -0
- lusid/api/order_management_api.py +160 -0
- lusid/api/workspace_api.py +3433 -0
- lusid/configuration.py +16 -7
- lusid/models/__init__.py +28 -0
- lusid/models/close_period_diary_entry_request.py +1 -1
- lusid/models/data_type.py +8 -8
- lusid/models/data_type_entity.py +131 -0
- lusid/models/diary_entry.py +1 -1
- lusid/models/diary_entry_request.py +1 -1
- lusid/models/fund_configuration.py +6 -6
- lusid/models/fund_configuration_request.py +6 -6
- lusid/models/instrument_resolution_detail.py +19 -5
- 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/paged_resource_list_of_workspace.py +113 -0
- lusid/models/paged_resource_list_of_workspace_item.py +113 -0
- 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_breakdown.py +5 -13
- lusid/models/share_class_dealing_breakdown.py +96 -0
- 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_data_response.py +1 -1
- lusid/models/valuation_point_overview.py +125 -0
- lusid/models/workspace.py +92 -0
- lusid/models/workspace_creation_request.py +78 -0
- lusid/models/workspace_item.py +105 -0
- lusid/models/workspace_item_creation_request.py +91 -0
- lusid/models/workspace_item_update_request.py +82 -0
- lusid/models/workspace_update_request.py +69 -0
- {lusid_sdk-2.1.322.dist-info → lusid_sdk-2.1.351.dist-info}/METADATA +39 -1
- {lusid_sdk-2.1.322.dist-info → lusid_sdk-2.1.351.dist-info}/RECORD +41 -26
- {lusid_sdk-2.1.322.dist-info → lusid_sdk-2.1.351.dist-info}/WHEEL +0 -0
lusid/configuration.py
CHANGED
@@ -356,12 +356,21 @@ class Configuration:
|
|
356
356
|
"""
|
357
357
|
auth = {}
|
358
358
|
if self.access_token is not None:
|
359
|
-
|
360
|
-
|
361
|
-
'
|
362
|
-
|
363
|
-
|
364
|
-
|
359
|
+
|
360
|
+
if isinstance(self.access_token, str):
|
361
|
+
auth['oauth2'] = {
|
362
|
+
'type': 'bearer',
|
363
|
+
'in': 'header',
|
364
|
+
'key': 'Authorization',
|
365
|
+
'value': 'Bearer ' + self.access_token
|
366
|
+
}
|
367
|
+
else:
|
368
|
+
auth['oauth2'] = {
|
369
|
+
'type': 'bearer',
|
370
|
+
'in': 'header',
|
371
|
+
'key': 'Authorization',
|
372
|
+
'value': 'Bearer ' + self.access_token.data
|
373
|
+
}
|
365
374
|
return auth
|
366
375
|
|
367
376
|
def to_debug_report(self):
|
@@ -373,7 +382,7 @@ class Configuration:
|
|
373
382
|
return "Python SDK Debug Report:\n"\
|
374
383
|
"OS: {env}\n"\
|
375
384
|
"Python Version: {pyversion}\n"\
|
376
|
-
"Version of the API: 0.11.
|
385
|
+
"Version of the API: 0.11.6782\n"\
|
377
386
|
"SDK Package Version: {package_version}".\
|
378
387
|
format(env=sys.platform, pyversion=sys.version, package_version=package_version)
|
379
388
|
|
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,7 +617,10 @@ 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
|
622
|
+
from lusid.models.paged_resource_list_of_workspace import PagedResourceListOfWorkspace
|
623
|
+
from lusid.models.paged_resource_list_of_workspace_item import PagedResourceListOfWorkspaceItem
|
619
624
|
from lusid.models.participation import Participation
|
620
625
|
from lusid.models.participation_request import ParticipationRequest
|
621
626
|
from lusid.models.participation_set_request import ParticipationSetRequest
|
@@ -851,6 +856,7 @@ from lusid.models.settlement_schedule import SettlementSchedule
|
|
851
856
|
from lusid.models.share_class_amount import ShareClassAmount
|
852
857
|
from lusid.models.share_class_breakdown import ShareClassBreakdown
|
853
858
|
from lusid.models.share_class_data import ShareClassData
|
859
|
+
from lusid.models.share_class_dealing_breakdown import ShareClassDealingBreakdown
|
854
860
|
from lusid.models.share_class_details import ShareClassDetails
|
855
861
|
from lusid.models.share_class_pnl_breakdown import ShareClassPnlBreakdown
|
856
862
|
from lusid.models.side_configuration_data import SideConfigurationData
|
@@ -959,6 +965,7 @@ from lusid.models.update_data_type_request import UpdateDataTypeRequest
|
|
959
965
|
from lusid.models.update_derived_property_definition_request import UpdateDerivedPropertyDefinitionRequest
|
960
966
|
from lusid.models.update_fee_type_request import UpdateFeeTypeRequest
|
961
967
|
from lusid.models.update_instrument_identifier_request import UpdateInstrumentIdentifierRequest
|
968
|
+
from lusid.models.update_orders_response import UpdateOrdersResponse
|
962
969
|
from lusid.models.update_placements_response import UpdatePlacementsResponse
|
963
970
|
from lusid.models.update_portfolio_group_request import UpdatePortfolioGroupRequest
|
964
971
|
from lusid.models.update_portfolio_request import UpdatePortfolioRequest
|
@@ -1015,6 +1022,7 @@ from lusid.models.user import User
|
|
1015
1022
|
from lusid.models.valuation_point_data_query_parameters import ValuationPointDataQueryParameters
|
1016
1023
|
from lusid.models.valuation_point_data_request import ValuationPointDataRequest
|
1017
1024
|
from lusid.models.valuation_point_data_response import ValuationPointDataResponse
|
1025
|
+
from lusid.models.valuation_point_overview import ValuationPointOverview
|
1018
1026
|
from lusid.models.valuation_request import ValuationRequest
|
1019
1027
|
from lusid.models.valuation_schedule import ValuationSchedule
|
1020
1028
|
from lusid.models.valuations_reconciliation_request import ValuationsReconciliationRequest
|
@@ -1041,6 +1049,12 @@ from lusid.models.weekend_mask import WeekendMask
|
|
1041
1049
|
from lusid.models.weighted_instrument import WeightedInstrument
|
1042
1050
|
from lusid.models.weighted_instrument_in_line_lookup_identifiers import WeightedInstrumentInLineLookupIdentifiers
|
1043
1051
|
from lusid.models.weighted_instruments import WeightedInstruments
|
1052
|
+
from lusid.models.workspace import Workspace
|
1053
|
+
from lusid.models.workspace_creation_request import WorkspaceCreationRequest
|
1054
|
+
from lusid.models.workspace_item import WorkspaceItem
|
1055
|
+
from lusid.models.workspace_item_creation_request import WorkspaceItemCreationRequest
|
1056
|
+
from lusid.models.workspace_item_update_request import WorkspaceItemUpdateRequest
|
1057
|
+
from lusid.models.workspace_update_request import WorkspaceUpdateRequest
|
1044
1058
|
from lusid.models.yield_curve_data import YieldCurveData
|
1045
1059
|
|
1046
1060
|
|
@@ -1285,6 +1299,7 @@ __all__ = [
|
|
1285
1299
|
"DataMapping",
|
1286
1300
|
"DataScope",
|
1287
1301
|
"DataType",
|
1302
|
+
"DataTypeEntity",
|
1288
1303
|
"DataTypeSummary",
|
1289
1304
|
"DataTypeValueRange",
|
1290
1305
|
"DateAttributes",
|
@@ -1582,6 +1597,7 @@ __all__ = [
|
|
1582
1597
|
"OrderInstructionSetRequest",
|
1583
1598
|
"OrderRequest",
|
1584
1599
|
"OrderSetRequest",
|
1600
|
+
"OrderUpdateRequest",
|
1585
1601
|
"OtcConfirmation",
|
1586
1602
|
"OutputTransaction",
|
1587
1603
|
"OutputTransition",
|
@@ -1646,7 +1662,10 @@ __all__ = [
|
|
1646
1662
|
"PagedResourceListOfTransactionTemplate",
|
1647
1663
|
"PagedResourceListOfTransactionTemplateSpecification",
|
1648
1664
|
"PagedResourceListOfTranslationScriptId",
|
1665
|
+
"PagedResourceListOfValuationPointOverview",
|
1649
1666
|
"PagedResourceListOfVirtualRow",
|
1667
|
+
"PagedResourceListOfWorkspace",
|
1668
|
+
"PagedResourceListOfWorkspaceItem",
|
1650
1669
|
"Participation",
|
1651
1670
|
"ParticipationRequest",
|
1652
1671
|
"ParticipationSetRequest",
|
@@ -1882,6 +1901,7 @@ __all__ = [
|
|
1882
1901
|
"ShareClassAmount",
|
1883
1902
|
"ShareClassBreakdown",
|
1884
1903
|
"ShareClassData",
|
1904
|
+
"ShareClassDealingBreakdown",
|
1885
1905
|
"ShareClassDetails",
|
1886
1906
|
"ShareClassPnlBreakdown",
|
1887
1907
|
"SideConfigurationData",
|
@@ -1990,6 +2010,7 @@ __all__ = [
|
|
1990
2010
|
"UpdateDerivedPropertyDefinitionRequest",
|
1991
2011
|
"UpdateFeeTypeRequest",
|
1992
2012
|
"UpdateInstrumentIdentifierRequest",
|
2013
|
+
"UpdateOrdersResponse",
|
1993
2014
|
"UpdatePlacementsResponse",
|
1994
2015
|
"UpdatePortfolioGroupRequest",
|
1995
2016
|
"UpdatePortfolioRequest",
|
@@ -2046,6 +2067,7 @@ __all__ = [
|
|
2046
2067
|
"ValuationPointDataQueryParameters",
|
2047
2068
|
"ValuationPointDataRequest",
|
2048
2069
|
"ValuationPointDataResponse",
|
2070
|
+
"ValuationPointOverview",
|
2049
2071
|
"ValuationRequest",
|
2050
2072
|
"ValuationSchedule",
|
2051
2073
|
"ValuationsReconciliationRequest",
|
@@ -2072,5 +2094,11 @@ __all__ = [
|
|
2072
2094
|
"WeightedInstrument",
|
2073
2095
|
"WeightedInstrumentInLineLookupIdentifiers",
|
2074
2096
|
"WeightedInstruments",
|
2097
|
+
"Workspace",
|
2098
|
+
"WorkspaceCreationRequest",
|
2099
|
+
"WorkspaceItem",
|
2100
|
+
"WorkspaceItemCreationRequest",
|
2101
|
+
"WorkspaceItemUpdateRequest",
|
2102
|
+
"WorkspaceUpdateRequest",
|
2075
2103
|
"YieldCurveData"
|
2076
2104
|
]
|
@@ -30,7 +30,7 @@ class ClosePeriodDiaryEntryRequest(BaseModel):
|
|
30
30
|
name: Optional[constr(strict=True, max_length=512, min_length=1)] = Field(None, description="Identifiable Name assigned to the period. Where left blank, the system will generate a name in the format 'yyyyMMDD'.")
|
31
31
|
effective_at: Optional[datetime] = Field(None, alias="effectiveAt", description="The effective time of the diary entry.")
|
32
32
|
query_as_at: Optional[datetime] = Field(None, alias="queryAsAt", description="The query time of the diary entry. Defaults to latest.")
|
33
|
-
status: Optional[StrictStr] = Field(None, description="The status of
|
33
|
+
status: Optional[StrictStr] = Field(None, description="The status of a Diary Entry of Type 'PeriodBoundary'. Defaults to 'Estimate' when closing a period, and supports 'Estimate' and 'Final' for closing periods and 'Final' for locking periods.")
|
34
34
|
properties: Optional[Dict[str, ModelProperty]] = Field(None, description="A set of properties for the diary entry.")
|
35
35
|
closing_options: Optional[conlist(StrictStr)] = Field(None, alias="closingOptions", description="The options which will be executed once a period is closed or locked.")
|
36
36
|
__properties = ["diaryEntryCode", "name", "effectiveAt", "queryAsAt", "status", "properties", "closingOptions"]
|
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
|
lusid/models/diary_entry.py
CHANGED
@@ -34,7 +34,7 @@ class DiaryEntry(BaseModel):
|
|
34
34
|
diary_entry_code: Optional[StrictStr] = Field(None, alias="diaryEntryCode", description="The code of the diary entry.")
|
35
35
|
type: constr(strict=True, min_length=1) = Field(..., description="The type of the diary entry.")
|
36
36
|
name: Optional[constr(strict=True, max_length=256, min_length=1)] = Field(None, description="The name of the diary entry.")
|
37
|
-
status: constr(strict=True, min_length=1) = Field(..., description="The status of the diary entry.
|
37
|
+
status: constr(strict=True, min_length=1) = Field(..., description="The status of the diary entry. Statuses are constrained and defaulted by 'Type' specified. Type 'Other' defaults to 'Undefined' and supports 'Undefined', 'Estimate', 'Candidate', and 'Final'. Type 'PeriodBoundary' defaults to 'Estimate' when closing a period, and supports 'Estimate' and 'Final' for closing periods and 'Final' for locking periods. Type 'ValuationPoint' defaults to 'Estimate' when upserting a diary entry, moves to 'Candidate' or 'Final' when a ValuationPoint is accepted, and 'Final' when it is finalised.")
|
38
38
|
effective_at: datetime = Field(..., alias="effectiveAt", description="The effective time of the diary entry.")
|
39
39
|
query_as_at: Optional[datetime] = Field(None, alias="queryAsAt", description="The query time of the diary entry. Defaults to latest.")
|
40
40
|
previous_entry_time: Optional[datetime] = Field(None, alias="previousEntryTime", description="The entry time of the previous diary entry.")
|
@@ -27,7 +27,7 @@ class DiaryEntryRequest(BaseModel):
|
|
27
27
|
The request to add a diary entry # noqa: E501
|
28
28
|
"""
|
29
29
|
name: Optional[constr(strict=True, max_length=512, min_length=1)] = Field(None, description="The name of the diary entry.")
|
30
|
-
status: Optional[StrictStr] = Field(None, description="The status of
|
30
|
+
status: Optional[StrictStr] = Field(None, description="The status of a Diary Entry of Type 'Other'. Defaults to 'Undefined' and supports 'Undefined', 'Estimate', 'Candidate', and 'Final'.")
|
31
31
|
effective_at: datetime = Field(..., alias="effectiveAt", description="The effective time of the diary entry.")
|
32
32
|
query_as_at: Optional[datetime] = Field(None, alias="queryAsAt", description="The query time of the diary entry. Defaults to latest.")
|
33
33
|
properties: Optional[Dict[str, ModelProperty]] = Field(None, description="A set of properties for the diary entry.")
|
@@ -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))
|
@@ -17,9 +17,9 @@ import pprint
|
|
17
17
|
import re # noqa: F401
|
18
18
|
import json
|
19
19
|
|
20
|
-
|
21
|
-
from typing import Any, Dict, Optional
|
22
|
-
from pydantic.v1 import BaseModel, Field, StrictStr, constr, validator
|
20
|
+
from datetime import datetime
|
21
|
+
from typing import Any, Dict, Optional, Union
|
22
|
+
from pydantic.v1 import BaseModel, Field, StrictFloat, StrictInt, StrictStr, constr, validator
|
23
23
|
|
24
24
|
class InstrumentResolutionDetail(BaseModel):
|
25
25
|
"""
|
@@ -28,7 +28,9 @@ class InstrumentResolutionDetail(BaseModel):
|
|
28
28
|
instrument_identifiers: Dict[str, StrictStr] = Field(..., alias="instrumentIdentifiers", description="Unique instrument identifiers")
|
29
29
|
lusid_instrument_id: Optional[constr(strict=True, max_length=64, min_length=1)] = Field(None, alias="lusidInstrumentId", description="LUSID's internal unique instrument identifier, resolved from the instrument identifiers")
|
30
30
|
instrument_scope: Optional[constr(strict=True, max_length=64, min_length=1)] = Field(None, alias="instrumentScope", description="The scope in which the instrument lies.")
|
31
|
-
|
31
|
+
launch_price: Optional[Union[StrictFloat, StrictInt]] = Field(None, alias="launchPrice", description="The launch price set when a shareclass is added to the fund. Defaults to 1.")
|
32
|
+
launch_date: Optional[datetime] = Field(None, alias="launchDate", description="The launch date set when a shareclass is added to the fund. Defaults to Fund Inception Date.")
|
33
|
+
__properties = ["instrumentIdentifiers", "lusidInstrumentId", "instrumentScope", "launchPrice", "launchDate"]
|
32
34
|
|
33
35
|
@validator('lusid_instrument_id')
|
34
36
|
def lusid_instrument_id_validate_regular_expression(cls, value):
|
@@ -86,6 +88,16 @@ class InstrumentResolutionDetail(BaseModel):
|
|
86
88
|
if self.instrument_scope is None and "instrument_scope" in self.__fields_set__:
|
87
89
|
_dict['instrumentScope'] = None
|
88
90
|
|
91
|
+
# set to None if launch_price (nullable) is None
|
92
|
+
# and __fields_set__ contains the field
|
93
|
+
if self.launch_price is None and "launch_price" in self.__fields_set__:
|
94
|
+
_dict['launchPrice'] = None
|
95
|
+
|
96
|
+
# set to None if launch_date (nullable) is None
|
97
|
+
# and __fields_set__ contains the field
|
98
|
+
if self.launch_date is None and "launch_date" in self.__fields_set__:
|
99
|
+
_dict['launchDate'] = None
|
100
|
+
|
89
101
|
return _dict
|
90
102
|
|
91
103
|
@classmethod
|
@@ -100,6 +112,8 @@ class InstrumentResolutionDetail(BaseModel):
|
|
100
112
|
_obj = InstrumentResolutionDetail.parse_obj({
|
101
113
|
"instrument_identifiers": obj.get("instrumentIdentifiers"),
|
102
114
|
"lusid_instrument_id": obj.get("lusidInstrumentId"),
|
103
|
-
"instrument_scope": obj.get("instrumentScope")
|
115
|
+
"instrument_scope": obj.get("instrumentScope"),
|
116
|
+
"launch_price": obj.get("launchPrice"),
|
117
|
+
"launch_date": obj.get("launchDate")
|
104
118
|
})
|
105
119
|
return _obj
|
@@ -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"),
|