lusid-sdk 2.1.684__py3-none-any.whl → 2.1.686__py3-none-any.whl
Sign up to get free protection for your applications and to get access to all the features.
- lusid/configuration.py +1 -1
- lusid/models/loan_interest_repayment_event.py +19 -4
- {lusid_sdk-2.1.684.dist-info → lusid_sdk-2.1.686.dist-info}/METADATA +1 -1
- {lusid_sdk-2.1.684.dist-info → lusid_sdk-2.1.686.dist-info}/RECORD +5 -5
- {lusid_sdk-2.1.684.dist-info → lusid_sdk-2.1.686.dist-info}/WHEEL +0 -0
lusid/configuration.py
CHANGED
@@ -445,7 +445,7 @@ class Configuration:
|
|
445
445
|
return "Python SDK Debug Report:\n"\
|
446
446
|
"OS: {env}\n"\
|
447
447
|
"Python Version: {pyversion}\n"\
|
448
|
-
"Version of the API: 0.11.
|
448
|
+
"Version of the API: 0.11.7323\n"\
|
449
449
|
"SDK Package Version: {package_version}".\
|
450
450
|
format(env=sys.platform, pyversion=sys.version, package_version=package_version)
|
451
451
|
|
@@ -18,9 +18,10 @@ import re # noqa: F401
|
|
18
18
|
import json
|
19
19
|
|
20
20
|
from datetime import datetime
|
21
|
-
from typing import Any, Dict, Optional, Union
|
22
|
-
from pydantic.v1 import Field, StrictFloat, StrictInt, StrictStr, validator
|
21
|
+
from typing import Any, Dict, List, Optional, Union
|
22
|
+
from pydantic.v1 import Field, StrictFloat, StrictInt, StrictStr, conlist, validator
|
23
23
|
from lusid.models.instrument_event import InstrumentEvent
|
24
|
+
from lusid.models.lapse_election import LapseElection
|
24
25
|
|
25
26
|
class LoanInterestRepaymentEvent(InstrumentEvent):
|
26
27
|
"""
|
@@ -30,9 +31,10 @@ class LoanInterestRepaymentEvent(InstrumentEvent):
|
|
30
31
|
ex_date: datetime = Field(..., alias="exDate", description="Date that the accrued interest is calculated up until.")
|
31
32
|
currency: StrictStr = Field(..., description="Currency of the repayment.")
|
32
33
|
fraction: Optional[Union[StrictFloat, StrictInt]] = Field(None, description="Fraction of the accrued on the holding to be repaid. Must be between 0 and 1, inclusive. Defaults to 1 if not set.")
|
34
|
+
lapse_elections: Optional[conlist(LapseElection)] = Field(None, alias="lapseElections", description="Election for controlling whether the interest is paid automatically or not. Exactly one election must be provided.")
|
33
35
|
instrument_event_type: StrictStr = Field(..., alias="instrumentEventType", description="The Type of Event. The available values are: TransitionEvent, InformationalEvent, OpenEvent, CloseEvent, StockSplitEvent, BondDefaultEvent, CashDividendEvent, AmortisationEvent, CashFlowEvent, ExerciseEvent, ResetEvent, TriggerEvent, RawVendorEvent, InformationalErrorEvent, BondCouponEvent, DividendReinvestmentEvent, AccumulationEvent, BondPrincipalEvent, DividendOptionEvent, MaturityEvent, FxForwardSettlementEvent, ExpiryEvent, ScripDividendEvent, StockDividendEvent, ReverseStockSplitEvent, CapitalDistributionEvent, SpinOffEvent, MergerEvent, FutureExpiryEvent, SwapCashFlowEvent, SwapPrincipalEvent, CreditPremiumCashFlowEvent, CdsCreditEvent, CdxCreditEvent, MbsCouponEvent, MbsPrincipalEvent, BonusIssueEvent, MbsPrincipalWriteOffEvent, MbsInterestDeferralEvent, MbsInterestShortfallEvent, TenderEvent, CallOnIntermediateSecuritiesEvent, IntermediateSecuritiesDistributionEvent, OptionExercisePhysicalEvent, OptionExerciseCashEvent, ProtectionPayoutCashFlowEvent, TermDepositInterestEvent, TermDepositPrincipalEvent, EarlyRedemptionEvent, FutureMarkToMarketEvent, AdjustGlobalCommitmentEvent, ContractInitialisationEvent, DrawdownEvent, LoanInterestRepaymentEvent")
|
34
36
|
additional_properties: Dict[str, Any] = {}
|
35
|
-
__properties = ["instrumentEventType", "paymentDate", "exDate", "currency", "fraction"]
|
37
|
+
__properties = ["instrumentEventType", "paymentDate", "exDate", "currency", "fraction", "lapseElections"]
|
36
38
|
|
37
39
|
@validator('instrument_event_type')
|
38
40
|
def instrument_event_type_validate_enum(cls, value):
|
@@ -74,11 +76,23 @@ class LoanInterestRepaymentEvent(InstrumentEvent):
|
|
74
76
|
"additional_properties"
|
75
77
|
},
|
76
78
|
exclude_none=True)
|
79
|
+
# override the default output from pydantic by calling `to_dict()` of each item in lapse_elections (list)
|
80
|
+
_items = []
|
81
|
+
if self.lapse_elections:
|
82
|
+
for _item in self.lapse_elections:
|
83
|
+
if _item:
|
84
|
+
_items.append(_item.to_dict())
|
85
|
+
_dict['lapseElections'] = _items
|
77
86
|
# puts key-value pairs in additional_properties in the top level
|
78
87
|
if self.additional_properties is not None:
|
79
88
|
for _key, _value in self.additional_properties.items():
|
80
89
|
_dict[_key] = _value
|
81
90
|
|
91
|
+
# set to None if lapse_elections (nullable) is None
|
92
|
+
# and __fields_set__ contains the field
|
93
|
+
if self.lapse_elections is None and "lapse_elections" in self.__fields_set__:
|
94
|
+
_dict['lapseElections'] = None
|
95
|
+
|
82
96
|
return _dict
|
83
97
|
|
84
98
|
@classmethod
|
@@ -95,7 +109,8 @@ class LoanInterestRepaymentEvent(InstrumentEvent):
|
|
95
109
|
"payment_date": obj.get("paymentDate"),
|
96
110
|
"ex_date": obj.get("exDate"),
|
97
111
|
"currency": obj.get("currency"),
|
98
|
-
"fraction": obj.get("fraction")
|
112
|
+
"fraction": obj.get("fraction"),
|
113
|
+
"lapse_elections": [LapseElection.from_dict(_item) for _item in obj.get("lapseElections")] if obj.get("lapseElections") is not None else None
|
99
114
|
})
|
100
115
|
# store additional fields in additional_properties
|
101
116
|
for _key in obj.keys():
|
@@ -73,7 +73,7 @@ lusid/api/translation_api.py,sha256=nIyuLncCvVC5k2d7Nm32zR8AQ1dkrVm1OThkmELY_OM,
|
|
73
73
|
lusid/api/workspace_api.py,sha256=Yox1q7TDY-_O3HF-N8g5kGuNgp4unWvlSZmRZ6MNZO0,196701
|
74
74
|
lusid/api_client.py,sha256=ewMTmf9SRurY8pYnUx9jy24RdldPCOa4US38pnrVxjA,31140
|
75
75
|
lusid/api_response.py,sha256=6-gnhty6lu8MMAERt3_kTVD7UxQgWFfcjgpcq6iN5IU,855
|
76
|
-
lusid/configuration.py,sha256=
|
76
|
+
lusid/configuration.py,sha256=wTmDNKh5TIuEXYoAI7YQtDA7grnHRUX_TF6Bw1-wVfo,17972
|
77
77
|
lusid/exceptions.py,sha256=HIQwgmQrszLlcVCLaqex8dO0laVuejUyOMz7U2ZWJ6s,5326
|
78
78
|
lusid/extensions/__init__.py,sha256=dzDHEzpn-9smd2-_UMWQzeyX6Ha4jGf6fnqx7qxKxNI,630
|
79
79
|
lusid/extensions/api_client.py,sha256=GzygWg_h603QK1QS2HvAijuE2R1TnvoF6-Yg0CeM3ug,30943
|
@@ -638,7 +638,7 @@ lusid/models/list_aggregation_reconciliation.py,sha256=yHkO9sqn9dFMC9hb_5ei1SH59
|
|
638
638
|
lusid/models/list_aggregation_response.py,sha256=dInlTbNsb_wV19nKDRKRf2T_QU9MtKvflHvSVY2H3XA,5625
|
639
639
|
lusid/models/list_complex_market_data_with_meta_data_response.py,sha256=lgKBJUqrpjtKEXWgvTCn8b8q-6R1NiabSqoUKBVPzw4,3814
|
640
640
|
lusid/models/loan_facility.py,sha256=HNJdbmzo6fGI3XG4X_GBvCKRSRDGxFwMmYb8_VTjrvE,7476
|
641
|
-
lusid/models/loan_interest_repayment_event.py,sha256=
|
641
|
+
lusid/models/loan_interest_repayment_event.py,sha256=9qiwLU2MGD75OST77ONtRohLRiYTmqvw0B_yW1fHWIU,8628
|
642
642
|
lusid/models/loan_period.py,sha256=_etbhg_IaojuEys0N0rxwAAzO6bDCA1JHLiOAqkiunY,2364
|
643
643
|
lusid/models/lock_period_diary_entry_request.py,sha256=NC5mK4AXFMVYyFilhiL5iHqMc0NLWPjaiUpJsa41sCg,3511
|
644
644
|
lusid/models/lusid_instrument.py,sha256=t_rKTKqfKCmpxCI-UdnDoP0xXtbeG7zU-BhlO2aFcxI,8191
|
@@ -1268,6 +1268,6 @@ lusid/models/workspace_update_request.py,sha256=5N7j21uF9XV75Sl3oJbsSOKT5PrQEx3y
|
|
1268
1268
|
lusid/models/yield_curve_data.py,sha256=vtOzY4t2lgHJUWcna9dEKnuZ_tinolyb8IAFPB23DZ0,6543
|
1269
1269
|
lusid/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
1270
1270
|
lusid/rest.py,sha256=HQT__5LQEMu6_1sLKvYj-DI4FH1DJXBIPYfZCTTyrY4,13431
|
1271
|
-
lusid_sdk-2.1.
|
1272
|
-
lusid_sdk-2.1.
|
1273
|
-
lusid_sdk-2.1.
|
1271
|
+
lusid_sdk-2.1.686.dist-info/METADATA,sha256=bajgmXIcFFfdLc8DZnjy8S01zYnf-TBYP8IBmitJXLg,216264
|
1272
|
+
lusid_sdk-2.1.686.dist-info/WHEEL,sha256=Nq82e9rUAnEjt98J6MlVmMCZb-t9cYE2Ir1kpBmnWfs,88
|
1273
|
+
lusid_sdk-2.1.686.dist-info/RECORD,,
|
File without changes
|