lusid-sdk 2.1.261__py3-none-any.whl → 2.1.322__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 +38 -0
- lusid/api/compliance_api.py +191 -0
- lusid/api/funds_api.py +1 -1
- lusid/api/order_management_api.py +159 -0
- lusid/api/scopes_api.py +38 -9
- lusid/configuration.py +1 -1
- lusid/extensions/configuration_loaders.py +9 -1
- lusid/models/__init__.py +38 -0
- lusid/models/cancel_orders_response.py +153 -0
- lusid/models/cancelled_order_result.py +73 -0
- lusid/models/cash.py +93 -0
- lusid/models/compliance_run_configuration.py +73 -0
- lusid/models/component_filter.py +85 -0
- lusid/models/component_rule.py +13 -19
- lusid/models/contract_for_difference.py +4 -2
- lusid/models/fund.py +6 -1
- lusid/models/fund_amount.py +69 -0
- lusid/models/fund_configuration.py +16 -15
- lusid/models/fund_configuration_request.py +18 -12
- lusid/models/fund_pnl_breakdown.py +110 -0
- lusid/models/fund_previous_nav.py +69 -0
- lusid/models/fund_request.py +6 -1
- lusid/models/fund_valuation_point_data.py +152 -0
- lusid/models/futures_contract_details.py +9 -2
- lusid/models/lusid_instrument.py +3 -2
- lusid/models/market_data_key_rule.py +3 -3
- lusid/models/market_data_specific_rule.py +3 -3
- lusid/models/market_quote.py +3 -3
- lusid/models/model_selection.py +3 -3
- lusid/models/posting_module_rule.py +7 -32
- lusid/models/pre_trade_configuration.py +69 -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/pricing_model.py +1 -0
- lusid/models/quote_series_id.py +4 -20
- lusid/models/quote_type.py +3 -0
- lusid/models/share_class_amount.py +73 -0
- lusid/models/share_class_breakdown.py +163 -0
- lusid/models/share_class_data.py +79 -0
- lusid/models/share_class_details.py +108 -0
- lusid/models/share_class_pnl_breakdown.py +110 -0
- lusid/models/staged_modification.py +8 -1
- lusid/models/template_field.py +3 -1
- lusid/models/transaction_configuration_movement_data.py +2 -2
- lusid/models/transaction_configuration_movement_data_request.py +1 -1
- lusid/models/transaction_field_map.py +1 -1
- lusid/models/transaction_type_movement.py +2 -2
- lusid/models/unitisation_data.py +73 -0
- lusid/models/valuation_point_data_response.py +30 -9
- {lusid_sdk-2.1.261.dist-info → lusid_sdk-2.1.322.dist-info}/METADATA +30 -215
- {lusid_sdk-2.1.261.dist-info → lusid_sdk-2.1.322.dist-info}/RECORD +53 -34
- {lusid_sdk-2.1.261.dist-info → lusid_sdk-2.1.322.dist-info}/WHEEL +0 -0
@@ -0,0 +1,110 @@
|
|
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.v1 import BaseModel, Field
|
23
|
+
from lusid.models.share_class_amount import ShareClassAmount
|
24
|
+
|
25
|
+
class ShareClassPnlBreakdown(BaseModel):
|
26
|
+
"""
|
27
|
+
The breakdown of PnL for a Share Class on a specified date. # noqa: E501
|
28
|
+
"""
|
29
|
+
apportioned_non_class_specific_pnl: Dict[str, ShareClassAmount] = Field(..., alias="apportionedNonClassSpecificPnl", description="Bucket of detail for PnL within the queried period not explicitly allocated to any share class but has been apportioned to the share class.")
|
30
|
+
class_pnl: Dict[str, ShareClassAmount] = Field(..., alias="classPnl", description="Bucket of detail for PnL specific to the share class within the queried period.")
|
31
|
+
total_pnl: Dict[str, ShareClassAmount] = Field(..., alias="totalPnl", description="Bucket of detail for the sum of class PnL and PnL not specific to a class within the queried period.")
|
32
|
+
__properties = ["apportionedNonClassSpecificPnl", "classPnl", "totalPnl"]
|
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) -> ShareClassPnlBreakdown:
|
49
|
+
"""Create an instance of ShareClassPnlBreakdown 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 each value in apportioned_non_class_specific_pnl (dict)
|
59
|
+
_field_dict = {}
|
60
|
+
if self.apportioned_non_class_specific_pnl:
|
61
|
+
for _key in self.apportioned_non_class_specific_pnl:
|
62
|
+
if self.apportioned_non_class_specific_pnl[_key]:
|
63
|
+
_field_dict[_key] = self.apportioned_non_class_specific_pnl[_key].to_dict()
|
64
|
+
_dict['apportionedNonClassSpecificPnl'] = _field_dict
|
65
|
+
# override the default output from pydantic by calling `to_dict()` of each value in class_pnl (dict)
|
66
|
+
_field_dict = {}
|
67
|
+
if self.class_pnl:
|
68
|
+
for _key in self.class_pnl:
|
69
|
+
if self.class_pnl[_key]:
|
70
|
+
_field_dict[_key] = self.class_pnl[_key].to_dict()
|
71
|
+
_dict['classPnl'] = _field_dict
|
72
|
+
# override the default output from pydantic by calling `to_dict()` of each value in total_pnl (dict)
|
73
|
+
_field_dict = {}
|
74
|
+
if self.total_pnl:
|
75
|
+
for _key in self.total_pnl:
|
76
|
+
if self.total_pnl[_key]:
|
77
|
+
_field_dict[_key] = self.total_pnl[_key].to_dict()
|
78
|
+
_dict['totalPnl'] = _field_dict
|
79
|
+
return _dict
|
80
|
+
|
81
|
+
@classmethod
|
82
|
+
def from_dict(cls, obj: dict) -> ShareClassPnlBreakdown:
|
83
|
+
"""Create an instance of ShareClassPnlBreakdown from a dict"""
|
84
|
+
if obj is None:
|
85
|
+
return None
|
86
|
+
|
87
|
+
if not isinstance(obj, dict):
|
88
|
+
return ShareClassPnlBreakdown.parse_obj(obj)
|
89
|
+
|
90
|
+
_obj = ShareClassPnlBreakdown.parse_obj({
|
91
|
+
"apportioned_non_class_specific_pnl": dict(
|
92
|
+
(_k, ShareClassAmount.from_dict(_v))
|
93
|
+
for _k, _v in obj.get("apportionedNonClassSpecificPnl").items()
|
94
|
+
)
|
95
|
+
if obj.get("apportionedNonClassSpecificPnl") is not None
|
96
|
+
else None,
|
97
|
+
"class_pnl": dict(
|
98
|
+
(_k, ShareClassAmount.from_dict(_v))
|
99
|
+
for _k, _v in obj.get("classPnl").items()
|
100
|
+
)
|
101
|
+
if obj.get("classPnl") is not None
|
102
|
+
else None,
|
103
|
+
"total_pnl": dict(
|
104
|
+
(_k, ShareClassAmount.from_dict(_v))
|
105
|
+
for _k, _v in obj.get("totalPnl").items()
|
106
|
+
)
|
107
|
+
if obj.get("totalPnl") is not None
|
108
|
+
else None
|
109
|
+
})
|
110
|
+
return _obj
|
@@ -44,8 +44,9 @@ class StagedModification(BaseModel):
|
|
44
44
|
entity_unique_id: Optional[StrictStr] = Field(None, alias="entityUniqueId", description="The unique Id of the entity the staged modification applies to.")
|
45
45
|
requested_changes: Optional[RequestedChanges] = Field(None, alias="requestedChanges")
|
46
46
|
entity_hrefs: Optional[StagedModificationsEntityHrefs] = Field(None, alias="entityHrefs")
|
47
|
+
display_name: Optional[StrictStr] = Field(None, alias="displayName", description="The display name of the entity the staged modification applies to.")
|
47
48
|
links: Optional[conlist(Link)] = None
|
48
|
-
__properties = ["id", "asAtStaged", "userIdStaged", "requestedIdStaged", "action", "stagingRule", "decisions", "decisionsCount", "status", "entityType", "scope", "entityUniqueId", "requestedChanges", "entityHrefs", "links"]
|
49
|
+
__properties = ["id", "asAtStaged", "userIdStaged", "requestedIdStaged", "action", "stagingRule", "decisions", "decisionsCount", "status", "entityType", "scope", "entityUniqueId", "requestedChanges", "entityHrefs", "displayName", "links"]
|
49
50
|
|
50
51
|
class Config:
|
51
52
|
"""Pydantic configuration"""
|
@@ -139,6 +140,11 @@ class StagedModification(BaseModel):
|
|
139
140
|
if self.entity_unique_id is None and "entity_unique_id" in self.__fields_set__:
|
140
141
|
_dict['entityUniqueId'] = None
|
141
142
|
|
143
|
+
# set to None if display_name (nullable) is None
|
144
|
+
# and __fields_set__ contains the field
|
145
|
+
if self.display_name is None and "display_name" in self.__fields_set__:
|
146
|
+
_dict['displayName'] = None
|
147
|
+
|
142
148
|
# set to None if links (nullable) is None
|
143
149
|
# and __fields_set__ contains the field
|
144
150
|
if self.links is None and "links" in self.__fields_set__:
|
@@ -170,6 +176,7 @@ class StagedModification(BaseModel):
|
|
170
176
|
"entity_unique_id": obj.get("entityUniqueId"),
|
171
177
|
"requested_changes": RequestedChanges.from_dict(obj.get("requestedChanges")) if obj.get("requestedChanges") is not None else None,
|
172
178
|
"entity_hrefs": StagedModificationsEntityHrefs.from_dict(obj.get("entityHrefs")) if obj.get("entityHrefs") is not None else None,
|
179
|
+
"display_name": obj.get("displayName"),
|
173
180
|
"links": [Link.from_dict(_item) for _item in obj.get("links")] if obj.get("links") is not None else None
|
174
181
|
})
|
175
182
|
return _obj
|
lusid/models/template_field.py
CHANGED
@@ -29,8 +29,9 @@ class TemplateField(BaseModel):
|
|
29
29
|
specificity: constr(strict=True, min_length=1) = Field(...)
|
30
30
|
description: constr(strict=True, min_length=1) = Field(...)
|
31
31
|
type: constr(strict=True, min_length=1) = Field(...)
|
32
|
+
availability: constr(strict=True, min_length=1) = Field(...)
|
32
33
|
usage: conlist(StrictStr) = Field(...)
|
33
|
-
__properties = ["fieldName", "specificity", "description", "type", "usage"]
|
34
|
+
__properties = ["fieldName", "specificity", "description", "type", "availability", "usage"]
|
34
35
|
|
35
36
|
class Config:
|
36
37
|
"""Pydantic configuration"""
|
@@ -72,6 +73,7 @@ class TemplateField(BaseModel):
|
|
72
73
|
"specificity": obj.get("specificity"),
|
73
74
|
"description": obj.get("description"),
|
74
75
|
"type": obj.get("type"),
|
76
|
+
"availability": obj.get("availability"),
|
75
77
|
"usage": obj.get("usage")
|
76
78
|
})
|
77
79
|
return _obj
|
@@ -27,13 +27,13 @@ class TransactionConfigurationMovementData(BaseModel):
|
|
27
27
|
"""
|
28
28
|
TransactionConfigurationMovementData
|
29
29
|
"""
|
30
|
-
movement_types: StrictStr = Field(..., alias="movementTypes", description=". The available values are: Settlement, Traded, StockMovement, FutureCash, Commitment, Receivable, CashSettlement, CashForward, CashCommitment, CashReceivable, Accrual, CashAccrual, ForwardFx, CashFxForward, UnsettledCashTypes, Carry, CarryAsPnl, VariationMargin, Capital, Fee")
|
30
|
+
movement_types: StrictStr = Field(..., alias="movementTypes", description="Movement types determine the impact of the movement on the holdings. The available values are: Settlement, Traded, StockMovement, FutureCash, Commitment, Receivable, CashSettlement, CashForward, CashCommitment, CashReceivable, Accrual, CashAccrual, ForwardFx, CashFxForward, UnsettledCashTypes, Carry, CarryAsPnl, VariationMargin, Capital, Fee. The available values are: Settlement, Traded, StockMovement, FutureCash, Commitment, Receivable, CashSettlement, CashForward, CashCommitment, CashReceivable, Accrual, CashAccrual, ForwardFx, CashFxForward, UnsettledCashTypes, Carry, CarryAsPnl, VariationMargin, Capital, Fee")
|
31
31
|
side: constr(strict=True, min_length=1) = Field(..., description="The Side determines which of the fields from our transaction are used to generate the Movement. Side1 means the 'security' side of the transaction, ie the Instrument and Units; Side2 means the 'cash' side, ie the Total Consideration")
|
32
32
|
direction: StrictInt = Field(..., description=" A multiplier to apply to Transaction amounts; the values are -1 to indicate to reverse the signs and 1 to indicate to use the signed values from the Transaction directly. For a typical Transaction with unsigned values, 1 means increase, -1 means decrease")
|
33
33
|
properties: Optional[Dict[str, PerpetualProperty]] = Field(None, description="The properties associated with the underlying Movement")
|
34
34
|
mappings: Optional[conlist(TransactionPropertyMapping)] = Field(None, description="This allows you to map a transaction property to a property on the underlying holding")
|
35
35
|
name: Optional[StrictStr] = Field(None, description="The movement name (optional)")
|
36
|
-
movement_options: Optional[conlist(StrictStr)] = Field(None, alias="movementOptions", description="Allows extra specifications for the movement. The options currently available are 'DirectAdjustment' and '
|
36
|
+
movement_options: Optional[conlist(StrictStr)] = Field(None, alias="movementOptions", description="Allows extra specifications for the movement. The options currently available are 'DirectAdjustment', 'IncludesTradedInterest' and 'Virtual' (works only with the movement type 'StockMovement'). A movement type of 'StockMovement' with an option of 'DirectAdjusment' will allow you to adjust the units of a holding without affecting its cost base. You will, therefore, be able to reflect the impact of a stock split by loading a Transaction.")
|
37
37
|
__properties = ["movementTypes", "side", "direction", "properties", "mappings", "name", "movementOptions"]
|
38
38
|
|
39
39
|
@validator('movement_types')
|
@@ -33,7 +33,7 @@ class TransactionConfigurationMovementDataRequest(BaseModel):
|
|
33
33
|
properties: Optional[Dict[str, PerpetualProperty]] = Field(None, description="The properties associated with the underlying Movement.")
|
34
34
|
mappings: Optional[conlist(TransactionPropertyMappingRequest)] = Field(None, description="This allows you to map a transaction property to a property on the underlying holding.")
|
35
35
|
name: Optional[StrictStr] = Field(None, description="The movement name (optional)")
|
36
|
-
movement_options: Optional[conlist(StrictStr)] = Field(None, alias="movementOptions", description="Allows extra specifications for the movement. The options currently available are 'DirectAdjustment' and '
|
36
|
+
movement_options: Optional[conlist(StrictStr)] = Field(None, alias="movementOptions", description="Allows extra specifications for the movement. The options currently available are 'DirectAdjustment', 'IncludesTradedInterest' and 'Virtual' (works only with the movement type 'StockMovement'). A movement type of 'StockMovement' with an option of 'DirectAdjusment' will allow you to adjust the units of a holding without affecting its cost base. You will, therefore, be able to reflect the impact of a stock split by loading a Transaction.")
|
37
37
|
__properties = ["movementTypes", "side", "direction", "properties", "mappings", "name", "movementOptions"]
|
38
38
|
|
39
39
|
@validator('movement_types')
|
@@ -34,7 +34,7 @@ class TransactionFieldMap(BaseModel):
|
|
34
34
|
transaction_date: constr(strict=True, max_length=1024, min_length=0) = Field(..., alias="transactionDate")
|
35
35
|
settlement_date: constr(strict=True, max_length=1024, min_length=0) = Field(..., alias="settlementDate")
|
36
36
|
units: constr(strict=True, max_length=1024, min_length=0) = Field(...)
|
37
|
-
transaction_price: TransactionPriceAndType = Field(
|
37
|
+
transaction_price: Optional[TransactionPriceAndType] = Field(None, alias="transactionPrice")
|
38
38
|
transaction_currency: constr(strict=True, max_length=1024, min_length=0) = Field(..., alias="transactionCurrency")
|
39
39
|
exchange_rate: Optional[constr(strict=True, max_length=1024, min_length=0)] = Field(None, alias="exchangeRate")
|
40
40
|
total_consideration: TransactionCurrencyAndAmount = Field(..., alias="totalConsideration")
|
@@ -27,13 +27,13 @@ class TransactionTypeMovement(BaseModel):
|
|
27
27
|
"""
|
28
28
|
TransactionTypeMovement
|
29
29
|
"""
|
30
|
-
movement_types: constr(strict=True, min_length=1) = Field(..., alias="movementTypes", description="Movement types determine the impact of the movement on the holdings")
|
30
|
+
movement_types: constr(strict=True, min_length=1) = Field(..., alias="movementTypes", description="Movement types determine the impact of the movement on the holdings. The available values are: Settlement, Traded, StockMovement, FutureCash, Commitment, Receivable, CashSettlement, CashForward, CashCommitment, CashReceivable, Accrual, CashAccrual, ForwardFx, CashFxForward, UnsettledCashTypes, Carry, CarryAsPnl, VariationMargin, Capital, Fee.")
|
31
31
|
side: constr(strict=True, max_length=64, min_length=1) = Field(..., description="The Side determines which of the fields from our transaction are used to generate the Movement. Side1 means the 'security' side of the transaction, ie the Instrument and Units; Side2 means the 'cash' side, ie the Total Consideration")
|
32
32
|
direction: StrictInt = Field(..., description=" A multiplier to apply to Transaction amounts; the values are -1 to indicate to reverse the signs and 1 to indicate to use the signed values from the Transaction directly. For a typical Transaction with unsigned values, 1 means increase, -1 means decrease")
|
33
33
|
properties: Optional[Dict[str, PerpetualProperty]] = Field(None, description="The properties associated with the underlying Movement")
|
34
34
|
mappings: Optional[conlist(TransactionTypePropertyMapping, max_items=5000)] = Field(None, description="This allows you to map a transaction property to a property on the underlying holding")
|
35
35
|
name: Optional[constr(strict=True, max_length=512, min_length=1)] = Field(None, description="The movement name (optional)")
|
36
|
-
movement_options: Optional[conlist(StrictStr)] = Field(None, alias="movementOptions", description="Allows extra specifications for the movement. The options currently available are 'DirectAdjustment' and '
|
36
|
+
movement_options: Optional[conlist(StrictStr)] = Field(None, alias="movementOptions", description="Allows extra specifications for the movement. The options currently available are 'DirectAdjustment', 'IncludesTradedInterest' and 'Virtual' (works only with the movement type 'StockMovement'). A movement type of 'StockMovement' with an option of 'DirectAdjusment' will allow you to adjust the units of a holding without affecting its cost base. You will, therefore, be able to reflect the impact of a stock split by loading a Transaction.")
|
37
37
|
settlement_date_override: Optional[StrictStr] = Field(None, alias="settlementDateOverride", description="Optional property key that must be in the Transaction domain when specified. When the movement is processed and the transaction has this property set to a valid date, then the property value will override the SettlementDate of the transaction.")
|
38
38
|
condition: Optional[constr(strict=True, max_length=16384, min_length=0)] = Field(None, description="The condition that the transaction must satisfy to generate the movement, such as: Portfolio.BaseCurrency eq 'GBP'. The condition can contain fields and properties from transactions and portfolios. If no condition is provided, the movement will apply for all transactions of this type.")
|
39
39
|
__properties = ["movementTypes", "side", "direction", "properties", "mappings", "name", "movementOptions", "settlementDateOverride", "condition"]
|
@@ -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
|