lusid-sdk 2.1.242__py3-none-any.whl → 2.1.320__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 +66 -0
- lusid/api/__init__.py +2 -0
- lusid/api/compliance_api.py +191 -0
- lusid/api/entities_api.py +360 -0
- lusid/api/fee_types_api.py +143 -0
- lusid/api/fund_configurations_api.py +944 -0
- lusid/api/funds_api.py +1 -1
- lusid/api/order_management_api.py +479 -1
- lusid/api/scopes_api.py +38 -9
- lusid/configuration.py +1 -1
- lusid/extensions/configuration_loaders.py +9 -1
- lusid/models/__init__.py +64 -0
- lusid/models/accounting_method.py +3 -0
- lusid/models/accumulation_event.py +3 -3
- lusid/models/amortisation_event.py +3 -3
- lusid/models/bond_coupon_event.py +3 -3
- lusid/models/bond_default_event.py +3 -3
- lusid/models/bond_principal_event.py +3 -3
- lusid/models/cancel_orders_response.py +153 -0
- lusid/models/cancel_placements_response.py +153 -0
- lusid/models/cancelled_order_result.py +73 -0
- lusid/models/cancelled_placement_result.py +83 -0
- lusid/models/capital_distribution_event.py +3 -3
- lusid/models/cash.py +93 -0
- lusid/models/cash_dividend_event.py +3 -3
- lusid/models/cash_flow_event.py +3 -3
- lusid/models/close_event.py +3 -3
- lusid/models/compliance_run_configuration.py +73 -0
- lusid/models/component_filter.py +85 -0
- lusid/models/component_rule.py +77 -0
- lusid/models/contract_for_difference.py +4 -2
- lusid/models/create_derived_transaction_portfolio_request.py +3 -3
- lusid/models/create_transaction_portfolio_request.py +3 -3
- lusid/models/dependency_source_filter.py +9 -2
- lusid/models/dividend_option_event.py +3 -3
- lusid/models/dividend_reinvestment_event.py +3 -3
- lusid/models/exercise_event.py +3 -3
- lusid/models/expiry_event.py +3 -3
- lusid/models/fee_transaction_template_specification.py +79 -0
- lusid/models/fund.py +6 -1
- lusid/models/fund_amount.py +69 -0
- lusid/models/fund_configuration.py +151 -0
- lusid/models/fund_configuration_properties.py +115 -0
- lusid/models/fund_configuration_request.py +136 -0
- 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/future_expiry_event.py +100 -0
- lusid/models/futures_contract_details.py +9 -2
- lusid/models/fx_forward_settlement_event.py +3 -3
- lusid/models/informational_error_event.py +3 -3
- lusid/models/informational_event.py +3 -3
- lusid/models/instrument_entity.py +146 -0
- lusid/models/instrument_event.py +6 -5
- lusid/models/instrument_event_type.py +1 -0
- 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/maturity_event.py +3 -3
- lusid/models/merger_event.py +3 -3
- lusid/models/model_selection.py +3 -3
- lusid/models/open_event.py +3 -3
- lusid/models/paged_resource_list_of_fund_configuration.py +113 -0
- lusid/models/placement_update_request.py +116 -0
- lusid/models/portfolio.py +3 -3
- lusid/models/portfolio_details.py +3 -3
- lusid/models/portfolio_without_href.py +3 -3
- 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/property_definition.py +7 -1
- lusid/models/property_definition_entity.py +146 -0
- lusid/models/quote_series_id.py +4 -20
- lusid/models/quote_type.py +3 -0
- lusid/models/raw_vendor_event.py +3 -3
- lusid/models/reset_event.py +3 -3
- lusid/models/reverse_stock_split_event.py +3 -3
- lusid/models/scrip_dividend_event.py +3 -3
- 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/spin_off_event.py +3 -3
- lusid/models/staged_modification.py +8 -1
- lusid/models/stock_dividend_event.py +3 -3
- lusid/models/stock_split_event.py +3 -3
- 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 +8 -3
- lusid/models/transaction_type_movement.py +2 -2
- lusid/models/transition_event.py +3 -3
- lusid/models/trigger_event.py +3 -3
- lusid/models/unitisation_data.py +73 -0
- lusid/models/update_placements_response.py +153 -0
- lusid/models/valuation_point_data_response.py +30 -9
- {lusid_sdk-2.1.242.dist-info → lusid_sdk-2.1.320.dist-info}/METADATA +53 -215
- {lusid_sdk-2.1.242.dist-info → lusid_sdk-2.1.320.dist-info}/RECORD +104 -71
- {lusid_sdk-2.1.242.dist-info → lusid_sdk-2.1.320.dist-info}/WHEEL +0 -0
@@ -0,0 +1,163 @@
|
|
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.share_class_pnl_breakdown import ShareClassPnlBreakdown
|
28
|
+
from lusid.models.unitisation_data import UnitisationData
|
29
|
+
|
30
|
+
class ShareClassBreakdown(BaseModel):
|
31
|
+
"""
|
32
|
+
The Valuation Point Data for a Share Class on a specified date. # noqa: E501
|
33
|
+
"""
|
34
|
+
back_out: Dict[str, ShareClassAmount] = Field(..., alias="backOut", description="Bucket of detail for the Valuation Point where data points have been 'backed out'.")
|
35
|
+
dealing: Dict[str, ShareClassAmount] = Field(..., description="Bucket of detail for any 'Dealing' that has occured inside the queried period.")
|
36
|
+
pn_l: ShareClassPnlBreakdown = Field(..., alias="pnL")
|
37
|
+
gav: MultiCurrencyAmounts = Field(...)
|
38
|
+
fees: Dict[str, FeeAccrual] = Field(..., description="Bucket of detail for any 'Fees' that have been charged in the selected period.")
|
39
|
+
nav: MultiCurrencyAmounts = Field(...)
|
40
|
+
unitisation: Optional[UnitisationData] = None
|
41
|
+
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).")
|
42
|
+
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.")
|
43
|
+
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.")
|
44
|
+
previous_share_class_breakdown: PreviousShareClassBreakdown = Field(..., alias="previousShareClassBreakdown")
|
45
|
+
__properties = ["backOut", "dealing", "pnL", "gav", "fees", "nav", "unitisation", "miscellaneous", "shareClassToFundFxRate", "capitalRatio", "previousShareClassBreakdown"]
|
46
|
+
|
47
|
+
class Config:
|
48
|
+
"""Pydantic configuration"""
|
49
|
+
allow_population_by_field_name = True
|
50
|
+
validate_assignment = True
|
51
|
+
|
52
|
+
def to_str(self) -> str:
|
53
|
+
"""Returns the string representation of the model using alias"""
|
54
|
+
return pprint.pformat(self.dict(by_alias=True))
|
55
|
+
|
56
|
+
def to_json(self) -> str:
|
57
|
+
"""Returns the JSON representation of the model using alias"""
|
58
|
+
return json.dumps(self.to_dict())
|
59
|
+
|
60
|
+
@classmethod
|
61
|
+
def from_json(cls, json_str: str) -> ShareClassBreakdown:
|
62
|
+
"""Create an instance of ShareClassBreakdown from a JSON string"""
|
63
|
+
return cls.from_dict(json.loads(json_str))
|
64
|
+
|
65
|
+
def to_dict(self):
|
66
|
+
"""Returns the dictionary representation of the model using alias"""
|
67
|
+
_dict = self.dict(by_alias=True,
|
68
|
+
exclude={
|
69
|
+
},
|
70
|
+
exclude_none=True)
|
71
|
+
# override the default output from pydantic by calling `to_dict()` of each value in back_out (dict)
|
72
|
+
_field_dict = {}
|
73
|
+
if self.back_out:
|
74
|
+
for _key in self.back_out:
|
75
|
+
if self.back_out[_key]:
|
76
|
+
_field_dict[_key] = self.back_out[_key].to_dict()
|
77
|
+
_dict['backOut'] = _field_dict
|
78
|
+
# override the default output from pydantic by calling `to_dict()` of each value in dealing (dict)
|
79
|
+
_field_dict = {}
|
80
|
+
if self.dealing:
|
81
|
+
for _key in self.dealing:
|
82
|
+
if self.dealing[_key]:
|
83
|
+
_field_dict[_key] = self.dealing[_key].to_dict()
|
84
|
+
_dict['dealing'] = _field_dict
|
85
|
+
# override the default output from pydantic by calling `to_dict()` of pn_l
|
86
|
+
if self.pn_l:
|
87
|
+
_dict['pnL'] = self.pn_l.to_dict()
|
88
|
+
# override the default output from pydantic by calling `to_dict()` of gav
|
89
|
+
if self.gav:
|
90
|
+
_dict['gav'] = self.gav.to_dict()
|
91
|
+
# override the default output from pydantic by calling `to_dict()` of each value in fees (dict)
|
92
|
+
_field_dict = {}
|
93
|
+
if self.fees:
|
94
|
+
for _key in self.fees:
|
95
|
+
if self.fees[_key]:
|
96
|
+
_field_dict[_key] = self.fees[_key].to_dict()
|
97
|
+
_dict['fees'] = _field_dict
|
98
|
+
# override the default output from pydantic by calling `to_dict()` of nav
|
99
|
+
if self.nav:
|
100
|
+
_dict['nav'] = self.nav.to_dict()
|
101
|
+
# override the default output from pydantic by calling `to_dict()` of unitisation
|
102
|
+
if self.unitisation:
|
103
|
+
_dict['unitisation'] = self.unitisation.to_dict()
|
104
|
+
# override the default output from pydantic by calling `to_dict()` of each value in miscellaneous (dict)
|
105
|
+
_field_dict = {}
|
106
|
+
if self.miscellaneous:
|
107
|
+
for _key in self.miscellaneous:
|
108
|
+
if self.miscellaneous[_key]:
|
109
|
+
_field_dict[_key] = self.miscellaneous[_key].to_dict()
|
110
|
+
_dict['miscellaneous'] = _field_dict
|
111
|
+
# override the default output from pydantic by calling `to_dict()` of previous_share_class_breakdown
|
112
|
+
if self.previous_share_class_breakdown:
|
113
|
+
_dict['previousShareClassBreakdown'] = self.previous_share_class_breakdown.to_dict()
|
114
|
+
# set to None if miscellaneous (nullable) is None
|
115
|
+
# and __fields_set__ contains the field
|
116
|
+
if self.miscellaneous is None and "miscellaneous" in self.__fields_set__:
|
117
|
+
_dict['miscellaneous'] = None
|
118
|
+
|
119
|
+
return _dict
|
120
|
+
|
121
|
+
@classmethod
|
122
|
+
def from_dict(cls, obj: dict) -> ShareClassBreakdown:
|
123
|
+
"""Create an instance of ShareClassBreakdown from a dict"""
|
124
|
+
if obj is None:
|
125
|
+
return None
|
126
|
+
|
127
|
+
if not isinstance(obj, dict):
|
128
|
+
return ShareClassBreakdown.parse_obj(obj)
|
129
|
+
|
130
|
+
_obj = ShareClassBreakdown.parse_obj({
|
131
|
+
"back_out": dict(
|
132
|
+
(_k, ShareClassAmount.from_dict(_v))
|
133
|
+
for _k, _v in obj.get("backOut").items()
|
134
|
+
)
|
135
|
+
if obj.get("backOut") is not None
|
136
|
+
else None,
|
137
|
+
"dealing": dict(
|
138
|
+
(_k, ShareClassAmount.from_dict(_v))
|
139
|
+
for _k, _v in obj.get("dealing").items()
|
140
|
+
)
|
141
|
+
if obj.get("dealing") is not None
|
142
|
+
else None,
|
143
|
+
"pn_l": ShareClassPnlBreakdown.from_dict(obj.get("pnL")) if obj.get("pnL") is not None else None,
|
144
|
+
"gav": MultiCurrencyAmounts.from_dict(obj.get("gav")) if obj.get("gav") is not None else None,
|
145
|
+
"fees": dict(
|
146
|
+
(_k, FeeAccrual.from_dict(_v))
|
147
|
+
for _k, _v in obj.get("fees").items()
|
148
|
+
)
|
149
|
+
if obj.get("fees") is not None
|
150
|
+
else None,
|
151
|
+
"nav": MultiCurrencyAmounts.from_dict(obj.get("nav")) if obj.get("nav") is not None else None,
|
152
|
+
"unitisation": UnitisationData.from_dict(obj.get("unitisation")) if obj.get("unitisation") is not None else None,
|
153
|
+
"miscellaneous": dict(
|
154
|
+
(_k, ShareClassAmount.from_dict(_v))
|
155
|
+
for _k, _v in obj.get("miscellaneous").items()
|
156
|
+
)
|
157
|
+
if obj.get("miscellaneous") is not None
|
158
|
+
else None,
|
159
|
+
"share_class_to_fund_fx_rate": obj.get("shareClassToFundFxRate"),
|
160
|
+
"capital_ratio": obj.get("capitalRatio"),
|
161
|
+
"previous_share_class_breakdown": PreviousShareClassBreakdown.from_dict(obj.get("previousShareClassBreakdown")) if obj.get("previousShareClassBreakdown") is not None else None
|
162
|
+
})
|
163
|
+
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,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
|
lusid/models/spin_off_event.py
CHANGED
@@ -37,15 +37,15 @@ class SpinOffEvent(InstrumentEvent):
|
|
37
37
|
cost_factor: Optional[Union[StrictFloat, StrictInt]] = Field(None, alias="costFactor", description="Optional. The fraction of cost that is transferred from the existing shares to the new shares.")
|
38
38
|
fractional_units_cash_price: Optional[Union[StrictFloat, StrictInt]] = Field(None, alias="fractionalUnitsCashPrice", description="Optional. Used in calculating cash-in-lieu of fractional shares.")
|
39
39
|
fractional_units_cash_currency: Optional[StrictStr] = Field(None, alias="fractionalUnitsCashCurrency", description="Optional. Used in calculating cash-in-lieu of fractional shares.")
|
40
|
-
instrument_event_type: StrictStr = Field(..., alias="instrumentEventType", description="The Type of Event. The available values are: TransitionEvent, InformationalEvent, OpenEvent, CloseEvent, StockSplitEvent, BondDefaultEvent, CashDividendEvent, AmortisationEvent, CashFlowEvent, ExerciseEvent, ResetEvent, TriggerEvent, RawVendorEvent, InformationalErrorEvent, BondCouponEvent, DividendReinvestmentEvent, AccumulationEvent, BondPrincipalEvent, DividendOptionEvent, MaturityEvent, FxForwardSettlementEvent, ExpiryEvent, ScripDividendEvent, StockDividendEvent, ReverseStockSplitEvent, CapitalDistributionEvent, SpinOffEvent, MergerEvent")
|
40
|
+
instrument_event_type: StrictStr = Field(..., alias="instrumentEventType", description="The Type of Event. The available values are: TransitionEvent, InformationalEvent, OpenEvent, CloseEvent, StockSplitEvent, BondDefaultEvent, CashDividendEvent, AmortisationEvent, CashFlowEvent, ExerciseEvent, ResetEvent, TriggerEvent, RawVendorEvent, InformationalErrorEvent, BondCouponEvent, DividendReinvestmentEvent, AccumulationEvent, BondPrincipalEvent, DividendOptionEvent, MaturityEvent, FxForwardSettlementEvent, ExpiryEvent, ScripDividendEvent, StockDividendEvent, ReverseStockSplitEvent, CapitalDistributionEvent, SpinOffEvent, MergerEvent, FutureExpiryEvent")
|
41
41
|
additional_properties: Dict[str, Any] = {}
|
42
42
|
__properties = ["instrumentEventType", "announcementDate", "exDate", "recordDate", "paymentDate", "newInstrument", "unitsRatio", "costFactor", "fractionalUnitsCashPrice", "fractionalUnitsCashCurrency"]
|
43
43
|
|
44
44
|
@validator('instrument_event_type')
|
45
45
|
def instrument_event_type_validate_enum(cls, value):
|
46
46
|
"""Validates the enum"""
|
47
|
-
if value not in ('TransitionEvent', 'InformationalEvent', 'OpenEvent', 'CloseEvent', 'StockSplitEvent', 'BondDefaultEvent', 'CashDividendEvent', 'AmortisationEvent', 'CashFlowEvent', 'ExerciseEvent', 'ResetEvent', 'TriggerEvent', 'RawVendorEvent', 'InformationalErrorEvent', 'BondCouponEvent', 'DividendReinvestmentEvent', 'AccumulationEvent', 'BondPrincipalEvent', 'DividendOptionEvent', 'MaturityEvent', 'FxForwardSettlementEvent', 'ExpiryEvent', 'ScripDividendEvent', 'StockDividendEvent', 'ReverseStockSplitEvent', 'CapitalDistributionEvent', 'SpinOffEvent', 'MergerEvent'):
|
48
|
-
raise ValueError("must be one of enum values ('TransitionEvent', 'InformationalEvent', 'OpenEvent', 'CloseEvent', 'StockSplitEvent', 'BondDefaultEvent', 'CashDividendEvent', 'AmortisationEvent', 'CashFlowEvent', 'ExerciseEvent', 'ResetEvent', 'TriggerEvent', 'RawVendorEvent', 'InformationalErrorEvent', 'BondCouponEvent', 'DividendReinvestmentEvent', 'AccumulationEvent', 'BondPrincipalEvent', 'DividendOptionEvent', 'MaturityEvent', 'FxForwardSettlementEvent', 'ExpiryEvent', 'ScripDividendEvent', 'StockDividendEvent', 'ReverseStockSplitEvent', 'CapitalDistributionEvent', 'SpinOffEvent', 'MergerEvent')")
|
47
|
+
if value not in ('TransitionEvent', 'InformationalEvent', 'OpenEvent', 'CloseEvent', 'StockSplitEvent', 'BondDefaultEvent', 'CashDividendEvent', 'AmortisationEvent', 'CashFlowEvent', 'ExerciseEvent', 'ResetEvent', 'TriggerEvent', 'RawVendorEvent', 'InformationalErrorEvent', 'BondCouponEvent', 'DividendReinvestmentEvent', 'AccumulationEvent', 'BondPrincipalEvent', 'DividendOptionEvent', 'MaturityEvent', 'FxForwardSettlementEvent', 'ExpiryEvent', 'ScripDividendEvent', 'StockDividendEvent', 'ReverseStockSplitEvent', 'CapitalDistributionEvent', 'SpinOffEvent', 'MergerEvent', 'FutureExpiryEvent'):
|
48
|
+
raise ValueError("must be one of enum values ('TransitionEvent', 'InformationalEvent', 'OpenEvent', 'CloseEvent', 'StockSplitEvent', 'BondDefaultEvent', 'CashDividendEvent', 'AmortisationEvent', 'CashFlowEvent', 'ExerciseEvent', 'ResetEvent', 'TriggerEvent', 'RawVendorEvent', 'InformationalErrorEvent', 'BondCouponEvent', 'DividendReinvestmentEvent', 'AccumulationEvent', 'BondPrincipalEvent', 'DividendOptionEvent', 'MaturityEvent', 'FxForwardSettlementEvent', 'ExpiryEvent', 'ScripDividendEvent', 'StockDividendEvent', 'ReverseStockSplitEvent', 'CapitalDistributionEvent', 'SpinOffEvent', 'MergerEvent', 'FutureExpiryEvent')")
|
49
49
|
return value
|
50
50
|
|
51
51
|
class Config:
|
@@ -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
|
@@ -32,15 +32,15 @@ class StockDividendEvent(InstrumentEvent):
|
|
32
32
|
payment_date: datetime = Field(..., alias="paymentDate", description="The date the company pays out dividends to shareholders.")
|
33
33
|
record_date: Optional[datetime] = Field(None, alias="recordDate", description="Date you have to be the holder of record in order to participate in the tender.")
|
34
34
|
units_ratio: UnitsRatio = Field(..., alias="unitsRatio")
|
35
|
-
instrument_event_type: StrictStr = Field(..., alias="instrumentEventType", description="The Type of Event. The available values are: TransitionEvent, InformationalEvent, OpenEvent, CloseEvent, StockSplitEvent, BondDefaultEvent, CashDividendEvent, AmortisationEvent, CashFlowEvent, ExerciseEvent, ResetEvent, TriggerEvent, RawVendorEvent, InformationalErrorEvent, BondCouponEvent, DividendReinvestmentEvent, AccumulationEvent, BondPrincipalEvent, DividendOptionEvent, MaturityEvent, FxForwardSettlementEvent, ExpiryEvent, ScripDividendEvent, StockDividendEvent, ReverseStockSplitEvent, CapitalDistributionEvent, SpinOffEvent, MergerEvent")
|
35
|
+
instrument_event_type: StrictStr = Field(..., alias="instrumentEventType", description="The Type of Event. The available values are: TransitionEvent, InformationalEvent, OpenEvent, CloseEvent, StockSplitEvent, BondDefaultEvent, CashDividendEvent, AmortisationEvent, CashFlowEvent, ExerciseEvent, ResetEvent, TriggerEvent, RawVendorEvent, InformationalErrorEvent, BondCouponEvent, DividendReinvestmentEvent, AccumulationEvent, BondPrincipalEvent, DividendOptionEvent, MaturityEvent, FxForwardSettlementEvent, ExpiryEvent, ScripDividendEvent, StockDividendEvent, ReverseStockSplitEvent, CapitalDistributionEvent, SpinOffEvent, MergerEvent, FutureExpiryEvent")
|
36
36
|
additional_properties: Dict[str, Any] = {}
|
37
37
|
__properties = ["instrumentEventType", "announcementDate", "exDate", "paymentDate", "recordDate", "unitsRatio"]
|
38
38
|
|
39
39
|
@validator('instrument_event_type')
|
40
40
|
def instrument_event_type_validate_enum(cls, value):
|
41
41
|
"""Validates the enum"""
|
42
|
-
if value not in ('TransitionEvent', 'InformationalEvent', 'OpenEvent', 'CloseEvent', 'StockSplitEvent', 'BondDefaultEvent', 'CashDividendEvent', 'AmortisationEvent', 'CashFlowEvent', 'ExerciseEvent', 'ResetEvent', 'TriggerEvent', 'RawVendorEvent', 'InformationalErrorEvent', 'BondCouponEvent', 'DividendReinvestmentEvent', 'AccumulationEvent', 'BondPrincipalEvent', 'DividendOptionEvent', 'MaturityEvent', 'FxForwardSettlementEvent', 'ExpiryEvent', 'ScripDividendEvent', 'StockDividendEvent', 'ReverseStockSplitEvent', 'CapitalDistributionEvent', 'SpinOffEvent', 'MergerEvent'):
|
43
|
-
raise ValueError("must be one of enum values ('TransitionEvent', 'InformationalEvent', 'OpenEvent', 'CloseEvent', 'StockSplitEvent', 'BondDefaultEvent', 'CashDividendEvent', 'AmortisationEvent', 'CashFlowEvent', 'ExerciseEvent', 'ResetEvent', 'TriggerEvent', 'RawVendorEvent', 'InformationalErrorEvent', 'BondCouponEvent', 'DividendReinvestmentEvent', 'AccumulationEvent', 'BondPrincipalEvent', 'DividendOptionEvent', 'MaturityEvent', 'FxForwardSettlementEvent', 'ExpiryEvent', 'ScripDividendEvent', 'StockDividendEvent', 'ReverseStockSplitEvent', 'CapitalDistributionEvent', 'SpinOffEvent', 'MergerEvent')")
|
42
|
+
if value not in ('TransitionEvent', 'InformationalEvent', 'OpenEvent', 'CloseEvent', 'StockSplitEvent', 'BondDefaultEvent', 'CashDividendEvent', 'AmortisationEvent', 'CashFlowEvent', 'ExerciseEvent', 'ResetEvent', 'TriggerEvent', 'RawVendorEvent', 'InformationalErrorEvent', 'BondCouponEvent', 'DividendReinvestmentEvent', 'AccumulationEvent', 'BondPrincipalEvent', 'DividendOptionEvent', 'MaturityEvent', 'FxForwardSettlementEvent', 'ExpiryEvent', 'ScripDividendEvent', 'StockDividendEvent', 'ReverseStockSplitEvent', 'CapitalDistributionEvent', 'SpinOffEvent', 'MergerEvent', 'FutureExpiryEvent'):
|
43
|
+
raise ValueError("must be one of enum values ('TransitionEvent', 'InformationalEvent', 'OpenEvent', 'CloseEvent', 'StockSplitEvent', 'BondDefaultEvent', 'CashDividendEvent', 'AmortisationEvent', 'CashFlowEvent', 'ExerciseEvent', 'ResetEvent', 'TriggerEvent', 'RawVendorEvent', 'InformationalErrorEvent', 'BondCouponEvent', 'DividendReinvestmentEvent', 'AccumulationEvent', 'BondPrincipalEvent', 'DividendOptionEvent', 'MaturityEvent', 'FxForwardSettlementEvent', 'ExpiryEvent', 'ScripDividendEvent', 'StockDividendEvent', 'ReverseStockSplitEvent', 'CapitalDistributionEvent', 'SpinOffEvent', 'MergerEvent', 'FutureExpiryEvent')")
|
44
44
|
return value
|
45
45
|
|
46
46
|
class Config:
|
@@ -32,15 +32,15 @@ class StockSplitEvent(InstrumentEvent):
|
|
32
32
|
units_ratio: UnitsRatio = Field(..., alias="unitsRatio")
|
33
33
|
record_date: Optional[datetime] = Field(None, alias="recordDate", description="Date you have to be the holder of record in order to receive the additional shares.")
|
34
34
|
announcement_date: Optional[datetime] = Field(None, alias="announcementDate", description="Date the stock split was announced.")
|
35
|
-
instrument_event_type: StrictStr = Field(..., alias="instrumentEventType", description="The Type of Event. The available values are: TransitionEvent, InformationalEvent, OpenEvent, CloseEvent, StockSplitEvent, BondDefaultEvent, CashDividendEvent, AmortisationEvent, CashFlowEvent, ExerciseEvent, ResetEvent, TriggerEvent, RawVendorEvent, InformationalErrorEvent, BondCouponEvent, DividendReinvestmentEvent, AccumulationEvent, BondPrincipalEvent, DividendOptionEvent, MaturityEvent, FxForwardSettlementEvent, ExpiryEvent, ScripDividendEvent, StockDividendEvent, ReverseStockSplitEvent, CapitalDistributionEvent, SpinOffEvent, MergerEvent")
|
35
|
+
instrument_event_type: StrictStr = Field(..., alias="instrumentEventType", description="The Type of Event. The available values are: TransitionEvent, InformationalEvent, OpenEvent, CloseEvent, StockSplitEvent, BondDefaultEvent, CashDividendEvent, AmortisationEvent, CashFlowEvent, ExerciseEvent, ResetEvent, TriggerEvent, RawVendorEvent, InformationalErrorEvent, BondCouponEvent, DividendReinvestmentEvent, AccumulationEvent, BondPrincipalEvent, DividendOptionEvent, MaturityEvent, FxForwardSettlementEvent, ExpiryEvent, ScripDividendEvent, StockDividendEvent, ReverseStockSplitEvent, CapitalDistributionEvent, SpinOffEvent, MergerEvent, FutureExpiryEvent")
|
36
36
|
additional_properties: Dict[str, Any] = {}
|
37
37
|
__properties = ["instrumentEventType", "paymentDate", "exDate", "unitsRatio", "recordDate", "announcementDate"]
|
38
38
|
|
39
39
|
@validator('instrument_event_type')
|
40
40
|
def instrument_event_type_validate_enum(cls, value):
|
41
41
|
"""Validates the enum"""
|
42
|
-
if value not in ('TransitionEvent', 'InformationalEvent', 'OpenEvent', 'CloseEvent', 'StockSplitEvent', 'BondDefaultEvent', 'CashDividendEvent', 'AmortisationEvent', 'CashFlowEvent', 'ExerciseEvent', 'ResetEvent', 'TriggerEvent', 'RawVendorEvent', 'InformationalErrorEvent', 'BondCouponEvent', 'DividendReinvestmentEvent', 'AccumulationEvent', 'BondPrincipalEvent', 'DividendOptionEvent', 'MaturityEvent', 'FxForwardSettlementEvent', 'ExpiryEvent', 'ScripDividendEvent', 'StockDividendEvent', 'ReverseStockSplitEvent', 'CapitalDistributionEvent', 'SpinOffEvent', 'MergerEvent'):
|
43
|
-
raise ValueError("must be one of enum values ('TransitionEvent', 'InformationalEvent', 'OpenEvent', 'CloseEvent', 'StockSplitEvent', 'BondDefaultEvent', 'CashDividendEvent', 'AmortisationEvent', 'CashFlowEvent', 'ExerciseEvent', 'ResetEvent', 'TriggerEvent', 'RawVendorEvent', 'InformationalErrorEvent', 'BondCouponEvent', 'DividendReinvestmentEvent', 'AccumulationEvent', 'BondPrincipalEvent', 'DividendOptionEvent', 'MaturityEvent', 'FxForwardSettlementEvent', 'ExpiryEvent', 'ScripDividendEvent', 'StockDividendEvent', 'ReverseStockSplitEvent', 'CapitalDistributionEvent', 'SpinOffEvent', 'MergerEvent')")
|
42
|
+
if value not in ('TransitionEvent', 'InformationalEvent', 'OpenEvent', 'CloseEvent', 'StockSplitEvent', 'BondDefaultEvent', 'CashDividendEvent', 'AmortisationEvent', 'CashFlowEvent', 'ExerciseEvent', 'ResetEvent', 'TriggerEvent', 'RawVendorEvent', 'InformationalErrorEvent', 'BondCouponEvent', 'DividendReinvestmentEvent', 'AccumulationEvent', 'BondPrincipalEvent', 'DividendOptionEvent', 'MaturityEvent', 'FxForwardSettlementEvent', 'ExpiryEvent', 'ScripDividendEvent', 'StockDividendEvent', 'ReverseStockSplitEvent', 'CapitalDistributionEvent', 'SpinOffEvent', 'MergerEvent', 'FutureExpiryEvent'):
|
43
|
+
raise ValueError("must be one of enum values ('TransitionEvent', 'InformationalEvent', 'OpenEvent', 'CloseEvent', 'StockSplitEvent', 'BondDefaultEvent', 'CashDividendEvent', 'AmortisationEvent', 'CashFlowEvent', 'ExerciseEvent', 'ResetEvent', 'TriggerEvent', 'RawVendorEvent', 'InformationalErrorEvent', 'BondCouponEvent', 'DividendReinvestmentEvent', 'AccumulationEvent', 'BondPrincipalEvent', 'DividendOptionEvent', 'MaturityEvent', 'FxForwardSettlementEvent', 'ExpiryEvent', 'ScripDividendEvent', 'StockDividendEvent', 'ReverseStockSplitEvent', 'CapitalDistributionEvent', 'SpinOffEvent', 'MergerEvent', 'FutureExpiryEvent')")
|
44
44
|
return value
|
45
45
|
|
46
46
|
class Config:
|
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')
|