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.
Files changed (49) hide show
  1. lusid/__init__.py +2 -2
  2. lusid/api/investor_records_api.py +2 -2
  3. lusid/api/legal_entities_api.py +2 -2
  4. lusid/api/persons_api.py +2 -2
  5. lusid/configuration.py +1 -1
  6. lusid/models/__init__.py +2 -2
  7. lusid/models/bond.py +8 -2
  8. lusid/models/cap_floor.py +8 -2
  9. lusid/models/cds_index.py +8 -2
  10. lusid/models/complex_bond.py +8 -2
  11. lusid/models/contract_for_difference.py +8 -2
  12. lusid/models/create_derived_property_definition_request.py +3 -3
  13. lusid/models/create_identifier_definition_request.py +3 -3
  14. lusid/models/create_property_definition_request.py +3 -3
  15. lusid/models/credit_default_swap.py +8 -2
  16. lusid/models/equity_option.py +8 -2
  17. lusid/models/equity_swap.py +8 -2
  18. lusid/models/exchange_traded_option.py +8 -2
  19. lusid/models/fixed_leg.py +8 -2
  20. lusid/models/flexible_deposit.py +8 -2
  21. lusid/models/flexible_loan.py +9 -3
  22. lusid/models/floating_leg.py +8 -2
  23. lusid/models/forward_rate_agreement.py +8 -2
  24. lusid/models/fund_share_class.py +8 -2
  25. lusid/models/funding_leg.py +8 -2
  26. lusid/models/future.py +8 -2
  27. lusid/models/fx_forward.py +8 -2
  28. lusid/models/fx_option.py +8 -2
  29. lusid/models/fx_swap.py +8 -2
  30. lusid/models/identifier_definition.py +3 -3
  31. lusid/models/inflation_leg.py +8 -2
  32. lusid/models/inflation_linked_bond.py +8 -2
  33. lusid/models/inflation_swap.py +8 -2
  34. lusid/models/interest_rate_swap.py +8 -2
  35. lusid/models/interest_rate_swaption.py +8 -2
  36. lusid/models/investor.py +1 -1
  37. lusid/models/{upsert_investor.py → investor_identifier.py} +10 -10
  38. lusid/models/loan_facility.py +9 -3
  39. lusid/models/property_definition.py +3 -3
  40. lusid/models/property_definition_search_result.py +3 -3
  41. lusid/models/property_domain.py +1 -0
  42. lusid/models/repo.py +8 -2
  43. lusid/models/simple_cash_flow_loan.py +9 -3
  44. lusid/models/term_deposit.py +8 -2
  45. lusid/models/total_return_swap.py +8 -2
  46. lusid/models/upsert_investor_record_request.py +7 -7
  47. {lusid_sdk-2.1.846.dist-info → lusid_sdk-2.1.848.dist-info}/METADATA +5 -5
  48. {lusid_sdk-2.1.846.dist-info → lusid_sdk-2.1.848.dist-info}/RECORD +49 -49
  49. {lusid_sdk-2.1.846.dist-info → lusid_sdk-2.1.848.dist-info}/WHEEL +0 -0
