lusid-sdk 2.1.254__py3-none-any.whl → 2.1.259__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 +18 -0
- lusid/api/__init__.py +2 -0
- lusid/api/fund_configurations_api.py +944 -0
- lusid/api/order_management_api.py +161 -2
- lusid/configuration.py +1 -1
- lusid/models/__init__.py +16 -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_placements_response.py +153 -0
- lusid/models/cancelled_placement_result.py +83 -0
- lusid/models/capital_distribution_event.py +3 -3
- 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/component_rule.py +83 -0
- lusid/models/create_derived_transaction_portfolio_request.py +3 -3
- lusid/models/create_transaction_portfolio_request.py +3 -3
- 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/fund_configuration.py +150 -0
- lusid/models/fund_configuration_properties.py +115 -0
- lusid/models/fund_configuration_request.py +130 -0
- lusid/models/future_expiry_event.py +100 -0
- 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_event.py +6 -5
- lusid/models/instrument_event_type.py +1 -0
- lusid/models/maturity_event.py +3 -3
- lusid/models/merger_event.py +3 -3
- lusid/models/open_event.py +3 -3
- lusid/models/paged_resource_list_of_fund_configuration.py +113 -0
- lusid/models/portfolio.py +3 -3
- lusid/models/portfolio_details.py +3 -3
- lusid/models/portfolio_without_href.py +3 -3
- 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/spin_off_event.py +3 -3
- lusid/models/stock_dividend_event.py +3 -3
- lusid/models/stock_split_event.py +3 -3
- lusid/models/transition_event.py +3 -3
- lusid/models/trigger_event.py +3 -3
- {lusid_sdk-2.1.254.dist-info → lusid_sdk-2.1.259.dist-info}/METADATA +17 -3
- {lusid_sdk-2.1.254.dist-info → lusid_sdk-2.1.259.dist-info}/RECORD +53 -44
- {lusid_sdk-2.1.254.dist-info → lusid_sdk-2.1.259.dist-info}/WHEEL +0 -0
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
LUSID API
|
|
5
|
+
|
|
6
|
+
FINBOURNE Technology # noqa: E501
|
|
7
|
+
|
|
8
|
+
Contact: info@finbourne.com
|
|
9
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
10
|
+
|
|
11
|
+
Do not edit the class manually.
|
|
12
|
+
"""
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
from __future__ import annotations
|
|
16
|
+
import pprint
|
|
17
|
+
import re # noqa: F401
|
|
18
|
+
import json
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
from typing import Any, Dict, List, Optional
|
|
22
|
+
from pydantic.v1 import BaseModel, Field, StrictStr, conlist
|
|
23
|
+
from lusid.models.link import Link
|
|
24
|
+
from lusid.models.model_property import ModelProperty
|
|
25
|
+
from lusid.models.version import Version
|
|
26
|
+
|
|
27
|
+
class FundConfigurationProperties(BaseModel):
|
|
28
|
+
"""
|
|
29
|
+
FundConfigurationProperties
|
|
30
|
+
"""
|
|
31
|
+
href: Optional[StrictStr] = Field(None, description="The specific Uniform Resource Identifier (URI) for this resource at the requested effective and asAt datetime.")
|
|
32
|
+
properties: Optional[Dict[str, ModelProperty]] = Field(None, description="The Fund Configuration properties. These will be from the 'FundConfiguration' domain.")
|
|
33
|
+
version: Optional[Version] = None
|
|
34
|
+
links: Optional[conlist(Link)] = None
|
|
35
|
+
__properties = ["href", "properties", "version", "links"]
|
|
36
|
+
|
|
37
|
+
class Config:
|
|
38
|
+
"""Pydantic configuration"""
|
|
39
|
+
allow_population_by_field_name = True
|
|
40
|
+
validate_assignment = True
|
|
41
|
+
|
|
42
|
+
def to_str(self) -> str:
|
|
43
|
+
"""Returns the string representation of the model using alias"""
|
|
44
|
+
return pprint.pformat(self.dict(by_alias=True))
|
|
45
|
+
|
|
46
|
+
def to_json(self) -> str:
|
|
47
|
+
"""Returns the JSON representation of the model using alias"""
|
|
48
|
+
return json.dumps(self.to_dict())
|
|
49
|
+
|
|
50
|
+
@classmethod
|
|
51
|
+
def from_json(cls, json_str: str) -> FundConfigurationProperties:
|
|
52
|
+
"""Create an instance of FundConfigurationProperties from a JSON string"""
|
|
53
|
+
return cls.from_dict(json.loads(json_str))
|
|
54
|
+
|
|
55
|
+
def to_dict(self):
|
|
56
|
+
"""Returns the dictionary representation of the model using alias"""
|
|
57
|
+
_dict = self.dict(by_alias=True,
|
|
58
|
+
exclude={
|
|
59
|
+
},
|
|
60
|
+
exclude_none=True)
|
|
61
|
+
# override the default output from pydantic by calling `to_dict()` of each value in properties (dict)
|
|
62
|
+
_field_dict = {}
|
|
63
|
+
if self.properties:
|
|
64
|
+
for _key in self.properties:
|
|
65
|
+
if self.properties[_key]:
|
|
66
|
+
_field_dict[_key] = self.properties[_key].to_dict()
|
|
67
|
+
_dict['properties'] = _field_dict
|
|
68
|
+
# override the default output from pydantic by calling `to_dict()` of version
|
|
69
|
+
if self.version:
|
|
70
|
+
_dict['version'] = self.version.to_dict()
|
|
71
|
+
# override the default output from pydantic by calling `to_dict()` of each item in links (list)
|
|
72
|
+
_items = []
|
|
73
|
+
if self.links:
|
|
74
|
+
for _item in self.links:
|
|
75
|
+
if _item:
|
|
76
|
+
_items.append(_item.to_dict())
|
|
77
|
+
_dict['links'] = _items
|
|
78
|
+
# set to None if href (nullable) is None
|
|
79
|
+
# and __fields_set__ contains the field
|
|
80
|
+
if self.href is None and "href" in self.__fields_set__:
|
|
81
|
+
_dict['href'] = None
|
|
82
|
+
|
|
83
|
+
# set to None if properties (nullable) is None
|
|
84
|
+
# and __fields_set__ contains the field
|
|
85
|
+
if self.properties is None and "properties" in self.__fields_set__:
|
|
86
|
+
_dict['properties'] = None
|
|
87
|
+
|
|
88
|
+
# set to None if links (nullable) is None
|
|
89
|
+
# and __fields_set__ contains the field
|
|
90
|
+
if self.links is None and "links" in self.__fields_set__:
|
|
91
|
+
_dict['links'] = None
|
|
92
|
+
|
|
93
|
+
return _dict
|
|
94
|
+
|
|
95
|
+
@classmethod
|
|
96
|
+
def from_dict(cls, obj: dict) -> FundConfigurationProperties:
|
|
97
|
+
"""Create an instance of FundConfigurationProperties from a dict"""
|
|
98
|
+
if obj is None:
|
|
99
|
+
return None
|
|
100
|
+
|
|
101
|
+
if not isinstance(obj, dict):
|
|
102
|
+
return FundConfigurationProperties.parse_obj(obj)
|
|
103
|
+
|
|
104
|
+
_obj = FundConfigurationProperties.parse_obj({
|
|
105
|
+
"href": obj.get("href"),
|
|
106
|
+
"properties": dict(
|
|
107
|
+
(_k, ModelProperty.from_dict(_v))
|
|
108
|
+
for _k, _v in obj.get("properties").items()
|
|
109
|
+
)
|
|
110
|
+
if obj.get("properties") is not None
|
|
111
|
+
else None,
|
|
112
|
+
"version": Version.from_dict(obj.get("version")) if obj.get("version") is not None else None,
|
|
113
|
+
"links": [Link.from_dict(_item) for _item in obj.get("links")] if obj.get("links") is not None else None
|
|
114
|
+
})
|
|
115
|
+
return _obj
|
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
LUSID API
|
|
5
|
+
|
|
6
|
+
FINBOURNE Technology # noqa: E501
|
|
7
|
+
|
|
8
|
+
Contact: info@finbourne.com
|
|
9
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
10
|
+
|
|
11
|
+
Do not edit the class manually.
|
|
12
|
+
"""
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
from __future__ import annotations
|
|
16
|
+
import pprint
|
|
17
|
+
import re # noqa: F401
|
|
18
|
+
import json
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
from typing import Any, Dict, List, Optional
|
|
22
|
+
from pydantic.v1 import BaseModel, Field, conlist, constr, validator
|
|
23
|
+
from lusid.models.component_rule import ComponentRule
|
|
24
|
+
from lusid.models.model_property import ModelProperty
|
|
25
|
+
|
|
26
|
+
class FundConfigurationRequest(BaseModel):
|
|
27
|
+
"""
|
|
28
|
+
FundConfigurationRequest
|
|
29
|
+
"""
|
|
30
|
+
code: constr(strict=True, max_length=64, min_length=1) = Field(...)
|
|
31
|
+
display_name: Optional[constr(strict=True, max_length=256, min_length=1)] = Field(None, alias="displayName", description="The name of the Fund.")
|
|
32
|
+
description: Optional[constr(strict=True, max_length=1024, min_length=0)] = Field(None, description="A description for the Fund.")
|
|
33
|
+
component_rules: conlist(ComponentRule) = Field(..., alias="componentRules")
|
|
34
|
+
properties: Optional[Dict[str, ModelProperty]] = Field(None, description="A set of properties for the Fund Configuration.")
|
|
35
|
+
__properties = ["code", "displayName", "description", "componentRules", "properties"]
|
|
36
|
+
|
|
37
|
+
@validator('code')
|
|
38
|
+
def code_validate_regular_expression(cls, value):
|
|
39
|
+
"""Validates the regular expression"""
|
|
40
|
+
if not re.match(r"^[a-zA-Z0-9\-_]+$", value):
|
|
41
|
+
raise ValueError(r"must validate the regular expression /^[a-zA-Z0-9\-_]+$/")
|
|
42
|
+
return value
|
|
43
|
+
|
|
44
|
+
@validator('description')
|
|
45
|
+
def description_validate_regular_expression(cls, value):
|
|
46
|
+
"""Validates the regular expression"""
|
|
47
|
+
if value is None:
|
|
48
|
+
return value
|
|
49
|
+
|
|
50
|
+
if not re.match(r"^[\s\S]*$", value):
|
|
51
|
+
raise ValueError(r"must validate the regular expression /^[\s\S]*$/")
|
|
52
|
+
return value
|
|
53
|
+
|
|
54
|
+
class Config:
|
|
55
|
+
"""Pydantic configuration"""
|
|
56
|
+
allow_population_by_field_name = True
|
|
57
|
+
validate_assignment = True
|
|
58
|
+
|
|
59
|
+
def to_str(self) -> str:
|
|
60
|
+
"""Returns the string representation of the model using alias"""
|
|
61
|
+
return pprint.pformat(self.dict(by_alias=True))
|
|
62
|
+
|
|
63
|
+
def to_json(self) -> str:
|
|
64
|
+
"""Returns the JSON representation of the model using alias"""
|
|
65
|
+
return json.dumps(self.to_dict())
|
|
66
|
+
|
|
67
|
+
@classmethod
|
|
68
|
+
def from_json(cls, json_str: str) -> FundConfigurationRequest:
|
|
69
|
+
"""Create an instance of FundConfigurationRequest from a JSON string"""
|
|
70
|
+
return cls.from_dict(json.loads(json_str))
|
|
71
|
+
|
|
72
|
+
def to_dict(self):
|
|
73
|
+
"""Returns the dictionary representation of the model using alias"""
|
|
74
|
+
_dict = self.dict(by_alias=True,
|
|
75
|
+
exclude={
|
|
76
|
+
},
|
|
77
|
+
exclude_none=True)
|
|
78
|
+
# override the default output from pydantic by calling `to_dict()` of each item in component_rules (list)
|
|
79
|
+
_items = []
|
|
80
|
+
if self.component_rules:
|
|
81
|
+
for _item in self.component_rules:
|
|
82
|
+
if _item:
|
|
83
|
+
_items.append(_item.to_dict())
|
|
84
|
+
_dict['componentRules'] = _items
|
|
85
|
+
# override the default output from pydantic by calling `to_dict()` of each value in properties (dict)
|
|
86
|
+
_field_dict = {}
|
|
87
|
+
if self.properties:
|
|
88
|
+
for _key in self.properties:
|
|
89
|
+
if self.properties[_key]:
|
|
90
|
+
_field_dict[_key] = self.properties[_key].to_dict()
|
|
91
|
+
_dict['properties'] = _field_dict
|
|
92
|
+
# set to None if display_name (nullable) is None
|
|
93
|
+
# and __fields_set__ contains the field
|
|
94
|
+
if self.display_name is None and "display_name" in self.__fields_set__:
|
|
95
|
+
_dict['displayName'] = None
|
|
96
|
+
|
|
97
|
+
# set to None if description (nullable) is None
|
|
98
|
+
# and __fields_set__ contains the field
|
|
99
|
+
if self.description is None and "description" in self.__fields_set__:
|
|
100
|
+
_dict['description'] = None
|
|
101
|
+
|
|
102
|
+
# set to None if properties (nullable) is None
|
|
103
|
+
# and __fields_set__ contains the field
|
|
104
|
+
if self.properties is None and "properties" in self.__fields_set__:
|
|
105
|
+
_dict['properties'] = None
|
|
106
|
+
|
|
107
|
+
return _dict
|
|
108
|
+
|
|
109
|
+
@classmethod
|
|
110
|
+
def from_dict(cls, obj: dict) -> FundConfigurationRequest:
|
|
111
|
+
"""Create an instance of FundConfigurationRequest from a dict"""
|
|
112
|
+
if obj is None:
|
|
113
|
+
return None
|
|
114
|
+
|
|
115
|
+
if not isinstance(obj, dict):
|
|
116
|
+
return FundConfigurationRequest.parse_obj(obj)
|
|
117
|
+
|
|
118
|
+
_obj = FundConfigurationRequest.parse_obj({
|
|
119
|
+
"code": obj.get("code"),
|
|
120
|
+
"display_name": obj.get("displayName"),
|
|
121
|
+
"description": obj.get("description"),
|
|
122
|
+
"component_rules": [ComponentRule.from_dict(_item) for _item in obj.get("componentRules")] if obj.get("componentRules") is not None else None,
|
|
123
|
+
"properties": dict(
|
|
124
|
+
(_k, ModelProperty.from_dict(_v))
|
|
125
|
+
for _k, _v in obj.get("properties").items()
|
|
126
|
+
)
|
|
127
|
+
if obj.get("properties") is not None
|
|
128
|
+
else None
|
|
129
|
+
})
|
|
130
|
+
return _obj
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
LUSID API
|
|
5
|
+
|
|
6
|
+
FINBOURNE Technology # noqa: E501
|
|
7
|
+
|
|
8
|
+
Contact: info@finbourne.com
|
|
9
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
10
|
+
|
|
11
|
+
Do not edit the class manually.
|
|
12
|
+
"""
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
from __future__ import annotations
|
|
16
|
+
import pprint
|
|
17
|
+
import re # noqa: F401
|
|
18
|
+
import json
|
|
19
|
+
|
|
20
|
+
from datetime import datetime
|
|
21
|
+
from typing import Any, Dict, Optional, Union
|
|
22
|
+
from pydantic.v1 import Field, StrictFloat, StrictInt, StrictStr, validator
|
|
23
|
+
from lusid.models.instrument_event import InstrumentEvent
|
|
24
|
+
|
|
25
|
+
class FutureExpiryEvent(InstrumentEvent):
|
|
26
|
+
"""
|
|
27
|
+
Definition of a Future Expiry Event. This is an event that describes the expiry of a Future instrument. # noqa: E501
|
|
28
|
+
"""
|
|
29
|
+
expiry_date: datetime = Field(..., alias="expiryDate", description="Expiry date of the Future instrument.")
|
|
30
|
+
settlement_currency: StrictStr = Field(..., alias="settlementCurrency", description="Settlement currency of the Future instrument.")
|
|
31
|
+
notional_amount_per_unit: Optional[Union[StrictFloat, StrictInt]] = Field(None, alias="notionalAmountPerUnit", description="The notional amount of each unit in the Future instrument.")
|
|
32
|
+
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")
|
|
33
|
+
additional_properties: Dict[str, Any] = {}
|
|
34
|
+
__properties = ["instrumentEventType", "expiryDate", "settlementCurrency", "notionalAmountPerUnit"]
|
|
35
|
+
|
|
36
|
+
@validator('instrument_event_type')
|
|
37
|
+
def instrument_event_type_validate_enum(cls, value):
|
|
38
|
+
"""Validates the enum"""
|
|
39
|
+
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'):
|
|
40
|
+
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')")
|
|
41
|
+
return value
|
|
42
|
+
|
|
43
|
+
class Config:
|
|
44
|
+
"""Pydantic configuration"""
|
|
45
|
+
allow_population_by_field_name = True
|
|
46
|
+
validate_assignment = True
|
|
47
|
+
|
|
48
|
+
def to_str(self) -> str:
|
|
49
|
+
"""Returns the string representation of the model using alias"""
|
|
50
|
+
return pprint.pformat(self.dict(by_alias=True))
|
|
51
|
+
|
|
52
|
+
def to_json(self) -> str:
|
|
53
|
+
"""Returns the JSON representation of the model using alias"""
|
|
54
|
+
return json.dumps(self.to_dict())
|
|
55
|
+
|
|
56
|
+
@classmethod
|
|
57
|
+
def from_json(cls, json_str: str) -> FutureExpiryEvent:
|
|
58
|
+
"""Create an instance of FutureExpiryEvent from a JSON string"""
|
|
59
|
+
return cls.from_dict(json.loads(json_str))
|
|
60
|
+
|
|
61
|
+
def to_dict(self):
|
|
62
|
+
"""Returns the dictionary representation of the model using alias"""
|
|
63
|
+
_dict = self.dict(by_alias=True,
|
|
64
|
+
exclude={
|
|
65
|
+
"additional_properties"
|
|
66
|
+
},
|
|
67
|
+
exclude_none=True)
|
|
68
|
+
# puts key-value pairs in additional_properties in the top level
|
|
69
|
+
if self.additional_properties is not None:
|
|
70
|
+
for _key, _value in self.additional_properties.items():
|
|
71
|
+
_dict[_key] = _value
|
|
72
|
+
|
|
73
|
+
# set to None if notional_amount_per_unit (nullable) is None
|
|
74
|
+
# and __fields_set__ contains the field
|
|
75
|
+
if self.notional_amount_per_unit is None and "notional_amount_per_unit" in self.__fields_set__:
|
|
76
|
+
_dict['notionalAmountPerUnit'] = None
|
|
77
|
+
|
|
78
|
+
return _dict
|
|
79
|
+
|
|
80
|
+
@classmethod
|
|
81
|
+
def from_dict(cls, obj: dict) -> FutureExpiryEvent:
|
|
82
|
+
"""Create an instance of FutureExpiryEvent from a dict"""
|
|
83
|
+
if obj is None:
|
|
84
|
+
return None
|
|
85
|
+
|
|
86
|
+
if not isinstance(obj, dict):
|
|
87
|
+
return FutureExpiryEvent.parse_obj(obj)
|
|
88
|
+
|
|
89
|
+
_obj = FutureExpiryEvent.parse_obj({
|
|
90
|
+
"instrument_event_type": obj.get("instrumentEventType"),
|
|
91
|
+
"expiry_date": obj.get("expiryDate"),
|
|
92
|
+
"settlement_currency": obj.get("settlementCurrency"),
|
|
93
|
+
"notional_amount_per_unit": obj.get("notionalAmountPerUnit")
|
|
94
|
+
})
|
|
95
|
+
# store additional fields in additional_properties
|
|
96
|
+
for _key in obj.keys():
|
|
97
|
+
if _key not in cls.__properties:
|
|
98
|
+
_obj.additional_properties[_key] = obj.get(_key)
|
|
99
|
+
|
|
100
|
+
return _obj
|
|
@@ -37,15 +37,15 @@ class FxForwardSettlementEvent(InstrumentEvent):
|
|
|
37
37
|
cash_flow_per_unit: Optional[Union[StrictFloat, StrictInt]] = Field(None, alias="cashFlowPerUnit", description="Optional. Required if the event is an NDF (i.e. if IsNdf = true). CashFlow per unit. Paid in the SettlementCcy.")
|
|
38
38
|
domestic_to_foreign_rate: Optional[Union[StrictFloat, StrictInt]] = Field(None, alias="domesticToForeignRate", description="Domestic currency to foreign currency FX rate. Not required, only used to override quotes.")
|
|
39
39
|
domestic_to_settlement_rate: Optional[Union[StrictFloat, StrictInt]] = Field(None, alias="domesticToSettlementRate", description="Domestic currency to settlement currency FX rate Not required, only used to override quotes.")
|
|
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", "maturityDate", "domAmountPerUnit", "domCcy", "fgnAmountPerUnit", "fgnCcy", "isNdf", "fixingDate", "settlementCcy", "cashFlowPerUnit", "domesticToForeignRate", "domesticToSettlementRate"]
|
|
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:
|
|
@@ -29,15 +29,15 @@ class InformationalErrorEvent(InstrumentEvent):
|
|
|
29
29
|
error_detail: constr(strict=True, min_length=1) = Field(..., alias="errorDetail", description="The details of the error")
|
|
30
30
|
error_reason: constr(strict=True, min_length=1) = Field(..., alias="errorReason", description="The error reason")
|
|
31
31
|
effective_at: datetime = Field(..., alias="effectiveAt", description="The effective date of the evaulation")
|
|
32
|
-
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")
|
|
32
|
+
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")
|
|
33
33
|
additional_properties: Dict[str, Any] = {}
|
|
34
34
|
__properties = ["instrumentEventType", "errorDetail", "errorReason", "effectiveAt"]
|
|
35
35
|
|
|
36
36
|
@validator('instrument_event_type')
|
|
37
37
|
def instrument_event_type_validate_enum(cls, value):
|
|
38
38
|
"""Validates the enum"""
|
|
39
|
-
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'):
|
|
40
|
-
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')")
|
|
39
|
+
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'):
|
|
40
|
+
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')")
|
|
41
41
|
return value
|
|
42
42
|
|
|
43
43
|
class Config:
|
|
@@ -31,15 +31,15 @@ class InformationalEvent(InstrumentEvent):
|
|
|
31
31
|
anchor_date: datetime = Field(..., alias="anchorDate", description="In the case of a point event, the single date on which the event occurs. In the case of an event which is spread over a window, e.g. a barrier or American option, the start of that window.")
|
|
32
32
|
event_window_end: Optional[datetime] = Field(None, alias="eventWindowEnd", description="In the case of a point event this is identical to the anchor date. In the case of an event that is spread over a window, this is the end of that window.")
|
|
33
33
|
diagnostics: Optional[ResultValueDictionary] = None
|
|
34
|
-
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")
|
|
34
|
+
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")
|
|
35
35
|
additional_properties: Dict[str, Any] = {}
|
|
36
36
|
__properties = ["instrumentEventType", "eventType", "anchorDate", "eventWindowEnd", "diagnostics"]
|
|
37
37
|
|
|
38
38
|
@validator('instrument_event_type')
|
|
39
39
|
def instrument_event_type_validate_enum(cls, value):
|
|
40
40
|
"""Validates the enum"""
|
|
41
|
-
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'):
|
|
42
|
-
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')")
|
|
41
|
+
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'):
|
|
42
|
+
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')")
|
|
43
43
|
return value
|
|
44
44
|
|
|
45
45
|
class Config:
|
lusid/models/instrument_event.py
CHANGED
|
@@ -26,14 +26,14 @@ class InstrumentEvent(BaseModel):
|
|
|
26
26
|
"""
|
|
27
27
|
Base class for representing instrument events in LUSID, such as dividends, stock splits, and option exercises. This base class should not be directly instantiated; each supported InstrumentEventType has a corresponding inherited class. # noqa: E501
|
|
28
28
|
"""
|
|
29
|
-
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")
|
|
29
|
+
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")
|
|
30
30
|
__properties = ["instrumentEventType"]
|
|
31
31
|
|
|
32
32
|
@validator('instrument_event_type')
|
|
33
33
|
def instrument_event_type_validate_enum(cls, value):
|
|
34
34
|
"""Validates the enum"""
|
|
35
|
-
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'):
|
|
36
|
-
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')")
|
|
35
|
+
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'):
|
|
36
|
+
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')")
|
|
37
37
|
return value
|
|
38
38
|
|
|
39
39
|
class Config:
|
|
@@ -59,6 +59,7 @@ class InstrumentEvent(BaseModel):
|
|
|
59
59
|
'DividendReinvestmentEvent': 'DividendReinvestmentEvent',
|
|
60
60
|
'ExerciseEvent': 'ExerciseEvent',
|
|
61
61
|
'ExpiryEvent': 'ExpiryEvent',
|
|
62
|
+
'FutureExpiryEvent': 'FutureExpiryEvent',
|
|
62
63
|
'FxForwardSettlementEvent': 'FxForwardSettlementEvent',
|
|
63
64
|
'InformationalErrorEvent': 'InformationalErrorEvent',
|
|
64
65
|
'InformationalEvent': 'InformationalEvent',
|
|
@@ -94,7 +95,7 @@ class InstrumentEvent(BaseModel):
|
|
|
94
95
|
return json.dumps(self.to_dict())
|
|
95
96
|
|
|
96
97
|
@classmethod
|
|
97
|
-
def from_json(cls, json_str: str) -> Union(AccumulationEvent, AmortisationEvent, BondCouponEvent, BondDefaultEvent, BondPrincipalEvent, CapitalDistributionEvent, CashDividendEvent, CashFlowEvent, CloseEvent, DividendOptionEvent, DividendReinvestmentEvent, ExerciseEvent, ExpiryEvent, FxForwardSettlementEvent, InformationalErrorEvent, InformationalEvent, MaturityEvent, MergerEvent, OpenEvent, RawVendorEvent, ResetEvent, ReverseStockSplitEvent, ScripDividendEvent, SpinOffEvent, StockDividendEvent, StockSplitEvent, TransitionEvent, TriggerEvent):
|
|
98
|
+
def from_json(cls, json_str: str) -> Union(AccumulationEvent, AmortisationEvent, BondCouponEvent, BondDefaultEvent, BondPrincipalEvent, CapitalDistributionEvent, CashDividendEvent, CashFlowEvent, CloseEvent, DividendOptionEvent, DividendReinvestmentEvent, ExerciseEvent, ExpiryEvent, FutureExpiryEvent, FxForwardSettlementEvent, InformationalErrorEvent, InformationalEvent, MaturityEvent, MergerEvent, OpenEvent, RawVendorEvent, ResetEvent, ReverseStockSplitEvent, ScripDividendEvent, SpinOffEvent, StockDividendEvent, StockSplitEvent, TransitionEvent, TriggerEvent):
|
|
98
99
|
"""Create an instance of InstrumentEvent from a JSON string"""
|
|
99
100
|
return cls.from_dict(json.loads(json_str))
|
|
100
101
|
|
|
@@ -107,7 +108,7 @@ class InstrumentEvent(BaseModel):
|
|
|
107
108
|
return _dict
|
|
108
109
|
|
|
109
110
|
@classmethod
|
|
110
|
-
def from_dict(cls, obj: dict) -> Union(AccumulationEvent, AmortisationEvent, BondCouponEvent, BondDefaultEvent, BondPrincipalEvent, CapitalDistributionEvent, CashDividendEvent, CashFlowEvent, CloseEvent, DividendOptionEvent, DividendReinvestmentEvent, ExerciseEvent, ExpiryEvent, FxForwardSettlementEvent, InformationalErrorEvent, InformationalEvent, MaturityEvent, MergerEvent, OpenEvent, RawVendorEvent, ResetEvent, ReverseStockSplitEvent, ScripDividendEvent, SpinOffEvent, StockDividendEvent, StockSplitEvent, TransitionEvent, TriggerEvent):
|
|
111
|
+
def from_dict(cls, obj: dict) -> Union(AccumulationEvent, AmortisationEvent, BondCouponEvent, BondDefaultEvent, BondPrincipalEvent, CapitalDistributionEvent, CashDividendEvent, CashFlowEvent, CloseEvent, DividendOptionEvent, DividendReinvestmentEvent, ExerciseEvent, ExpiryEvent, FutureExpiryEvent, FxForwardSettlementEvent, InformationalErrorEvent, InformationalEvent, MaturityEvent, MergerEvent, OpenEvent, RawVendorEvent, ResetEvent, ReverseStockSplitEvent, ScripDividendEvent, SpinOffEvent, StockDividendEvent, StockSplitEvent, TransitionEvent, TriggerEvent):
|
|
111
112
|
"""Create an instance of InstrumentEvent from a dict"""
|
|
112
113
|
# look up the object type based on discriminator mapping
|
|
113
114
|
object_type = cls.get_discriminator_value(obj)
|
|
@@ -57,6 +57,7 @@ class InstrumentEventType(str, Enum):
|
|
|
57
57
|
CAPITALDISTRIBUTIONEVENT = 'CapitalDistributionEvent'
|
|
58
58
|
SPINOFFEVENT = 'SpinOffEvent'
|
|
59
59
|
MERGEREVENT = 'MergerEvent'
|
|
60
|
+
FUTUREEXPIRYEVENT = 'FutureExpiryEvent'
|
|
60
61
|
|
|
61
62
|
@classmethod
|
|
62
63
|
def from_json(cls, json_str: str) -> InstrumentEventType:
|
lusid/models/maturity_event.py
CHANGED
|
@@ -27,15 +27,15 @@ class MaturityEvent(InstrumentEvent):
|
|
|
27
27
|
Definition of a Maturity Event This is an event that describes the maturity of the instrument. # noqa: E501
|
|
28
28
|
"""
|
|
29
29
|
maturity_date: datetime = Field(..., alias="maturityDate", description="Maturity date of the instrument")
|
|
30
|
-
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")
|
|
30
|
+
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")
|
|
31
31
|
additional_properties: Dict[str, Any] = {}
|
|
32
32
|
__properties = ["instrumentEventType", "maturityDate"]
|
|
33
33
|
|
|
34
34
|
@validator('instrument_event_type')
|
|
35
35
|
def instrument_event_type_validate_enum(cls, value):
|
|
36
36
|
"""Validates the enum"""
|
|
37
|
-
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'):
|
|
38
|
-
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')")
|
|
37
|
+
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'):
|
|
38
|
+
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')")
|
|
39
39
|
return value
|
|
40
40
|
|
|
41
41
|
class Config:
|
lusid/models/merger_event.py
CHANGED
|
@@ -40,15 +40,15 @@ class MergerEvent(InstrumentEvent):
|
|
|
40
40
|
payment_date: datetime = Field(..., alias="paymentDate", description="Date on which the merger takes place.")
|
|
41
41
|
record_date: Optional[datetime] = Field(None, alias="recordDate", description="Optional. Date you have to be the holder of record of the original shares in order to receive the new shares.")
|
|
42
42
|
security_elections: Optional[conlist(SecurityOfferElection)] = Field(None, alias="securityElections", description="List of possible SecurityOfferElections for this merger event")
|
|
43
|
-
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")
|
|
43
|
+
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")
|
|
44
44
|
additional_properties: Dict[str, Any] = {}
|
|
45
45
|
__properties = ["instrumentEventType", "announcementDate", "cashAndSecurityOfferElections", "cashElections", "exDate", "fractionalUnitsCashCurrency", "fractionalUnitsCashPrice", "newInstrument", "paymentDate", "recordDate", "securityElections"]
|
|
46
46
|
|
|
47
47
|
@validator('instrument_event_type')
|
|
48
48
|
def instrument_event_type_validate_enum(cls, value):
|
|
49
49
|
"""Validates the enum"""
|
|
50
|
-
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'):
|
|
51
|
-
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')")
|
|
50
|
+
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'):
|
|
51
|
+
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')")
|
|
52
52
|
return value
|
|
53
53
|
|
|
54
54
|
class Config:
|
lusid/models/open_event.py
CHANGED
|
@@ -27,15 +27,15 @@ class OpenEvent(InstrumentEvent):
|
|
|
27
27
|
The opening of an instrument. # noqa: E501
|
|
28
28
|
"""
|
|
29
29
|
anchor_date: Optional[datetime] = Field(None, alias="anchorDate", description="The date on the which the instrument was opened.")
|
|
30
|
-
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")
|
|
30
|
+
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")
|
|
31
31
|
additional_properties: Dict[str, Any] = {}
|
|
32
32
|
__properties = ["instrumentEventType", "anchorDate"]
|
|
33
33
|
|
|
34
34
|
@validator('instrument_event_type')
|
|
35
35
|
def instrument_event_type_validate_enum(cls, value):
|
|
36
36
|
"""Validates the enum"""
|
|
37
|
-
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'):
|
|
38
|
-
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')")
|
|
37
|
+
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'):
|
|
38
|
+
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')")
|
|
39
39
|
return value
|
|
40
40
|
|
|
41
41
|
class Config:
|