lusid-sdk 2.1.149__py3-none-any.whl → 2.1.158__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.

Files changed (49) hide show
  1. lusid/__init__.py +12 -0
  2. lusid/configuration.py +1 -1
  3. lusid/models/__init__.py +12 -0
  4. lusid/models/accumulation_event.py +3 -3
  5. lusid/models/amortisation_event.py +3 -3
  6. lusid/models/bond_conversion_entry.py +75 -0
  7. lusid/models/bond_conversion_schedule.py +130 -0
  8. lusid/models/bond_coupon_event.py +3 -3
  9. lusid/models/bond_default_event.py +3 -3
  10. lusid/models/bond_principal_event.py +3 -3
  11. lusid/models/capital_distribution_event.py +3 -3
  12. lusid/models/cash_and_security_offer_election.py +90 -0
  13. lusid/models/cash_dividend_event.py +3 -3
  14. lusid/models/cash_flow_event.py +3 -3
  15. lusid/models/cash_offer_election.py +77 -0
  16. lusid/models/close_event.py +3 -3
  17. lusid/models/dividend_option_event.py +3 -3
  18. lusid/models/dividend_reinvestment_event.py +3 -3
  19. lusid/models/exercise_event.py +3 -3
  20. lusid/models/expiry_event.py +3 -3
  21. lusid/models/fixed_schedule.py +3 -3
  22. lusid/models/float_schedule.py +3 -3
  23. lusid/models/fx_forward_settlement_event.py +3 -3
  24. lusid/models/fx_linked_notional_schedule.py +3 -3
  25. lusid/models/fx_rate_schedule.py +3 -3
  26. lusid/models/informational_error_event.py +3 -3
  27. lusid/models/informational_event.py +3 -3
  28. lusid/models/instrument_event.py +6 -5
  29. lusid/models/instrument_event_type.py +1 -0
  30. lusid/models/maturity_event.py +3 -3
  31. lusid/models/merger_event.py +172 -0
  32. lusid/models/open_event.py +3 -3
  33. lusid/models/optionality_schedule.py +3 -3
  34. lusid/models/raw_vendor_event.py +3 -3
  35. lusid/models/reset_event.py +3 -3
  36. lusid/models/reverse_stock_split_event.py +3 -3
  37. lusid/models/schedule.py +6 -5
  38. lusid/models/schedule_type.py +1 -0
  39. lusid/models/scrip_dividend_event.py +3 -3
  40. lusid/models/security_offer_election.py +79 -0
  41. lusid/models/spin_off_event.py +3 -3
  42. lusid/models/step_schedule.py +3 -3
  43. lusid/models/stock_dividend_event.py +3 -3
  44. lusid/models/stock_split_event.py +3 -3
  45. lusid/models/transition_event.py +3 -3
  46. lusid/models/trigger_event.py +3 -3
  47. {lusid_sdk-2.1.149.dist-info → lusid_sdk-2.1.158.dist-info}/METADATA +9 -3
  48. {lusid_sdk-2.1.149.dist-info → lusid_sdk-2.1.158.dist-info}/RECORD +49 -43
  49. {lusid_sdk-2.1.149.dist-info → lusid_sdk-2.1.158.dist-info}/WHEEL +0 -0
lusid/__init__.py CHANGED
@@ -166,6 +166,8 @@ from lusid.models.block_request import BlockRequest
166
166
  from lusid.models.block_set_request import BlockSetRequest
167
167
  from lusid.models.blocked_order_request import BlockedOrderRequest
168
168
  from lusid.models.bond import Bond
169
+ from lusid.models.bond_conversion_entry import BondConversionEntry
170
+ from lusid.models.bond_conversion_schedule import BondConversionSchedule
169
171
  from lusid.models.bond_coupon_event import BondCouponEvent
170
172
  from lusid.models.bond_default_event import BondDefaultEvent
171
173
  from lusid.models.bond_principal_event import BondPrincipalEvent