@@ -24,6 +24,7 @@ from lusid.models.additional_payment import AdditionalPayment
24
24
  from lusid.models.flow_conventions import FlowConventions
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 EquitySwap(LusidInstrument):
29
30
  """
@@ -41,9 +42,10 @@ class EquitySwap(LusidInstrument):
41
42
  underlying_identifier: StrictStr = Field(...,alias="underlyingIdentifier", description="External market codes and identifiers for the EquitySwap, e.g. RIC. Supported string (enumeration) values are: [LusidInstrumentId, Isin, Sedol, Cusip, ClientInternal, Figi, RIC, QuotePermId, REDCode, BBGId, ICECode].")
42
43
  equity_swap_dividend_payment_timing: Optional[StrictStr] = Field(None,alias="equitySwapDividendPaymentTiming", description="Determines how the payment of dividends is handled for the equity swap. Defaults to paying at the next Equity coupon date. Supported string (enumeration) values are: [PayAtNextEquityCouponDate, PayAtMaturityOfSwap, PayAtNextFundingLegCouponDate, PayAtPaymentDateOfDividendEvent].")
43
44
  additional_payments: Optional[conlist(AdditionalPayment)] = Field(None, alias="additionalPayments", description="Optional additional payments at a given date e.g. to level off an uneven equity swap. The dates must be distinct and either all payments are Pay or all payments are Receive.")
45
+ time_zone_conventions: Optional[TimeZoneConventions] = Field(None, alias="timeZoneConventions")
44
46
  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")
45
47
  additional_properties: Dict[str, Any] = {}
46
- __properties = ["instrumentType", "startDate", "maturityDate", "code", "equityFlowConventions", "fundingLeg", "includeDividends", "initialPrice", "notionalReset", "quantity", "underlyingIdentifier", "equitySwapDividendPaymentTiming", "additionalPayments"]
48
+ __properties = ["instrumentType", "startDate", "maturityDate", "code", "equityFlowConventions", "fundingLeg", "includeDividends", "initialPrice", "notionalReset", "quantity", "underlyingIdentifier", "equitySwapDividendPaymentTiming", "additionalPayments", "timeZoneConventions"]
47
49
 
48
50
  @validator('instrument_type')
49
51
  def instrument_type_validate_enum(cls, value):
@@ -150,6 +152,9 @@ class EquitySwap(LusidInstrument):
150
152
  if _item:
151
153
  _items.append(_item.to_dict())
152
154
  _dict['additionalPayments'] = _items
155
+ # override the default output from pydantic by calling `to_dict()` of time_zone_conventions
156
+ if self.time_zone_conventions:
157
+ _dict['timeZoneConventions'] = self.time_zone_conventions.to_dict()
153
158
  # puts key-value pairs in additional_properties in the top level
154
159
  if self.additional_properties is not None:
155
160
  for _key, _value in self.additional_properties.items():
@@ -189,7 +194,8 @@ class EquitySwap(LusidInstrument):
189
194
  "quantity": obj.get("quantity"),
190
195
  "underlying_identifier": obj.get("underlyingIdentifier"),
191
196
  "equity_swap_dividend_payment_timing": obj.get("equitySwapDividendPaymentTiming"),
192
- "additional_payments": [AdditionalPayment.from_dict(_item) for _item in obj.get("additionalPayments")] if obj.get("additionalPayments") is not None else None
197
+ "additional_payments": [AdditionalPayment.from_dict(_item) for _item in obj.get("additionalPayments")] if obj.get("additionalPayments") is not None else None,
198
+ "time_zone_conventions": TimeZoneConventions.from_dict(obj.get("timeZoneConventions")) if obj.get("timeZoneConventions") is not None else None
193
199
  })
194
200
  # store additional fields in additional_properties
195
201
  for _key in obj.keys():
@@ -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.exchange_traded_option_contract_details import ExchangeTradedOptionContractDetails
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 ExchangeTradedOption(LusidInstrument):
@@ -33,9 +34,10 @@ class ExchangeTradedOption(LusidInstrument):
33
34
  contracts: Union[StrictFloat, StrictInt] = Field(..., description="The number of contracts held.")
34
35
  ref_spot_price: Union[StrictFloat, StrictInt] = Field(..., alias="refSpotPrice", description="The reference spot price for the option at which the contract was entered into.")
35
36
  trading_conventions: Optional[TradingConventions] = Field(None, alias="tradingConventions")
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", "contractDetails", "contracts", "refSpotPrice", "tradingConventions"]
40
+ __properties = ["instrumentType", "startDate", "contractDetails", "contracts", "refSpotPrice", "tradingConventions", "timeZoneConventions"]
39
41
 
40
42
  @validator('instrument_type')
41
43
  def instrument_type_validate_enum(cls, value):
@@ -135,6 +137,9 @@ class ExchangeTradedOption(LusidInstrument):
135
137
  # override the default output from pydantic by calling `to_dict()` of trading_conventions
136
138
  if self.trading_conventions:
137
139
  _dict['tradingConventions'] = self.trading_conventions.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 ExchangeTradedOption(LusidInstrument):
157
162
  "contract_details": ExchangeTradedOptionContractDetails.from_dict(obj.get("contractDetails")) if obj.get("contractDetails") is not None else None,
158
163
  "contracts": obj.get("contracts"),
159
164
  "ref_spot_price": obj.get("refSpotPrice"),
160
- "trading_conventions": TradingConventions.from_dict(obj.get("tradingConventions")) if obj.get("tradingConventions") is not None else None
165
+ "trading_conventions": TradingConventions.from_dict(obj.get("tradingConventions")) if obj.get("tradingConventions") 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/fixed_leg.py CHANGED
@@ -23,6 +23,7 @@ from pydantic.v1 import StrictStr, Field, Field, StrictFloat, StrictInt, StrictS
23
23
  from lusid.models.fixed_leg_all_of_overrides import FixedLegAllOfOverrides
24
24
  from lusid.models.instrument_leg import InstrumentLeg
25
25
  from lusid.models.leg_definition import LegDefinition
26
+ from lusid.models.time_zone_conventions import TimeZoneConventions
26
27
 
27
28
  class FixedLeg(InstrumentLeg):
28
29
  """
@@ -33,9 +34,10 @@ class FixedLeg(InstrumentLeg):
33
34
  leg_definition: LegDefinition = Field(..., alias="legDefinition")
34
35
  notional: Union[StrictFloat, StrictInt] = Field(...)
35
36
  overrides: Optional[FixedLegAllOfOverrides] = None
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", "legDefinition", "notional", "overrides"]
40
+ __properties = ["instrumentType", "startDate", "maturityDate", "legDefinition", "notional", "overrides", "timeZoneConventions"]
39
41
 
40
42
  @validator('instrument_type')
41
43
  def instrument_type_validate_enum(cls, value):
@@ -135,6 +137,9 @@ class FixedLeg(InstrumentLeg):
135
137
  # override the default output from pydantic by calling `to_dict()` of overrides
136
138
  if self.overrides:
137
139
  _dict['overrides'] = self.overrides.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():
