lusid-sdk 2.1.847__py3-none-any.whl → 2.1.849__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 (42) hide show
  1. lusid/configuration.py +1 -1
  2. lusid/models/bond.py +8 -2
  3. lusid/models/cap_floor.py +8 -2
  4. lusid/models/cds_index.py +8 -2
  5. lusid/models/complex_bond.py +8 -2
  6. lusid/models/contract_for_difference.py +8 -2
  7. lusid/models/create_derived_property_definition_request.py +3 -3
  8. lusid/models/create_identifier_definition_request.py +3 -3
  9. lusid/models/create_property_definition_request.py +3 -3
  10. lusid/models/credit_default_swap.py +8 -2
  11. lusid/models/equity_option.py +8 -2
  12. lusid/models/equity_swap.py +8 -2
  13. lusid/models/exchange_traded_option.py +8 -2
  14. lusid/models/fixed_leg.py +8 -2
  15. lusid/models/flexible_deposit.py +8 -2
  16. lusid/models/flexible_loan.py +9 -3
  17. lusid/models/floating_leg.py +8 -2
  18. lusid/models/forward_rate_agreement.py +8 -2
  19. lusid/models/fund_share_class.py +8 -2
  20. lusid/models/funding_leg.py +8 -2
  21. lusid/models/future.py +8 -2
  22. lusid/models/fx_forward.py +8 -2
  23. lusid/models/fx_option.py +8 -2
  24. lusid/models/fx_swap.py +8 -2
  25. lusid/models/identifier_definition.py +3 -3
  26. lusid/models/inflation_leg.py +8 -2
  27. lusid/models/inflation_linked_bond.py +8 -2
  28. lusid/models/inflation_swap.py +8 -2
  29. lusid/models/interest_rate_swap.py +8 -2
  30. lusid/models/interest_rate_swaption.py +8 -2
  31. lusid/models/loan_facility.py +9 -3
  32. lusid/models/property_definition.py +3 -3
  33. lusid/models/property_definition_search_result.py +3 -3
  34. lusid/models/property_domain.py +1 -0
  35. lusid/models/repo.py +8 -2
  36. lusid/models/simple_cash_flow_loan.py +9 -3
  37. lusid/models/staged_modification.py +1 -1
  38. lusid/models/term_deposit.py +8 -2
  39. lusid/models/total_return_swap.py +8 -2
  40. {lusid_sdk-2.1.847.dist-info → lusid_sdk-2.1.849.dist-info}/METADATA +1 -1
  41. {lusid_sdk-2.1.847.dist-info → lusid_sdk-2.1.849.dist-info}/RECORD +42 -42
  42. {lusid_sdk-2.1.847.dist-info → lusid_sdk-2.1.849.dist-info}/WHEEL +0 -0
@@ -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():
@@ -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, 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")
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, CheckDefinition, 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', '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')")
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', 'CheckDefinition', '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', 'CheckDefinition', '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, 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")
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, CheckDefinition, 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', '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')")
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', 'CheckDefinition', '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', 'CheckDefinition', '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')
@@ -62,6 +62,7 @@ class PropertyDomain(str, Enum):
62
62
  ACCOUNT = 'Account'
63
63
  CHARTOFACCOUNTS = 'ChartOfAccounts'
64
64
  CUSTODIANACCOUNT = 'CustodianAccount'
65
+ CHECKDEFINITION = 'CheckDefinition'
65
66
  ABOR = 'Abor'
66
67
  ABORCONFIGURATION = 'AborConfiguration'
67
68
  FUND = 'Fund'
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():
@@ -34,7 +34,7 @@ class StagedModification(BaseModel):
34
34
  as_at_staged: Optional[datetime] = Field(None, alias="asAtStaged", description="Time at which the modification was staged.")
35
35
  user_id_staged: Optional[StrictStr] = Field(None,alias="userIdStaged", description="Id of the user who created the stage modification request.")
36
36
  requested_id_staged: Optional[StrictStr] = Field(None,alias="requestedIdStaged", description="The Request Id that initiated this staged modification.")
37
- request_reason: Optional[StrictStr] = Field(None,alias="requestReason", description="Reason staged change request made.")
37
+ request_reason: Optional[StrictStr] = Field(None,alias="requestReason", description="The Request Reason from the context that initiated this staged modification.")
38
38
  action: Optional[StrictStr] = Field(None,alias="action", description="Type of action of the staged modification, either create, update or delete.")
39
39
  staging_rule: Optional[StagedModificationStagingRule] = Field(None, alias="stagingRule")
40
40
  decisions: Optional[conlist(StagedModificationDecision)] = Field(None, description="Object containing information relating to the decision on the staged modification.")
@@ -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():
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: lusid-sdk
3
- Version: 2.1.847
3
+ Version: 2.1.849
4
4
  Summary: LUSID API
5
5
  Home-page: https://github.com/finbourne/lusid-sdk-python
6
6
  License: MIT