lusid-sdk 2.0.470__py3-none-any.whl → 2.0.485__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/funds_api.py +933 -54
- lusid/configuration.py +1 -1
- lusid/extensions/api_client_factory.py +4 -1
- lusid/models/__init__.py +8 -0
- lusid/models/instrument_event_configuration.py +8 -2
- lusid/models/order_graph_block_order_synopsis.py +9 -2
- lusid/models/order_graph_block_placement_synopsis.py +9 -2
- lusid/models/transaction_property_map.py +9 -8
- lusid/models/upsert_valuation_point_request.py +135 -0
- lusid/models/valuation_point_data_query_parameters.py +73 -0
- lusid/models/valuation_point_data_request.py +76 -0
- lusid/models/valuation_point_data_response.py +107 -0
- {lusid_sdk-2.0.470.dist-info → lusid_sdk-2.0.485.dist-info}/METADATA +14 -6
- {lusid_sdk-2.0.470.dist-info → lusid_sdk-2.0.485.dist-info}/RECORD +16 -12
- {lusid_sdk-2.0.470.dist-info → lusid_sdk-2.0.485.dist-info}/WHEEL +0 -0
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.6432\n"\
|
|
377
377
|
"SDK Package Version: {package_version}".\
|
|
378
378
|
format(env=sys.platform, pyversion=sys.version, package_version=package_version)
|
|
379
379
|
|
|
@@ -184,6 +184,7 @@ class ApiClientFactory:
|
|
|
184
184
|
A list of aiohttp TraceConfigs, used to set up request tracing.
|
|
185
185
|
by default None
|
|
186
186
|
"""
|
|
187
|
+
is_owner = True
|
|
187
188
|
api_config = get_api_configuration(config_loaders=config_loaders)
|
|
188
189
|
api_client_config = api_config.build_api_client_config(
|
|
189
190
|
tcp_keep_alive=tcp_keep_alive,
|
|
@@ -197,6 +198,7 @@ class ApiClientFactory:
|
|
|
197
198
|
try:
|
|
198
199
|
if client_session is not None:
|
|
199
200
|
connector = client_session.connector
|
|
201
|
+
is_owner = False
|
|
200
202
|
# by default take explicitly passed trace_config param
|
|
201
203
|
# otherwise copy from session.
|
|
202
204
|
trace_configs = trace_configs or client_session.trace_configs
|
|
@@ -209,7 +211,8 @@ class ApiClientFactory:
|
|
|
209
211
|
rc.pool_manager = ClientSession(
|
|
210
212
|
connector=connector,
|
|
211
213
|
trust_env=True,
|
|
212
|
-
trace_configs=trace_configs
|
|
214
|
+
trace_configs=trace_configs,
|
|
215
|
+
connector_owner=is_owner
|
|
213
216
|
)
|
|
214
217
|
except AttributeError:
|
|
215
218
|
logger.exception("client_session must be an aiohttp.ClientSession"
|
lusid/models/__init__.py
CHANGED
|
@@ -909,7 +909,11 @@ from lusid.models.upsert_structured_data_response import UpsertStructuredDataRes
|
|
|
909
909
|
from lusid.models.upsert_structured_result_data_request import UpsertStructuredResultDataRequest
|
|
910
910
|
from lusid.models.upsert_transaction_properties_response import UpsertTransactionPropertiesResponse
|
|
911
911
|
from lusid.models.upsert_translation_script_request import UpsertTranslationScriptRequest
|
|
912
|
+
from lusid.models.upsert_valuation_point_request import UpsertValuationPointRequest
|
|
912
913
|
from lusid.models.user import User
|
|
914
|
+
from lusid.models.valuation_point_data_query_parameters import ValuationPointDataQueryParameters
|
|
915
|
+
from lusid.models.valuation_point_data_request import ValuationPointDataRequest
|
|
916
|
+
from lusid.models.valuation_point_data_response import ValuationPointDataResponse
|
|
913
917
|
from lusid.models.valuation_request import ValuationRequest
|
|
914
918
|
from lusid.models.valuation_schedule import ValuationSchedule
|
|
915
919
|
from lusid.models.valuations_reconciliation_request import ValuationsReconciliationRequest
|
|
@@ -1835,7 +1839,11 @@ __all__ = [
|
|
|
1835
1839
|
"UpsertStructuredResultDataRequest",
|
|
1836
1840
|
"UpsertTransactionPropertiesResponse",
|
|
1837
1841
|
"UpsertTranslationScriptRequest",
|
|
1842
|
+
"UpsertValuationPointRequest",
|
|
1838
1843
|
"User",
|
|
1844
|
+
"ValuationPointDataQueryParameters",
|
|
1845
|
+
"ValuationPointDataRequest",
|
|
1846
|
+
"ValuationPointDataResponse",
|
|
1839
1847
|
"ValuationRequest",
|
|
1840
1848
|
"ValuationSchedule",
|
|
1841
1849
|
"ValuationsReconciliationRequest",
|
|
@@ -20,13 +20,15 @@ import json
|
|
|
20
20
|
|
|
21
21
|
from typing import Any, Dict, List, Optional
|
|
22
22
|
from pydantic import BaseModel, Field, StrictStr, conlist
|
|
23
|
+
from lusid.models.resource_id import ResourceId
|
|
23
24
|
|
|
24
25
|
class InstrumentEventConfiguration(BaseModel):
|
|
25
26
|
"""
|
|
26
27
|
InstrumentEventConfiguration
|
|
27
28
|
"""
|
|
28
29
|
transaction_template_scopes: Optional[conlist(StrictStr)] = Field(None, alias="transactionTemplateScopes")
|
|
29
|
-
|
|
30
|
+
recipe_id: Optional[ResourceId] = Field(None, alias="recipeId")
|
|
31
|
+
__properties = ["transactionTemplateScopes", "recipeId"]
|
|
30
32
|
|
|
31
33
|
class Config:
|
|
32
34
|
"""Pydantic configuration"""
|
|
@@ -52,6 +54,9 @@ class InstrumentEventConfiguration(BaseModel):
|
|
|
52
54
|
exclude={
|
|
53
55
|
},
|
|
54
56
|
exclude_none=True)
|
|
57
|
+
# override the default output from pydantic by calling `to_dict()` of recipe_id
|
|
58
|
+
if self.recipe_id:
|
|
59
|
+
_dict['recipeId'] = self.recipe_id.to_dict()
|
|
55
60
|
# set to None if transaction_template_scopes (nullable) is None
|
|
56
61
|
# and __fields_set__ contains the field
|
|
57
62
|
if self.transaction_template_scopes is None and "transaction_template_scopes" in self.__fields_set__:
|
|
@@ -69,6 +74,7 @@ class InstrumentEventConfiguration(BaseModel):
|
|
|
69
74
|
return InstrumentEventConfiguration.parse_obj(obj)
|
|
70
75
|
|
|
71
76
|
_obj = InstrumentEventConfiguration.parse_obj({
|
|
72
|
-
"transaction_template_scopes": obj.get("transactionTemplateScopes")
|
|
77
|
+
"transaction_template_scopes": obj.get("transactionTemplateScopes"),
|
|
78
|
+
"recipe_id": ResourceId.from_dict(obj.get("recipeId")) if obj.get("recipeId") is not None else None
|
|
73
79
|
})
|
|
74
80
|
return _obj
|
|
@@ -18,7 +18,7 @@ import re # noqa: F401
|
|
|
18
18
|
import json
|
|
19
19
|
|
|
20
20
|
|
|
21
|
-
from typing import Any, Dict, List, Union
|
|
21
|
+
from typing import Any, Dict, List, Optional, Union
|
|
22
22
|
from pydantic import BaseModel, Field, StrictFloat, StrictInt, conlist
|
|
23
23
|
from lusid.models.order_graph_block_order_detail import OrderGraphBlockOrderDetail
|
|
24
24
|
|
|
@@ -27,8 +27,9 @@ class OrderGraphBlockOrderSynopsis(BaseModel):
|
|
|
27
27
|
OrderGraphBlockOrderSynopsis
|
|
28
28
|
"""
|
|
29
29
|
quantity: Union[StrictFloat, StrictInt] = Field(..., description="Total number of units ordered.")
|
|
30
|
+
quantity_by_state: Optional[Dict[str, Union[StrictFloat, StrictInt]]] = Field(None, alias="quantityByState", description="Total number of units placed.")
|
|
30
31
|
details: conlist(OrderGraphBlockOrderDetail) = Field(..., description="Identifiers and other info for each order in this block.")
|
|
31
|
-
__properties = ["quantity", "details"]
|
|
32
|
+
__properties = ["quantity", "quantityByState", "details"]
|
|
32
33
|
|
|
33
34
|
class Config:
|
|
34
35
|
"""Pydantic configuration"""
|
|
@@ -61,6 +62,11 @@ class OrderGraphBlockOrderSynopsis(BaseModel):
|
|
|
61
62
|
if _item:
|
|
62
63
|
_items.append(_item.to_dict())
|
|
63
64
|
_dict['details'] = _items
|
|
65
|
+
# set to None if quantity_by_state (nullable) is None
|
|
66
|
+
# and __fields_set__ contains the field
|
|
67
|
+
if self.quantity_by_state is None and "quantity_by_state" in self.__fields_set__:
|
|
68
|
+
_dict['quantityByState'] = None
|
|
69
|
+
|
|
64
70
|
return _dict
|
|
65
71
|
|
|
66
72
|
@classmethod
|
|
@@ -74,6 +80,7 @@ class OrderGraphBlockOrderSynopsis(BaseModel):
|
|
|
74
80
|
|
|
75
81
|
_obj = OrderGraphBlockOrderSynopsis.parse_obj({
|
|
76
82
|
"quantity": obj.get("quantity"),
|
|
83
|
+
"quantity_by_state": obj.get("quantityByState"),
|
|
77
84
|
"details": [OrderGraphBlockOrderDetail.from_dict(_item) for _item in obj.get("details")] if obj.get("details") is not None else None
|
|
78
85
|
})
|
|
79
86
|
return _obj
|
|
@@ -18,7 +18,7 @@ import re # noqa: F401
|
|
|
18
18
|
import json
|
|
19
19
|
|
|
20
20
|
|
|
21
|
-
from typing import Any, Dict, List, Union
|
|
21
|
+
from typing import Any, Dict, List, Optional, Union
|
|
22
22
|
from pydantic import BaseModel, Field, StrictFloat, StrictInt, conlist
|
|
23
23
|
from lusid.models.order_graph_block_placement_detail import OrderGraphBlockPlacementDetail
|
|
24
24
|
|
|
@@ -27,8 +27,9 @@ class OrderGraphBlockPlacementSynopsis(BaseModel):
|
|
|
27
27
|
OrderGraphBlockPlacementSynopsis
|
|
28
28
|
"""
|
|
29
29
|
quantity: Union[StrictFloat, StrictInt] = Field(..., description="Total number of units placed.")
|
|
30
|
+
quantity_by_state: Optional[Dict[str, Union[StrictFloat, StrictInt]]] = Field(None, alias="quantityByState", description="Total number of units placed.")
|
|
30
31
|
details: conlist(OrderGraphBlockPlacementDetail) = Field(..., description="Identifiers for each placement in this block.")
|
|
31
|
-
__properties = ["quantity", "details"]
|
|
32
|
+
__properties = ["quantity", "quantityByState", "details"]
|
|
32
33
|
|
|
33
34
|
class Config:
|
|
34
35
|
"""Pydantic configuration"""
|
|
@@ -61,6 +62,11 @@ class OrderGraphBlockPlacementSynopsis(BaseModel):
|
|
|
61
62
|
if _item:
|
|
62
63
|
_items.append(_item.to_dict())
|
|
63
64
|
_dict['details'] = _items
|
|
65
|
+
# set to None if quantity_by_state (nullable) is None
|
|
66
|
+
# and __fields_set__ contains the field
|
|
67
|
+
if self.quantity_by_state is None and "quantity_by_state" in self.__fields_set__:
|
|
68
|
+
_dict['quantityByState'] = None
|
|
69
|
+
|
|
64
70
|
return _dict
|
|
65
71
|
|
|
66
72
|
@classmethod
|
|
@@ -74,6 +80,7 @@ class OrderGraphBlockPlacementSynopsis(BaseModel):
|
|
|
74
80
|
|
|
75
81
|
_obj = OrderGraphBlockPlacementSynopsis.parse_obj({
|
|
76
82
|
"quantity": obj.get("quantity"),
|
|
83
|
+
"quantity_by_state": obj.get("quantityByState"),
|
|
77
84
|
"details": [OrderGraphBlockPlacementDetail.from_dict(_item) for _item in obj.get("details")] if obj.get("details") is not None else None
|
|
78
85
|
})
|
|
79
86
|
return _obj
|
|
@@ -19,16 +19,15 @@ import json
|
|
|
19
19
|
|
|
20
20
|
|
|
21
21
|
from typing import Any, Dict, Optional
|
|
22
|
-
from pydantic import BaseModel, Field, StrictStr
|
|
23
|
-
from lusid.models.property_value import PropertyValue
|
|
22
|
+
from pydantic import BaseModel, Field, StrictStr, constr
|
|
24
23
|
|
|
25
24
|
class TransactionPropertyMap(BaseModel):
|
|
26
25
|
"""
|
|
27
26
|
TransactionPropertyMap
|
|
28
27
|
"""
|
|
29
28
|
property_key: Optional[StrictStr] = Field(None, alias="propertyKey", description="The key that uniquely identifies the property. It has the format {domain}/{scope}/{code}.")
|
|
30
|
-
|
|
31
|
-
__properties = ["propertyKey", "
|
|
29
|
+
value: Optional[constr(strict=True, max_length=1024, min_length=0)] = None
|
|
30
|
+
__properties = ["propertyKey", "value"]
|
|
32
31
|
|
|
33
32
|
class Config:
|
|
34
33
|
"""Pydantic configuration"""
|
|
@@ -54,14 +53,16 @@ class TransactionPropertyMap(BaseModel):
|
|
|
54
53
|
exclude={
|
|
55
54
|
},
|
|
56
55
|
exclude_none=True)
|
|
57
|
-
# override the default output from pydantic by calling `to_dict()` of property_value
|
|
58
|
-
if self.property_value:
|
|
59
|
-
_dict['propertyValue'] = self.property_value.to_dict()
|
|
60
56
|
# set to None if property_key (nullable) is None
|
|
61
57
|
# and __fields_set__ contains the field
|
|
62
58
|
if self.property_key is None and "property_key" in self.__fields_set__:
|
|
63
59
|
_dict['propertyKey'] = None
|
|
64
60
|
|
|
61
|
+
# set to None if value (nullable) is None
|
|
62
|
+
# and __fields_set__ contains the field
|
|
63
|
+
if self.value is None and "value" in self.__fields_set__:
|
|
64
|
+
_dict['value'] = None
|
|
65
|
+
|
|
65
66
|
return _dict
|
|
66
67
|
|
|
67
68
|
@classmethod
|
|
@@ -75,6 +76,6 @@ class TransactionPropertyMap(BaseModel):
|
|
|
75
76
|
|
|
76
77
|
_obj = TransactionPropertyMap.parse_obj({
|
|
77
78
|
"property_key": obj.get("propertyKey"),
|
|
78
|
-
"
|
|
79
|
+
"value": obj.get("value")
|
|
79
80
|
})
|
|
80
81
|
return _obj
|
|
@@ -0,0 +1,135 @@
|
|
|
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 import BaseModel, Field, constr, validator
|
|
23
|
+
from lusid.models.model_property import ModelProperty
|
|
24
|
+
|
|
25
|
+
class UpsertValuationPointRequest(BaseModel):
|
|
26
|
+
"""
|
|
27
|
+
A definition for the period you wish to close # noqa: E501
|
|
28
|
+
"""
|
|
29
|
+
diary_entry_code: Optional[constr(strict=True, max_length=64, min_length=1)] = Field(None, alias="diaryEntryCode", description="Unique code for the Valuation Point.")
|
|
30
|
+
name: Optional[constr(strict=True, max_length=512, min_length=1)] = Field(None, description="Identifiable Name assigned to the Valuation Point.")
|
|
31
|
+
effective_at: Optional[datetime] = Field(None, alias="effectiveAt", description="The effective time of the diary entry.")
|
|
32
|
+
query_as_at: Optional[datetime] = Field(None, alias="queryAsAt", description="The query time of the diary entry. Defaults to latest.")
|
|
33
|
+
properties: Optional[Dict[str, ModelProperty]] = Field(None, description="A set of properties for the diary entry.")
|
|
34
|
+
__properties = ["diaryEntryCode", "name", "effectiveAt", "queryAsAt", "properties"]
|
|
35
|
+
|
|
36
|
+
@validator('diary_entry_code')
|
|
37
|
+
def diary_entry_code_validate_regular_expression(cls, value):
|
|
38
|
+
"""Validates the regular expression"""
|
|
39
|
+
if value is None:
|
|
40
|
+
return value
|
|
41
|
+
|
|
42
|
+
if not re.match(r"^[a-zA-Z0-9\-_]+$", value):
|
|
43
|
+
raise ValueError(r"must validate the regular expression /^[a-zA-Z0-9\-_]+$/")
|
|
44
|
+
return value
|
|
45
|
+
|
|
46
|
+
@validator('name')
|
|
47
|
+
def name_validate_regular_expression(cls, value):
|
|
48
|
+
"""Validates the regular expression"""
|
|
49
|
+
if value is None:
|
|
50
|
+
return value
|
|
51
|
+
|
|
52
|
+
if not re.match(r"^[\s\S]*$", value):
|
|
53
|
+
raise ValueError(r"must validate the regular expression /^[\s\S]*$/")
|
|
54
|
+
return value
|
|
55
|
+
|
|
56
|
+
class Config:
|
|
57
|
+
"""Pydantic configuration"""
|
|
58
|
+
allow_population_by_field_name = True
|
|
59
|
+
validate_assignment = True
|
|
60
|
+
|
|
61
|
+
def to_str(self) -> str:
|
|
62
|
+
"""Returns the string representation of the model using alias"""
|
|
63
|
+
return pprint.pformat(self.dict(by_alias=True))
|
|
64
|
+
|
|
65
|
+
def to_json(self) -> str:
|
|
66
|
+
"""Returns the JSON representation of the model using alias"""
|
|
67
|
+
return json.dumps(self.to_dict())
|
|
68
|
+
|
|
69
|
+
@classmethod
|
|
70
|
+
def from_json(cls, json_str: str) -> UpsertValuationPointRequest:
|
|
71
|
+
"""Create an instance of UpsertValuationPointRequest from a JSON string"""
|
|
72
|
+
return cls.from_dict(json.loads(json_str))
|
|
73
|
+
|
|
74
|
+
def to_dict(self):
|
|
75
|
+
"""Returns the dictionary representation of the model using alias"""
|
|
76
|
+
_dict = self.dict(by_alias=True,
|
|
77
|
+
exclude={
|
|
78
|
+
},
|
|
79
|
+
exclude_none=True)
|
|
80
|
+
# override the default output from pydantic by calling `to_dict()` of each value in properties (dict)
|
|
81
|
+
_field_dict = {}
|
|
82
|
+
if self.properties:
|
|
83
|
+
for _key in self.properties:
|
|
84
|
+
if self.properties[_key]:
|
|
85
|
+
_field_dict[_key] = self.properties[_key].to_dict()
|
|
86
|
+
_dict['properties'] = _field_dict
|
|
87
|
+
# set to None if diary_entry_code (nullable) is None
|
|
88
|
+
# and __fields_set__ contains the field
|
|
89
|
+
if self.diary_entry_code is None and "diary_entry_code" in self.__fields_set__:
|
|
90
|
+
_dict['diaryEntryCode'] = None
|
|
91
|
+
|
|
92
|
+
# set to None if name (nullable) is None
|
|
93
|
+
# and __fields_set__ contains the field
|
|
94
|
+
if self.name is None and "name" in self.__fields_set__:
|
|
95
|
+
_dict['name'] = None
|
|
96
|
+
|
|
97
|
+
# set to None if effective_at (nullable) is None
|
|
98
|
+
# and __fields_set__ contains the field
|
|
99
|
+
if self.effective_at is None and "effective_at" in self.__fields_set__:
|
|
100
|
+
_dict['effectiveAt'] = None
|
|
101
|
+
|
|
102
|
+
# set to None if query_as_at (nullable) is None
|
|
103
|
+
# and __fields_set__ contains the field
|
|
104
|
+
if self.query_as_at is None and "query_as_at" in self.__fields_set__:
|
|
105
|
+
_dict['queryAsAt'] = None
|
|
106
|
+
|
|
107
|
+
# set to None if properties (nullable) is None
|
|
108
|
+
# and __fields_set__ contains the field
|
|
109
|
+
if self.properties is None and "properties" in self.__fields_set__:
|
|
110
|
+
_dict['properties'] = None
|
|
111
|
+
|
|
112
|
+
return _dict
|
|
113
|
+
|
|
114
|
+
@classmethod
|
|
115
|
+
def from_dict(cls, obj: dict) -> UpsertValuationPointRequest:
|
|
116
|
+
"""Create an instance of UpsertValuationPointRequest from a dict"""
|
|
117
|
+
if obj is None:
|
|
118
|
+
return None
|
|
119
|
+
|
|
120
|
+
if not isinstance(obj, dict):
|
|
121
|
+
return UpsertValuationPointRequest.parse_obj(obj)
|
|
122
|
+
|
|
123
|
+
_obj = UpsertValuationPointRequest.parse_obj({
|
|
124
|
+
"diary_entry_code": obj.get("diaryEntryCode"),
|
|
125
|
+
"name": obj.get("name"),
|
|
126
|
+
"effective_at": obj.get("effectiveAt"),
|
|
127
|
+
"query_as_at": obj.get("queryAsAt"),
|
|
128
|
+
"properties": dict(
|
|
129
|
+
(_k, ModelProperty.from_dict(_v))
|
|
130
|
+
for _k, _v in obj.get("properties").items()
|
|
131
|
+
)
|
|
132
|
+
if obj.get("properties") is not None
|
|
133
|
+
else None
|
|
134
|
+
})
|
|
135
|
+
return _obj
|
|
@@ -0,0 +1,73 @@
|
|
|
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
|
+
|
|
21
|
+
from typing import Any, Dict, Optional
|
|
22
|
+
from pydantic import BaseModel
|
|
23
|
+
from lusid.models.date_or_diary_entry import DateOrDiaryEntry
|
|
24
|
+
|
|
25
|
+
class ValuationPointDataQueryParameters(BaseModel):
|
|
26
|
+
"""
|
|
27
|
+
The parameters used in getting the ValuationPointData. # noqa: E501
|
|
28
|
+
"""
|
|
29
|
+
end: Optional[DateOrDiaryEntry] = None
|
|
30
|
+
__properties = ["end"]
|
|
31
|
+
|
|
32
|
+
class Config:
|
|
33
|
+
"""Pydantic configuration"""
|
|
34
|
+
allow_population_by_field_name = True
|
|
35
|
+
validate_assignment = True
|
|
36
|
+
|
|
37
|
+
def to_str(self) -> str:
|
|
38
|
+
"""Returns the string representation of the model using alias"""
|
|
39
|
+
return pprint.pformat(self.dict(by_alias=True))
|
|
40
|
+
|
|
41
|
+
def to_json(self) -> str:
|
|
42
|
+
"""Returns the JSON representation of the model using alias"""
|
|
43
|
+
return json.dumps(self.to_dict())
|
|
44
|
+
|
|
45
|
+
@classmethod
|
|
46
|
+
def from_json(cls, json_str: str) -> ValuationPointDataQueryParameters:
|
|
47
|
+
"""Create an instance of ValuationPointDataQueryParameters from a JSON string"""
|
|
48
|
+
return cls.from_dict(json.loads(json_str))
|
|
49
|
+
|
|
50
|
+
def to_dict(self):
|
|
51
|
+
"""Returns the dictionary representation of the model using alias"""
|
|
52
|
+
_dict = self.dict(by_alias=True,
|
|
53
|
+
exclude={
|
|
54
|
+
},
|
|
55
|
+
exclude_none=True)
|
|
56
|
+
# override the default output from pydantic by calling `to_dict()` of end
|
|
57
|
+
if self.end:
|
|
58
|
+
_dict['end'] = self.end.to_dict()
|
|
59
|
+
return _dict
|
|
60
|
+
|
|
61
|
+
@classmethod
|
|
62
|
+
def from_dict(cls, obj: dict) -> ValuationPointDataQueryParameters:
|
|
63
|
+
"""Create an instance of ValuationPointDataQueryParameters from a dict"""
|
|
64
|
+
if obj is None:
|
|
65
|
+
return None
|
|
66
|
+
|
|
67
|
+
if not isinstance(obj, dict):
|
|
68
|
+
return ValuationPointDataQueryParameters.parse_obj(obj)
|
|
69
|
+
|
|
70
|
+
_obj = ValuationPointDataQueryParameters.parse_obj({
|
|
71
|
+
"end": DateOrDiaryEntry.from_dict(obj.get("end")) if obj.get("end") is not None else None
|
|
72
|
+
})
|
|
73
|
+
return _obj
|
|
@@ -0,0 +1,76 @@
|
|
|
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
|
+
|
|
21
|
+
from typing import Any, Dict
|
|
22
|
+
from pydantic import BaseModel, Field, constr, validator
|
|
23
|
+
|
|
24
|
+
class ValuationPointDataRequest(BaseModel):
|
|
25
|
+
"""
|
|
26
|
+
The ValuationPointDataRequest. # noqa: E501
|
|
27
|
+
"""
|
|
28
|
+
diary_entry_code: constr(strict=True, max_length=64, min_length=1) = Field(..., alias="diaryEntryCode", description="Unique code for the Valuation Point.")
|
|
29
|
+
__properties = ["diaryEntryCode"]
|
|
30
|
+
|
|
31
|
+
@validator('diary_entry_code')
|
|
32
|
+
def diary_entry_code_validate_regular_expression(cls, value):
|
|
33
|
+
"""Validates the regular expression"""
|
|
34
|
+
if not re.match(r"^[a-zA-Z0-9\-_]+$", value):
|
|
35
|
+
raise ValueError(r"must validate the regular expression /^[a-zA-Z0-9\-_]+$/")
|
|
36
|
+
return value
|
|
37
|
+
|
|
38
|
+
class Config:
|
|
39
|
+
"""Pydantic configuration"""
|
|
40
|
+
allow_population_by_field_name = True
|
|
41
|
+
validate_assignment = True
|
|
42
|
+
|
|
43
|
+
def to_str(self) -> str:
|
|
44
|
+
"""Returns the string representation of the model using alias"""
|
|
45
|
+
return pprint.pformat(self.dict(by_alias=True))
|
|
46
|
+
|
|
47
|
+
def to_json(self) -> str:
|
|
48
|
+
"""Returns the JSON representation of the model using alias"""
|
|
49
|
+
return json.dumps(self.to_dict())
|
|
50
|
+
|
|
51
|
+
@classmethod
|
|
52
|
+
def from_json(cls, json_str: str) -> ValuationPointDataRequest:
|
|
53
|
+
"""Create an instance of ValuationPointDataRequest from a JSON string"""
|
|
54
|
+
return cls.from_dict(json.loads(json_str))
|
|
55
|
+
|
|
56
|
+
def to_dict(self):
|
|
57
|
+
"""Returns the dictionary representation of the model using alias"""
|
|
58
|
+
_dict = self.dict(by_alias=True,
|
|
59
|
+
exclude={
|
|
60
|
+
},
|
|
61
|
+
exclude_none=True)
|
|
62
|
+
return _dict
|
|
63
|
+
|
|
64
|
+
@classmethod
|
|
65
|
+
def from_dict(cls, obj: dict) -> ValuationPointDataRequest:
|
|
66
|
+
"""Create an instance of ValuationPointDataRequest from a dict"""
|
|
67
|
+
if obj is None:
|
|
68
|
+
return None
|
|
69
|
+
|
|
70
|
+
if not isinstance(obj, dict):
|
|
71
|
+
return ValuationPointDataRequest.parse_obj(obj)
|
|
72
|
+
|
|
73
|
+
_obj = ValuationPointDataRequest.parse_obj({
|
|
74
|
+
"diary_entry_code": obj.get("diaryEntryCode")
|
|
75
|
+
})
|
|
76
|
+
return _obj
|
|
@@ -0,0 +1,107 @@
|
|
|
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
|
+
|
|
21
|
+
from typing import Any, Dict, List, Optional, Union
|
|
22
|
+
from pydantic import BaseModel, Field, StrictFloat, StrictInt, StrictStr, conlist, constr
|
|
23
|
+
from lusid.models.link import Link
|
|
24
|
+
|
|
25
|
+
class ValuationPointDataResponse(BaseModel):
|
|
26
|
+
"""
|
|
27
|
+
The Valuation Point Data Response for the Fund and specified date. # noqa: E501
|
|
28
|
+
"""
|
|
29
|
+
href: Optional[StrictStr] = Field(None, description="The specific Uniform Resource Identifier (URI) for this resource at the requested effective and asAt datetime.")
|
|
30
|
+
type: constr(strict=True, min_length=1) = Field(..., description="The Type of the associated Diary Entry ('PeriodBoundary','ValuationPoint','Other' or 'Adhoc' when a diary Entry wasn't used).")
|
|
31
|
+
status: constr(strict=True, min_length=1) = Field(..., description="The Status of the associated Diary Entry ('Estimate','Final','Candidate' or 'Unofficial').")
|
|
32
|
+
backout: Dict[str, Union[StrictFloat, StrictInt]] = Field(..., description="Bucket of detail for the Valuation Point, where data points have been 'backed out'.")
|
|
33
|
+
dealing: Dict[str, Union[StrictFloat, StrictInt]] = Field(..., description="Bucket of detail for any 'Dealing' that has occured inside the queried period.")
|
|
34
|
+
pn_l: Dict[str, Union[StrictFloat, StrictInt]] = Field(..., alias="pnL", description="Bucket of detail for 'PnL' that has occured inside the queried period.")
|
|
35
|
+
gav: Union[StrictFloat, StrictInt] = Field(..., description="The Gross Asset Value of the Fund at the Period end. This is effectively a summation of all Trial balance entries linked to accounts of types 'Asset' and 'Liabilities'.")
|
|
36
|
+
fees: Dict[str, Union[StrictFloat, StrictInt]] = Field(..., description="Bucket of detail for any 'Fees' that have been charged in the selected period.")
|
|
37
|
+
nav: Union[StrictFloat, StrictInt] = Field(..., description="The Net Asset Value of the Fund at the Period end. This represents the GAV with any fees applied in the period.")
|
|
38
|
+
previous_nav: Union[StrictFloat, StrictInt] = Field(..., alias="previousNav", description="The Net Asset Value of the Fund at the End of the last Period.")
|
|
39
|
+
links: Optional[conlist(Link)] = None
|
|
40
|
+
__properties = ["href", "type", "status", "backout", "dealing", "pnL", "gav", "fees", "nav", "previousNav", "links"]
|
|
41
|
+
|
|
42
|
+
class Config:
|
|
43
|
+
"""Pydantic configuration"""
|
|
44
|
+
allow_population_by_field_name = True
|
|
45
|
+
validate_assignment = True
|
|
46
|
+
|
|
47
|
+
def to_str(self) -> str:
|
|
48
|
+
"""Returns the string representation of the model using alias"""
|
|
49
|
+
return pprint.pformat(self.dict(by_alias=True))
|
|
50
|
+
|
|
51
|
+
def to_json(self) -> str:
|
|
52
|
+
"""Returns the JSON representation of the model using alias"""
|
|
53
|
+
return json.dumps(self.to_dict())
|
|
54
|
+
|
|
55
|
+
@classmethod
|
|
56
|
+
def from_json(cls, json_str: str) -> ValuationPointDataResponse:
|
|
57
|
+
"""Create an instance of ValuationPointDataResponse from a JSON string"""
|
|
58
|
+
return cls.from_dict(json.loads(json_str))
|
|
59
|
+
|
|
60
|
+
def to_dict(self):
|
|
61
|
+
"""Returns the dictionary representation of the model using alias"""
|
|
62
|
+
_dict = self.dict(by_alias=True,
|
|
63
|
+
exclude={
|
|
64
|
+
},
|
|
65
|
+
exclude_none=True)
|
|
66
|
+
# override the default output from pydantic by calling `to_dict()` of each item in links (list)
|
|
67
|
+
_items = []
|
|
68
|
+
if self.links:
|
|
69
|
+
for _item in self.links:
|
|
70
|
+
if _item:
|
|
71
|
+
_items.append(_item.to_dict())
|
|
72
|
+
_dict['links'] = _items
|
|
73
|
+
# set to None if href (nullable) is None
|
|
74
|
+
# and __fields_set__ contains the field
|
|
75
|
+
if self.href is None and "href" in self.__fields_set__:
|
|
76
|
+
_dict['href'] = None
|
|
77
|
+
|
|
78
|
+
# set to None if links (nullable) is None
|
|
79
|
+
# and __fields_set__ contains the field
|
|
80
|
+
if self.links is None and "links" in self.__fields_set__:
|
|
81
|
+
_dict['links'] = None
|
|
82
|
+
|
|
83
|
+
return _dict
|
|
84
|
+
|
|
85
|
+
@classmethod
|
|
86
|
+
def from_dict(cls, obj: dict) -> ValuationPointDataResponse:
|
|
87
|
+
"""Create an instance of ValuationPointDataResponse from a dict"""
|
|
88
|
+
if obj is None:
|
|
89
|
+
return None
|
|
90
|
+
|
|
91
|
+
if not isinstance(obj, dict):
|
|
92
|
+
return ValuationPointDataResponse.parse_obj(obj)
|
|
93
|
+
|
|
94
|
+
_obj = ValuationPointDataResponse.parse_obj({
|
|
95
|
+
"href": obj.get("href"),
|
|
96
|
+
"type": obj.get("type"),
|
|
97
|
+
"status": obj.get("status"),
|
|
98
|
+
"backout": obj.get("backout"),
|
|
99
|
+
"dealing": obj.get("dealing"),
|
|
100
|
+
"pn_l": obj.get("pnL"),
|
|
101
|
+
"gav": obj.get("gav"),
|
|
102
|
+
"fees": obj.get("fees"),
|
|
103
|
+
"nav": obj.get("nav"),
|
|
104
|
+
"previous_nav": obj.get("previousNav"),
|
|
105
|
+
"links": [Link.from_dict(_item) for _item in obj.get("links")] if obj.get("links") is not None else None
|
|
106
|
+
})
|
|
107
|
+
return _obj
|