@@ -162,7 +167,8 @@ class FixedLeg(InstrumentLeg):
162
167
  "maturity_date": obj.get("maturityDate"),
163
168
  "leg_definition": LegDefinition.from_dict(obj.get("legDefinition")) if obj.get("legDefinition") is not None else None,
164
169
  "notional": obj.get("notional"),
165
- "overrides": FixedLegAllOfOverrides.from_dict(obj.get("overrides")) if obj.get("overrides") is not None else None
170
+ "overrides": FixedLegAllOfOverrides.from_dict(obj.get("overrides")) if obj.get("overrides") is not None else None,
171
+ "time_zone_conventions": TimeZoneConventions.from_dict(obj.get("timeZoneConventions")) if obj.get("timeZoneConventions") is not None else None
166
172
  })
167
173
  # store additional fields in additional_properties
168
174
  for _key in obj.keys():
@@ -22,6 +22,7 @@ from typing import Any, Dict, List, Optional
22
22
  from pydantic.v1 import StrictStr, Field, Field, StrictStr, conlist, 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
  from lusid.models.trading_conventions import TradingConventions
26
27
 
27
28
  class FlexibleDeposit(LusidInstrument):
@@ -33,9 +34,10 @@ class FlexibleDeposit(LusidInstrument):
33
34
  dom_ccy: StrictStr = Field(...,alias="domCcy", description="The domestic currency of the instrument.")
34
35
  schedules: conlist(Schedule) = Field(..., description="Repayment schedules for the deposit instrument.")
35
36
  trading_conventions: Optional[TradingConventions] = Field(None, alias="tradingConventions")
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", "schedules", "tradingConventions"]
40
+ __properties = ["instrumentType", "startDate", "maturityDate", "domCcy", "schedules", "tradingConventions", "timeZoneConventions"]
39
41
 
40
42
  @validator('instrument_type')
41
43
  def instrument_type_validate_enum(cls, value):
@@ -139,6 +141,9 @@ class FlexibleDeposit(LusidInstrument):
139
141
  # override the default output from pydantic by calling `to_dict()` of trading_conventions
140
142
  if self.trading_conventions:
141
143
  _dict['tradingConventions'] = self.trading_conventions.to_dict()
144
+ # override the default output from pydantic by calling `to_dict()` of time_zone_conventions
145
+ if self.time_zone_conventions:
146
+ _dict['timeZoneConventions'] = self.time_zone_conventions.to_dict()
142
147
  # puts key-value pairs in additional_properties in the top level
143
148
  if self.additional_properties is not None:
144
149
  for _key, _value in self.additional_properties.items():
@@ -161,7 +166,8 @@ class FlexibleDeposit(LusidInstrument):
161
166
  "maturity_date": obj.get("maturityDate"),
162
167
  "dom_ccy": obj.get("domCcy"),
163
168
  "schedules": [Schedule.from_dict(_item) for _item in obj.get("schedules")] if obj.get("schedules") is not None else None,
164
- "trading_conventions": TradingConventions.from_dict(obj.get("tradingConventions")) if obj.get("tradingConventions") is not None else None
169
+ "trading_conventions": TradingConventions.from_dict(obj.get("tradingConventions")) if obj.get("tradingConventions") is not None else None,
170
+ "time_zone_conventions": TimeZoneConventions.from_dict(obj.get("timeZoneConventions")) if obj.get("timeZoneConventions") is not None else None
165
171
  })
166
172
  # store additional fields in additional_properties
167
173
  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.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 FlexibleLoan(LusidInstrument):
27
28
  """
@@ -31,9 +32,10 @@ class FlexibleLoan(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
  schedules: conlist(Schedule) = Field(..., description="Repayment schedules for the 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", "schedules"]
38
+ __properties = ["instrumentType", "startDate", "maturityDate", "domCcy", "schedules", "timeZoneConventions"]
37
39
 
38
40
  @validator('instrument_type')
39
41
  def instrument_type_validate_enum(cls, value):
@@ -134,6 +136,9 @@ class FlexibleLoan(LusidInstrument):
134
136
  if _item:
135
137
  _items.append(_item.to_dict())
136
138
  _dict['schedules'] = _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 FlexibleLoan(LusidInstrument):
155
160
  "start_date": obj.get("startDate"),
156
161
  "maturity_date": obj.get("maturityDate"),
157
162
  "dom_ccy": obj.get("domCcy"),
158
- "schedules": [Schedule.from_dict(_item) for _item in obj.get("schedules")] if obj.get("schedules") is not None else None
163
+ "schedules": [Schedule.from_dict(_item) for _item in obj.get("schedules")] if obj.get("schedules") 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():
@@ -23,6 +23,7 @@ from pydantic.v1 import StrictStr, Field, Field, StrictFloat, StrictInt, StrictS
23
23
  from lusid.models.fixed_leg_all_of_overrides import FixedLegAllOfOverrides
24
24
  from lusid.models.instrument_leg import InstrumentLeg
25
25
  from lusid.models.leg_definition import LegDefinition
26
+ from lusid.models.time_zone_conventions import TimeZoneConventions
26
27
 
27
28
  class FloatingLeg(InstrumentLeg):
28
29
  """
