lusid-sdk 2.1.157__py3-none-any.whl → 2.1.191__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 +10 -0
- lusid/api/amortisation_rule_sets_api.py +1 -1
- lusid/api/chart_of_accounts_api.py +365 -0
- lusid/api/entities_api.py +18 -9
- lusid/api/fee_types_api.py +1 -1
- lusid/api/funds_api.py +259 -76
- lusid/api/relations_api.py +1 -1
- lusid/configuration.py +1 -1
- lusid/models/__init__.py +10 -0
- lusid/models/accumulation_event.py +3 -3
- lusid/models/amortisation_event.py +3 -3
- lusid/models/applicable_instrument_event.py +9 -4
- 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/capital_distribution_event.py +3 -3
- lusid/models/cash_and_security_offer_election.py +90 -0
- lusid/models/cash_dividend_event.py +3 -3
- lusid/models/cash_flow_event.py +3 -3
- lusid/models/cash_offer_election.py +77 -0
- lusid/models/close_event.py +3 -3
- lusid/models/create_derived_property_definition_request.py +3 -3
- lusid/models/create_property_definition_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/fee.py +3 -3
- lusid/models/fee_accrual.py +4 -2
- lusid/models/fee_properties.py +115 -0
- lusid/models/fee_request.py +3 -3
- lusid/models/float_schedule.py +5 -3
- lusid/models/fx_forward_settlement_event.py +3 -3
- lusid/models/group_filter_step.py +2 -11
- 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/journal_entry_lines_query_parameters.py +1 -1
- lusid/models/maturity_event.py +3 -3
- lusid/models/merger_event.py +172 -0
- lusid/models/open_event.py +3 -3
- lusid/models/portfolio_entity.py +13 -1
- lusid/models/portfolio_properties.py +7 -1
- lusid/models/property_definition.py +3 -3
- lusid/models/property_definition_search_result.py +3 -3
- lusid/models/property_domain.py +1 -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/security_offer_election.py +79 -0
- 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/transaction_type_calculation.py +11 -3
- lusid/models/transition_event.py +3 -3
- lusid/models/trial_balance_query_parameters.py +1 -1
- lusid/models/trigger_event.py +3 -3
- lusid/models/upsert_valuation_point_request.py +2 -15
- {lusid_sdk-2.1.157.dist-info → lusid_sdk-2.1.191.dist-info}/METADATA +15 -7
- {lusid_sdk-2.1.157.dist-info → lusid_sdk-2.1.191.dist-info}/RECORD +63 -58
- {lusid_sdk-2.1.157.dist-info → lusid_sdk-2.1.191.dist-info}/WHEEL +0 -0
|
@@ -0,0 +1,172 @@
|
|
|
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, List, Optional, Union
|
|
22
|
+
from pydantic.v1 import Field, StrictFloat, StrictInt, StrictStr, conlist, validator
|
|
23
|
+
from lusid.models.cash_and_security_offer_election import CashAndSecurityOfferElection
|
|
24
|
+
from lusid.models.cash_offer_election import CashOfferElection
|
|
25
|
+
from lusid.models.instrument_event import InstrumentEvent
|
|
26
|
+
from lusid.models.new_instrument import NewInstrument
|
|
27
|
+
from lusid.models.security_offer_election import SecurityOfferElection
|
|
28
|
+
|
|
29
|
+
class MergerEvent(InstrumentEvent):
|
|
30
|
+
"""
|
|
31
|
+
Merger Event (MRGR). # noqa: E501
|
|
32
|
+
"""
|
|
33
|
+
announcement_date: Optional[datetime] = Field(None, alias="announcementDate", description="The date the merger is announced.")
|
|
34
|
+
cash_and_security_offer_elections: Optional[conlist(CashAndSecurityOfferElection)] = Field(None, alias="cashAndSecurityOfferElections", description="List of possible CashAndSecurityOfferElections for this merger event")
|
|
35
|
+
cash_elections: Optional[conlist(CashOfferElection)] = Field(None, alias="cashElections", description="List of possible CashOfferElections for this merger event")
|
|
36
|
+
ex_date: datetime = Field(..., alias="exDate", description="The first date on which the holder of record of the original shares has entitled ownership of the new shares.")
|
|
37
|
+
fractional_units_cash_currency: Optional[StrictStr] = Field(None, alias="fractionalUnitsCashCurrency", description="Optional. Used in calculating cash-in-lieu of fractional shares.")
|
|
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
|
+
new_instrument: NewInstrument = Field(..., alias="newInstrument")
|
|
40
|
+
payment_date: datetime = Field(..., alias="paymentDate", description="Date on which the merger takes place.")
|
|
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
|
+
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")
|
|
44
|
+
additional_properties: Dict[str, Any] = {}
|
|
45
|
+
__properties = ["instrumentEventType", "announcementDate", "cashAndSecurityOfferElections", "cashElections", "exDate", "fractionalUnitsCashCurrency", "fractionalUnitsCashPrice", "newInstrument", "paymentDate", "recordDate", "securityElections"]
|
|
46
|
+
|
|
47
|
+
@validator('instrument_event_type')
|
|
48
|
+
def instrument_event_type_validate_enum(cls, value):
|
|
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')")
|
|
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) -> MergerEvent:
|
|
69
|
+
"""Create an instance of MergerEvent 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
|
+
"additional_properties"
|
|
77
|
+
},
|
|
78
|
+
exclude_none=True)
|
|
79
|
+
# override the default output from pydantic by calling `to_dict()` of each item in cash_and_security_offer_elections (list)
|
|
80
|
+
_items = []
|
|
81
|
+
if self.cash_and_security_offer_elections:
|
|
82
|
+
for _item in self.cash_and_security_offer_elections:
|
|
83
|
+
if _item:
|
|
84
|
+
_items.append(_item.to_dict())
|
|
85
|
+
_dict['cashAndSecurityOfferElections'] = _items
|
|
86
|
+
# override the default output from pydantic by calling `to_dict()` of each item in cash_elections (list)
|
|
87
|
+
_items = []
|
|
88
|
+
if self.cash_elections:
|
|
89
|
+
for _item in self.cash_elections:
|
|
90
|
+
if _item:
|
|
91
|
+
_items.append(_item.to_dict())
|
|
92
|
+
_dict['cashElections'] = _items
|
|
93
|
+
# override the default output from pydantic by calling `to_dict()` of new_instrument
|
|
94
|
+
if self.new_instrument:
|
|
95
|
+
_dict['newInstrument'] = self.new_instrument.to_dict()
|
|
96
|
+
# override the default output from pydantic by calling `to_dict()` of each item in security_elections (list)
|
|
97
|
+
_items = []
|
|
98
|
+
if self.security_elections:
|
|
99
|
+
for _item in self.security_elections:
|
|
100
|
+
if _item:
|
|
101
|
+
_items.append(_item.to_dict())
|
|
102
|
+
_dict['securityElections'] = _items
|
|
103
|
+
# puts key-value pairs in additional_properties in the top level
|
|
104
|
+
if self.additional_properties is not None:
|
|
105
|
+
for _key, _value in self.additional_properties.items():
|
|
106
|
+
_dict[_key] = _value
|
|
107
|
+
|
|
108
|
+
# set to None if announcement_date (nullable) is None
|
|
109
|
+
# and __fields_set__ contains the field
|
|
110
|
+
if self.announcement_date is None and "announcement_date" in self.__fields_set__:
|
|
111
|
+
_dict['announcementDate'] = None
|
|
112
|
+
|
|
113
|
+
# set to None if cash_and_security_offer_elections (nullable) is None
|
|
114
|
+
# and __fields_set__ contains the field
|
|
115
|
+
if self.cash_and_security_offer_elections is None and "cash_and_security_offer_elections" in self.__fields_set__:
|
|
116
|
+
_dict['cashAndSecurityOfferElections'] = None
|
|
117
|
+
|
|
118
|
+
# set to None if cash_elections (nullable) is None
|
|
119
|
+
# and __fields_set__ contains the field
|
|
120
|
+
if self.cash_elections is None and "cash_elections" in self.__fields_set__:
|
|
121
|
+
_dict['cashElections'] = None
|
|
122
|
+
|
|
123
|
+
# set to None if fractional_units_cash_currency (nullable) is None
|
|
124
|
+
# and __fields_set__ contains the field
|
|
125
|
+
if self.fractional_units_cash_currency is None and "fractional_units_cash_currency" in self.__fields_set__:
|
|
126
|
+
_dict['fractionalUnitsCashCurrency'] = None
|
|
127
|
+
|
|
128
|
+
# set to None if fractional_units_cash_price (nullable) is None
|
|
129
|
+
# and __fields_set__ contains the field
|
|
130
|
+
if self.fractional_units_cash_price is None and "fractional_units_cash_price" in self.__fields_set__:
|
|
131
|
+
_dict['fractionalUnitsCashPrice'] = None
|
|
132
|
+
|
|
133
|
+
# set to None if record_date (nullable) is None
|
|
134
|
+
# and __fields_set__ contains the field
|
|
135
|
+
if self.record_date is None and "record_date" in self.__fields_set__:
|
|
136
|
+
_dict['recordDate'] = None
|
|
137
|
+
|
|
138
|
+
# set to None if security_elections (nullable) is None
|
|
139
|
+
# and __fields_set__ contains the field
|
|
140
|
+
if self.security_elections is None and "security_elections" in self.__fields_set__:
|
|
141
|
+
_dict['securityElections'] = None
|
|
142
|
+
|
|
143
|
+
return _dict
|
|
144
|
+
|
|
145
|
+
@classmethod
|
|
146
|
+
def from_dict(cls, obj: dict) -> MergerEvent:
|
|
147
|
+
"""Create an instance of MergerEvent from a dict"""
|
|
148
|
+
if obj is None:
|
|
149
|
+
return None
|
|
150
|
+
|
|
151
|
+
if not isinstance(obj, dict):
|
|
152
|
+
return MergerEvent.parse_obj(obj)
|
|
153
|
+
|
|
154
|
+
_obj = MergerEvent.parse_obj({
|
|
155
|
+
"instrument_event_type": obj.get("instrumentEventType"),
|
|
156
|
+
"announcement_date": obj.get("announcementDate"),
|
|
157
|
+
"cash_and_security_offer_elections": [CashAndSecurityOfferElection.from_dict(_item) for _item in obj.get("cashAndSecurityOfferElections")] if obj.get("cashAndSecurityOfferElections") is not None else None,
|
|
158
|
+
"cash_elections": [CashOfferElection.from_dict(_item) for _item in obj.get("cashElections")] if obj.get("cashElections") is not None else None,
|
|
159
|
+
"ex_date": obj.get("exDate"),
|
|
160
|
+
"fractional_units_cash_currency": obj.get("fractionalUnitsCashCurrency"),
|
|
161
|
+
"fractional_units_cash_price": obj.get("fractionalUnitsCashPrice"),
|
|
162
|
+
"new_instrument": NewInstrument.from_dict(obj.get("newInstrument")) if obj.get("newInstrument") is not None else None,
|
|
163
|
+
"payment_date": obj.get("paymentDate"),
|
|
164
|
+
"record_date": obj.get("recordDate"),
|
|
165
|
+
"security_elections": [SecurityOfferElection.from_dict(_item) for _item in obj.get("securityElections")] if obj.get("securityElections") is not None else None
|
|
166
|
+
})
|
|
167
|
+
# store additional fields in additional_properties
|
|
168
|
+
for _key in obj.keys():
|
|
169
|
+
if _key not in cls.__properties:
|
|
170
|
+
_obj.additional_properties[_key] = obj.get(_key)
|
|
171
|
+
|
|
172
|
+
return _obj
|
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")
|
|
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")
|
|
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'):
|
|
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')")
|
|
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')")
|
|
39
39
|
return value
|
|
40
40
|
|
|
41
41
|
class Config:
|
lusid/models/portfolio_entity.py
CHANGED
|
@@ -37,8 +37,10 @@ class PortfolioEntity(BaseModel):
|
|
|
37
37
|
effective_at_created: Optional[datetime] = Field(None, alias="effectiveAtCreated", description="The EffectiveAt this Entity is created, if entity does not currently exist in EffectiveAt.")
|
|
38
38
|
prevailing_portfolio: Optional[PortfolioWithoutHref] = Field(None, alias="prevailingPortfolio")
|
|
39
39
|
deleted_portfolio: Optional[PortfolioWithoutHref] = Field(None, alias="deletedPortfolio")
|
|
40
|
+
previewed_status: Optional[StrictStr] = Field(None, alias="previewedStatus", description="The status of the previewed entity.")
|
|
41
|
+
previewed_portfolio: Optional[PortfolioWithoutHref] = Field(None, alias="previewedPortfolio")
|
|
40
42
|
links: Optional[conlist(Link)] = None
|
|
41
|
-
__properties = ["href", "entityUniqueId", "asAtVersionNumber", "status", "asAtDeleted", "userIdDeleted", "requestIdDeleted", "effectiveAtCreated", "prevailingPortfolio", "deletedPortfolio", "links"]
|
|
43
|
+
__properties = ["href", "entityUniqueId", "asAtVersionNumber", "status", "asAtDeleted", "userIdDeleted", "requestIdDeleted", "effectiveAtCreated", "prevailingPortfolio", "deletedPortfolio", "previewedStatus", "previewedPortfolio", "links"]
|
|
42
44
|
|
|
43
45
|
class Config:
|
|
44
46
|
"""Pydantic configuration"""
|
|
@@ -70,6 +72,9 @@ class PortfolioEntity(BaseModel):
|
|
|
70
72
|
# override the default output from pydantic by calling `to_dict()` of deleted_portfolio
|
|
71
73
|
if self.deleted_portfolio:
|
|
72
74
|
_dict['deletedPortfolio'] = self.deleted_portfolio.to_dict()
|
|
75
|
+
# override the default output from pydantic by calling `to_dict()` of previewed_portfolio
|
|
76
|
+
if self.previewed_portfolio:
|
|
77
|
+
_dict['previewedPortfolio'] = self.previewed_portfolio.to_dict()
|
|
73
78
|
# override the default output from pydantic by calling `to_dict()` of each item in links (list)
|
|
74
79
|
_items = []
|
|
75
80
|
if self.links:
|
|
@@ -102,6 +107,11 @@ class PortfolioEntity(BaseModel):
|
|
|
102
107
|
if self.effective_at_created is None and "effective_at_created" in self.__fields_set__:
|
|
103
108
|
_dict['effectiveAtCreated'] = None
|
|
104
109
|
|
|
110
|
+
# set to None if previewed_status (nullable) is None
|
|
111
|
+
# and __fields_set__ contains the field
|
|
112
|
+
if self.previewed_status is None and "previewed_status" in self.__fields_set__:
|
|
113
|
+
_dict['previewedStatus'] = None
|
|
114
|
+
|
|
105
115
|
# set to None if links (nullable) is None
|
|
106
116
|
# and __fields_set__ contains the field
|
|
107
117
|
if self.links is None and "links" in self.__fields_set__:
|
|
@@ -129,6 +139,8 @@ class PortfolioEntity(BaseModel):
|
|
|
129
139
|
"effective_at_created": obj.get("effectiveAtCreated"),
|
|
130
140
|
"prevailing_portfolio": PortfolioWithoutHref.from_dict(obj.get("prevailingPortfolio")) if obj.get("prevailingPortfolio") is not None else None,
|
|
131
141
|
"deleted_portfolio": PortfolioWithoutHref.from_dict(obj.get("deletedPortfolio")) if obj.get("deletedPortfolio") is not None else None,
|
|
142
|
+
"previewed_status": obj.get("previewedStatus"),
|
|
143
|
+
"previewed_portfolio": PortfolioWithoutHref.from_dict(obj.get("previewedPortfolio")) if obj.get("previewedPortfolio") is not None else None,
|
|
132
144
|
"links": [Link.from_dict(_item) for _item in obj.get("links")] if obj.get("links") is not None else None
|
|
133
145
|
})
|
|
134
146
|
return _obj
|
|
@@ -22,6 +22,7 @@ from typing import Any, Dict, List, Optional
|
|
|
22
22
|
from pydantic.v1 import BaseModel, Field, StrictStr, conlist
|
|
23
23
|
from lusid.models.link import Link
|
|
24
24
|
from lusid.models.model_property import ModelProperty
|
|
25
|
+
from lusid.models.staged_modifications_info import StagedModificationsInfo
|
|
25
26
|
from lusid.models.version import Version
|
|
26
27
|
|
|
27
28
|
class PortfolioProperties(BaseModel):
|
|
@@ -31,8 +32,9 @@ class PortfolioProperties(BaseModel):
|
|
|
31
32
|
href: Optional[StrictStr] = Field(None, description="The specific Uniform Resource Identifier (URI) for this resource at the requested effective and asAt datetime.")
|
|
32
33
|
properties: Optional[Dict[str, ModelProperty]] = Field(None, description="The portfolio properties. These will be from the 'Portfolio' domain.")
|
|
33
34
|
version: Optional[Version] = None
|
|
35
|
+
staged_modifications: Optional[StagedModificationsInfo] = Field(None, alias="stagedModifications")
|
|
34
36
|
links: Optional[conlist(Link)] = None
|
|
35
|
-
__properties = ["href", "properties", "version", "links"]
|
|
37
|
+
__properties = ["href", "properties", "version", "stagedModifications", "links"]
|
|
36
38
|
|
|
37
39
|
class Config:
|
|
38
40
|
"""Pydantic configuration"""
|
|
@@ -68,6 +70,9 @@ class PortfolioProperties(BaseModel):
|
|
|
68
70
|
# override the default output from pydantic by calling `to_dict()` of version
|
|
69
71
|
if self.version:
|
|
70
72
|
_dict['version'] = self.version.to_dict()
|
|
73
|
+
# override the default output from pydantic by calling `to_dict()` of staged_modifications
|
|
74
|
+
if self.staged_modifications:
|
|
75
|
+
_dict['stagedModifications'] = self.staged_modifications.to_dict()
|
|
71
76
|
# override the default output from pydantic by calling `to_dict()` of each item in links (list)
|
|
72
77
|
_items = []
|
|
73
78
|
if self.links:
|
|
@@ -110,6 +115,7 @@ class PortfolioProperties(BaseModel):
|
|
|
110
115
|
if obj.get("properties") is not None
|
|
111
116
|
else None,
|
|
112
117
|
"version": Version.from_dict(obj.get("version")) if obj.get("version") is not None else None,
|
|
118
|
+
"staged_modifications": StagedModificationsInfo.from_dict(obj.get("stagedModifications")) if obj.get("stagedModifications") is not None else None,
|
|
113
119
|
"links": [Link.from_dict(_item) for _item in obj.get("links")] if obj.get("links") is not None else None
|
|
114
120
|
})
|
|
115
121
|
return _obj
|
|
@@ -36,7 +36,7 @@ class PropertyDefinition(BaseModel):
|
|
|
36
36
|
data_type_id: Optional[ResourceId] = Field(None, alias="dataTypeId")
|
|
37
37
|
type: Optional[StrictStr] = Field(None, description="The type of the property. The available values are: Label, Metric, Information")
|
|
38
38
|
unit_schema: Optional[StrictStr] = Field(None, alias="unitSchema", description="The units that can be associated with the property's values. This is defined by the property's data type. The available values are: NoUnits, Basic, Iso4217Currency")
|
|
39
|
-
domain: Optional[StrictStr] = Field(None, description="The domain that the property exists in. The available values are: NotDefined, Transaction, Portfolio, Holding, ReferenceHolding, TransactionConfiguration, Instrument, CutLabelDefinition, Analytic, PortfolioGroup, Person, AccessMetadata, Order, UnitResult, MarketData, ConfigurationRecipe, Allocation, Calendar, LegalEntity, Placement, Execution, Block, Participation, Package, OrderInstruction, NextBestAction, CustomEntity, InstrumentEvent, Account, ChartOfAccounts, CustodianAccount, Abor, AborConfiguration, Fund, Fee, Reconciliation, PropertyDefinition, Compliance, DiaryEntry, Leg, DerivedValuation")
|
|
39
|
+
domain: Optional[StrictStr] = Field(None, description="The domain that the property exists in. The available values are: NotDefined, Transaction, Portfolio, Holding, ReferenceHolding, TransactionConfiguration, Instrument, CutLabelDefinition, Analytic, PortfolioGroup, Person, AccessMetadata, Order, UnitResult, MarketData, ConfigurationRecipe, Allocation, Calendar, LegalEntity, Placement, Execution, Block, Participation, Package, OrderInstruction, NextBestAction, CustomEntity, InstrumentEvent, Account, ChartOfAccounts, CustodianAccount, Abor, AborConfiguration, Fund, FundConfiguration, Fee, Reconciliation, PropertyDefinition, Compliance, DiaryEntry, Leg, DerivedValuation")
|
|
40
40
|
scope: Optional[StrictStr] = Field(None, description="The scope that the property exists in.")
|
|
41
41
|
code: Optional[StrictStr] = Field(None, description="The code of the property. Together with the domain and scope this uniquely identifies the property.")
|
|
42
42
|
value_required: Optional[StrictBool] = Field(None, alias="valueRequired", description="This field is not implemented and should be disregarded.")
|
|
@@ -87,8 +87,8 @@ class PropertyDefinition(BaseModel):
|
|
|
87
87
|
if value is None:
|
|
88
88
|
return value
|
|
89
89
|
|
|
90
|
-
if value not in ('NotDefined', 'Transaction', 'Portfolio', 'Holding', 'ReferenceHolding', 'TransactionConfiguration', 'Instrument', 'CutLabelDefinition', 'Analytic', 'PortfolioGroup', 'Person', 'AccessMetadata', 'Order', 'UnitResult', 'MarketData', 'ConfigurationRecipe', 'Allocation', 'Calendar', 'LegalEntity', 'Placement', 'Execution', 'Block', 'Participation', 'Package', 'OrderInstruction', 'NextBestAction', 'CustomEntity', 'InstrumentEvent', 'Account', 'ChartOfAccounts', 'CustodianAccount', 'Abor', 'AborConfiguration', 'Fund', 'Fee', 'Reconciliation', 'PropertyDefinition', 'Compliance', 'DiaryEntry', 'Leg', 'DerivedValuation'):
|
|
91
|
-
raise ValueError("must be one of enum values ('NotDefined', 'Transaction', 'Portfolio', 'Holding', 'ReferenceHolding', 'TransactionConfiguration', 'Instrument', 'CutLabelDefinition', 'Analytic', 'PortfolioGroup', 'Person', 'AccessMetadata', 'Order', 'UnitResult', 'MarketData', 'ConfigurationRecipe', 'Allocation', 'Calendar', 'LegalEntity', 'Placement', 'Execution', 'Block', 'Participation', 'Package', 'OrderInstruction', 'NextBestAction', 'CustomEntity', 'InstrumentEvent', 'Account', 'ChartOfAccounts', 'CustodianAccount', 'Abor', 'AborConfiguration', 'Fund', 'Fee', 'Reconciliation', 'PropertyDefinition', 'Compliance', 'DiaryEntry', 'Leg', 'DerivedValuation')")
|
|
90
|
+
if value not in ('NotDefined', 'Transaction', 'Portfolio', 'Holding', 'ReferenceHolding', 'TransactionConfiguration', 'Instrument', 'CutLabelDefinition', 'Analytic', 'PortfolioGroup', 'Person', 'AccessMetadata', 'Order', 'UnitResult', 'MarketData', 'ConfigurationRecipe', 'Allocation', 'Calendar', 'LegalEntity', 'Placement', 'Execution', 'Block', 'Participation', 'Package', 'OrderInstruction', 'NextBestAction', 'CustomEntity', 'InstrumentEvent', 'Account', 'ChartOfAccounts', 'CustodianAccount', 'Abor', 'AborConfiguration', 'Fund', 'FundConfiguration', 'Fee', 'Reconciliation', 'PropertyDefinition', 'Compliance', 'DiaryEntry', 'Leg', 'DerivedValuation'):
|
|
91
|
+
raise ValueError("must be one of enum values ('NotDefined', 'Transaction', 'Portfolio', 'Holding', 'ReferenceHolding', 'TransactionConfiguration', 'Instrument', 'CutLabelDefinition', 'Analytic', 'PortfolioGroup', 'Person', 'AccessMetadata', 'Order', 'UnitResult', 'MarketData', 'ConfigurationRecipe', 'Allocation', 'Calendar', 'LegalEntity', 'Placement', 'Execution', 'Block', 'Participation', 'Package', 'OrderInstruction', 'NextBestAction', 'CustomEntity', 'InstrumentEvent', 'Account', 'ChartOfAccounts', 'CustodianAccount', 'Abor', 'AborConfiguration', 'Fund', 'FundConfiguration', 'Fee', 'Reconciliation', 'PropertyDefinition', 'Compliance', 'DiaryEntry', 'Leg', 'DerivedValuation')")
|
|
92
92
|
return value
|
|
93
93
|
|
|
94
94
|
@validator('life_time')
|
|
@@ -34,7 +34,7 @@ class PropertyDefinitionSearchResult(BaseModel):
|
|
|
34
34
|
data_type_id: Optional[ResourceId] = Field(None, alias="dataTypeId")
|
|
35
35
|
type: Optional[StrictStr] = Field(None, description="The type of the property. The available values are: Label, Metric, Information")
|
|
36
36
|
unit_schema: Optional[StrictStr] = Field(None, alias="unitSchema", description="The units that can be associated with the property's values. This is defined by the property's data type. The available values are: NoUnits, Basic, Iso4217Currency")
|
|
37
|
-
domain: Optional[StrictStr] = Field(None, description="The domain that the property exists in. The available values are: NotDefined, Transaction, Portfolio, Holding, ReferenceHolding, TransactionConfiguration, Instrument, CutLabelDefinition, Analytic, PortfolioGroup, Person, AccessMetadata, Order, UnitResult, MarketData, ConfigurationRecipe, Allocation, Calendar, LegalEntity, Placement, Execution, Block, Participation, Package, OrderInstruction, NextBestAction, CustomEntity, InstrumentEvent, Account, ChartOfAccounts, CustodianAccount, Abor, AborConfiguration, Fund, Fee, Reconciliation, PropertyDefinition, Compliance, DiaryEntry, Leg, DerivedValuation")
|
|
37
|
+
domain: Optional[StrictStr] = Field(None, description="The domain that the property exists in. The available values are: NotDefined, Transaction, Portfolio, Holding, ReferenceHolding, TransactionConfiguration, Instrument, CutLabelDefinition, Analytic, PortfolioGroup, Person, AccessMetadata, Order, UnitResult, MarketData, ConfigurationRecipe, Allocation, Calendar, LegalEntity, Placement, Execution, Block, Participation, Package, OrderInstruction, NextBestAction, CustomEntity, InstrumentEvent, Account, ChartOfAccounts, CustodianAccount, Abor, AborConfiguration, Fund, FundConfiguration, Fee, Reconciliation, PropertyDefinition, Compliance, DiaryEntry, Leg, DerivedValuation")
|
|
38
38
|
scope: Optional[StrictStr] = Field(None, description="The scope that the property exists in.")
|
|
39
39
|
code: Optional[StrictStr] = Field(None, description="The code of the property. Together with the domain and scope this uniquely identifies the property.")
|
|
40
40
|
value_required: Optional[StrictBool] = Field(None, alias="valueRequired", description="This field is not implemented and should be disregarded.")
|
|
@@ -82,8 +82,8 @@ class PropertyDefinitionSearchResult(BaseModel):
|
|
|
82
82
|
if value is None:
|
|
83
83
|
return value
|
|
84
84
|
|
|
85
|
-
if value not in ('NotDefined', 'Transaction', 'Portfolio', 'Holding', 'ReferenceHolding', 'TransactionConfiguration', 'Instrument', 'CutLabelDefinition', 'Analytic', 'PortfolioGroup', 'Person', 'AccessMetadata', 'Order', 'UnitResult', 'MarketData', 'ConfigurationRecipe', 'Allocation', 'Calendar', 'LegalEntity', 'Placement', 'Execution', 'Block', 'Participation', 'Package', 'OrderInstruction', 'NextBestAction', 'CustomEntity', 'InstrumentEvent', 'Account', 'ChartOfAccounts', 'CustodianAccount', 'Abor', 'AborConfiguration', 'Fund', 'Fee', 'Reconciliation', 'PropertyDefinition', 'Compliance', 'DiaryEntry', 'Leg', 'DerivedValuation'):
|
|
86
|
-
raise ValueError("must be one of enum values ('NotDefined', 'Transaction', 'Portfolio', 'Holding', 'ReferenceHolding', 'TransactionConfiguration', 'Instrument', 'CutLabelDefinition', 'Analytic', 'PortfolioGroup', 'Person', 'AccessMetadata', 'Order', 'UnitResult', 'MarketData', 'ConfigurationRecipe', 'Allocation', 'Calendar', 'LegalEntity', 'Placement', 'Execution', 'Block', 'Participation', 'Package', 'OrderInstruction', 'NextBestAction', 'CustomEntity', 'InstrumentEvent', 'Account', 'ChartOfAccounts', 'CustodianAccount', 'Abor', 'AborConfiguration', 'Fund', 'Fee', 'Reconciliation', 'PropertyDefinition', 'Compliance', 'DiaryEntry', 'Leg', 'DerivedValuation')")
|
|
85
|
+
if value not in ('NotDefined', 'Transaction', 'Portfolio', 'Holding', 'ReferenceHolding', 'TransactionConfiguration', 'Instrument', 'CutLabelDefinition', 'Analytic', 'PortfolioGroup', 'Person', 'AccessMetadata', 'Order', 'UnitResult', 'MarketData', 'ConfigurationRecipe', 'Allocation', 'Calendar', 'LegalEntity', 'Placement', 'Execution', 'Block', 'Participation', 'Package', 'OrderInstruction', 'NextBestAction', 'CustomEntity', 'InstrumentEvent', 'Account', 'ChartOfAccounts', 'CustodianAccount', 'Abor', 'AborConfiguration', 'Fund', 'FundConfiguration', 'Fee', 'Reconciliation', 'PropertyDefinition', 'Compliance', 'DiaryEntry', 'Leg', 'DerivedValuation'):
|
|
86
|
+
raise ValueError("must be one of enum values ('NotDefined', 'Transaction', 'Portfolio', 'Holding', 'ReferenceHolding', 'TransactionConfiguration', 'Instrument', 'CutLabelDefinition', 'Analytic', 'PortfolioGroup', 'Person', 'AccessMetadata', 'Order', 'UnitResult', 'MarketData', 'ConfigurationRecipe', 'Allocation', 'Calendar', 'LegalEntity', 'Placement', 'Execution', 'Block', 'Participation', 'Package', 'OrderInstruction', 'NextBestAction', 'CustomEntity', 'InstrumentEvent', 'Account', 'ChartOfAccounts', 'CustodianAccount', 'Abor', 'AborConfiguration', 'Fund', 'FundConfiguration', 'Fee', 'Reconciliation', 'PropertyDefinition', 'Compliance', 'DiaryEntry', 'Leg', 'DerivedValuation')")
|
|
87
87
|
return value
|
|
88
88
|
|
|
89
89
|
@validator('life_time')
|
lusid/models/property_domain.py
CHANGED
lusid/models/raw_vendor_event.py
CHANGED
|
@@ -30,15 +30,15 @@ class RawVendorEvent(InstrumentEvent):
|
|
|
30
30
|
effective_at: datetime = Field(..., alias="effectiveAt", description="The effective date of the event")
|
|
31
31
|
event_value: LifeCycleEventValue = Field(..., alias="eventValue")
|
|
32
32
|
event_type: constr(strict=True, min_length=1) = Field(..., alias="eventType", description="What type of internal event does this represent; reset, exercise, amortisation etc.")
|
|
33
|
-
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")
|
|
33
|
+
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
34
|
additional_properties: Dict[str, Any] = {}
|
|
35
35
|
__properties = ["instrumentEventType", "effectiveAt", "eventValue", "eventType"]
|
|
36
36
|
|
|
37
37
|
@validator('instrument_event_type')
|
|
38
38
|
def instrument_event_type_validate_enum(cls, value):
|
|
39
39
|
"""Validates the enum"""
|
|
40
|
-
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'):
|
|
41
|
-
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')")
|
|
40
|
+
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'):
|
|
41
|
+
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
42
|
return value
|
|
43
43
|
|
|
44
44
|
class Config:
|
lusid/models/reset_event.py
CHANGED
|
@@ -30,15 +30,15 @@ class ResetEvent(InstrumentEvent):
|
|
|
30
30
|
reset_type: constr(strict=True, min_length=1) = Field(..., alias="resetType", description="The type of the reset; e.g. RIC, Currency-pair")
|
|
31
31
|
fixing_source: Optional[StrictStr] = Field(None, alias="fixingSource", description="Fixing identification source, if available.")
|
|
32
32
|
fixing_date: datetime = Field(..., alias="fixingDate", description="The date the reset fixes, or is observed upon.")
|
|
33
|
-
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")
|
|
33
|
+
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
34
|
additional_properties: Dict[str, Any] = {}
|
|
35
35
|
__properties = ["instrumentEventType", "value", "resetType", "fixingSource", "fixingDate"]
|
|
36
36
|
|
|
37
37
|
@validator('instrument_event_type')
|
|
38
38
|
def instrument_event_type_validate_enum(cls, value):
|
|
39
39
|
"""Validates the enum"""
|
|
40
|
-
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'):
|
|
41
|
-
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')")
|
|
40
|
+
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'):
|
|
41
|
+
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
42
|
return value
|
|
43
43
|
|
|
44
44
|
class Config:
|
|
@@ -32,15 +32,15 @@ class ReverseStockSplitEvent(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 have their shares merged.")
|
|
34
34
|
announcement_date: Optional[datetime] = Field(None, alias="announcementDate", description="Date the reverse 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")
|
|
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")
|
|
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'):
|
|
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')")
|
|
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')")
|
|
44
44
|
return value
|
|
45
45
|
|
|
46
46
|
class Config:
|
|
@@ -32,15 +32,15 @@ class ScripDividendEvent(InstrumentEvent):
|
|
|
32
32
|
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.")
|
|
33
33
|
payment_date: datetime = Field(..., alias="paymentDate", description="The date the company pays out dividends to shareholders.")
|
|
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")
|
|
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")
|
|
36
36
|
additional_properties: Dict[str, Any] = {}
|
|
37
37
|
__properties = ["instrumentEventType", "announcementDate", "exDate", "recordDate", "paymentDate", "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'):
|
|
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')")
|
|
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')")
|
|
44
44
|
return value
|
|
45
45
|
|
|
46
46
|
class Config:
|
|
@@ -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, StrictBool, constr
|
|
23
|
+
from lusid.models.units_ratio import UnitsRatio
|
|
24
|
+
|
|
25
|
+
class SecurityOfferElection(BaseModel):
|
|
26
|
+
"""
|
|
27
|
+
Security election for Events that result in equity via a merger # noqa: E501
|
|
28
|
+
"""
|
|
29
|
+
election_key: constr(strict=True, min_length=1) = Field(..., alias="electionKey", description="Unique key associated to this election.")
|
|
30
|
+
is_chosen: Optional[StrictBool] = Field(None, alias="isChosen", description="Is this the election that has been explicitly chosen from multiple options.")
|
|
31
|
+
is_default: Optional[StrictBool] = Field(None, alias="isDefault", description="Is this election automatically applied in the absence of an election having been made. May only be true for one election if multiple are provided.")
|
|
32
|
+
units_ratio: UnitsRatio = Field(..., alias="unitsRatio")
|
|
33
|
+
__properties = ["electionKey", "isChosen", "isDefault", "unitsRatio"]
|
|
34
|
+
|
|
35
|
+
class Config:
|
|
36
|
+
"""Pydantic configuration"""
|
|
37
|
+
allow_population_by_field_name = True
|
|
38
|
+
validate_assignment = True
|
|
39
|
+
|
|
40
|
+
def to_str(self) -> str:
|
|
41
|
+
"""Returns the string representation of the model using alias"""
|
|
42
|
+
return pprint.pformat(self.dict(by_alias=True))
|
|
43
|
+
|
|
44
|
+
def to_json(self) -> str:
|
|
45
|
+
"""Returns the JSON representation of the model using alias"""
|
|
46
|
+
return json.dumps(self.to_dict())
|
|
47
|
+
|
|
48
|
+
@classmethod
|
|
49
|
+
def from_json(cls, json_str: str) -> SecurityOfferElection:
|
|
50
|
+
"""Create an instance of SecurityOfferElection from a JSON string"""
|
|
51
|
+
return cls.from_dict(json.loads(json_str))
|
|
52
|
+
|
|
53
|
+
def to_dict(self):
|
|
54
|
+
"""Returns the dictionary representation of the model using alias"""
|
|
55
|
+
_dict = self.dict(by_alias=True,
|
|
56
|
+
exclude={
|
|
57
|
+
},
|
|
58
|
+
exclude_none=True)
|
|
59
|
+
# override the default output from pydantic by calling `to_dict()` of units_ratio
|
|
60
|
+
if self.units_ratio:
|
|
61
|
+
_dict['unitsRatio'] = self.units_ratio.to_dict()
|
|
62
|
+
return _dict
|
|
63
|
+
|
|
64
|
+
@classmethod
|
|
65
|
+
def from_dict(cls, obj: dict) -> SecurityOfferElection:
|
|
66
|
+
"""Create an instance of SecurityOfferElection from a dict"""
|
|
67
|
+
if obj is None:
|
|
68
|
+
return None
|
|
69
|
+
|
|
70
|
+
if not isinstance(obj, dict):
|
|
71
|
+
return SecurityOfferElection.parse_obj(obj)
|
|
72
|
+
|
|
73
|
+
_obj = SecurityOfferElection.parse_obj({
|
|
74
|
+
"election_key": obj.get("electionKey"),
|
|
75
|
+
"is_chosen": obj.get("isChosen"),
|
|
76
|
+
"is_default": obj.get("isDefault"),
|
|
77
|
+
"units_ratio": UnitsRatio.from_dict(obj.get("unitsRatio")) if obj.get("unitsRatio") is not None else None
|
|
78
|
+
})
|
|
79
|
+
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")
|
|
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")
|
|
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'):
|
|
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')")
|
|
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')")
|
|
49
49
|
return value
|
|
50
50
|
|
|
51
51
|
class Config:
|
|
@@ -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")
|
|
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")
|
|
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'):
|
|
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')")
|
|
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')")
|
|
44
44
|
return value
|
|
45
45
|
|
|
46
46
|
class Config:
|