@@ -184,6 +186,7 @@ from lusid.models.calendar_date import CalendarDate
184
186
  from lusid.models.calendar_dependency import CalendarDependency
185
187
  from lusid.models.cap_floor import CapFloor
186
188
  from lusid.models.capital_distribution_event import CapitalDistributionEvent
189
+ from lusid.models.cash_and_security_offer_election import CashAndSecurityOfferElection
187
190
  from lusid.models.cash_dependency import CashDependency
188
191
  from lusid.models.cash_dividend_event import CashDividendEvent
189
192
  from lusid.models.cash_election import CashElection
@@ -192,6 +195,7 @@ from lusid.models.cash_flow_lineage import CashFlowLineage
192
195
  from lusid.models.cash_flow_value import CashFlowValue
193
196
  from lusid.models.cash_flow_value_set import CashFlowValueSet
194
197
  from lusid.models.cash_ladder_record import CashLadderRecord
198
+ from lusid.models.cash_offer_election import CashOfferElection
195
199
  from lusid.models.cash_perpetual import CashPerpetual
196
200
  from lusid.models.cds_flow_conventions import CdsFlowConventions
197
201
  from lusid.models.cds_index import CdsIndex
@@ -553,6 +557,7 @@ from lusid.models.market_options import MarketOptions
553
557
  from lusid.models.market_quote import MarketQuote
554
558
  from lusid.models.match_criterion import MatchCriterion
555
559
  from lusid.models.maturity_event import MaturityEvent
560
+ from lusid.models.merger_event import MergerEvent
556
561
  from lusid.models.metric_value import MetricValue
557
562
  from lusid.models.model_options import ModelOptions
558
563
  from lusid.models.model_options_type import ModelOptionsType
@@ -881,6 +886,7 @@ from lusid.models.scope_definition import ScopeDefinition
881
886
  from lusid.models.scrip_dividend_event import ScripDividendEvent
882
887
  from lusid.models.script_map_reference import ScriptMapReference
883
888
  from lusid.models.security_election import SecurityElection
889
+ from lusid.models.security_offer_election import SecurityOfferElection
884
890
  from lusid.models.sequence_definition import SequenceDefinition
885
891
  from lusid.models.set_amortisation_rules_request import SetAmortisationRulesRequest
886
892
  from lusid.models.set_legal_entity_identifiers_request import SetLegalEntityIdentifiersRequest