@@ -35,9 +36,10 @@ class FloatingLeg(InstrumentLeg):
35
36
  overrides: Optional[FixedLegAllOfOverrides] = None
36
37
  cap_rate: Optional[Union[StrictFloat, StrictInt]] = Field(None, alias="capRate", description="The maximum floating rate which a cashflow can accrue.")
37
38
  floor_rate: Optional[Union[StrictFloat, StrictInt]] = Field(None, alias="floorRate", description="The minimum floating rate which a cashflow can accrue.")
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", "legDefinition", "notional", "overrides", "capRate", "floorRate"]
42
+ __properties = ["instrumentType", "startDate", "maturityDate", "legDefinition", "notional", "overrides", "capRate", "floorRate", "timeZoneConventions"]
41
43
 
42
44
  @validator('instrument_type')
43
45
  def instrument_type_validate_enum(cls, value):
@@ -137,6 +139,9 @@ class FloatingLeg(InstrumentLeg):
137
139
  # override the default output from pydantic by calling `to_dict()` of overrides
138
140
  if self.overrides:
139
141
  _dict['overrides'] = self.overrides.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():
@@ -176,7 +181,8 @@ class FloatingLeg(InstrumentLeg):
176
181
  "notional": obj.get("notional"),
177
182
  "overrides": FixedLegAllOfOverrides.from_dict(obj.get("overrides")) if obj.get("overrides") is not None else None,
178
183
  "cap_rate": obj.get("capRate"),
179
- "floor_rate": obj.get("floorRate")
184
+ "floor_rate": obj.get("floorRate"),
185
+ "time_zone_conventions": TimeZoneConventions.from_dict(obj.get("timeZoneConventions")) if obj.get("timeZoneConventions") is not None else None
180
186
  })
181
187
  # store additional fields in additional_properties
182
188
  for _key in obj.keys():
@@ -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.index_convention import IndexConvention
24
24
  from lusid.models.lusid_instrument import LusidInstrument
25
+ from lusid.models.time_zone_conventions import TimeZoneConventions
25
26
 
26
27
  class ForwardRateAgreement(LusidInstrument):
27
28
  """
@@ -34,9 +35,10 @@ class ForwardRateAgreement(LusidInstrument):
34
35
  fra_rate: Union[StrictFloat, StrictInt] = Field(..., alias="fraRate", description="The rate at which the FRA is traded.")
35
36
  notional: Union[StrictFloat, StrictInt] = Field(..., description="The amount for which the FRA is traded.")
36
37
  index_convention: Optional[IndexConvention] = Field(None, alias="indexConvention")
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", "domCcy", "fixingDate", "fraRate", "notional", "indexConvention"]
41
+ __properties = ["instrumentType", "startDate", "maturityDate", "domCcy", "fixingDate", "fraRate", "notional", "indexConvention", "timeZoneConventions"]
40
42
 
41
43
  @validator('instrument_type')
42
44
  def instrument_type_validate_enum(cls, value):
@@ -133,6 +135,9 @@ class ForwardRateAgreement(LusidInstrument):
133
135
  # override the default output from pydantic by calling `to_dict()` of index_convention
134
136
  if self.index_convention:
135
137
  _dict['indexConvention'] = self.index_convention.to_dict()
138
+ # override the default output from pydantic by calling `to_dict()` of time_zone_conventions
139
+ if self.time_zone_conventions:
140
+ _dict['timeZoneConventions'] = self.time_zone_conventions.to_dict()
136
141
  # puts key-value pairs in additional_properties in the top level
137
142
  if self.additional_properties is not None:
138
143
  for _key, _value in self.additional_properties.items():
@@ -157,7 +162,8 @@ class ForwardRateAgreement(LusidInstrument):
157
162
  "fixing_date": obj.get("fixingDate"),
158
163
  "fra_rate": obj.get("fraRate"),
159
164
  "notional": obj.get("notional"),
160
- "index_convention": IndexConvention.from_dict(obj.get("indexConvention")) if obj.get("indexConvention") is not None else None
165
+ "index_convention": IndexConvention.from_dict(obj.get("indexConvention")) if obj.get("indexConvention") 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():
@@ -22,6 +22,7 @@ from typing import Any, Dict, List, Optional
22
22
  from pydantic.v1 import StrictStr, Field, Field, StrictStr, conlist, constr, validator
23
23
  from lusid.models.lusid_instrument import LusidInstrument
24
24
  from lusid.models.simple_rounding_convention import SimpleRoundingConvention
25
+ from lusid.models.time_zone_conventions import TimeZoneConventions
25
26
  from lusid.models.trading_conventions import TradingConventions
26
27
 
27
28
  class FundShareClass(LusidInstrument):
@@ -35,9 +36,10 @@ class FundShareClass(LusidInstrument):
35
36
  dom_ccy: StrictStr = Field(...,alias="domCcy", description="The domestic currency of the instrument.")
36
37
  rounding_conventions: Optional[conlist(SimpleRoundingConvention)] = Field(None, alias="roundingConventions", description="Rounding Convention used for the FundShareClass quotes")
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", "shortCode", "fundShareClassType", "distributionPaymentType", "hedging", "domCcy", "roundingConventions", "tradingConventions"]
42
+ __properties = ["instrumentType", "shortCode", "fundShareClassType", "distributionPaymentType", "hedging", "domCcy", "roundingConventions", "tradingConventions", "timeZoneConventions"]
41
43
 
42
44
  @validator('instrument_type')
43
45
  def instrument_type_validate_enum(cls, value):
@@ -141,6 +143,9 @@ class FundShareClass(LusidInstrument):
141
143
  # override the default output from pydantic by calling `to_dict()` of trading_conventions
142
144
  if self.trading_conventions:
143
145
  _dict['tradingConventions'] = self.trading_conventions.to_dict()
146
+ # override the default output from pydantic by calling `to_dict()` of time_zone_conventions
147
+ if self.time_zone_conventions:
148
+ _dict['timeZoneConventions'] = self.time_zone_conventions.to_dict()
144
149
  # puts key-value pairs in additional_properties in the top level
145
150
  if self.additional_properties is not None:
146
151
  for _key, _value in self.additional_properties.items():
@@ -170,7 +175,8 @@ class FundShareClass(LusidInstrument):
170
175
  "hedging": obj.get("hedging"),
171
176
  "dom_ccy": obj.get("domCcy"),
172
177
  "rounding_conventions": [SimpleRoundingConvention.from_dict(_item) for _item in obj.get("roundingConventions")] if obj.get("roundingConventions") is not None else None,
173
- "trading_conventions": TradingConventions.from_dict(obj.get("tradingConventions")) if obj.get("tradingConventions") is not None else None
178
+ "trading_conventions": TradingConventions.from_dict(obj.get("tradingConventions")) if obj.get("tradingConventions") 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():
@@ -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.instrument_leg import InstrumentLeg
24
24
  from lusid.models.leg_definition import LegDefinition
25
+ from lusid.models.time_zone_conventions import TimeZoneConventions
25
26
 
26
27
  class FundingLeg(InstrumentLeg):
27
28
  """
