lusid-sdk 2.1.676__py3-none-any.whl → 2.1.678__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
lusid/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.7289\n"\
|
449
449
|
"SDK Package Version: {package_version}".\
|
450
450
|
format(env=sys.platform, pyversion=sys.version, package_version=package_version)
|
451
451
|
|
lusid/models/loan_facility.py
CHANGED
@@ -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
|
22
|
-
from pydantic.v1 import Field, StrictStr, validator
|
21
|
+
from typing import Any, Dict, List
|
22
|
+
from pydantic.v1 import Field, StrictStr, conlist, constr, validator
|
23
23
|
from lusid.models.lusid_instrument import LusidInstrument
|
24
|
+
from lusid.models.schedule import Schedule
|
24
25
|
|
25
26
|
class LoanFacility(LusidInstrument):
|
26
27
|
"""
|
@@ -29,9 +30,11 @@ class LoanFacility(LusidInstrument):
|
|
29
30
|
start_date: datetime = Field(..., alias="startDate", description="The start date of the instrument. This is normally synonymous with the trade-date.")
|
30
31
|
maturity_date: datetime = Field(..., alias="maturityDate", description="The final maturity date of the instrument. This means the last date on which the instruments makes a payment of any amount. For the avoidance of doubt, that is not necessarily prior to its last sensitivity date for the purposes of risk; e.g. instruments such as Constant Maturity Swaps (CMS) often have sensitivities to rates that may well be observed or set prior to the maturity date, but refer to a termination date beyond it.")
|
31
32
|
dom_ccy: StrictStr = Field(..., alias="domCcy", description="The domestic currency of the instrument.")
|
33
|
+
loan_type: constr(strict=True, min_length=1) = Field(..., alias="loanType", description="LoanType for this facility. The facility can either be a revolving or a term loan. Supported string (enumeration) values are: [Revolver, TermLoan].")
|
34
|
+
schedules: conlist(Schedule) = Field(..., description="Repayment schedules for the loan.")
|
32
35
|
instrument_type: StrictStr = Field(..., alias="instrumentType", description="The available values are: QuotedSecurity, InterestRateSwap, FxForward, Future, ExoticInstrument, FxOption, CreditDefaultSwap, InterestRateSwaption, Bond, EquityOption, FixedLeg, FloatingLeg, BespokeCashFlowsLeg, Unknown, TermDeposit, ContractForDifference, EquitySwap, CashPerpetual, CapFloor, CashSettled, CdsIndex, Basket, FundingLeg, FxSwap, ForwardRateAgreement, SimpleInstrument, Repo, Equity, ExchangeTradedOption, ReferenceInstrument, ComplexBond, InflationLinkedBond, InflationSwap, SimpleCashFlowLoan, TotalReturnSwap, InflationLeg, FundShareClass, FlexibleLoan, UnsettledCash, Cash, MasteredInstrument, LoanFacility, FlexibleDeposit")
|
33
36
|
additional_properties: Dict[str, Any] = {}
|
34
|
-
__properties = ["instrumentType", "startDate", "maturityDate", "domCcy"]
|
37
|
+
__properties = ["instrumentType", "startDate", "maturityDate", "domCcy", "loanType", "schedules"]
|
35
38
|
|
36
39
|
@validator('instrument_type')
|
37
40
|
def instrument_type_validate_enum(cls, value):
|
@@ -73,6 +76,13 @@ class LoanFacility(LusidInstrument):
|
|
73
76
|
"additional_properties"
|
74
77
|
},
|
75
78
|
exclude_none=True)
|
79
|
+
# override the default output from pydantic by calling `to_dict()` of each item in schedules (list)
|
80
|
+
_items = []
|
81
|
+
if self.schedules:
|
82
|
+
for _item in self.schedules:
|
83
|
+
if _item:
|
84
|
+
_items.append(_item.to_dict())
|
85
|
+
_dict['schedules'] = _items
|
76
86
|
# puts key-value pairs in additional_properties in the top level
|
77
87
|
if self.additional_properties is not None:
|
78
88
|
for _key, _value in self.additional_properties.items():
|
@@ -93,7 +103,9 @@ class LoanFacility(LusidInstrument):
|
|
93
103
|
"instrument_type": obj.get("instrumentType"),
|
94
104
|
"start_date": obj.get("startDate"),
|
95
105
|
"maturity_date": obj.get("maturityDate"),
|
96
|
-
"dom_ccy": obj.get("domCcy")
|
106
|
+
"dom_ccy": obj.get("domCcy"),
|
107
|
+
"loan_type": obj.get("loanType"),
|
108
|
+
"schedules": [Schedule.from_dict(_item) for _item in obj.get("schedules")] if obj.get("schedules") is not None else None
|
97
109
|
})
|
98
110
|
# store additional fields in additional_properties
|
99
111
|
for _key in obj.keys():
|
@@ -71,7 +71,7 @@ lusid/api/translation_api.py,sha256=nIyuLncCvVC5k2d7Nm32zR8AQ1dkrVm1OThkmELY_OM,
|
|
71
71
|
lusid/api/workspace_api.py,sha256=Yox1q7TDY-_O3HF-N8g5kGuNgp4unWvlSZmRZ6MNZO0,196701
|
72
72
|
lusid/api_client.py,sha256=ewMTmf9SRurY8pYnUx9jy24RdldPCOa4US38pnrVxjA,31140
|
73
73
|
lusid/api_response.py,sha256=6-gnhty6lu8MMAERt3_kTVD7UxQgWFfcjgpcq6iN5IU,855
|
74
|
-
lusid/configuration.py,sha256=
|
74
|
+
lusid/configuration.py,sha256=T-BiyWr_-PMx7R5muId9PxutG4Y6nJnnje-CMjGJG9I,17972
|
75
75
|
lusid/exceptions.py,sha256=HIQwgmQrszLlcVCLaqex8dO0laVuejUyOMz7U2ZWJ6s,5326
|
76
76
|
lusid/extensions/__init__.py,sha256=dzDHEzpn-9smd2-_UMWQzeyX6Ha4jGf6fnqx7qxKxNI,630
|
77
77
|
lusid/extensions/api_client.py,sha256=GzygWg_h603QK1QS2HvAijuE2R1TnvoF6-Yg0CeM3ug,30943
|
@@ -626,7 +626,7 @@ lusid/models/link.py,sha256=VFgfjebDV-GeFukJsVZljcv9FXYj5c2b1x1Xc2ERv7I,2462
|
|
626
626
|
lusid/models/list_aggregation_reconciliation.py,sha256=yHkO9sqn9dFMC9hb_5ei1SH59ZkINwSs43722JD1TFE,3558
|
627
627
|
lusid/models/list_aggregation_response.py,sha256=dInlTbNsb_wV19nKDRKRf2T_QU9MtKvflHvSVY2H3XA,5625
|
628
628
|
lusid/models/list_complex_market_data_with_meta_data_response.py,sha256=lgKBJUqrpjtKEXWgvTCn8b8q-6R1NiabSqoUKBVPzw4,3814
|
629
|
-
lusid/models/loan_facility.py,sha256=
|
629
|
+
lusid/models/loan_facility.py,sha256=HNJdbmzo6fGI3XG4X_GBvCKRSRDGxFwMmYb8_VTjrvE,7476
|
630
630
|
lusid/models/loan_interest_repayment_event.py,sha256=0T4j-BaaX_sRbxv2czD84s-Zzro7tpzSrUEe6aZ2vQw,7589
|
631
631
|
lusid/models/loan_period.py,sha256=_etbhg_IaojuEys0N0rxwAAzO6bDCA1JHLiOAqkiunY,2364
|
632
632
|
lusid/models/lock_period_diary_entry_request.py,sha256=NC5mK4AXFMVYyFilhiL5iHqMc0NLWPjaiUpJsa41sCg,3511
|
@@ -1254,6 +1254,6 @@ lusid/models/workspace_update_request.py,sha256=5N7j21uF9XV75Sl3oJbsSOKT5PrQEx3y
|
|
1254
1254
|
lusid/models/yield_curve_data.py,sha256=vtOzY4t2lgHJUWcna9dEKnuZ_tinolyb8IAFPB23DZ0,6543
|
1255
1255
|
lusid/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
1256
1256
|
lusid/rest.py,sha256=HQT__5LQEMu6_1sLKvYj-DI4FH1DJXBIPYfZCTTyrY4,13431
|
1257
|
-
lusid_sdk-2.1.
|
1258
|
-
lusid_sdk-2.1.
|
1259
|
-
lusid_sdk-2.1.
|
1257
|
+
lusid_sdk-2.1.678.dist-info/METADATA,sha256=v_HHYiMuOwcmc0f2ADHxM4nD-Snes61GK-qNKQwTRbA,213719
|
1258
|
+
lusid_sdk-2.1.678.dist-info/WHEEL,sha256=Nq82e9rUAnEjt98J6MlVmMCZb-t9cYE2Ir1kpBmnWfs,88
|
1259
|
+
lusid_sdk-2.1.678.dist-info/RECORD,,
|
File without changes
|