@@ -1231,6 +1237,8 @@ __all__ = [
1231
1237
  "BlockSetRequest",
1232
1238
  "BlockedOrderRequest",
1233
1239
  "Bond",
1240
+ "BondConversionEntry",
1241
+ "BondConversionSchedule",
1234
1242
  "BondCouponEvent",
1235
1243
  "BondDefaultEvent",
1236
1244
  "BondPrincipalEvent",
@@ -1249,6 +1257,7 @@ __all__ = [
1249
1257
  "CalendarDependency",
1250
1258
  "CapFloor",
1251
1259
  "CapitalDistributionEvent",
1260
+ "CashAndSecurityOfferElection",
1252
1261
  "CashDependency",
1253
1262
  "CashDividendEvent",
1254
1263
  "CashElection",
@@ -1257,6 +1266,7 @@ __all__ = [
1257
1266
  "CashFlowValue",
1258
1267
  "CashFlowValueSet",
1259
1268
  "CashLadderRecord",
1269
+ "CashOfferElection",
1260
1270
  "CashPerpetual",
1261
1271
  "CdsFlowConventions",
1262
1272
  "CdsIndex",
@@ -1618,6 +1628,7 @@ __all__ = [
1618
1628
  "MarketQuote",
1619
1629
  "MatchCriterion",
1620
1630
  "MaturityEvent",
1631
+ "MergerEvent",
1621
1632
  "MetricValue",
1622
1633
  "ModelOptions",
1623
1634
  "ModelOptionsType",
@@ -1946,6 +1957,7 @@ __all__ = [
1946
1957
  "ScripDividendEvent",
1947
1958
  "ScriptMapReference",
1948
1959
  "SecurityElection",
1960
+ "SecurityOfferElection",
1949
1961
  "SequenceDefinition",
1950
1962
  "SetAmortisationRulesRequest",
1951
1963
  "SetLegalEntityIdentifiersRequest",
lusid/configuration.py CHANGED
@@ -373,7 +373,7 @@ class Configuration:
373
373
  return "Python SDK Debug Report:\n"\
374
374
  "OS: {env}\n"\
375
375
  "Python Version: {pyversion}\n"\
376
- "Version of the API: 0.11.6583\n"\
376
+ "Version of the API: 0.11.6592\n"\
377
377
  "SDK Package Version: {package_version}".\
378
378
  format(env=sys.platform, pyversion=sys.version, package_version=package_version)
379
379
 
lusid/models/__init__.py CHANGED
@@ -88,6 +88,8 @@ from lusid.models.block_request import BlockRequest
88
88
  from lusid.models.block_set_request import BlockSetRequest
89
89
  from lusid.models.blocked_order_request import BlockedOrderRequest
90
90
  from lusid.models.bond import Bond
91
+ from lusid.models.bond_conversion_entry import BondConversionEntry
92
+ from lusid.models.bond_conversion_schedule import BondConversionSchedule
91
93
  from lusid.models.bond_coupon_event import BondCouponEvent
92
94
  from lusid.models.bond_default_event import BondDefaultEvent
93
95
  from lusid.models.bond_principal_event import BondPrincipalEvent
@@ -106,6 +108,7 @@ from lusid.models.calendar_date import CalendarDate
106
108
  from lusid.models.calendar_dependency import CalendarDependency
107
109
  from lusid.models.cap_floor import CapFloor
108
110
  from lusid.models.capital_distribution_event import CapitalDistributionEvent
111
+ from lusid.models.cash_and_security_offer_election import CashAndSecurityOfferElection
109
112
  from lusid.models.cash_dependency import CashDependency
110
113
  from lusid.models.cash_dividend_event import CashDividendEvent
111
114
  from lusid.models.cash_election import CashElection
@@ -114,6 +117,7 @@ from lusid.models.cash_flow_lineage import CashFlowLineage
114
117
  from lusid.models.cash_flow_value import CashFlowValue
115
118
  from lusid.models.cash_flow_value_set import CashFlowValueSet
116
119
  from lusid.models.cash_ladder_record import CashLadderRecord
120
+ from lusid.models.cash_offer_election import CashOfferElection
117
121
  from lusid.models.cash_perpetual import CashPerpetual
118
122
  from lusid.models.cds_flow_conventions import CdsFlowConventions
119
123
  from lusid.models.cds_index import CdsIndex
@@ -475,6 +479,7 @@ from lusid.models.market_options import MarketOptions
475
479
  from lusid.models.market_quote import MarketQuote
476
480
  from lusid.models.match_criterion import MatchCriterion
477
481
  from lusid.models.maturity_event import MaturityEvent
482
+ from lusid.models.merger_event import MergerEvent
478
483
  from lusid.models.metric_value import MetricValue
479
484
  from lusid.models.model_options import ModelOptions
480
485
  from lusid.models.model_options_type import ModelOptionsType
@@ -803,6 +808,7 @@ from lusid.models.scope_definition import ScopeDefinition
803
808
  from lusid.models.scrip_dividend_event import ScripDividendEvent
804
809
  from lusid.models.script_map_reference import ScriptMapReference
805
810
  from lusid.models.security_election import SecurityElection
811
+ from lusid.models.security_offer_election import SecurityOfferElection
806
812
  from lusid.models.sequence_definition import SequenceDefinition
807
813
  from lusid.models.set_amortisation_rules_request import SetAmortisationRulesRequest
808
814
  from lusid.models.set_legal_entity_identifiers_request import SetLegalEntityIdentifiersRequest
@@ -1076,6 +1082,8 @@ __all__ = [
1076
1082
  "BlockSetRequest",
1077
1083
  "BlockedOrderRequest",
1078
1084
  "Bond",
1085
+ "BondConversionEntry",
1086
+ "BondConversionSchedule",
1079
1087
  "BondCouponEvent",
1080
1088
  "BondDefaultEvent",
1081
1089
  "BondPrincipalEvent",
@@ -1094,6 +1102,7 @@ __all__ = [
1094
1102
  "CalendarDependency",
1095
1103
  "CapFloor",
1096
1104
  "CapitalDistributionEvent",
1105
+ "CashAndSecurityOfferElection",
1097
1106
  "CashDependency",
1098
1107
  "CashDividendEvent",
1099
1108
  "CashElection",
@@ -1102,6 +1111,7 @@ __all__ = [
1102
1111
  "CashFlowValue",
1103
1112
  "CashFlowValueSet",
1104
1113
  "CashLadderRecord",
1114
+ "CashOfferElection",
1105
1115
  "CashPerpetual",
1106
1116
  "CdsFlowConventions",
1107
1117
  "CdsIndex",
@@ -1463,6 +1473,7 @@ __all__ = [
1463
1473
  "MarketQuote",
1464
1474
  "MatchCriterion",
1465
1475
  "MaturityEvent",
1476
+ "MergerEvent",
1466
1477
  "MetricValue",
1467
1478
  "ModelOptions",
1468
1479
  "ModelOptionsType",
@@ -1791,6 +1802,7 @@ __all__ = [
1791
1802
  "ScripDividendEvent",
1792
1803
  "ScriptMapReference",
1793
1804
  "SecurityElection",
1805
+ "SecurityOfferElection",
1794
1806
  "SequenceDefinition",
1795
1807
  "SetAmortisationRulesRequest",
1796
1808
  "SetLegalEntityIdentifiersRequest",
@@ -31,15 +31,15 @@ class AccumulationEvent(InstrumentEvent):
31
31
  dividend_rate: Union[StrictFloat, StrictInt] = Field(..., alias="dividendRate", description="Dividend rate or payment rate as a percentage. i.e. 5% is written as 0.05")
32
32
  ex_date: datetime = Field(..., alias="exDate", description="The first business day on which the dividend is not owed to the buying party. Typically this is T-1 from the RecordDate.")
33
33
  payment_date: datetime = Field(..., alias="paymentDate", description="The date the company pays out dividends to shareholders.")
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")
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")
35
35
  additional_properties: Dict[str, Any] = {}
36
36
  __properties = ["instrumentEventType", "announcementDate", "dividendCurrency", "dividendRate", "exDate", "paymentDate"]
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'):
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')")
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')")
43
43
  return value
44
44
 
45
45
  class Config:
@@ -30,15 +30,15 @@ class AmortisationEvent(InstrumentEvent):
30
30
  dom_ccy: StrictStr = Field(..., alias="domCcy", description="Domestic currency of the originating instrument")
31
31
  pay_receive: constr(strict=True, min_length=1) = Field(..., alias="payReceive", description="Is this event in relation to the Pay or Receive leg")
32
32
  payment_date: datetime = Field(..., alias="paymentDate", description="The date the principal payment is to be made.")
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", "amountReduced", "domCcy", "payReceive", "paymentDate"]
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:
@@ -0,0 +1,75 @@
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 BaseModel, Field, StrictFloat, StrictInt
23
+
24
+ class BondConversionEntry(BaseModel):
25
+ """
26
+ Information required to specify a conversion event for a convertible bond. # noqa: E501
27
+ """
28
+ var_date: Optional[datetime] = Field(None, alias="date", description="The date at which the bond can be converted")
29
+ denomination: Optional[Union[StrictFloat, StrictInt]] = Field(None, description="The number of shares to be issued on conversion will be equal to the denomination of the bond divided by the conversion price. Two (and only two) entries out of (Price, Ratio, Denomination) must be provided. So, to allow one entry out of the three to not be provided, we make all the three nullable defaulting to zero and during validation we check if there is exactly one of the three equal to zero.")
30
+ price: Optional[Union[StrictFloat, StrictInt]] = Field(None, description="The conversion price Two (and only two) entries out of (Price, Ratio, Denomination) must be provided. So, to allow one entry out of the three to not be provided, we make all the three nullable defaulting to zero and during validation we check if there is exactly one of the three equal to zero.")
31
+ ratio: Optional[Union[StrictFloat, StrictInt]] = Field(None, description="The number of common shares received at the time of conversion for each convertible bond Two (and only two) entries out of (Price, Ratio, Denomination) must be provided. So, to allow one entry out of the three to not be provided, we make all the three nullable defaulting to zero and during validation we check if there is exactly one of the three equal to zero.")
32
+ __properties = ["date", "denomination", "price", "ratio"]
33
+
34
+ class Config:
35
+ """Pydantic configuration"""
36
+ allow_population_by_field_name = True
37
+ validate_assignment = True
38
+
39
+ def to_str(self) -> str:
40
+ """Returns the string representation of the model using alias"""
41
+ return pprint.pformat(self.dict(by_alias=True))
42
+
43
+ def to_json(self) -> str:
44
+ """Returns the JSON representation of the model using alias"""
45
+ return json.dumps(self.to_dict())
46
+
47
+ @classmethod
48
+ def from_json(cls, json_str: str) -> BondConversionEntry:
49
+ """Create an instance of BondConversionEntry from a JSON string"""
50
+ return cls.from_dict(json.loads(json_str))
51
+
52
+ def to_dict(self):
53
+ """Returns the dictionary representation of the model using alias"""
54
+ _dict = self.dict(by_alias=True,
55
+ exclude={
56
+ },
57
+ exclude_none=True)
58
+ return _dict
59
+
60
+ @classmethod
61
+ def from_dict(cls, obj: dict) -> BondConversionEntry:
62
+ """Create an instance of BondConversionEntry from a dict"""
63
+ if obj is None:
64
+ return None
65
+
66
+ if not isinstance(obj, dict):
67
+ return BondConversionEntry.parse_obj(obj)
68
+
69
+ _obj = BondConversionEntry.parse_obj({
70
+ "var_date": obj.get("date"),
71
+ "denomination": obj.get("denomination"),
72
+ "price": obj.get("price"),
73
+ "ratio": obj.get("ratio")
74
+ })
75
+ 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
+ from datetime import datetime
21
+ from typing import Any, Dict, List, Optional
22
+ from pydantic.v1 import Field, StrictBool, StrictStr, conlist, constr, validator
23
+ from lusid.models.bond_conversion_entry import BondConversionEntry
24
+ from lusid.models.schedule import Schedule
25
+
26
+ class BondConversionSchedule(Schedule):
27
+ """
28
+ A BondConversionSchedule object represents a class containing the information required for the creation of convertible features in a ComplexBond # noqa: E501
29
+ """
30
+ identifiers: Optional[Dict[str, StrictStr]] = Field(None, description="The market identifier(s) of the share that the bond converts to. The instrument will not fail validation if no identifier is supplied.")
31
+ bond_conversion_entries: Optional[conlist(BondConversionEntry)] = Field(None, alias="bondConversionEntries", description="The dates at which the bond may be converted and associated information required about the conversion.")
32
+ conversion_trigger: constr(strict=True, max_length=50, min_length=0) = Field(..., alias="conversionTrigger", description="Corporate event that triggers a conversion Supported string (enumeration) values are: [NextEquityFinancing, IpoConversion, KnownDates, SoftCall].")
33
+ delivery_type: Optional[constr(strict=True, max_length=50, min_length=0)] = Field(None, alias="deliveryType", description="Is a conversion made into cash or into shares? Supported string (enumeration) values are: [Cash, Physical].")
34
+ exercise_type: constr(strict=True, max_length=50, min_length=0) = Field(..., alias="exerciseType", description="The exercise type of the conversion schedule (American or European). For American type, the bond is convertible from a given exercise date until the next date in the schedule, or until it matures. For European type, the bond is only convertible on the given exercise date. Supported string (enumeration) values are: [European, Bermudan, American].")
35
+ includes_accrued: Optional[StrictBool] = Field(None, alias="includesAccrued", description="Set this to true if a accrued interest is included in the conversion. Defaults to true.")
36
+ mandatory_conversion: Optional[StrictBool] = Field(None, alias="mandatoryConversion", description="Set this to true if a conversion is mandatory if the trigger occurs. Defaults to false.")
37
+ notification_period_end: Optional[datetime] = Field(None, alias="notificationPeriodEnd", description="The last day in the notification period for the conversion of the bond")
38
+ notification_period_start: Optional[datetime] = Field(None, alias="notificationPeriodStart", description="The first day in the notification period for the conversion of the bond")
39
+ schedule_type: StrictStr = Field(..., alias="scheduleType", description="The available values are: FixedSchedule, FloatSchedule, OptionalitySchedule, StepSchedule, Exercise, FxRateSchedule, FxLinkedNotionalSchedule, BondConversionSchedule, Invalid")
40
+ additional_properties: Dict[str, Any] = {}
41
+ __properties = ["scheduleType", "identifiers", "bondConversionEntries", "conversionTrigger", "deliveryType", "exerciseType", "includesAccrued", "mandatoryConversion", "notificationPeriodEnd", "notificationPeriodStart"]
42
+
43
+ @validator('schedule_type')
44
+ def schedule_type_validate_enum(cls, value):
45
+ """Validates the enum"""
46
+ if value not in ('FixedSchedule', 'FloatSchedule', 'OptionalitySchedule', 'StepSchedule', 'Exercise', 'FxRateSchedule', 'FxLinkedNotionalSchedule', 'BondConversionSchedule', 'Invalid'):
47
+ raise ValueError("must be one of enum values ('FixedSchedule', 'FloatSchedule', 'OptionalitySchedule', 'StepSchedule', 'Exercise', 'FxRateSchedule', 'FxLinkedNotionalSchedule', 'BondConversionSchedule', 'Invalid')")
48
+ return value
49
+
50
+ class Config:
51
+ """Pydantic configuration"""
52
+ allow_population_by_field_name = True
53
+ validate_assignment = True
54
+
55
+ def to_str(self) -> str:
56
+ """Returns the string representation of the model using alias"""
57
+ return pprint.pformat(self.dict(by_alias=True))
58
+
59
+ def to_json(self) -> str:
60
+ """Returns the JSON representation of the model using alias"""
61
+ return json.dumps(self.to_dict())
62
+
63
+ @classmethod
64
+ def from_json(cls, json_str: str) -> BondConversionSchedule:
65
+ """Create an instance of BondConversionSchedule from a JSON string"""
66
+ return cls.from_dict(json.loads(json_str))
67
+
68
+ def to_dict(self):
69
+ """Returns the dictionary representation of the model using alias"""
70
+ _dict = self.dict(by_alias=True,
71
+ exclude={
72
+ "additional_properties"
73
+ },
74
+ exclude_none=True)
75
+ # override the default output from pydantic by calling `to_dict()` of each item in bond_conversion_entries (list)
76
+ _items = []
77
+ if self.bond_conversion_entries:
78
+ for _item in self.bond_conversion_entries:
79
+ if _item:
80
+ _items.append(_item.to_dict())
81
+ _dict['bondConversionEntries'] = _items
82
+ # puts key-value pairs in additional_properties in the top level
83
+ if self.additional_properties is not None:
84
+ for _key, _value in self.additional_properties.items():
85
+ _dict[_key] = _value
86
+
87
+ # set to None if identifiers (nullable) is None
88
+ # and __fields_set__ contains the field
89
+ if self.identifiers is None and "identifiers" in self.__fields_set__:
90
+ _dict['identifiers'] = None
91
+
92
+ # set to None if bond_conversion_entries (nullable) is None
93
+ # and __fields_set__ contains the field
94
+ if self.bond_conversion_entries is None and "bond_conversion_entries" in self.__fields_set__:
95
+ _dict['bondConversionEntries'] = None
96
+
97
+ # set to None if delivery_type (nullable) is None
98
+ # and __fields_set__ contains the field
99
+ if self.delivery_type is None and "delivery_type" in self.__fields_set__:
100
+ _dict['deliveryType'] = None
101
+
102
+ return _dict
103
+
104
+ @classmethod
105
+ def from_dict(cls, obj: dict) -> BondConversionSchedule:
106
+ """Create an instance of BondConversionSchedule from a dict"""
107
+ if obj is None:
108
+ return None
109
+
110
+ if not isinstance(obj, dict):
111
+ return BondConversionSchedule.parse_obj(obj)
112
+
113
+ _obj = BondConversionSchedule.parse_obj({
114
+ "schedule_type": obj.get("scheduleType"),
115
+ "identifiers": obj.get("identifiers"),
116
+ "bond_conversion_entries": [BondConversionEntry.from_dict(_item) for _item in obj.get("bondConversionEntries")] if obj.get("bondConversionEntries") is not None else None,
117
+ "conversion_trigger": obj.get("conversionTrigger"),
118
+ "delivery_type": obj.get("deliveryType"),
119
+ "exercise_type": obj.get("exerciseType"),
120
+ "includes_accrued": obj.get("includesAccrued"),
121
+ "mandatory_conversion": obj.get("mandatoryConversion"),
122
+ "notification_period_end": obj.get("notificationPeriodEnd"),
123
+ "notification_period_start": obj.get("notificationPeriodStart")
124
+ })
125
+ # store additional fields in additional_properties
126
+ for _key in obj.keys():
127
+ if _key not in cls.__properties:
128
+ _obj.additional_properties[_key] = obj.get(_key)
129
+
130
+ return _obj
@@ -30,15 +30,15 @@ class BondCouponEvent(InstrumentEvent):
30
30
  payment_date: datetime = Field(..., alias="paymentDate", description="Payment date of the coupon payment")
31
31
  currency: StrictStr = Field(..., description="Currency of the coupon payment")
32
32
  coupon_per_unit: Union[StrictFloat, StrictInt] = Field(..., alias="couponPerUnit", description="CouponRate*Principal")
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", "exDate", "paymentDate", "currency", "couponPerUnit"]
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:
@@ -27,15 +27,15 @@ class BondDefaultEvent(InstrumentEvent):
27
27
  Indicates when an issuer has defaulted on an obligation due to technical default, missed payments, or bankruptcy filing. # noqa: E501
28
28
  """
29
29
  effective_date: datetime = Field(..., alias="effectiveDate", description="The date the bond default occurred.")
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", "effectiveDate"]
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:
@@ -30,15 +30,15 @@ class BondPrincipalEvent(InstrumentEvent):
30
30
  ex_date: datetime = Field(..., alias="exDate", description="Ex-Dividend date of the principal payment")
31
31
  payment_date: datetime = Field(..., alias="paymentDate", description="Payment date of the principal payment")
32
32
  principal_per_unit: Union[StrictFloat, StrictInt] = Field(..., alias="principalPerUnit", description="Principal per unit")
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", "currency", "exDate", "paymentDate", "principalPerUnit"]
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 CapitalDistributionEvent(InstrumentEvent):
32
32
  ex_date: datetime = Field(..., alias="exDate", description="The first business day on which the dividend is not owed to the buying party.")
33
33
  payment_date: datetime = Field(..., alias="paymentDate", description="The date the company begins distributing the dividend.")
34
34
  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.")
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", "cashElections", "exDate", "paymentDate", "recordDate"]
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,90 @@
1
+ # coding: utf-8
2
+
3
+ """
4
+ LUSID API
5
+
6
+ FINBOURNE Technology # noqa: E501
7
+
8
+ Contact: info@finbourne.com
9
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
10
+
11
+ Do not edit the class manually.
12
+ """
13
+
14
+
15
+ from __future__ import annotations
16
+ import pprint
17
+ import re # noqa: F401
18
+ import json
19
+
20
+
21
+ from typing import Any, Dict, Optional, Union
22
+ from pydantic.v1 import BaseModel, Field, StrictBool, StrictFloat, StrictInt, StrictStr, constr
23
+ from lusid.models.units_ratio import UnitsRatio
24
+
25
+ class CashAndSecurityOfferElection(BaseModel):
26
+ """
27
+ # noqa: E501
28
+ """
29
+ cash_offer_currency: StrictStr = Field(..., alias="cashOfferCurrency", description="Currency of the cash offer")
30
+ cash_offer_price: Union[StrictFloat, StrictInt] = Field(..., alias="cashOfferPrice", description="Price per share of the cash offer")
31
+ 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.")
32
+ election_key: constr(strict=True, min_length=1) = Field(..., alias="electionKey", description="Unique key associated to this election.")
33
+ is_chosen: Optional[StrictBool] = Field(None, alias="isChosen", description="Is this the election that has been explicitly chosen from multiple options.")
34
+ 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.")
35
+ units_ratio: UnitsRatio = Field(..., alias="unitsRatio")
36
+ __properties = ["cashOfferCurrency", "cashOfferPrice", "costFactor", "electionKey", "isChosen", "isDefault", "unitsRatio"]
37
+
38
+ class Config:
39
+ """Pydantic configuration"""
40
+ allow_population_by_field_name = True
41
+ validate_assignment = True
42
+
43
+ def to_str(self) -> str:
44
+ """Returns the string representation of the model using alias"""
45
+ return pprint.pformat(self.dict(by_alias=True))
46
+
47
+ def to_json(self) -> str:
48
+ """Returns the JSON representation of the model using alias"""
49
+ return json.dumps(self.to_dict())
50
+
51
+ @classmethod
52
+ def from_json(cls, json_str: str) -> CashAndSecurityOfferElection:
53
+ """Create an instance of CashAndSecurityOfferElection from a JSON string"""
54
+ return cls.from_dict(json.loads(json_str))
55
+
56
+ def to_dict(self):
57
+ """Returns the dictionary representation of the model using alias"""
58
+ _dict = self.dict(by_alias=True,
59
+ exclude={
60
+ },
61
+ exclude_none=True)
62
+ # override the default output from pydantic by calling `to_dict()` of units_ratio
63
+ if self.units_ratio:
64
+ _dict['unitsRatio'] = self.units_ratio.to_dict()
65
+ # set to None if cost_factor (nullable) is None
66
+ # and __fields_set__ contains the field
67
+ if self.cost_factor is None and "cost_factor" in self.__fields_set__:
68
+ _dict['costFactor'] = None
69
+
70
+ return _dict
71
+
72
+ @classmethod
73
+ def from_dict(cls, obj: dict) -> CashAndSecurityOfferElection:
74
+ """Create an instance of CashAndSecurityOfferElection from a dict"""
75
+ if obj is None:
76
+ return None
77
+
78
+ if not isinstance(obj, dict):
79
+ return CashAndSecurityOfferElection.parse_obj(obj)
80
+
81
+ _obj = CashAndSecurityOfferElection.parse_obj({
82
+ "cash_offer_currency": obj.get("cashOfferCurrency"),
83
+ "cash_offer_price": obj.get("cashOfferPrice"),
84
+ "cost_factor": obj.get("costFactor"),
85
+ "election_key": obj.get("electionKey"),
86
+ "is_chosen": obj.get("isChosen"),
87
+ "is_default": obj.get("isDefault"),
88
+ "units_ratio": UnitsRatio.from_dict(obj.get("unitsRatio")) if obj.get("unitsRatio") is not None else None
89
+ })
90
+ return _obj