@@ -31,9 +32,10 @@ class FundingLeg(InstrumentLeg):
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 beyond their last payment date.")
32
33
  leg_definition: LegDefinition = Field(..., alias="legDefinition")
33
34
  notional: Optional[Union[StrictFloat, StrictInt]] = Field(None, description="The initial notional of the Funding Leg instrument. When \"RequiresFundingLegHistory\" property key is present in transaction key, during a GetValuation endpoint call (for instance), this field would overriden by the Funding Leg history's notional and this notional field would not be used in the pricing and accrual calculations. As such, we recommend setting this to 0 or not setting it at all. Please see the following Notebook example and Knowledge Base article: Notebook: https://github.com/finbourne/sample-notebooks/blob/master/examples/use-cases/instruments/Funding%20Leg%20Swap.ipynb Knowledge Base article: https://support.lusid.com/knowledgebase/article/KA-01764/")
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", "legDefinition", "notional"]
38
+ __properties = ["instrumentType", "startDate", "maturityDate", "legDefinition", "notional", "timeZoneConventions"]
37
39
 
38
40
  @validator('instrument_type')
39
41
  def instrument_type_validate_enum(cls, value):
@@ -130,6 +132,9 @@ class FundingLeg(InstrumentLeg):
130
132
  # override the default output from pydantic by calling `to_dict()` of leg_definition
131
133
  if self.leg_definition:
132
134
  _dict['legDefinition'] = self.leg_definition.to_dict()
135
+ # override the default output from pydantic by calling `to_dict()` of time_zone_conventions
136
+ if self.time_zone_conventions:
137
+ _dict['timeZoneConventions'] = self.time_zone_conventions.to_dict()
133
138
  # puts key-value pairs in additional_properties in the top level
134
139
  if self.additional_properties is not None:
135
140
  for _key, _value in self.additional_properties.items():
@@ -156,7 +161,8 @@ class FundingLeg(InstrumentLeg):
156
161
  "start_date": obj.get("startDate"),
157
162
  "maturity_date": obj.get("maturityDate"),
158
163
  "leg_definition": LegDefinition.from_dict(obj.get("legDefinition")) if obj.get("legDefinition") is not None else None,
159
- "notional": obj.get("notional")
164
+ "notional": obj.get("notional"),
165
+ "time_zone_conventions": TimeZoneConventions.from_dict(obj.get("timeZoneConventions")) if obj.get("timeZoneConventions") is not None else None
160
166
  })
161
167
  # store additional fields in additional_properties
162
168
  for _key in obj.keys():
lusid/models/future.py CHANGED
@@ -23,6 +23,7 @@ from pydantic.v1 import StrictStr, Field, Field, StrictFloat, StrictInt, StrictS
23
23
  from lusid.models.futures_contract_details import FuturesContractDetails
24
24
  from lusid.models.lusid_instrument import LusidInstrument
25
25
  from lusid.models.mark_to_market_conventions import MarkToMarketConventions
26
+ from lusid.models.time_zone_conventions import TimeZoneConventions
26
27
  from lusid.models.trading_conventions import TradingConventions
