lusid-sdk 2.1.279__py3-none-any.whl → 2.1.280__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 +22 -0
- lusid/configuration.py +1 -1
- lusid/models/__init__.py +22 -0
- lusid/models/fund_amount.py +69 -0
- lusid/models/fund_previous_nav.py +69 -0
- lusid/models/fund_valuation_point_data.py +160 -0
- lusid/models/previous_fund_valuation_point_data.py +79 -0
- lusid/models/previous_nav.py +73 -0
- lusid/models/previous_share_class_breakdown.py +81 -0
- lusid/models/share_class_amount.py +73 -0
- lusid/models/share_class_breakdown.py +171 -0
- lusid/models/share_class_data.py +79 -0
- lusid/models/share_class_details.py +108 -0
- lusid/models/unitisation_data.py +73 -0
- lusid/models/valuation_point_data_response.py +30 -9
- {lusid_sdk-2.1.279.dist-info → lusid_sdk-2.1.280.dist-info}/METADATA +14 -3
- {lusid_sdk-2.1.279.dist-info → lusid_sdk-2.1.280.dist-info}/RECORD +18 -7
- {lusid_sdk-2.1.279.dist-info → lusid_sdk-2.1.280.dist-info}/WHEEL +0 -0
|
@@ -0,0 +1,81 @@
|
|
|
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, Union
|
|
22
|
+
from pydantic.v1 import BaseModel, Field, StrictFloat, StrictInt
|
|
23
|
+
from lusid.models.previous_nav import PreviousNAV
|
|
24
|
+
from lusid.models.unitisation_data import UnitisationData
|
|
25
|
+
|
|
26
|
+
class PreviousShareClassBreakdown(BaseModel):
|
|
27
|
+
"""
|
|
28
|
+
The data for a Share Class at the previous valuation point. # noqa: E501
|
|
29
|
+
"""
|
|
30
|
+
nav: PreviousNAV = Field(...)
|
|
31
|
+
unitisation: Optional[UnitisationData] = None
|
|
32
|
+
share_class_to_fund_fx_rate: Union[StrictFloat, StrictInt] = Field(..., alias="shareClassToFundFxRate", description="The fx rate from the Share Class currency to the fund currency at this valuation point.")
|
|
33
|
+
__properties = ["nav", "unitisation", "shareClassToFundFxRate"]
|
|
34
|
+
|
|
35
|
+
class Config:
|
|
36
|
+
"""Pydantic configuration"""
|
|
37
|
+
allow_population_by_field_name = True
|
|
38
|
+
validate_assignment = True
|
|
39
|
+
|
|
40
|
+
def to_str(self) -> str:
|
|
41
|
+
"""Returns the string representation of the model using alias"""
|
|
42
|
+
return pprint.pformat(self.dict(by_alias=True))
|
|
43
|
+
|
|
44
|
+
def to_json(self) -> str:
|
|
45
|
+
"""Returns the JSON representation of the model using alias"""
|
|
46
|
+
return json.dumps(self.to_dict())
|
|
47
|
+
|
|
48
|
+
@classmethod
|
|
49
|
+
def from_json(cls, json_str: str) -> PreviousShareClassBreakdown:
|
|
50
|
+
"""Create an instance of PreviousShareClassBreakdown from a JSON string"""
|
|
51
|
+
return cls.from_dict(json.loads(json_str))
|
|
52
|
+
|
|
53
|
+
def to_dict(self):
|
|
54
|
+
"""Returns the dictionary representation of the model using alias"""
|
|
55
|
+
_dict = self.dict(by_alias=True,
|
|
56
|
+
exclude={
|
|
57
|
+
},
|
|
58
|
+
exclude_none=True)
|
|
59
|
+
# override the default output from pydantic by calling `to_dict()` of nav
|
|
60
|
+
if self.nav:
|
|
61
|
+
_dict['nav'] = self.nav.to_dict()
|
|
62
|
+
# override the default output from pydantic by calling `to_dict()` of unitisation
|
|
63
|
+
if self.unitisation:
|
|
64
|
+
_dict['unitisation'] = self.unitisation.to_dict()
|
|
65
|
+
return _dict
|
|
66
|
+
|
|
67
|
+
@classmethod
|
|
68
|
+
def from_dict(cls, obj: dict) -> PreviousShareClassBreakdown:
|
|
69
|
+
"""Create an instance of PreviousShareClassBreakdown from a dict"""
|
|
70
|
+
if obj is None:
|
|
71
|
+
return None
|
|
72
|
+
|
|
73
|
+
if not isinstance(obj, dict):
|
|
74
|
+
return PreviousShareClassBreakdown.parse_obj(obj)
|
|
75
|
+
|
|
76
|
+
_obj = PreviousShareClassBreakdown.parse_obj({
|
|
77
|
+
"nav": PreviousNAV.from_dict(obj.get("nav")) if obj.get("nav") is not None else None,
|
|
78
|
+
"unitisation": UnitisationData.from_dict(obj.get("unitisation")) if obj.get("unitisation") is not None else None,
|
|
79
|
+
"share_class_to_fund_fx_rate": obj.get("shareClassToFundFxRate")
|
|
80
|
+
})
|
|
81
|
+
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.v1 import BaseModel
|
|
23
|
+
from lusid.models.multi_currency_amounts import MultiCurrencyAmounts
|
|
24
|
+
|
|
25
|
+
class ShareClassAmount(BaseModel):
|
|
26
|
+
"""
|
|
27
|
+
ShareClassAmount
|
|
28
|
+
"""
|
|
29
|
+
value: Optional[MultiCurrencyAmounts] = None
|
|
30
|
+
__properties = ["value"]
|
|
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) -> ShareClassAmount:
|
|
47
|
+
"""Create an instance of ShareClassAmount 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 value
|
|
57
|
+
if self.value:
|
|
58
|
+
_dict['value'] = self.value.to_dict()
|
|
59
|
+
return _dict
|
|
60
|
+
|
|
61
|
+
@classmethod
|
|
62
|
+
def from_dict(cls, obj: dict) -> ShareClassAmount:
|
|
63
|
+
"""Create an instance of ShareClassAmount from a dict"""
|
|
64
|
+
if obj is None:
|
|
65
|
+
return None
|
|
66
|
+
|
|
67
|
+
if not isinstance(obj, dict):
|
|
68
|
+
return ShareClassAmount.parse_obj(obj)
|
|
69
|
+
|
|
70
|
+
_obj = ShareClassAmount.parse_obj({
|
|
71
|
+
"value": MultiCurrencyAmounts.from_dict(obj.get("value")) if obj.get("value") is not None else None
|
|
72
|
+
})
|
|
73
|
+
return _obj
|
|
@@ -0,0 +1,171 @@
|
|
|
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, Union
|
|
22
|
+
from pydantic.v1 import BaseModel, Field, StrictFloat, StrictInt
|
|
23
|
+
from lusid.models.fee_accrual import FeeAccrual
|
|
24
|
+
from lusid.models.multi_currency_amounts import MultiCurrencyAmounts
|
|
25
|
+
from lusid.models.previous_share_class_breakdown import PreviousShareClassBreakdown
|
|
26
|
+
from lusid.models.share_class_amount import ShareClassAmount
|
|
27
|
+
from lusid.models.unitisation_data import UnitisationData
|
|
28
|
+
|
|
29
|
+
class ShareClassBreakdown(BaseModel):
|
|
30
|
+
"""
|
|
31
|
+
The Valuation Point Data for a Share Class on a specified date. # noqa: E501
|
|
32
|
+
"""
|
|
33
|
+
back_out: Dict[str, ShareClassAmount] = Field(..., alias="backOut", description="Bucket of detail for the Valuation Point where data points have been 'backed out'.")
|
|
34
|
+
dealing: Dict[str, ShareClassAmount] = Field(..., description="Bucket of detail for any 'Dealing' that has occured inside the queried period.")
|
|
35
|
+
pn_l: Dict[str, ShareClassAmount] = Field(..., alias="pnL", description="Bucket of detail for 'PnL' that has occured inside the queried period.")
|
|
36
|
+
gav: MultiCurrencyAmounts = Field(...)
|
|
37
|
+
fees: Dict[str, FeeAccrual] = Field(..., description="Bucket of detail for any 'Fees' that have been charged in the selected period.")
|
|
38
|
+
nav: MultiCurrencyAmounts = Field(...)
|
|
39
|
+
unitisation: Optional[UnitisationData] = None
|
|
40
|
+
miscellaneous: Optional[Dict[str, ShareClassAmount]] = Field(None, description="Not used directly by the LUSID engines but serves as a holding area for any custom derived data points that may be useful in, for example, fee calculations).")
|
|
41
|
+
share_class_to_fund_fx_rate: Union[StrictFloat, StrictInt] = Field(..., alias="shareClassToFundFxRate", description="The fx rate from the Share Class currency to the fund currency at this valuation point.")
|
|
42
|
+
capital_ratio: Union[StrictFloat, StrictInt] = Field(..., alias="capitalRatio", description="The proportion of the fund's adjusted beginning equity (ie: the sum of the previous NAV and the net dealing) that is invested in the share class.")
|
|
43
|
+
previous_share_class_breakdown: PreviousShareClassBreakdown = Field(..., alias="previousShareClassBreakdown")
|
|
44
|
+
__properties = ["backOut", "dealing", "pnL", "gav", "fees", "nav", "unitisation", "miscellaneous", "shareClassToFundFxRate", "capitalRatio", "previousShareClassBreakdown"]
|
|
45
|
+
|
|
46
|
+
class Config:
|
|
47
|
+
"""Pydantic configuration"""
|
|
48
|
+
allow_population_by_field_name = True
|
|
49
|
+
validate_assignment = True
|
|
50
|
+
|
|
51
|
+
def to_str(self) -> str:
|
|
52
|
+
"""Returns the string representation of the model using alias"""
|
|
53
|
+
return pprint.pformat(self.dict(by_alias=True))
|
|
54
|
+
|
|
55
|
+
def to_json(self) -> str:
|
|
56
|
+
"""Returns the JSON representation of the model using alias"""
|
|
57
|
+
return json.dumps(self.to_dict())
|
|
58
|
+
|
|
59
|
+
@classmethod
|
|
60
|
+
def from_json(cls, json_str: str) -> ShareClassBreakdown:
|
|
61
|
+
"""Create an instance of ShareClassBreakdown from a JSON string"""
|
|
62
|
+
return cls.from_dict(json.loads(json_str))
|
|
63
|
+
|
|
64
|
+
def to_dict(self):
|
|
65
|
+
"""Returns the dictionary representation of the model using alias"""
|
|
66
|
+
_dict = self.dict(by_alias=True,
|
|
67
|
+
exclude={
|
|
68
|
+
},
|
|
69
|
+
exclude_none=True)
|
|
70
|
+
# override the default output from pydantic by calling `to_dict()` of each value in back_out (dict)
|
|
71
|
+
_field_dict = {}
|
|
72
|
+
if self.back_out:
|
|
73
|
+
for _key in self.back_out:
|
|
74
|
+
if self.back_out[_key]:
|
|
75
|
+
_field_dict[_key] = self.back_out[_key].to_dict()
|
|
76
|
+
_dict['backOut'] = _field_dict
|
|
77
|
+
# override the default output from pydantic by calling `to_dict()` of each value in dealing (dict)
|
|
78
|
+
_field_dict = {}
|
|
79
|
+
if self.dealing:
|
|
80
|
+
for _key in self.dealing:
|
|
81
|
+
if self.dealing[_key]:
|
|
82
|
+
_field_dict[_key] = self.dealing[_key].to_dict()
|
|
83
|
+
_dict['dealing'] = _field_dict
|
|
84
|
+
# override the default output from pydantic by calling `to_dict()` of each value in pn_l (dict)
|
|
85
|
+
_field_dict = {}
|
|
86
|
+
if self.pn_l:
|
|
87
|
+
for _key in self.pn_l:
|
|
88
|
+
if self.pn_l[_key]:
|
|
89
|
+
_field_dict[_key] = self.pn_l[_key].to_dict()
|
|
90
|
+
_dict['pnL'] = _field_dict
|
|
91
|
+
# override the default output from pydantic by calling `to_dict()` of gav
|
|
92
|
+
if self.gav:
|
|
93
|
+
_dict['gav'] = self.gav.to_dict()
|
|
94
|
+
# override the default output from pydantic by calling `to_dict()` of each value in fees (dict)
|
|
95
|
+
_field_dict = {}
|
|
96
|
+
if self.fees:
|
|
97
|
+
for _key in self.fees:
|
|
98
|
+
if self.fees[_key]:
|
|
99
|
+
_field_dict[_key] = self.fees[_key].to_dict()
|
|
100
|
+
_dict['fees'] = _field_dict
|
|
101
|
+
# override the default output from pydantic by calling `to_dict()` of nav
|
|
102
|
+
if self.nav:
|
|
103
|
+
_dict['nav'] = self.nav.to_dict()
|
|
104
|
+
# override the default output from pydantic by calling `to_dict()` of unitisation
|
|
105
|
+
if self.unitisation:
|
|
106
|
+
_dict['unitisation'] = self.unitisation.to_dict()
|
|
107
|
+
# override the default output from pydantic by calling `to_dict()` of each value in miscellaneous (dict)
|
|
108
|
+
_field_dict = {}
|
|
109
|
+
if self.miscellaneous:
|
|
110
|
+
for _key in self.miscellaneous:
|
|
111
|
+
if self.miscellaneous[_key]:
|
|
112
|
+
_field_dict[_key] = self.miscellaneous[_key].to_dict()
|
|
113
|
+
_dict['miscellaneous'] = _field_dict
|
|
114
|
+
# override the default output from pydantic by calling `to_dict()` of previous_share_class_breakdown
|
|
115
|
+
if self.previous_share_class_breakdown:
|
|
116
|
+
_dict['previousShareClassBreakdown'] = self.previous_share_class_breakdown.to_dict()
|
|
117
|
+
# set to None if miscellaneous (nullable) is None
|
|
118
|
+
# and __fields_set__ contains the field
|
|
119
|
+
if self.miscellaneous is None and "miscellaneous" in self.__fields_set__:
|
|
120
|
+
_dict['miscellaneous'] = None
|
|
121
|
+
|
|
122
|
+
return _dict
|
|
123
|
+
|
|
124
|
+
@classmethod
|
|
125
|
+
def from_dict(cls, obj: dict) -> ShareClassBreakdown:
|
|
126
|
+
"""Create an instance of ShareClassBreakdown from a dict"""
|
|
127
|
+
if obj is None:
|
|
128
|
+
return None
|
|
129
|
+
|
|
130
|
+
if not isinstance(obj, dict):
|
|
131
|
+
return ShareClassBreakdown.parse_obj(obj)
|
|
132
|
+
|
|
133
|
+
_obj = ShareClassBreakdown.parse_obj({
|
|
134
|
+
"back_out": dict(
|
|
135
|
+
(_k, ShareClassAmount.from_dict(_v))
|
|
136
|
+
for _k, _v in obj.get("backOut").items()
|
|
137
|
+
)
|
|
138
|
+
if obj.get("backOut") is not None
|
|
139
|
+
else None,
|
|
140
|
+
"dealing": dict(
|
|
141
|
+
(_k, ShareClassAmount.from_dict(_v))
|
|
142
|
+
for _k, _v in obj.get("dealing").items()
|
|
143
|
+
)
|
|
144
|
+
if obj.get("dealing") is not None
|
|
145
|
+
else None,
|
|
146
|
+
"pn_l": dict(
|
|
147
|
+
(_k, ShareClassAmount.from_dict(_v))
|
|
148
|
+
for _k, _v in obj.get("pnL").items()
|
|
149
|
+
)
|
|
150
|
+
if obj.get("pnL") is not None
|
|
151
|
+
else None,
|
|
152
|
+
"gav": MultiCurrencyAmounts.from_dict(obj.get("gav")) if obj.get("gav") is not None else None,
|
|
153
|
+
"fees": dict(
|
|
154
|
+
(_k, FeeAccrual.from_dict(_v))
|
|
155
|
+
for _k, _v in obj.get("fees").items()
|
|
156
|
+
)
|
|
157
|
+
if obj.get("fees") is not None
|
|
158
|
+
else None,
|
|
159
|
+
"nav": MultiCurrencyAmounts.from_dict(obj.get("nav")) if obj.get("nav") is not None else None,
|
|
160
|
+
"unitisation": UnitisationData.from_dict(obj.get("unitisation")) if obj.get("unitisation") is not None else None,
|
|
161
|
+
"miscellaneous": dict(
|
|
162
|
+
(_k, ShareClassAmount.from_dict(_v))
|
|
163
|
+
for _k, _v in obj.get("miscellaneous").items()
|
|
164
|
+
)
|
|
165
|
+
if obj.get("miscellaneous") is not None
|
|
166
|
+
else None,
|
|
167
|
+
"share_class_to_fund_fx_rate": obj.get("shareClassToFundFxRate"),
|
|
168
|
+
"capital_ratio": obj.get("capitalRatio"),
|
|
169
|
+
"previous_share_class_breakdown": PreviousShareClassBreakdown.from_dict(obj.get("previousShareClassBreakdown")) if obj.get("previousShareClassBreakdown") is not None else None
|
|
170
|
+
})
|
|
171
|
+
return _obj
|
|
@@ -0,0 +1,79 @@
|
|
|
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.v1 import BaseModel, Field
|
|
23
|
+
from lusid.models.share_class_breakdown import ShareClassBreakdown
|
|
24
|
+
from lusid.models.share_class_details import ShareClassDetails
|
|
25
|
+
|
|
26
|
+
class ShareClassData(BaseModel):
|
|
27
|
+
"""
|
|
28
|
+
The data for a Share Class. Includes Valuation Point Data and instrument information. # noqa: E501
|
|
29
|
+
"""
|
|
30
|
+
share_class_breakdown: ShareClassBreakdown = Field(..., alias="shareClassBreakdown")
|
|
31
|
+
share_class_details: Optional[ShareClassDetails] = Field(None, alias="shareClassDetails")
|
|
32
|
+
__properties = ["shareClassBreakdown", "shareClassDetails"]
|
|
33
|
+
|
|
34
|
+
class Config:
|
|
35
|
+
"""Pydantic configuration"""
|
|
36
|
+
allow_population_by_field_name = True
|
|
37
|
+
validate_assignment = True
|
|
38
|
+
|
|
39
|
+
def to_str(self) -> str:
|
|
40
|
+
"""Returns the string representation of the model using alias"""
|
|
41
|
+
return pprint.pformat(self.dict(by_alias=True))
|
|
42
|
+
|
|
43
|
+
def to_json(self) -> str:
|
|
44
|
+
"""Returns the JSON representation of the model using alias"""
|
|
45
|
+
return json.dumps(self.to_dict())
|
|
46
|
+
|
|
47
|
+
@classmethod
|
|
48
|
+
def from_json(cls, json_str: str) -> ShareClassData:
|
|
49
|
+
"""Create an instance of ShareClassData from a JSON string"""
|
|
50
|
+
return cls.from_dict(json.loads(json_str))
|
|
51
|
+
|
|
52
|
+
def to_dict(self):
|
|
53
|
+
"""Returns the dictionary representation of the model using alias"""
|
|
54
|
+
_dict = self.dict(by_alias=True,
|
|
55
|
+
exclude={
|
|
56
|
+
},
|
|
57
|
+
exclude_none=True)
|
|
58
|
+
# override the default output from pydantic by calling `to_dict()` of share_class_breakdown
|
|
59
|
+
if self.share_class_breakdown:
|
|
60
|
+
_dict['shareClassBreakdown'] = self.share_class_breakdown.to_dict()
|
|
61
|
+
# override the default output from pydantic by calling `to_dict()` of share_class_details
|
|
62
|
+
if self.share_class_details:
|
|
63
|
+
_dict['shareClassDetails'] = self.share_class_details.to_dict()
|
|
64
|
+
return _dict
|
|
65
|
+
|
|
66
|
+
@classmethod
|
|
67
|
+
def from_dict(cls, obj: dict) -> ShareClassData:
|
|
68
|
+
"""Create an instance of ShareClassData from a dict"""
|
|
69
|
+
if obj is None:
|
|
70
|
+
return None
|
|
71
|
+
|
|
72
|
+
if not isinstance(obj, dict):
|
|
73
|
+
return ShareClassData.parse_obj(obj)
|
|
74
|
+
|
|
75
|
+
_obj = ShareClassData.parse_obj({
|
|
76
|
+
"share_class_breakdown": ShareClassBreakdown.from_dict(obj.get("shareClassBreakdown")) if obj.get("shareClassBreakdown") is not None else None,
|
|
77
|
+
"share_class_details": ShareClassDetails.from_dict(obj.get("shareClassDetails")) if obj.get("shareClassDetails") is not None else None
|
|
78
|
+
})
|
|
79
|
+
return _obj
|
|
@@ -0,0 +1,108 @@
|
|
|
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.v1 import BaseModel, Field, StrictStr, constr, validator
|
|
23
|
+
|
|
24
|
+
class ShareClassDetails(BaseModel):
|
|
25
|
+
"""
|
|
26
|
+
ShareClassDetails
|
|
27
|
+
"""
|
|
28
|
+
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 share class' instrument identifiers")
|
|
29
|
+
instrument_scope: Optional[constr(strict=True, max_length=64, min_length=1)] = Field(None, alias="instrumentScope", description="The scope in which the share class instrument lies.")
|
|
30
|
+
dom_currency: Optional[StrictStr] = Field(None, alias="domCurrency", description="The domestic currency of the share class instrument")
|
|
31
|
+
__properties = ["lusidInstrumentId", "instrumentScope", "domCurrency"]
|
|
32
|
+
|
|
33
|
+
@validator('lusid_instrument_id')
|
|
34
|
+
def lusid_instrument_id_validate_regular_expression(cls, value):
|
|
35
|
+
"""Validates the regular expression"""
|
|
36
|
+
if value is None:
|
|
37
|
+
return value
|
|
38
|
+
|
|
39
|
+
if not re.match(r"^[a-zA-Z0-9\-_]+$", value):
|
|
40
|
+
raise ValueError(r"must validate the regular expression /^[a-zA-Z0-9\-_]+$/")
|
|
41
|
+
return value
|
|
42
|
+
|
|
43
|
+
@validator('instrument_scope')
|
|
44
|
+
def instrument_scope_validate_regular_expression(cls, value):
|
|
45
|
+
"""Validates the regular expression"""
|
|
46
|
+
if value is None:
|
|
47
|
+
return value
|
|
48
|
+
|
|
49
|
+
if not re.match(r"^[a-zA-Z0-9\-_]+$", value):
|
|
50
|
+
raise ValueError(r"must validate the regular expression /^[a-zA-Z0-9\-_]+$/")
|
|
51
|
+
return value
|
|
52
|
+
|
|
53
|
+
class Config:
|
|
54
|
+
"""Pydantic configuration"""
|
|
55
|
+
allow_population_by_field_name = True
|
|
56
|
+
validate_assignment = True
|
|
57
|
+
|
|
58
|
+
def to_str(self) -> str:
|
|
59
|
+
"""Returns the string representation of the model using alias"""
|
|
60
|
+
return pprint.pformat(self.dict(by_alias=True))
|
|
61
|
+
|
|
62
|
+
def to_json(self) -> str:
|
|
63
|
+
"""Returns the JSON representation of the model using alias"""
|
|
64
|
+
return json.dumps(self.to_dict())
|
|
65
|
+
|
|
66
|
+
@classmethod
|
|
67
|
+
def from_json(cls, json_str: str) -> ShareClassDetails:
|
|
68
|
+
"""Create an instance of ShareClassDetails from a JSON string"""
|
|
69
|
+
return cls.from_dict(json.loads(json_str))
|
|
70
|
+
|
|
71
|
+
def to_dict(self):
|
|
72
|
+
"""Returns the dictionary representation of the model using alias"""
|
|
73
|
+
_dict = self.dict(by_alias=True,
|
|
74
|
+
exclude={
|
|
75
|
+
},
|
|
76
|
+
exclude_none=True)
|
|
77
|
+
# set to None if lusid_instrument_id (nullable) is None
|
|
78
|
+
# and __fields_set__ contains the field
|
|
79
|
+
if self.lusid_instrument_id is None and "lusid_instrument_id" in self.__fields_set__:
|
|
80
|
+
_dict['lusidInstrumentId'] = None
|
|
81
|
+
|
|
82
|
+
# set to None if instrument_scope (nullable) is None
|
|
83
|
+
# and __fields_set__ contains the field
|
|
84
|
+
if self.instrument_scope is None and "instrument_scope" in self.__fields_set__:
|
|
85
|
+
_dict['instrumentScope'] = None
|
|
86
|
+
|
|
87
|
+
# set to None if dom_currency (nullable) is None
|
|
88
|
+
# and __fields_set__ contains the field
|
|
89
|
+
if self.dom_currency is None and "dom_currency" in self.__fields_set__:
|
|
90
|
+
_dict['domCurrency'] = None
|
|
91
|
+
|
|
92
|
+
return _dict
|
|
93
|
+
|
|
94
|
+
@classmethod
|
|
95
|
+
def from_dict(cls, obj: dict) -> ShareClassDetails:
|
|
96
|
+
"""Create an instance of ShareClassDetails from a dict"""
|
|
97
|
+
if obj is None:
|
|
98
|
+
return None
|
|
99
|
+
|
|
100
|
+
if not isinstance(obj, dict):
|
|
101
|
+
return ShareClassDetails.parse_obj(obj)
|
|
102
|
+
|
|
103
|
+
_obj = ShareClassDetails.parse_obj({
|
|
104
|
+
"lusid_instrument_id": obj.get("lusidInstrumentId"),
|
|
105
|
+
"instrument_scope": obj.get("instrumentScope"),
|
|
106
|
+
"dom_currency": obj.get("domCurrency")
|
|
107
|
+
})
|
|
108
|
+
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, Union
|
|
22
|
+
from pydantic.v1 import BaseModel, Field, StrictFloat, StrictInt
|
|
23
|
+
|
|
24
|
+
class UnitisationData(BaseModel):
|
|
25
|
+
"""
|
|
26
|
+
UnitisationData
|
|
27
|
+
"""
|
|
28
|
+
shares_in_issue: Union[StrictFloat, StrictInt] = Field(..., alias="sharesInIssue", description="The number of shares in issue at a valuation point.")
|
|
29
|
+
unit_price: Union[StrictFloat, StrictInt] = Field(..., alias="unitPrice", description="The price of one unit of the share class at a valuation point.")
|
|
30
|
+
net_dealing_units: Union[StrictFloat, StrictInt] = Field(..., alias="netDealingUnits", description="The net dealing in units for the share class at a valuation point. This could be the sum of negative redemptions (in units) and positive subscriptions (in units).")
|
|
31
|
+
__properties = ["sharesInIssue", "unitPrice", "netDealingUnits"]
|
|
32
|
+
|
|
33
|
+
class Config:
|
|
34
|
+
"""Pydantic configuration"""
|
|
35
|
+
allow_population_by_field_name = True
|
|
36
|
+
validate_assignment = True
|
|
37
|
+
|
|
38
|
+
def to_str(self) -> str:
|
|
39
|
+
"""Returns the string representation of the model using alias"""
|
|
40
|
+
return pprint.pformat(self.dict(by_alias=True))
|
|
41
|
+
|
|
42
|
+
def to_json(self) -> str:
|
|
43
|
+
"""Returns the JSON representation of the model using alias"""
|
|
44
|
+
return json.dumps(self.to_dict())
|
|
45
|
+
|
|
46
|
+
@classmethod
|
|
47
|
+
def from_json(cls, json_str: str) -> UnitisationData:
|
|
48
|
+
"""Create an instance of UnitisationData from a JSON string"""
|
|
49
|
+
return cls.from_dict(json.loads(json_str))
|
|
50
|
+
|
|
51
|
+
def to_dict(self):
|
|
52
|
+
"""Returns the dictionary representation of the model using alias"""
|
|
53
|
+
_dict = self.dict(by_alias=True,
|
|
54
|
+
exclude={
|
|
55
|
+
},
|
|
56
|
+
exclude_none=True)
|
|
57
|
+
return _dict
|
|
58
|
+
|
|
59
|
+
@classmethod
|
|
60
|
+
def from_dict(cls, obj: dict) -> UnitisationData:
|
|
61
|
+
"""Create an instance of UnitisationData from a dict"""
|
|
62
|
+
if obj is None:
|
|
63
|
+
return None
|
|
64
|
+
|
|
65
|
+
if not isinstance(obj, dict):
|
|
66
|
+
return UnitisationData.parse_obj(obj)
|
|
67
|
+
|
|
68
|
+
_obj = UnitisationData.parse_obj({
|
|
69
|
+
"shares_in_issue": obj.get("sharesInIssue"),
|
|
70
|
+
"unit_price": obj.get("unitPrice"),
|
|
71
|
+
"net_dealing_units": obj.get("netDealingUnits")
|
|
72
|
+
})
|
|
73
|
+
return _obj
|
|
@@ -21,24 +21,28 @@ import json
|
|
|
21
21
|
from typing import Any, Dict, List, Optional, Union
|
|
22
22
|
from pydantic.v1 import BaseModel, Field, StrictFloat, StrictInt, StrictStr, conlist, constr
|
|
23
23
|
from lusid.models.fee_accrual import FeeAccrual
|
|
24
|
+
from lusid.models.fund_valuation_point_data import FundValuationPointData
|
|
24
25
|
from lusid.models.link import Link
|
|
26
|
+
from lusid.models.share_class_data import ShareClassData
|
|
25
27
|
|
|
26
28
|
class ValuationPointDataResponse(BaseModel):
|
|
27
29
|
"""
|
|
28
30
|
The Valuation Point Data Response for the Fund and specified date. # noqa: E501
|
|
29
31
|
"""
|
|
30
32
|
href: Optional[StrictStr] = Field(None, description="The specific Uniform Resource Identifier (URI) for this resource at the requested effective and asAt datetime.")
|
|
31
|
-
type: constr(strict=True, min_length=1) = Field(..., description="The Type of the associated Diary Entry ('PeriodBoundary','ValuationPoint','Other' or 'Adhoc' when a diary
|
|
33
|
+
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).")
|
|
32
34
|
status: constr(strict=True, min_length=1) = Field(..., description="The Status of the associated Diary Entry ('Estimate','Final','Candidate' or 'Unofficial').")
|
|
33
|
-
backout: Dict[str, Union[StrictFloat, StrictInt]] = Field(..., description="Bucket of detail for the Valuation Point, where data points have been 'backed out'.")
|
|
34
|
-
dealing: Dict[str, Union[StrictFloat, StrictInt]] = Field(..., description="Bucket of detail for any 'Dealing' that has occured inside the queried period.")
|
|
35
|
-
pn_l: Dict[str, Union[StrictFloat, StrictInt]] = Field(..., alias="pnL", description="Bucket of detail for 'PnL' that has occured inside the queried period.")
|
|
36
|
-
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'.")
|
|
37
|
-
fees: Dict[str, FeeAccrual] = Field(..., description="Bucket of detail for any 'Fees' that have been charged in the selected period.")
|
|
38
|
-
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.")
|
|
39
|
-
previous_nav: Union[StrictFloat, StrictInt] = Field(..., alias="previousNav", description="The Net Asset Value of the Fund at the End of the last Period.")
|
|
35
|
+
backout: Dict[str, Union[StrictFloat, StrictInt]] = Field(..., description="DEPRECATED. Bucket of detail for the Valuation Point, where data points have been 'backed out'.")
|
|
36
|
+
dealing: Dict[str, Union[StrictFloat, StrictInt]] = Field(..., description="DEPRECATED. Bucket of detail for any 'Dealing' that has occured inside the queried period.")
|
|
37
|
+
pn_l: Dict[str, Union[StrictFloat, StrictInt]] = Field(..., alias="pnL", description="DEPRECATED. Bucket of detail for 'PnL' that has occured inside the queried period.")
|
|
38
|
+
gav: Union[StrictFloat, StrictInt] = Field(..., description="DEPRECATED. 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'.")
|
|
39
|
+
fees: Dict[str, FeeAccrual] = Field(..., description="DEPRECATED. Bucket of detail for any 'Fees' that have been charged in the selected period.")
|
|
40
|
+
nav: Union[StrictFloat, StrictInt] = Field(..., description="DEPRECATED. The Net Asset Value of the Fund at the Period end. This represents the GAV with any fees applied in the period.")
|
|
41
|
+
previous_nav: Union[StrictFloat, StrictInt] = Field(..., alias="previousNav", description="DEPRECATED. The Net Asset Value of the Fund at the End of the last Period.")
|
|
42
|
+
fund_valuation_point_data: FundValuationPointData = Field(..., alias="fundValuationPointData")
|
|
43
|
+
share_class_data: Dict[str, ShareClassData] = Field(..., alias="shareClassData", description="The data for all share classes in fund. Share classes are identified by their short codes.")
|
|
40
44
|
links: Optional[conlist(Link)] = None
|
|
41
|
-
__properties = ["href", "type", "status", "backout", "dealing", "pnL", "gav", "fees", "nav", "previousNav", "links"]
|
|
45
|
+
__properties = ["href", "type", "status", "backout", "dealing", "pnL", "gav", "fees", "nav", "previousNav", "fundValuationPointData", "shareClassData", "links"]
|
|
42
46
|
|
|
43
47
|
class Config:
|
|
44
48
|
"""Pydantic configuration"""
|
|
@@ -71,6 +75,16 @@ class ValuationPointDataResponse(BaseModel):
|
|
|
71
75
|
if self.fees[_key]:
|
|
72
76
|
_field_dict[_key] = self.fees[_key].to_dict()
|
|
73
77
|
_dict['fees'] = _field_dict
|
|
78
|
+
# override the default output from pydantic by calling `to_dict()` of fund_valuation_point_data
|
|
79
|
+
if self.fund_valuation_point_data:
|
|
80
|
+
_dict['fundValuationPointData'] = self.fund_valuation_point_data.to_dict()
|
|
81
|
+
# override the default output from pydantic by calling `to_dict()` of each value in share_class_data (dict)
|
|
82
|
+
_field_dict = {}
|
|
83
|
+
if self.share_class_data:
|
|
84
|
+
for _key in self.share_class_data:
|
|
85
|
+
if self.share_class_data[_key]:
|
|
86
|
+
_field_dict[_key] = self.share_class_data[_key].to_dict()
|
|
87
|
+
_dict['shareClassData'] = _field_dict
|
|
74
88
|
# override the default output from pydantic by calling `to_dict()` of each item in links (list)
|
|
75
89
|
_items = []
|
|
76
90
|
if self.links:
|
|
@@ -115,6 +129,13 @@ class ValuationPointDataResponse(BaseModel):
|
|
|
115
129
|
else None,
|
|
116
130
|
"nav": obj.get("nav"),
|
|
117
131
|
"previous_nav": obj.get("previousNav"),
|
|
132
|
+
"fund_valuation_point_data": FundValuationPointData.from_dict(obj.get("fundValuationPointData")) if obj.get("fundValuationPointData") is not None else None,
|
|
133
|
+
"share_class_data": dict(
|
|
134
|
+
(_k, ShareClassData.from_dict(_v))
|
|
135
|
+
for _k, _v in obj.get("shareClassData").items()
|
|
136
|
+
)
|
|
137
|
+
if obj.get("shareClassData") is not None
|
|
138
|
+
else None,
|
|
118
139
|
"links": [Link.from_dict(_item) for _item in obj.get("links")] if obj.get("links") is not None else None
|
|
119
140
|
})
|
|
120
141
|
return _obj
|