lusid-sdk 2.1.846__py3-none-any.whl → 2.1.848__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/__init__.py +2 -2
- lusid/api/investor_records_api.py +2 -2
- lusid/api/legal_entities_api.py +2 -2
- lusid/api/persons_api.py +2 -2
- lusid/configuration.py +1 -1
- lusid/models/__init__.py +2 -2
- lusid/models/bond.py +8 -2
- lusid/models/cap_floor.py +8 -2
- lusid/models/cds_index.py +8 -2
- lusid/models/complex_bond.py +8 -2
- lusid/models/contract_for_difference.py +8 -2
- lusid/models/create_derived_property_definition_request.py +3 -3
- lusid/models/create_identifier_definition_request.py +3 -3
- lusid/models/create_property_definition_request.py +3 -3
- lusid/models/credit_default_swap.py +8 -2
- lusid/models/equity_option.py +8 -2
- lusid/models/equity_swap.py +8 -2
- lusid/models/exchange_traded_option.py +8 -2
- lusid/models/fixed_leg.py +8 -2
- lusid/models/flexible_deposit.py +8 -2
- lusid/models/flexible_loan.py +9 -3
- lusid/models/floating_leg.py +8 -2
- lusid/models/forward_rate_agreement.py +8 -2
- lusid/models/fund_share_class.py +8 -2
- lusid/models/funding_leg.py +8 -2
- lusid/models/future.py +8 -2
- lusid/models/fx_forward.py +8 -2
- lusid/models/fx_option.py +8 -2
- lusid/models/fx_swap.py +8 -2
- lusid/models/identifier_definition.py +3 -3
- lusid/models/inflation_leg.py +8 -2
- lusid/models/inflation_linked_bond.py +8 -2
- lusid/models/inflation_swap.py +8 -2
- lusid/models/interest_rate_swap.py +8 -2
- lusid/models/interest_rate_swaption.py +8 -2
- lusid/models/investor.py +1 -1
- lusid/models/{upsert_investor.py → investor_identifier.py} +10 -10
- lusid/models/loan_facility.py +9 -3
- 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/repo.py +8 -2
- lusid/models/simple_cash_flow_loan.py +9 -3
- lusid/models/term_deposit.py +8 -2
- lusid/models/total_return_swap.py +8 -2
- lusid/models/upsert_investor_record_request.py +7 -7
- {lusid_sdk-2.1.846.dist-info → lusid_sdk-2.1.848.dist-info}/METADATA +5 -5
- {lusid_sdk-2.1.846.dist-info → lusid_sdk-2.1.848.dist-info}/RECORD +49 -49
- {lusid_sdk-2.1.846.dist-info → lusid_sdk-2.1.848.dist-info}/WHEEL +0 -0
lusid/models/inflation_leg.py
CHANGED
@@ -23,6 +23,7 @@ from pydantic.v1 import StrictStr, Field, Field, StrictFloat, StrictInt, StrictS
|
|
23
23
|
from lusid.models.flow_conventions import FlowConventions
|
24
24
|
from lusid.models.inflation_index_conventions import InflationIndexConventions
|
25
25
|
from lusid.models.lusid_instrument import LusidInstrument
|
26
|
+
from lusid.models.time_zone_conventions import TimeZoneConventions
|
26
27
|
|
27
28
|
class InflationLeg(LusidInstrument):
|
28
29
|
"""
|
@@ -38,9 +39,10 @@ class InflationLeg(LusidInstrument):
|
|
38
39
|
inflation_index_conventions: InflationIndexConventions = Field(..., alias="inflationIndexConventions")
|
39
40
|
notional: Union[StrictFloat, StrictInt] = Field(..., description="The notional")
|
40
41
|
pay_receive: Optional[StrictStr] = Field(None,alias="payReceive", description="PayReceive flag for the inflation leg. This field is optional and defaults to Pay. Supported string (enumeration) values are: [Pay, Receive].")
|
42
|
+
time_zone_conventions: Optional[TimeZoneConventions] = Field(None, alias="timeZoneConventions")
|
41
43
|
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")
|
42
44
|
additional_properties: Dict[str, Any] = {}
|
43
|
-
__properties = ["instrumentType", "startDate", "maturityDate", "flowConventions", "baseCPI", "calculationType", "capRate", "floorRate", "inflationIndexConventions", "notional", "payReceive"]
|
45
|
+
__properties = ["instrumentType", "startDate", "maturityDate", "flowConventions", "baseCPI", "calculationType", "capRate", "floorRate", "inflationIndexConventions", "notional", "payReceive", "timeZoneConventions"]
|
44
46
|
|
45
47
|
@validator('instrument_type')
|
46
48
|
def instrument_type_validate_enum(cls, value):
|
@@ -140,6 +142,9 @@ class InflationLeg(LusidInstrument):
|
|
140
142
|
# override the default output from pydantic by calling `to_dict()` of inflation_index_conventions
|
141
143
|
if self.inflation_index_conventions:
|
142
144
|
_dict['inflationIndexConventions'] = self.inflation_index_conventions.to_dict()
|
145
|
+
# override the default output from pydantic by calling `to_dict()` of time_zone_conventions
|
146
|
+
if self.time_zone_conventions:
|
147
|
+
_dict['timeZoneConventions'] = self.time_zone_conventions.to_dict()
|
143
148
|
# puts key-value pairs in additional_properties in the top level
|
144
149
|
if self.additional_properties is not None:
|
145
150
|
for _key, _value in self.additional_properties.items():
|
@@ -187,7 +192,8 @@ class InflationLeg(LusidInstrument):
|
|
187
192
|
"floor_rate": obj.get("floorRate"),
|
188
193
|
"inflation_index_conventions": InflationIndexConventions.from_dict(obj.get("inflationIndexConventions")) if obj.get("inflationIndexConventions") is not None else None,
|
189
194
|
"notional": obj.get("notional"),
|
190
|
-
"pay_receive": obj.get("payReceive")
|
195
|
+
"pay_receive": obj.get("payReceive"),
|
196
|
+
"time_zone_conventions": TimeZoneConventions.from_dict(obj.get("timeZoneConventions")) if obj.get("timeZoneConventions") is not None else None
|
191
197
|
})
|
192
198
|
# store additional fields in additional_properties
|
193
199
|
for _key in obj.keys():
|
@@ -24,6 +24,7 @@ from lusid.models.flow_conventions import FlowConventions
|
|
24
24
|
from lusid.models.inflation_index_conventions import InflationIndexConventions
|
25
25
|
from lusid.models.lusid_instrument import LusidInstrument
|
26
26
|
from lusid.models.rounding_convention import RoundingConvention
|
27
|
+
from lusid.models.time_zone_conventions import TimeZoneConventions
|
27
28
|
from lusid.models.trading_conventions import TradingConventions
|
28
29
|
|
29
30
|
class InflationLinkedBond(LusidInstrument):
|
@@ -47,9 +48,10 @@ class InflationLinkedBond(LusidInstrument):
|
|
47
48
|
rounding_conventions: Optional[conlist(RoundingConvention)] = Field(None, alias="roundingConventions", description="Rounding conventions for analytics, if any.")
|
48
49
|
trading_conventions: Optional[TradingConventions] = Field(None, alias="tradingConventions")
|
49
50
|
original_issue_price: Optional[Union[StrictFloat, StrictInt]] = Field(None, alias="originalIssuePrice", description="The price the bond was issued at. This is to be entered as a percentage of par, for example a value of 98.5 would represent 98.5%.")
|
51
|
+
time_zone_conventions: Optional[TimeZoneConventions] = Field(None, alias="timeZoneConventions")
|
50
52
|
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")
|
51
53
|
additional_properties: Dict[str, Any] = {}
|
52
|
-
__properties = ["instrumentType", "startDate", "maturityDate", "flowConventions", "inflationIndexConventions", "couponRate", "identifiers", "baseCPI", "baseCPIDate", "calculationType", "exDividendDays", "indexPrecision", "principal", "principalProtection", "stubType", "roundingConventions", "tradingConventions", "originalIssuePrice"]
|
54
|
+
__properties = ["instrumentType", "startDate", "maturityDate", "flowConventions", "inflationIndexConventions", "couponRate", "identifiers", "baseCPI", "baseCPIDate", "calculationType", "exDividendDays", "indexPrecision", "principal", "principalProtection", "stubType", "roundingConventions", "tradingConventions", "originalIssuePrice", "timeZoneConventions"]
|
53
55
|
|
54
56
|
@validator('instrument_type')
|
55
57
|
def instrument_type_validate_enum(cls, value):
|
@@ -159,6 +161,9 @@ class InflationLinkedBond(LusidInstrument):
|
|
159
161
|
# override the default output from pydantic by calling `to_dict()` of trading_conventions
|
160
162
|
if self.trading_conventions:
|
161
163
|
_dict['tradingConventions'] = self.trading_conventions.to_dict()
|
164
|
+
# override the default output from pydantic by calling `to_dict()` of time_zone_conventions
|
165
|
+
if self.time_zone_conventions:
|
166
|
+
_dict['timeZoneConventions'] = self.time_zone_conventions.to_dict()
|
162
167
|
# puts key-value pairs in additional_properties in the top level
|
163
168
|
if self.additional_properties is not None:
|
164
169
|
for _key, _value in self.additional_properties.items():
|
@@ -233,7 +238,8 @@ class InflationLinkedBond(LusidInstrument):
|
|
233
238
|
"stub_type": obj.get("stubType"),
|
234
239
|
"rounding_conventions": [RoundingConvention.from_dict(_item) for _item in obj.get("roundingConventions")] if obj.get("roundingConventions") is not None else None,
|
235
240
|
"trading_conventions": TradingConventions.from_dict(obj.get("tradingConventions")) if obj.get("tradingConventions") is not None else None,
|
236
|
-
"original_issue_price": obj.get("originalIssuePrice")
|
241
|
+
"original_issue_price": obj.get("originalIssuePrice"),
|
242
|
+
"time_zone_conventions": TimeZoneConventions.from_dict(obj.get("timeZoneConventions")) if obj.get("timeZoneConventions") is not None else None
|
237
243
|
})
|
238
244
|
# store additional fields in additional_properties
|
239
245
|
for _key in obj.keys():
|
lusid/models/inflation_swap.py
CHANGED
@@ -24,6 +24,7 @@ from lusid.models.additional_payment import AdditionalPayment
|
|
24
24
|
from lusid.models.fixed_leg import FixedLeg
|
25
25
|
from lusid.models.inflation_leg import InflationLeg
|
26
26
|
from lusid.models.lusid_instrument import LusidInstrument
|
27
|
+
from lusid.models.time_zone_conventions import TimeZoneConventions
|
27
28
|
|
28
29
|
class InflationSwap(LusidInstrument):
|
29
30
|
"""
|
@@ -34,9 +35,10 @@ class InflationSwap(LusidInstrument):
|
|
34
35
|
inflation_leg: InflationLeg = Field(..., alias="inflationLeg")
|
35
36
|
fixed_leg: FixedLeg = Field(..., alias="fixedLeg")
|
36
37
|
additional_payments: Optional[conlist(AdditionalPayment)] = Field(None, alias="additionalPayments", description="Optional additional payments at a given date e.g. to level off an uneven inflation swap. The dates must be distinct and either all payments are Pay or all payments are Receive.")
|
38
|
+
time_zone_conventions: Optional[TimeZoneConventions] = Field(None, alias="timeZoneConventions")
|
37
39
|
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")
|
38
40
|
additional_properties: Dict[str, Any] = {}
|
39
|
-
__properties = ["instrumentType", "startDate", "maturityDate", "inflationLeg", "fixedLeg", "additionalPayments"]
|
41
|
+
__properties = ["instrumentType", "startDate", "maturityDate", "inflationLeg", "fixedLeg", "additionalPayments", "timeZoneConventions"]
|
40
42
|
|
41
43
|
@validator('instrument_type')
|
42
44
|
def instrument_type_validate_enum(cls, value):
|
@@ -143,6 +145,9 @@ class InflationSwap(LusidInstrument):
|
|
143
145
|
if _item:
|
144
146
|
_items.append(_item.to_dict())
|
145
147
|
_dict['additionalPayments'] = _items
|
148
|
+
# override the default output from pydantic by calling `to_dict()` of time_zone_conventions
|
149
|
+
if self.time_zone_conventions:
|
150
|
+
_dict['timeZoneConventions'] = self.time_zone_conventions.to_dict()
|
146
151
|
# puts key-value pairs in additional_properties in the top level
|
147
152
|
if self.additional_properties is not None:
|
148
153
|
for _key, _value in self.additional_properties.items():
|
@@ -170,7 +175,8 @@ class InflationSwap(LusidInstrument):
|
|
170
175
|
"maturity_date": obj.get("maturityDate"),
|
171
176
|
"inflation_leg": InflationLeg.from_dict(obj.get("inflationLeg")) if obj.get("inflationLeg") is not None else None,
|
172
177
|
"fixed_leg": FixedLeg.from_dict(obj.get("fixedLeg")) if obj.get("fixedLeg") is not None else None,
|
173
|
-
"additional_payments": [AdditionalPayment.from_dict(_item) for _item in obj.get("additionalPayments")] if obj.get("additionalPayments") is not None else None
|
178
|
+
"additional_payments": [AdditionalPayment.from_dict(_item) for _item in obj.get("additionalPayments")] if obj.get("additionalPayments") is not None else None,
|
179
|
+
"time_zone_conventions": TimeZoneConventions.from_dict(obj.get("timeZoneConventions")) if obj.get("timeZoneConventions") is not None else None
|
174
180
|
})
|
175
181
|
# store additional fields in additional_properties
|
176
182
|
for _key in obj.keys():
|
@@ -23,6 +23,7 @@ from pydantic.v1 import StrictStr, Field, Field, StrictBool, StrictStr, conlist,
|
|
23
23
|
from lusid.models.additional_payment import AdditionalPayment
|
24
24
|
from lusid.models.instrument_leg import InstrumentLeg
|
25
25
|
from lusid.models.lusid_instrument import LusidInstrument
|
26
|
+
from lusid.models.time_zone_conventions import TimeZoneConventions
|
26
27
|
|
27
28
|
class InterestRateSwap(LusidInstrument):
|
28
29
|
"""
|
@@ -34,9 +35,10 @@ class InterestRateSwap(LusidInstrument):
|
|
34
35
|
legs: conlist(InstrumentLeg) = Field(..., description="The set of instrument legs that define the swap instrument, these should be FloatingLeg or FixedLeg.")
|
35
36
|
settlement_ccy: Optional[StrictStr] = Field(None,alias="settlementCcy", description="Settlement currency if IRS is non-deliverable.")
|
36
37
|
additional_payments: Optional[conlist(AdditionalPayment)] = Field(None, alias="additionalPayments", description="Optional additional payments at a given date e.g. to level off an uneven fixed-floating swap. The dates must be distinct and either all payments are Pay or all payments are Receive.")
|
38
|
+
time_zone_conventions: Optional[TimeZoneConventions] = Field(None, alias="timeZoneConventions")
|
37
39
|
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")
|
38
40
|
additional_properties: Dict[str, Any] = {}
|
39
|
-
__properties = ["instrumentType", "startDate", "maturityDate", "isNonDeliverable", "legs", "settlementCcy", "additionalPayments"]
|
41
|
+
__properties = ["instrumentType", "startDate", "maturityDate", "isNonDeliverable", "legs", "settlementCcy", "additionalPayments", "timeZoneConventions"]
|
40
42
|
|
41
43
|
@validator('instrument_type')
|
42
44
|
def instrument_type_validate_enum(cls, value):
|
@@ -144,6 +146,9 @@ class InterestRateSwap(LusidInstrument):
|
|
144
146
|
if _item:
|
145
147
|
_items.append(_item.to_dict())
|
146
148
|
_dict['additionalPayments'] = _items
|
149
|
+
# override the default output from pydantic by calling `to_dict()` of time_zone_conventions
|
150
|
+
if self.time_zone_conventions:
|
151
|
+
_dict['timeZoneConventions'] = self.time_zone_conventions.to_dict()
|
147
152
|
# puts key-value pairs in additional_properties in the top level
|
148
153
|
if self.additional_properties is not None:
|
149
154
|
for _key, _value in self.additional_properties.items():
|
@@ -177,7 +182,8 @@ class InterestRateSwap(LusidInstrument):
|
|
177
182
|
"is_non_deliverable": obj.get("isNonDeliverable"),
|
178
183
|
"legs": [InstrumentLeg.from_dict(_item) for _item in obj.get("legs")] if obj.get("legs") is not None else None,
|
179
184
|
"settlement_ccy": obj.get("settlementCcy"),
|
180
|
-
"additional_payments": [AdditionalPayment.from_dict(_item) for _item in obj.get("additionalPayments")] if obj.get("additionalPayments") is not None else None
|
185
|
+
"additional_payments": [AdditionalPayment.from_dict(_item) for _item in obj.get("additionalPayments")] if obj.get("additionalPayments") is not None else None,
|
186
|
+
"time_zone_conventions": TimeZoneConventions.from_dict(obj.get("timeZoneConventions")) if obj.get("timeZoneConventions") is not None else None
|
181
187
|
})
|
182
188
|
# store additional fields in additional_properties
|
183
189
|
for _key in obj.keys():
|
@@ -23,6 +23,7 @@ from pydantic.v1 import StrictStr, Field, Field, StrictStr, constr, validator
|
|
23
23
|
from lusid.models.interest_rate_swap import InterestRateSwap
|
24
24
|
from lusid.models.lusid_instrument import LusidInstrument
|
25
25
|
from lusid.models.premium import Premium
|
26
|
+
from lusid.models.time_zone_conventions import TimeZoneConventions
|
26
27
|
|
27
28
|
class InterestRateSwaption(LusidInstrument):
|
28
29
|
"""
|
@@ -33,9 +34,10 @@ class InterestRateSwaption(LusidInstrument):
|
|
33
34
|
premium: Optional[Premium] = None
|
34
35
|
delivery_method: StrictStr = Field(...,alias="deliveryMethod", description="How does the option settle Supported string (enumeration) values are: [Cash, Physical].")
|
35
36
|
swap: InterestRateSwap = Field(...)
|
37
|
+
time_zone_conventions: Optional[TimeZoneConventions] = Field(None, alias="timeZoneConventions")
|
36
38
|
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")
|
37
39
|
additional_properties: Dict[str, Any] = {}
|
38
|
-
__properties = ["instrumentType", "startDate", "payOrReceiveFixed", "premium", "deliveryMethod", "swap"]
|
40
|
+
__properties = ["instrumentType", "startDate", "payOrReceiveFixed", "premium", "deliveryMethod", "swap", "timeZoneConventions"]
|
39
41
|
|
40
42
|
@validator('instrument_type')
|
41
43
|
def instrument_type_validate_enum(cls, value):
|
@@ -135,6 +137,9 @@ class InterestRateSwaption(LusidInstrument):
|
|
135
137
|
# override the default output from pydantic by calling `to_dict()` of swap
|
136
138
|
if self.swap:
|
137
139
|
_dict['swap'] = self.swap.to_dict()
|
140
|
+
# override the default output from pydantic by calling `to_dict()` of time_zone_conventions
|
141
|
+
if self.time_zone_conventions:
|
142
|
+
_dict['timeZoneConventions'] = self.time_zone_conventions.to_dict()
|
138
143
|
# puts key-value pairs in additional_properties in the top level
|
139
144
|
if self.additional_properties is not None:
|
140
145
|
for _key, _value in self.additional_properties.items():
|
@@ -157,7 +162,8 @@ class InterestRateSwaption(LusidInstrument):
|
|
157
162
|
"pay_or_receive_fixed": obj.get("payOrReceiveFixed"),
|
158
163
|
"premium": Premium.from_dict(obj.get("premium")) if obj.get("premium") is not None else None,
|
159
164
|
"delivery_method": obj.get("deliveryMethod"),
|
160
|
-
"swap": InterestRateSwap.from_dict(obj.get("swap")) if obj.get("swap") is not None else None
|
165
|
+
"swap": InterestRateSwap.from_dict(obj.get("swap")) if obj.get("swap") is not None else None,
|
166
|
+
"time_zone_conventions": TimeZoneConventions.from_dict(obj.get("timeZoneConventions")) if obj.get("timeZoneConventions") is not None else None
|
161
167
|
})
|
162
168
|
# store additional fields in additional_properties
|
163
169
|
for _key in obj.keys():
|
lusid/models/investor.py
CHANGED
@@ -26,7 +26,7 @@ from lusid.models.person import Person
|
|
26
26
|
|
27
27
|
class Investor(BaseModel):
|
28
28
|
"""
|
29
|
-
|
29
|
+
Representation of an Investor on the LUSID API # noqa: E501
|
30
30
|
"""
|
31
31
|
investor_type: Optional[StrictStr] = Field(None,alias="investorType", description="The type of the Investor")
|
32
32
|
investor_identifiers: Optional[Dict[str, ModelProperty]] = Field(None, alias="investorIdentifiers", description="The identifiers of the Investor")
|
@@ -22,12 +22,12 @@ from typing import Any, Dict, Optional
|
|
22
22
|
from pydantic.v1 import StrictStr, Field, BaseModel, Field, StrictStr
|
23
23
|
from lusid.models.model_property import ModelProperty
|
24
24
|
|
25
|
-
class
|
25
|
+
class InvestorIdentifier(BaseModel):
|
26
26
|
"""
|
27
|
-
|
27
|
+
Identification of an Investor on the LUSID API. # noqa: E501
|
28
28
|
"""
|
29
|
-
investor_type: Optional[StrictStr] = Field(None,alias="investorType", description="The type of the Investor")
|
30
|
-
investor_identifiers: Optional[Dict[str, ModelProperty]] = Field(None, alias="investorIdentifiers", description="
|
29
|
+
investor_type: Optional[StrictStr] = Field(None,alias="investorType", description="The type of the investor of the Investor Record. Can be either a Person or a LegalEntity")
|
30
|
+
investor_identifiers: Optional[Dict[str, ModelProperty]] = Field(None, alias="investorIdentifiers", description="Single identifier that should target the desired person or legal entity")
|
31
31
|
__properties = ["investorType", "investorIdentifiers"]
|
32
32
|
|
33
33
|
class Config:
|
@@ -52,8 +52,8 @@ class UpsertInvestor(BaseModel):
|
|
52
52
|
return json.dumps(self.to_dict())
|
53
53
|
|
54
54
|
@classmethod
|
55
|
-
def from_json(cls, json_str: str) ->
|
56
|
-
"""Create an instance of
|
55
|
+
def from_json(cls, json_str: str) -> InvestorIdentifier:
|
56
|
+
"""Create an instance of InvestorIdentifier from a JSON string"""
|
57
57
|
return cls.from_dict(json.loads(json_str))
|
58
58
|
|
59
59
|
def to_dict(self):
|
@@ -82,15 +82,15 @@ class UpsertInvestor(BaseModel):
|
|
82
82
|
return _dict
|
83
83
|
|
84
84
|
@classmethod
|
85
|
-
def from_dict(cls, obj: dict) ->
|
86
|
-
"""Create an instance of
|
85
|
+
def from_dict(cls, obj: dict) -> InvestorIdentifier:
|
86
|
+
"""Create an instance of InvestorIdentifier from a dict"""
|
87
87
|
if obj is None:
|
88
88
|
return None
|
89
89
|
|
90
90
|
if not isinstance(obj, dict):
|
91
|
-
return
|
91
|
+
return InvestorIdentifier.parse_obj(obj)
|
92
92
|
|
93
|
-
_obj =
|
93
|
+
_obj = InvestorIdentifier.parse_obj({
|
94
94
|
"investor_type": obj.get("investorType"),
|
95
95
|
"investor_identifiers": dict(
|
96
96
|
(_k, ModelProperty.from_dict(_v))
|
lusid/models/loan_facility.py
CHANGED
@@ -18,10 +18,11 @@ import re # noqa: F401
|
|
18
18
|
import json
|
19
19
|
|
20
20
|
from datetime import datetime
|
21
|
-
from typing import Any, Dict, List, Union
|
21
|
+
from typing import Any, Dict, List, Optional, Union
|
22
22
|
from pydantic.v1 import StrictStr, Field, Field, StrictFloat, StrictInt, StrictStr, conlist, constr, validator
|
23
23
|
from lusid.models.lusid_instrument import LusidInstrument
|
24
24
|
from lusid.models.schedule import Schedule
|
25
|
+
from lusid.models.time_zone_conventions import TimeZoneConventions
|
25
26
|
|
26
27
|
class LoanFacility(LusidInstrument):
|
27
28
|
"""
|
@@ -33,9 +34,10 @@ class LoanFacility(LusidInstrument):
|
|
33
34
|
initial_commitment: Union[StrictFloat, StrictInt] = Field(..., alias="initialCommitment", description="The initial commitment for the loan facility.")
|
34
35
|
loan_type: StrictStr = 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].")
|
35
36
|
schedules: conlist(Schedule) = Field(..., description="Repayment schedules for the loan.")
|
37
|
+
time_zone_conventions: Optional[TimeZoneConventions] = Field(None, alias="timeZoneConventions")
|
36
38
|
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")
|
37
39
|
additional_properties: Dict[str, Any] = {}
|
38
|
-
__properties = ["instrumentType", "startDate", "maturityDate", "domCcy", "initialCommitment", "loanType", "schedules"]
|
40
|
+
__properties = ["instrumentType", "startDate", "maturityDate", "domCcy", "initialCommitment", "loanType", "schedules", "timeZoneConventions"]
|
39
41
|
|
40
42
|
@validator('instrument_type')
|
41
43
|
def instrument_type_validate_enum(cls, value):
|
@@ -136,6 +138,9 @@ class LoanFacility(LusidInstrument):
|
|
136
138
|
if _item:
|
137
139
|
_items.append(_item.to_dict())
|
138
140
|
_dict['schedules'] = _items
|
141
|
+
# override the default output from pydantic by calling `to_dict()` of time_zone_conventions
|
142
|
+
if self.time_zone_conventions:
|
143
|
+
_dict['timeZoneConventions'] = self.time_zone_conventions.to_dict()
|
139
144
|
# puts key-value pairs in additional_properties in the top level
|
140
145
|
if self.additional_properties is not None:
|
141
146
|
for _key, _value in self.additional_properties.items():
|
@@ -159,7 +164,8 @@ class LoanFacility(LusidInstrument):
|
|
159
164
|
"dom_ccy": obj.get("domCcy"),
|
160
165
|
"initial_commitment": obj.get("initialCommitment"),
|
161
166
|
"loan_type": obj.get("loanType"),
|
162
|
-
"schedules": [Schedule.from_dict(_item) for _item in obj.get("schedules")] if obj.get("schedules") is not None else None
|
167
|
+
"schedules": [Schedule.from_dict(_item) for _item in obj.get("schedules")] if obj.get("schedules") is not None else None,
|
168
|
+
"time_zone_conventions": TimeZoneConventions.from_dict(obj.get("timeZoneConventions")) if obj.get("timeZoneConventions") is not None else None
|
163
169
|
})
|
164
170
|
# store additional fields in additional_properties
|
165
171
|
for _key in obj.keys():
|
@@ -37,7 +37,7 @@ class PropertyDefinition(BaseModel):
|
|
37
37
|
data_type_id: Optional[ResourceId] = Field(None, alias="dataTypeId")
|
38
38
|
type: Optional[StrictStr] = Field(None,alias="type", description="The type of the property. The available values are: Label, Metric, Information")
|
39
39
|
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")
|
40
|
-
domain: Optional[StrictStr] = Field(None,alias="domain", 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, InvestorRecord, Placement, Execution, Block, Participation, Package, OrderInstruction, NextBestAction, CustomEntity, InstrumentEvent, Account, ChartOfAccounts, CustodianAccount, Abor, AborConfiguration, Fund, FundConfiguration, Fee, Reconciliation, PropertyDefinition, Compliance, DiaryEntry, Leg, DerivedValuation, Timeline, ClosedPeriod, AddressKeyDefinition, AmortisationRuleSet, AnalyticsSetInventory, AtomUnitResult, CleardownModule, ComplexMarketData, ComplianceRunSummary, ComplianceRule, ComplianceRunInfo, CorporateActionSource, CounterpartyAgreement, CustomEntityDefinition, DataType, Dialect, EventHandler, GeneralLedgerProfile, PostingModule, Quote, RecipeComposer, ReconciliationRunBreak, ReferenceList, RelationDefinition, ReturnBlockIndex, SRSDocument, SRSIndex, TransactionTemplate, TransactionTemplateScope, TransactionType, TransactionTypeConfig, TranslationScript, TaskDefinition, TaskInstance, Worker, StagingRuleSet, IdentifierDefinition")
|
40
|
+
domain: Optional[StrictStr] = Field(None,alias="domain", 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, InvestorRecord, InvestmentAccount, Placement, Execution, Block, Participation, Package, OrderInstruction, NextBestAction, CustomEntity, InstrumentEvent, Account, ChartOfAccounts, CustodianAccount, Abor, AborConfiguration, Fund, FundConfiguration, Fee, Reconciliation, PropertyDefinition, Compliance, DiaryEntry, Leg, DerivedValuation, Timeline, ClosedPeriod, AddressKeyDefinition, AmortisationRuleSet, AnalyticsSetInventory, AtomUnitResult, CleardownModule, ComplexMarketData, ComplianceRunSummary, ComplianceRule, ComplianceRunInfo, CorporateActionSource, CounterpartyAgreement, CustomEntityDefinition, DataType, Dialect, EventHandler, GeneralLedgerProfile, PostingModule, Quote, RecipeComposer, ReconciliationRunBreak, ReferenceList, RelationDefinition, ReturnBlockIndex, SRSDocument, SRSIndex, TransactionTemplate, TransactionTemplateScope, TransactionType, TransactionTypeConfig, TranslationScript, TaskDefinition, TaskInstance, Worker, StagingRuleSet, IdentifierDefinition")
|
41
41
|
scope: Optional[StrictStr] = Field(None,alias="scope", description="The scope that the property exists in.")
|
42
42
|
code: Optional[StrictStr] = Field(None,alias="code", description="The code of the property. Together with the domain and scope this uniquely identifies the property.")
|
43
43
|
value_required: Optional[StrictBool] = Field(None, alias="valueRequired", description="This field is not implemented and should be disregarded.")
|
@@ -298,8 +298,8 @@ class PropertyDefinition(BaseModel):
|
|
298
298
|
if value is None:
|
299
299
|
return value
|
300
300
|
|
301
|
-
if value not in ('NotDefined', 'Transaction', 'Portfolio', 'Holding', 'ReferenceHolding', 'TransactionConfiguration', 'Instrument', 'CutLabelDefinition', 'Analytic', 'PortfolioGroup', 'Person', 'AccessMetadata', 'Order', 'UnitResult', 'MarketData', 'ConfigurationRecipe', 'Allocation', 'Calendar', 'LegalEntity', 'InvestorRecord', 'Placement', 'Execution', 'Block', 'Participation', 'Package', 'OrderInstruction', 'NextBestAction', 'CustomEntity', 'InstrumentEvent', 'Account', 'ChartOfAccounts', 'CustodianAccount', 'Abor', 'AborConfiguration', 'Fund', 'FundConfiguration', 'Fee', 'Reconciliation', 'PropertyDefinition', 'Compliance', 'DiaryEntry', 'Leg', 'DerivedValuation', 'Timeline', 'ClosedPeriod', 'AddressKeyDefinition', 'AmortisationRuleSet', 'AnalyticsSetInventory', 'AtomUnitResult', 'CleardownModule', 'ComplexMarketData', 'ComplianceRunSummary', 'ComplianceRule', 'ComplianceRunInfo', 'CorporateActionSource', 'CounterpartyAgreement', 'CustomEntityDefinition', 'DataType', 'Dialect', 'EventHandler', 'GeneralLedgerProfile', 'PostingModule', 'Quote', 'RecipeComposer', 'ReconciliationRunBreak', 'ReferenceList', 'RelationDefinition', 'ReturnBlockIndex', 'SRSDocument', 'SRSIndex', 'TransactionTemplate', 'TransactionTemplateScope', 'TransactionType', 'TransactionTypeConfig', 'TranslationScript', 'TaskDefinition', 'TaskInstance', 'Worker', 'StagingRuleSet', 'IdentifierDefinition'):
|
302
|
-
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', 'InvestorRecord', 'Placement', 'Execution', 'Block', 'Participation', 'Package', 'OrderInstruction', 'NextBestAction', 'CustomEntity', 'InstrumentEvent', 'Account', 'ChartOfAccounts', 'CustodianAccount', 'Abor', 'AborConfiguration', 'Fund', 'FundConfiguration', 'Fee', 'Reconciliation', 'PropertyDefinition', 'Compliance', 'DiaryEntry', 'Leg', 'DerivedValuation', 'Timeline', 'ClosedPeriod', 'AddressKeyDefinition', 'AmortisationRuleSet', 'AnalyticsSetInventory', 'AtomUnitResult', 'CleardownModule', 'ComplexMarketData', 'ComplianceRunSummary', 'ComplianceRule', 'ComplianceRunInfo', 'CorporateActionSource', 'CounterpartyAgreement', 'CustomEntityDefinition', 'DataType', 'Dialect', 'EventHandler', 'GeneralLedgerProfile', 'PostingModule', 'Quote', 'RecipeComposer', 'ReconciliationRunBreak', 'ReferenceList', 'RelationDefinition', 'ReturnBlockIndex', 'SRSDocument', 'SRSIndex', 'TransactionTemplate', 'TransactionTemplateScope', 'TransactionType', 'TransactionTypeConfig', 'TranslationScript', 'TaskDefinition', 'TaskInstance', 'Worker', 'StagingRuleSet', 'IdentifierDefinition')")
|
301
|
+
if value not in ('NotDefined', 'Transaction', 'Portfolio', 'Holding', 'ReferenceHolding', 'TransactionConfiguration', 'Instrument', 'CutLabelDefinition', 'Analytic', 'PortfolioGroup', 'Person', 'AccessMetadata', 'Order', 'UnitResult', 'MarketData', 'ConfigurationRecipe', 'Allocation', 'Calendar', 'LegalEntity', 'InvestorRecord', 'InvestmentAccount', 'Placement', 'Execution', 'Block', 'Participation', 'Package', 'OrderInstruction', 'NextBestAction', 'CustomEntity', 'InstrumentEvent', 'Account', 'ChartOfAccounts', 'CustodianAccount', 'Abor', 'AborConfiguration', 'Fund', 'FundConfiguration', 'Fee', 'Reconciliation', 'PropertyDefinition', 'Compliance', 'DiaryEntry', 'Leg', 'DerivedValuation', 'Timeline', 'ClosedPeriod', 'AddressKeyDefinition', 'AmortisationRuleSet', 'AnalyticsSetInventory', 'AtomUnitResult', 'CleardownModule', 'ComplexMarketData', 'ComplianceRunSummary', 'ComplianceRule', 'ComplianceRunInfo', 'CorporateActionSource', 'CounterpartyAgreement', 'CustomEntityDefinition', 'DataType', 'Dialect', 'EventHandler', 'GeneralLedgerProfile', 'PostingModule', 'Quote', 'RecipeComposer', 'ReconciliationRunBreak', 'ReferenceList', 'RelationDefinition', 'ReturnBlockIndex', 'SRSDocument', 'SRSIndex', 'TransactionTemplate', 'TransactionTemplateScope', 'TransactionType', 'TransactionTypeConfig', 'TranslationScript', 'TaskDefinition', 'TaskInstance', 'Worker', 'StagingRuleSet', 'IdentifierDefinition'):
|
302
|
+
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', 'InvestorRecord', 'InvestmentAccount', 'Placement', 'Execution', 'Block', 'Participation', 'Package', 'OrderInstruction', 'NextBestAction', 'CustomEntity', 'InstrumentEvent', 'Account', 'ChartOfAccounts', 'CustodianAccount', 'Abor', 'AborConfiguration', 'Fund', 'FundConfiguration', 'Fee', 'Reconciliation', 'PropertyDefinition', 'Compliance', 'DiaryEntry', 'Leg', 'DerivedValuation', 'Timeline', 'ClosedPeriod', 'AddressKeyDefinition', 'AmortisationRuleSet', 'AnalyticsSetInventory', 'AtomUnitResult', 'CleardownModule', 'ComplexMarketData', 'ComplianceRunSummary', 'ComplianceRule', 'ComplianceRunInfo', 'CorporateActionSource', 'CounterpartyAgreement', 'CustomEntityDefinition', 'DataType', 'Dialect', 'EventHandler', 'GeneralLedgerProfile', 'PostingModule', 'Quote', 'RecipeComposer', 'ReconciliationRunBreak', 'ReferenceList', 'RelationDefinition', 'ReturnBlockIndex', 'SRSDocument', 'SRSIndex', 'TransactionTemplate', 'TransactionTemplateScope', 'TransactionType', 'TransactionTypeConfig', 'TranslationScript', 'TaskDefinition', 'TaskInstance', 'Worker', 'StagingRuleSet', 'IdentifierDefinition')")
|
303
303
|
return value
|
304
304
|
|
305
305
|
@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,alias="type", 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,alias="domain", 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, InvestorRecord, Placement, Execution, Block, Participation, Package, OrderInstruction, NextBestAction, CustomEntity, InstrumentEvent, Account, ChartOfAccounts, CustodianAccount, Abor, AborConfiguration, Fund, FundConfiguration, Fee, Reconciliation, PropertyDefinition, Compliance, DiaryEntry, Leg, DerivedValuation, Timeline, ClosedPeriod, AddressKeyDefinition, AmortisationRuleSet, AnalyticsSetInventory, AtomUnitResult, CleardownModule, ComplexMarketData, ComplianceRunSummary, ComplianceRule, ComplianceRunInfo, CorporateActionSource, CounterpartyAgreement, CustomEntityDefinition, DataType, Dialect, EventHandler, GeneralLedgerProfile, PostingModule, Quote, RecipeComposer, ReconciliationRunBreak, ReferenceList, RelationDefinition, ReturnBlockIndex, SRSDocument, SRSIndex, TransactionTemplate, TransactionTemplateScope, TransactionType, TransactionTypeConfig, TranslationScript, TaskDefinition, TaskInstance, Worker, StagingRuleSet, IdentifierDefinition")
|
37
|
+
domain: Optional[StrictStr] = Field(None,alias="domain", 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, InvestorRecord, InvestmentAccount, Placement, Execution, Block, Participation, Package, OrderInstruction, NextBestAction, CustomEntity, InstrumentEvent, Account, ChartOfAccounts, CustodianAccount, Abor, AborConfiguration, Fund, FundConfiguration, Fee, Reconciliation, PropertyDefinition, Compliance, DiaryEntry, Leg, DerivedValuation, Timeline, ClosedPeriod, AddressKeyDefinition, AmortisationRuleSet, AnalyticsSetInventory, AtomUnitResult, CleardownModule, ComplexMarketData, ComplianceRunSummary, ComplianceRule, ComplianceRunInfo, CorporateActionSource, CounterpartyAgreement, CustomEntityDefinition, DataType, Dialect, EventHandler, GeneralLedgerProfile, PostingModule, Quote, RecipeComposer, ReconciliationRunBreak, ReferenceList, RelationDefinition, ReturnBlockIndex, SRSDocument, SRSIndex, TransactionTemplate, TransactionTemplateScope, TransactionType, TransactionTypeConfig, TranslationScript, TaskDefinition, TaskInstance, Worker, StagingRuleSet, IdentifierDefinition")
|
38
38
|
scope: Optional[StrictStr] = Field(None,alias="scope", description="The scope that the property exists in.")
|
39
39
|
code: Optional[StrictStr] = Field(None,alias="code", 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.")
|
@@ -291,8 +291,8 @@ class PropertyDefinitionSearchResult(BaseModel):
|
|
291
291
|
if value is None:
|
292
292
|
return value
|
293
293
|
|
294
|
-
if value not in ('NotDefined', 'Transaction', 'Portfolio', 'Holding', 'ReferenceHolding', 'TransactionConfiguration', 'Instrument', 'CutLabelDefinition', 'Analytic', 'PortfolioGroup', 'Person', 'AccessMetadata', 'Order', 'UnitResult', 'MarketData', 'ConfigurationRecipe', 'Allocation', 'Calendar', 'LegalEntity', 'InvestorRecord', 'Placement', 'Execution', 'Block', 'Participation', 'Package', 'OrderInstruction', 'NextBestAction', 'CustomEntity', 'InstrumentEvent', 'Account', 'ChartOfAccounts', 'CustodianAccount', 'Abor', 'AborConfiguration', 'Fund', 'FundConfiguration', 'Fee', 'Reconciliation', 'PropertyDefinition', 'Compliance', 'DiaryEntry', 'Leg', 'DerivedValuation', 'Timeline', 'ClosedPeriod', 'AddressKeyDefinition', 'AmortisationRuleSet', 'AnalyticsSetInventory', 'AtomUnitResult', 'CleardownModule', 'ComplexMarketData', 'ComplianceRunSummary', 'ComplianceRule', 'ComplianceRunInfo', 'CorporateActionSource', 'CounterpartyAgreement', 'CustomEntityDefinition', 'DataType', 'Dialect', 'EventHandler', 'GeneralLedgerProfile', 'PostingModule', 'Quote', 'RecipeComposer', 'ReconciliationRunBreak', 'ReferenceList', 'RelationDefinition', 'ReturnBlockIndex', 'SRSDocument', 'SRSIndex', 'TransactionTemplate', 'TransactionTemplateScope', 'TransactionType', 'TransactionTypeConfig', 'TranslationScript', 'TaskDefinition', 'TaskInstance', 'Worker', 'StagingRuleSet', 'IdentifierDefinition'):
|
295
|
-
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', 'InvestorRecord', 'Placement', 'Execution', 'Block', 'Participation', 'Package', 'OrderInstruction', 'NextBestAction', 'CustomEntity', 'InstrumentEvent', 'Account', 'ChartOfAccounts', 'CustodianAccount', 'Abor', 'AborConfiguration', 'Fund', 'FundConfiguration', 'Fee', 'Reconciliation', 'PropertyDefinition', 'Compliance', 'DiaryEntry', 'Leg', 'DerivedValuation', 'Timeline', 'ClosedPeriod', 'AddressKeyDefinition', 'AmortisationRuleSet', 'AnalyticsSetInventory', 'AtomUnitResult', 'CleardownModule', 'ComplexMarketData', 'ComplianceRunSummary', 'ComplianceRule', 'ComplianceRunInfo', 'CorporateActionSource', 'CounterpartyAgreement', 'CustomEntityDefinition', 'DataType', 'Dialect', 'EventHandler', 'GeneralLedgerProfile', 'PostingModule', 'Quote', 'RecipeComposer', 'ReconciliationRunBreak', 'ReferenceList', 'RelationDefinition', 'ReturnBlockIndex', 'SRSDocument', 'SRSIndex', 'TransactionTemplate', 'TransactionTemplateScope', 'TransactionType', 'TransactionTypeConfig', 'TranslationScript', 'TaskDefinition', 'TaskInstance', 'Worker', 'StagingRuleSet', 'IdentifierDefinition')")
|
294
|
+
if value not in ('NotDefined', 'Transaction', 'Portfolio', 'Holding', 'ReferenceHolding', 'TransactionConfiguration', 'Instrument', 'CutLabelDefinition', 'Analytic', 'PortfolioGroup', 'Person', 'AccessMetadata', 'Order', 'UnitResult', 'MarketData', 'ConfigurationRecipe', 'Allocation', 'Calendar', 'LegalEntity', 'InvestorRecord', 'InvestmentAccount', 'Placement', 'Execution', 'Block', 'Participation', 'Package', 'OrderInstruction', 'NextBestAction', 'CustomEntity', 'InstrumentEvent', 'Account', 'ChartOfAccounts', 'CustodianAccount', 'Abor', 'AborConfiguration', 'Fund', 'FundConfiguration', 'Fee', 'Reconciliation', 'PropertyDefinition', 'Compliance', 'DiaryEntry', 'Leg', 'DerivedValuation', 'Timeline', 'ClosedPeriod', 'AddressKeyDefinition', 'AmortisationRuleSet', 'AnalyticsSetInventory', 'AtomUnitResult', 'CleardownModule', 'ComplexMarketData', 'ComplianceRunSummary', 'ComplianceRule', 'ComplianceRunInfo', 'CorporateActionSource', 'CounterpartyAgreement', 'CustomEntityDefinition', 'DataType', 'Dialect', 'EventHandler', 'GeneralLedgerProfile', 'PostingModule', 'Quote', 'RecipeComposer', 'ReconciliationRunBreak', 'ReferenceList', 'RelationDefinition', 'ReturnBlockIndex', 'SRSDocument', 'SRSIndex', 'TransactionTemplate', 'TransactionTemplateScope', 'TransactionType', 'TransactionTypeConfig', 'TranslationScript', 'TaskDefinition', 'TaskInstance', 'Worker', 'StagingRuleSet', 'IdentifierDefinition'):
|
295
|
+
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', 'InvestorRecord', 'InvestmentAccount', 'Placement', 'Execution', 'Block', 'Participation', 'Package', 'OrderInstruction', 'NextBestAction', 'CustomEntity', 'InstrumentEvent', 'Account', 'ChartOfAccounts', 'CustodianAccount', 'Abor', 'AborConfiguration', 'Fund', 'FundConfiguration', 'Fee', 'Reconciliation', 'PropertyDefinition', 'Compliance', 'DiaryEntry', 'Leg', 'DerivedValuation', 'Timeline', 'ClosedPeriod', 'AddressKeyDefinition', 'AmortisationRuleSet', 'AnalyticsSetInventory', 'AtomUnitResult', 'CleardownModule', 'ComplexMarketData', 'ComplianceRunSummary', 'ComplianceRule', 'ComplianceRunInfo', 'CorporateActionSource', 'CounterpartyAgreement', 'CustomEntityDefinition', 'DataType', 'Dialect', 'EventHandler', 'GeneralLedgerProfile', 'PostingModule', 'Quote', 'RecipeComposer', 'ReconciliationRunBreak', 'ReferenceList', 'RelationDefinition', 'ReturnBlockIndex', 'SRSDocument', 'SRSIndex', 'TransactionTemplate', 'TransactionTemplateScope', 'TransactionType', 'TransactionTypeConfig', 'TranslationScript', 'TaskDefinition', 'TaskInstance', 'Worker', 'StagingRuleSet', 'IdentifierDefinition')")
|
296
296
|
return value
|
297
297
|
|
298
298
|
@validator('life_time')
|
lusid/models/property_domain.py
CHANGED
lusid/models/repo.py
CHANGED
@@ -21,6 +21,7 @@ from datetime import datetime
|
|
21
21
|
from typing import Any, Dict, List, Optional, Union
|
22
22
|
from pydantic.v1 import StrictStr, Field, Field, StrictFloat, StrictInt, StrictStr, conlist, constr, validator
|
23
23
|
from lusid.models.lusid_instrument import LusidInstrument
|
24
|
+
from lusid.models.time_zone_conventions import TimeZoneConventions
|
24
25
|
|
25
26
|
class Repo(LusidInstrument):
|
26
27
|
"""
|
@@ -37,9 +38,10 @@ class Repo(LusidInstrument):
|
|
37
38
|
purchase_price: Optional[Union[StrictFloat, StrictInt]] = Field(None, alias="purchasePrice", description="The price the collateral is initially purchased for, this property can be used to explicitly set the purchase price and not require collateral value and a margin or haircut. While this property is optional, one, and only one, of PurchasePrice, Margin and Haircut must be specified.")
|
38
39
|
repo_rate: Optional[Union[StrictFloat, StrictInt]] = Field(None, alias="repoRate", description="The rate at which interest is to be accrue and be paid upon redemption of the collateral at maturity. This field is used to calculate the Repurchase price. While this property is optional, one, and only one, of the RepoRate and RepurchasePrice must be specified.")
|
39
40
|
repurchase_price: Optional[Union[StrictFloat, StrictInt]] = Field(None, alias="repurchasePrice", description="The price at which the collateral is repurchased, this field is optional and can be explicitly set here or will be calculated from the PurchasePrice and RepoRate. One, and only one, of the RepoRate and RepurchasePrice must be specified.")
|
41
|
+
time_zone_conventions: Optional[TimeZoneConventions] = Field(None, alias="timeZoneConventions")
|
40
42
|
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")
|
41
43
|
additional_properties: Dict[str, Any] = {}
|
42
|
-
__properties = ["instrumentType", "startDate", "maturityDate", "domCcy", "accrualBasis", "collateral", "collateralValue", "haircut", "margin", "purchasePrice", "repoRate", "repurchasePrice"]
|
44
|
+
__properties = ["instrumentType", "startDate", "maturityDate", "domCcy", "accrualBasis", "collateral", "collateralValue", "haircut", "margin", "purchasePrice", "repoRate", "repurchasePrice", "timeZoneConventions"]
|
43
45
|
|
44
46
|
@validator('instrument_type')
|
45
47
|
def instrument_type_validate_enum(cls, value):
|
@@ -140,6 +142,9 @@ class Repo(LusidInstrument):
|
|
140
142
|
if _item:
|
141
143
|
_items.append(_item.to_dict())
|
142
144
|
_dict['collateral'] = _items
|
145
|
+
# override the default output from pydantic by calling `to_dict()` of time_zone_conventions
|
146
|
+
if self.time_zone_conventions:
|
147
|
+
_dict['timeZoneConventions'] = self.time_zone_conventions.to_dict()
|
143
148
|
# puts key-value pairs in additional_properties in the top level
|
144
149
|
if self.additional_properties is not None:
|
145
150
|
for _key, _value in self.additional_properties.items():
|
@@ -203,7 +208,8 @@ class Repo(LusidInstrument):
|
|
203
208
|
"margin": obj.get("margin"),
|
204
209
|
"purchase_price": obj.get("purchasePrice"),
|
205
210
|
"repo_rate": obj.get("repoRate"),
|
206
|
-
"repurchase_price": obj.get("repurchasePrice")
|
211
|
+
"repurchase_price": obj.get("repurchasePrice"),
|
212
|
+
"time_zone_conventions": TimeZoneConventions.from_dict(obj.get("timeZoneConventions")) if obj.get("timeZoneConventions") is not None else None
|
207
213
|
})
|
208
214
|
# store additional fields in additional_properties
|
209
215
|
for _key in obj.keys():
|
@@ -18,10 +18,11 @@ import re # noqa: F401
|
|
18
18
|
import json
|
19
19
|
|
20
20
|
from datetime import datetime
|
21
|
-
from typing import Any, Dict, List
|
21
|
+
from typing import Any, Dict, List, Optional
|
22
22
|
from pydantic.v1 import StrictStr, Field, Field, StrictStr, conlist, validator
|
23
23
|
from lusid.models.loan_period import LoanPeriod
|
24
24
|
from lusid.models.lusid_instrument import LusidInstrument
|
25
|
+
from lusid.models.time_zone_conventions import TimeZoneConventions
|
25
26
|
|
26
27
|
class SimpleCashFlowLoan(LusidInstrument):
|
27
28
|
"""
|
@@ -31,9 +32,10 @@ class SimpleCashFlowLoan(LusidInstrument):
|
|
31
32
|
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.")
|
32
33
|
dom_ccy: StrictStr = Field(...,alias="domCcy", description="The domestic currency of the instrument.")
|
33
34
|
periods: conlist(LoanPeriod) = Field(..., description="Periods of the underlying loan")
|
35
|
+
time_zone_conventions: Optional[TimeZoneConventions] = Field(None, alias="timeZoneConventions")
|
34
36
|
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")
|
35
37
|
additional_properties: Dict[str, Any] = {}
|
36
|
-
__properties = ["instrumentType", "startDate", "maturityDate", "domCcy", "periods"]
|
38
|
+
__properties = ["instrumentType", "startDate", "maturityDate", "domCcy", "periods", "timeZoneConventions"]
|
37
39
|
|
38
40
|
@validator('instrument_type')
|
39
41
|
def instrument_type_validate_enum(cls, value):
|
@@ -134,6 +136,9 @@ class SimpleCashFlowLoan(LusidInstrument):
|
|
134
136
|
if _item:
|
135
137
|
_items.append(_item.to_dict())
|
136
138
|
_dict['periods'] = _items
|
139
|
+
# override the default output from pydantic by calling `to_dict()` of time_zone_conventions
|
140
|
+
if self.time_zone_conventions:
|
141
|
+
_dict['timeZoneConventions'] = self.time_zone_conventions.to_dict()
|
137
142
|
# puts key-value pairs in additional_properties in the top level
|
138
143
|
if self.additional_properties is not None:
|
139
144
|
for _key, _value in self.additional_properties.items():
|
@@ -155,7 +160,8 @@ class SimpleCashFlowLoan(LusidInstrument):
|
|
155
160
|
"start_date": obj.get("startDate"),
|
156
161
|
"maturity_date": obj.get("maturityDate"),
|
157
162
|
"dom_ccy": obj.get("domCcy"),
|
158
|
-
"periods": [LoanPeriod.from_dict(_item) for _item in obj.get("periods")] if obj.get("periods") is not None else None
|
163
|
+
"periods": [LoanPeriod.from_dict(_item) for _item in obj.get("periods")] if obj.get("periods") is not None else None,
|
164
|
+
"time_zone_conventions": TimeZoneConventions.from_dict(obj.get("timeZoneConventions")) if obj.get("timeZoneConventions") is not None else None
|
159
165
|
})
|
160
166
|
# store additional fields in additional_properties
|
161
167
|
for _key in obj.keys():
|
lusid/models/term_deposit.py
CHANGED
@@ -22,6 +22,7 @@ from typing import Any, Dict, Optional, Union
|
|
22
22
|
from pydantic.v1 import StrictStr, Field, Field, StrictFloat, StrictInt, StrictStr, validator
|
23
23
|
from lusid.models.flow_conventions import FlowConventions
|
24
24
|
from lusid.models.lusid_instrument import LusidInstrument
|
25
|
+
from lusid.models.time_zone_conventions import TimeZoneConventions
|
25
26
|
from lusid.models.trading_conventions import TradingConventions
|
26
27
|
|
27
28
|
class TermDeposit(LusidInstrument):
|
@@ -35,9 +36,10 @@ class TermDeposit(LusidInstrument):
|
|
35
36
|
rate: Union[StrictFloat, StrictInt] = Field(..., description="The fixed rate for the term deposit. Specified as a decimal, e.g 0.03 is meant to be 3% interest")
|
36
37
|
dom_ccy: Optional[StrictStr] = Field(None,alias="domCcy", description="The domestic currency of the instrument. This should be the same as the Currency set on the FlowConventions. You do not need to populate this field for Term Deposits in LUSID as all functionality is driven by the Currency set on the FlowConventions. LUSID will not store values saved on this field.")
|
37
38
|
trading_conventions: Optional[TradingConventions] = Field(None, alias="tradingConventions")
|
39
|
+
time_zone_conventions: Optional[TimeZoneConventions] = Field(None, alias="timeZoneConventions")
|
38
40
|
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")
|
39
41
|
additional_properties: Dict[str, Any] = {}
|
40
|
-
__properties = ["instrumentType", "startDate", "maturityDate", "contractSize", "flowConvention", "rate", "domCcy", "tradingConventions"]
|
42
|
+
__properties = ["instrumentType", "startDate", "maturityDate", "contractSize", "flowConvention", "rate", "domCcy", "tradingConventions", "timeZoneConventions"]
|
41
43
|
|
42
44
|
@validator('instrument_type')
|
43
45
|
def instrument_type_validate_enum(cls, value):
|
@@ -137,6 +139,9 @@ class TermDeposit(LusidInstrument):
|
|
137
139
|
# override the default output from pydantic by calling `to_dict()` of trading_conventions
|
138
140
|
if self.trading_conventions:
|
139
141
|
_dict['tradingConventions'] = self.trading_conventions.to_dict()
|
142
|
+
# override the default output from pydantic by calling `to_dict()` of time_zone_conventions
|
143
|
+
if self.time_zone_conventions:
|
144
|
+
_dict['timeZoneConventions'] = self.time_zone_conventions.to_dict()
|
140
145
|
# puts key-value pairs in additional_properties in the top level
|
141
146
|
if self.additional_properties is not None:
|
142
147
|
for _key, _value in self.additional_properties.items():
|
@@ -166,7 +171,8 @@ class TermDeposit(LusidInstrument):
|
|
166
171
|
"flow_convention": FlowConventions.from_dict(obj.get("flowConvention")) if obj.get("flowConvention") is not None else None,
|
167
172
|
"rate": obj.get("rate"),
|
168
173
|
"dom_ccy": obj.get("domCcy"),
|
169
|
-
"trading_conventions": TradingConventions.from_dict(obj.get("tradingConventions")) if obj.get("tradingConventions") is not None else None
|
174
|
+
"trading_conventions": TradingConventions.from_dict(obj.get("tradingConventions")) if obj.get("tradingConventions") is not None else None,
|
175
|
+
"time_zone_conventions": TimeZoneConventions.from_dict(obj.get("timeZoneConventions")) if obj.get("timeZoneConventions") is not None else None
|
170
176
|
})
|
171
177
|
# store additional fields in additional_properties
|
172
178
|
for _key in obj.keys():
|
@@ -24,6 +24,7 @@ from lusid.models.additional_payment import AdditionalPayment
|
|
24
24
|
from lusid.models.asset_leg import AssetLeg
|
25
25
|
from lusid.models.instrument_leg import InstrumentLeg
|
26
26
|
from lusid.models.lusid_instrument import LusidInstrument
|
27
|
+
from lusid.models.time_zone_conventions import TimeZoneConventions
|
27
28
|
|
28
29
|
class TotalReturnSwap(LusidInstrument):
|
29
30
|
"""
|
@@ -34,9 +35,10 @@ class TotalReturnSwap(LusidInstrument):
|
|
34
35
|
asset_leg: AssetLeg = Field(..., alias="assetLeg")
|
35
36
|
funding_leg: InstrumentLeg = Field(..., alias="fundingLeg")
|
36
37
|
additional_payments: Optional[conlist(AdditionalPayment)] = Field(None, alias="additionalPayments", description="Optional additional payments at a given date e.g. to level off an uneven total return swap. The dates must be distinct and either all payments are Pay or all payments are Receive.")
|
38
|
+
time_zone_conventions: Optional[TimeZoneConventions] = Field(None, alias="timeZoneConventions")
|
37
39
|
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")
|
38
40
|
additional_properties: Dict[str, Any] = {}
|
39
|
-
__properties = ["instrumentType", "startDate", "maturityDate", "assetLeg", "fundingLeg", "additionalPayments"]
|
41
|
+
__properties = ["instrumentType", "startDate", "maturityDate", "assetLeg", "fundingLeg", "additionalPayments", "timeZoneConventions"]
|
40
42
|
|
41
43
|
@validator('instrument_type')
|
42
44
|
def instrument_type_validate_enum(cls, value):
|
@@ -143,6 +145,9 @@ class TotalReturnSwap(LusidInstrument):
|
|
143
145
|
if _item:
|
144
146
|
_items.append(_item.to_dict())
|
145
147
|
_dict['additionalPayments'] = _items
|
148
|
+
# override the default output from pydantic by calling `to_dict()` of time_zone_conventions
|
149
|
+
if self.time_zone_conventions:
|
150
|
+
_dict['timeZoneConventions'] = self.time_zone_conventions.to_dict()
|
146
151
|
# puts key-value pairs in additional_properties in the top level
|
147
152
|
if self.additional_properties is not None:
|
148
153
|
for _key, _value in self.additional_properties.items():
|
@@ -170,7 +175,8 @@ class TotalReturnSwap(LusidInstrument):
|
|
170
175
|
"maturity_date": obj.get("maturityDate"),
|
171
176
|
"asset_leg": AssetLeg.from_dict(obj.get("assetLeg")) if obj.get("assetLeg") is not None else None,
|
172
177
|
"funding_leg": InstrumentLeg.from_dict(obj.get("fundingLeg")) if obj.get("fundingLeg") is not None else None,
|
173
|
-
"additional_payments": [AdditionalPayment.from_dict(_item) for _item in obj.get("additionalPayments")] if obj.get("additionalPayments") is not None else None
|
178
|
+
"additional_payments": [AdditionalPayment.from_dict(_item) for _item in obj.get("additionalPayments")] if obj.get("additionalPayments") is not None else None,
|
179
|
+
"time_zone_conventions": TimeZoneConventions.from_dict(obj.get("timeZoneConventions")) if obj.get("timeZoneConventions") is not None else None
|
174
180
|
})
|
175
181
|
# store additional fields in additional_properties
|
176
182
|
for _key in obj.keys():
|