27
28
 
28
29
  class Future(LusidInstrument):
@@ -39,9 +40,10 @@ class Future(LusidInstrument):
39
40
  underlying: Optional[LusidInstrument] = None
40
41
  calculation_type: Optional[StrictStr] = Field(None,alias="calculationType", description="Calculation type for some Future instruments which have non-standard methodology. Optional, if not set defaults as follows: - If ExchangeCode is \"ASX\" and ContractCode is \"IR\" or \"BB\" set to ASX_BankBills - If ExchangeCode is \"ASX\" and ContractCode is \"YT\" set to ASX_3Year - If ExchangeCode is \"ASX\" and ContractCode is \"VT\" set to ASX_5Year - If ExchangeCode is \"ASX\" and ContractCode is \"XT\" set to ASX_10Year - If ExchangeCode is \"ASX\" and ContractCode is \"LT\" set to ASX_20Year - otherwise set to Standard Specific calculation types for bond and interest rate futures are: - [Standard] The default calculation type, which does not fit into any of the categories below. - [ASX_BankBills] Used for AUD and NZD futures “IR” and “BB” on ASX. 90D Bank Bills. - [ASX_3Year] Used for “YT” on ASX. 3YR semi-annual bond (6 coupons) @ 6%. - [ASX_5Year] Used for “VT” on ASX. 5yr semi-annual bond (10 coupons) @ 2%. - [ASX_10Year] Used for “XT” on ASX. 10yr semi-annual bond (20 coupons) @ 6%. - [ASX_20Year] Used for “LT” on ASX. 20yr semi-annual bond (40 coupons) @ 4%. - [B3_DI1] Used for “DI1” on B3. Average of 1D interbank deposit rates. - For futures with this calculation type, quote values are expected to be specified as a percentage. For example, a quoted rate of 13.205% should be specified as a quote of 13.205 with a face value of 100. Supported string (enumeration) values are: [Standard, ASX_BankBills, ASX_3Year, ASX_5Year, ASX_10Year, ASX_20Year, B3_DI1].")
41
42
  trading_conventions: Optional[TradingConventions] = Field(None, alias="tradingConventions")
43
+ time_zone_conventions: Optional[TimeZoneConventions] = Field(None, alias="timeZoneConventions")
42
44
  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")
43
45
  additional_properties: Dict[str, Any] = {}
44
- __properties = ["instrumentType", "startDate", "maturityDate", "identifiers", "contractDetails", "contracts", "markToMarketConventions", "refSpotPrice", "underlying", "calculationType", "tradingConventions"]
46
+ __properties = ["instrumentType", "startDate", "maturityDate", "identifiers", "contractDetails", "contracts", "markToMarketConventions", "refSpotPrice", "underlying", "calculationType", "tradingConventions", "timeZoneConventions"]
45
47
 
46
48
  @validator('instrument_type')
47
49
  def instrument_type_validate_enum(cls, value):
@@ -147,6 +149,9 @@ class Future(LusidInstrument):
147
149
  # override the default output from pydantic by calling `to_dict()` of trading_conventions
148
150
  if self.trading_conventions:
149
151
  _dict['tradingConventions'] = self.trading_conventions.to_dict()
152
+ # override the default output from pydantic by calling `to_dict()` of time_zone_conventions
153
+ if self.time_zone_conventions:
154
+ _dict['timeZoneConventions'] = self.time_zone_conventions.to_dict()
150
155
  # puts key-value pairs in additional_properties in the top level
151
156
  if self.additional_properties is not None:
152
157
  for _key, _value in self.additional_properties.items():
@@ -179,7 +184,8 @@ class Future(LusidInstrument):
179
184
  "ref_spot_price": obj.get("refSpotPrice"),
180
185
  "underlying": LusidInstrument.from_dict(obj.get("underlying")) if obj.get("underlying") is not None else None,
181
186
  "calculation_type": obj.get("calculationType"),
182
- "trading_conventions": TradingConventions.from_dict(obj.get("tradingConventions")) if obj.get("tradingConventions") is not None else None
187
+ "trading_conventions": TradingConventions.from_dict(obj.get("tradingConventions")) if obj.get("tradingConventions") is not None else None,
188
+ "time_zone_conventions": TimeZoneConventions.from_dict(obj.get("timeZoneConventions")) if obj.get("timeZoneConventions") is not None else None
183
189
  })
184
190
  # store additional fields in additional_properties
185
191
  for _key in obj.keys():
@@ -21,6 +21,7 @@ from datetime import datetime
21
21
  from typing import Any, Dict, Optional, Union
22
22
  from pydantic.v1 import StrictStr, Field, Field, StrictBool, StrictFloat, StrictInt, StrictStr, validator
23
23
  from lusid.models.lusid_instrument import LusidInstrument
24
+ from lusid.models.time_zone_conventions import TimeZoneConventions
24
25
 
25
26
  class FxForward(LusidInstrument):
26
27
  """
@@ -37,9 +38,10 @@ class FxForward(LusidInstrument):
37
38
  fixing_date: Optional[datetime] = Field(None, alias="fixingDate", description="The fixing date.")
38
39
  settlement_ccy: Optional[StrictStr] = Field(None,alias="settlementCcy", description="The settlement currency. If provided, present value will be calculated in settlement currency, otherwise the domestic currency. Applies only to non-deliverable FX Forwards.")
39
40
  booked_as_spot: Optional[StrictBool] = Field(None, alias="bookedAsSpot", description="Boolean flag for FX Forward transactions booked with Spot settlement. This will default to False if not provided. For information purposes only, this does not impact LUSID valuation, analytics, cashflows or events, but may be used by third party vendors.")
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", "domAmount", "domCcy", "fgnAmount", "fgnCcy", "refSpotRate", "isNdf", "fixingDate", "settlementCcy", "bookedAsSpot"]
44
+ __properties = ["instrumentType", "startDate", "maturityDate", "domAmount", "domCcy", "fgnAmount", "fgnCcy", "refSpotRate", "isNdf", "fixingDate", "settlementCcy", "bookedAsSpot", "timeZoneConventions"]
43
45
 
44
46
  @validator('instrument_type')
45
47
  def instrument_type_validate_enum(cls, value):
@@ -133,6 +135,9 @@ class FxForward(LusidInstrument):
133
135
  "additional_properties"
134
136
  },
135
137
  exclude_none=True)
138
+ # override the default output from pydantic by calling `to_dict()` of time_zone_conventions
139
+ if self.time_zone_conventions:
140
+ _dict['timeZoneConventions'] = self.time_zone_conventions.to_dict()
136
141
  # puts key-value pairs in additional_properties in the top level
137
142
  if self.additional_properties is not None:
138
143
  for _key, _value in self.additional_properties.items():
@@ -166,7 +171,8 @@ class FxForward(LusidInstrument):
166
171
  "is_ndf": obj.get("isNdf"),
167
172
  "fixing_date": obj.get("fixingDate"),
168
173
  "settlement_ccy": obj.get("settlementCcy"),
169
- "booked_as_spot": obj.get("bookedAsSpot")
174
+ "booked_as_spot": obj.get("bookedAsSpot"),
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():
lusid/models/fx_option.py CHANGED
@@ -23,6 +23,7 @@ from pydantic.v1 import StrictStr, Field, Field, StrictBool, StrictFloat, Strict
23
23
  from lusid.models.barrier import Barrier
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
  from lusid.models.touch import Touch
27
28
 
28
29
  class FxOption(LusidInstrument):
@@ -45,9 +46,10 @@ class FxOption(LusidInstrument):
45
46
  payout_style: Optional[StrictStr] = Field(None,alias="payoutStyle", description="PayoutStyle for touch options. For options without touch optionality, payoutStyle should not be set. For options with touch optionality (where the touches data has been set), payoutStyle must be defined and cannot be None. Supported string (enumeration) values are: [Deferred, Immediate].")
46
47
  premium: Optional[Premium] = None
47
48
  touches: Optional[conlist(Touch)] = Field(None, description="For a touch option the list should not be empty. Up to two touches are supported. An option cannot be at the same time barrier- and touch-option. One (or both) of the lists must be empty.")
49
+ time_zone_conventions: Optional[TimeZoneConventions] = Field(None, alias="timeZoneConventions")
48
50
  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")
49
51
  additional_properties: Dict[str, Any] = {}
50
- __properties = ["instrumentType", "startDate", "domCcy", "domAmount", "fgnCcy", "fgnAmount", "strike", "barriers", "exerciseType", "isCallNotPut", "isDeliveryNotCash", "isPayoffDigital", "optionMaturityDate", "optionSettlementDate", "payoutStyle", "premium", "touches"]
52
+ __properties = ["instrumentType", "startDate", "domCcy", "domAmount", "fgnCcy", "fgnAmount", "strike", "barriers", "exerciseType", "isCallNotPut", "isDeliveryNotCash", "isPayoffDigital", "optionMaturityDate", "optionSettlementDate", "payoutStyle", "premium", "touches", "timeZoneConventions"]
51
53
 
52
54
  @validator('instrument_type')
53
55
  def instrument_type_validate_enum(cls, value):
@@ -158,6 +160,9 @@ class FxOption(LusidInstrument):
158
160
  if _item:
159
161
  _items.append(_item.to_dict())
160
162
  _dict['touches'] = _items
163
+ # override the default output from pydantic by calling `to_dict()` of time_zone_conventions
164
+ if self.time_zone_conventions:
165
+ _dict['timeZoneConventions'] = self.time_zone_conventions.to_dict()
161
166
  # puts key-value pairs in additional_properties in the top level
162
167
  if self.additional_properties is not None:
163
168
  for _key, _value in self.additional_properties.items():
@@ -226,7 +231,8 @@ class FxOption(LusidInstrument):
226
231
  "option_settlement_date": obj.get("optionSettlementDate"),
227
232
  "payout_style": obj.get("payoutStyle"),
228
233
  "premium": Premium.from_dict(obj.get("premium")) if obj.get("premium") is not None else None,
229
- "touches": [Touch.from_dict(_item) for _item in obj.get("touches")] if obj.get("touches") is not None else None
234
+ "touches": [Touch.from_dict(_item) for _item in obj.get("touches")] if obj.get("touches") is not None else None,
235
+ "time_zone_conventions": TimeZoneConventions.from_dict(obj.get("timeZoneConventions")) if obj.get("timeZoneConventions") is not None else None
230
236
  })
231
237
  # store additional fields in additional_properties
232
238
  for _key in obj.keys():
lusid/models/fx_swap.py CHANGED
@@ -22,6 +22,7 @@ from typing import Any, Dict, Optional
22
22
  from pydantic.v1 import StrictStr, Field, Field, StrictStr, validator
23
23
  from lusid.models.fx_forward import FxForward
24
24
  from lusid.models.lusid_instrument import LusidInstrument
25
+ from lusid.models.time_zone_conventions import TimeZoneConventions
25
26
 
26
27
  class FxSwap(LusidInstrument):
27
28
  """
@@ -30,9 +31,10 @@ class FxSwap(LusidInstrument):
30
31
  near_fx_forward: FxForward = Field(..., alias="nearFxForward")
31
32
  far_fx_forward: FxForward = Field(..., alias="farFxForward")
32
33
  notional_symmetry: Optional[StrictStr] = Field(None,alias="notionalSymmetry", description="The NotionalSymmetry allows for even and uneven FxSwaps to be supported. An even FxSwap is one where the near and far fx forwards have the same notional value on at least one of the legs. An uneven FxSwap is one where near and far fx forwards don't have the same notional on both the domestic and foreign legs. By default NotionalSymmetry will be set as even. Supported string (enumeration) values are: [Even, Uneven].")
34
+ time_zone_conventions: Optional[TimeZoneConventions] = Field(None, alias="timeZoneConventions")
33
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")
34
36
  additional_properties: Dict[str, Any] = {}
35
- __properties = ["instrumentType", "nearFxForward", "farFxForward", "notionalSymmetry"]
37
+ __properties = ["instrumentType", "nearFxForward", "farFxForward", "notionalSymmetry", "timeZoneConventions"]
36
38
 
37
39
  @validator('instrument_type')
38
40
  def instrument_type_validate_enum(cls, value):
@@ -132,6 +134,9 @@ class FxSwap(LusidInstrument):
132
134
  # override the default output from pydantic by calling `to_dict()` of far_fx_forward
133
135
  if self.far_fx_forward:
134
136
  _dict['farFxForward'] = self.far_fx_forward.to_dict()
137
+ # override the default output from pydantic by calling `to_dict()` of time_zone_conventions
138
+ if self.time_zone_conventions:
139
+ _dict['timeZoneConventions'] = self.time_zone_conventions.to_dict()
135
140
  # puts key-value pairs in additional_properties in the top level
136
141
  if self.additional_properties is not None:
137
142
  for _key, _value in self.additional_properties.items():
@@ -157,7 +162,8 @@ class FxSwap(LusidInstrument):
157
162
  "instrument_type": obj.get("instrumentType"),
158
163
  "near_fx_forward": FxForward.from_dict(obj.get("nearFxForward")) if obj.get("nearFxForward") is not None else None,
159
164
  "far_fx_forward": FxForward.from_dict(obj.get("farFxForward")) if obj.get("farFxForward") is not None else None,
160
- "notional_symmetry": obj.get("notionalSymmetry")
165
+ "notional_symmetry": obj.get("notionalSymmetry"),
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():
@@ -28,7 +28,7 @@ class IdentifierDefinition(BaseModel):
28
28
  IdentifierDefinition
29
29
  """
30
30
  href: Optional[StrictStr] = Field(None,alias="href", description="The specific Uniform Resource Identifier (URI) for this resource at the requested effective and asAt datetime.")
31
- domain: StrictStr = Field(...,alias="domain", description="The type of entity to which the identifier can be attached. Supported values are \"Instrument\", \"Person\", \"LegalEntity\"and \"CustomEntity\". 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")
31
+ domain: StrictStr = Field(...,alias="domain", description="The type of entity to which the identifier can be attached. Supported values are \"Instrument\", \"Person\", \"LegalEntity\"and \"CustomEntity\". 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")
32
32
  identifier_scope: StrictStr = Field(...,alias="identifierScope", description="The scope that the identifier definition exists in.")
33
33
  identifier_type: StrictStr = Field(...,alias="identifierType", description="What the identifier represents. Together with \"domain\" and \"identifierScope\" this uniquely identifies the identifier definition.")
34
34
  life_time: StrictStr = Field(...,alias="lifeTime", description="Describes whether an identifier value is associated with an entity for all effective dates (“Perpetual”) or applies within a specified effective date range (“TimeVariant”). The available values are: Perpetual, TimeVariant")
@@ -95,8 +95,8 @@ class IdentifierDefinition(BaseModel):
95
95
  if "domain" != "type":
96
96
  return value
97
97
 
98
- 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'):
99
- 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')")
98
+ 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'):
99
+ 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')")
100
100
  return value
101
101
 
102
102
  @validator('life_time')