lusid-sdk 2.1.462__py3-none-any.whl → 2.1.537__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 (104) hide show
  1. lusid/__init__.py +62 -0
  2. lusid/api/group_reconciliations_api.py +806 -79
  3. lusid/api/instruments_api.py +187 -0
  4. lusid/api/transaction_portfolios_api.py +202 -2
  5. lusid/configuration.py +1 -1
  6. lusid/models/__init__.py +62 -0
  7. lusid/models/accumulation_event.py +3 -3
  8. lusid/models/amortisation_event.py +3 -3
  9. lusid/models/applicable_instrument_event.py +7 -2
  10. lusid/models/asset_leg.py +1 -1
  11. lusid/models/batch_update_user_review_for_comparison_result_request.py +81 -0
  12. lusid/models/batch_update_user_review_for_comparison_result_response.py +146 -0
  13. lusid/models/bond_coupon_event.py +10 -5
  14. lusid/models/bond_default_event.py +3 -3
  15. lusid/models/bond_principal_event.py +10 -5
  16. lusid/models/bonus_issue_event.py +3 -3
  17. lusid/models/call_on_intermediate_securities_event.py +139 -0
  18. lusid/models/capital_distribution_event.py +3 -3
  19. lusid/models/cash_dividend_event.py +3 -3
  20. lusid/models/cash_flow_event.py +3 -3
  21. lusid/models/cds_credit_event.py +3 -3
  22. lusid/models/cdx_credit_event.py +3 -3
  23. lusid/models/close_event.py +3 -3
  24. lusid/models/comparison_attribute_value_pair.py +71 -0
  25. lusid/models/component_transaction.py +10 -3
  26. lusid/models/create_staging_rule_set_request.py +1 -6
  27. lusid/models/credit_premium_cash_flow_event.py +3 -3
  28. lusid/models/custodian_account_request.py +1 -1
  29. lusid/models/delete_instrument_properties_response.py +7 -1
  30. lusid/models/delete_instrument_response.py +7 -1
  31. lusid/models/delete_instruments_response.py +22 -1
  32. lusid/models/deleted_entity_response.py +7 -1
  33. lusid/models/dividend_option_event.py +3 -3
  34. lusid/models/dividend_reinvestment_event.py +9 -4
  35. lusid/models/equity_option.py +19 -4
  36. lusid/models/exchange_traded_option_contract_details.py +1 -1
  37. lusid/models/exercise_event.py +3 -3
  38. lusid/models/expiry_event.py +3 -3
  39. lusid/models/fee.py +10 -3
  40. lusid/models/fee_request.py +13 -6
  41. lusid/models/future_expiry_event.py +3 -3
  42. lusid/models/fx_forward_settlement_event.py +3 -3
  43. lusid/models/group_reconciliation_aggregate_attribute_values.py +86 -0
  44. lusid/models/group_reconciliation_comparison_result.py +148 -0
  45. lusid/models/group_reconciliation_core_attribute_values.py +86 -0
  46. lusid/models/group_reconciliation_date_pair.py +81 -0
  47. lusid/models/group_reconciliation_dates.py +78 -0
  48. lusid/models/group_reconciliation_instance_id.py +71 -0
  49. lusid/models/group_reconciliation_result_statuses.py +89 -0
  50. lusid/models/group_reconciliation_result_types.py +96 -0
  51. lusid/models/group_reconciliation_review_statuses.py +96 -0
  52. lusid/models/group_reconciliation_run_details.py +76 -0
  53. lusid/models/group_reconciliation_run_request.py +75 -0
  54. lusid/models/group_reconciliation_run_response.py +77 -0
  55. lusid/models/group_reconciliation_summary.py +121 -0
  56. lusid/models/group_reconciliation_user_review.py +112 -0
  57. lusid/models/group_reconciliation_user_review_add.py +88 -0
  58. lusid/models/group_reconciliation_user_review_break_code.py +80 -0
  59. lusid/models/group_reconciliation_user_review_comment.py +80 -0
  60. lusid/models/group_reconciliation_user_review_match_key.py +80 -0
  61. lusid/models/group_reconciliation_user_review_remove.py +88 -0
  62. lusid/models/informational_error_event.py +3 -3
  63. lusid/models/informational_event.py +3 -3
  64. lusid/models/instrument_event.py +10 -5
  65. lusid/models/instrument_event_type.py +5 -0
  66. lusid/models/intermediate_securities_distribution_event.py +140 -0
  67. lusid/models/maturity_event.py +3 -3
  68. lusid/models/mbs_coupon_event.py +10 -5
  69. lusid/models/mbs_interest_deferral_event.py +10 -5
  70. lusid/models/mbs_interest_shortfall_event.py +10 -5
  71. lusid/models/mbs_principal_event.py +10 -5
  72. lusid/models/mbs_principal_write_off_event.py +10 -5
  73. lusid/models/merger_event.py +3 -3
  74. lusid/models/new_instrument.py +1 -1
  75. lusid/models/open_event.py +3 -3
  76. lusid/models/option_exercise_cash_event.py +144 -0
  77. lusid/models/option_exercise_election.py +73 -0
  78. lusid/models/option_exercise_physical_event.py +149 -0
  79. lusid/models/paged_resource_list_of_group_reconciliation_comparison_result.py +113 -0
  80. lusid/models/pricing_options.py +8 -2
  81. lusid/models/protection_payout_cash_flow_event.py +102 -0
  82. lusid/models/raw_vendor_event.py +3 -3
  83. lusid/models/reset_event.py +3 -3
  84. lusid/models/resource_list_of_output_transaction.py +113 -0
  85. lusid/models/return_zero_pv_options.py +69 -0
  86. lusid/models/reverse_stock_split_event.py +3 -3
  87. lusid/models/scrip_dividend_event.py +3 -3
  88. lusid/models/spin_off_event.py +3 -3
  89. lusid/models/stock_dividend_event.py +3 -3
  90. lusid/models/stock_split_event.py +3 -3
  91. lusid/models/swap_cash_flow_event.py +3 -3
  92. lusid/models/swap_principal_event.py +3 -3
  93. lusid/models/target_tax_lot.py +23 -2
  94. lusid/models/target_tax_lot_request.py +23 -2
  95. lusid/models/tender_event.py +3 -3
  96. lusid/models/total_return_swap.py +1 -1
  97. lusid/models/transaction_price.py +3 -3
  98. lusid/models/transaction_price_type.py +2 -0
  99. lusid/models/transition_event.py +3 -3
  100. lusid/models/trigger_event.py +3 -3
  101. lusid/models/update_staging_rule_set_request.py +1 -6
  102. {lusid_sdk-2.1.462.dist-info → lusid_sdk-2.1.537.dist-info}/METADATA +40 -3
  103. {lusid_sdk-2.1.462.dist-info → lusid_sdk-2.1.537.dist-info}/RECORD +104 -73
  104. {lusid_sdk-2.1.462.dist-info → lusid_sdk-2.1.537.dist-info}/WHEEL +0 -0
@@ -26,7 +26,7 @@ class CreateStagingRuleSetRequest(BaseModel):
26
26
  """
27
27
  CreateStagingRuleSetRequest
28
28
  """
29
- display_name: Optional[constr(strict=True, max_length=256, min_length=1)] = Field(None, alias="displayName", description="The name of the staging rule set.")
29
+ display_name: constr(strict=True, max_length=256, min_length=1) = Field(..., alias="displayName", description="The name of the staging rule set.")
30
30
  description: Optional[constr(strict=True, max_length=1024, min_length=0)] = Field(None, description="A description for the staging rule set.")
31
31
  rules: conlist(StagingRule) = Field(..., description="The list of staging rules that apply to a specific entity type.")
32
32
  __properties = ["displayName", "description", "rules"]
@@ -62,11 +62,6 @@ class CreateStagingRuleSetRequest(BaseModel):
62
62
  if _item:
63
63
  _items.append(_item.to_dict())
64
64
  _dict['rules'] = _items
65
- # set to None if display_name (nullable) is None
66
- # and __fields_set__ contains the field
67
- if self.display_name is None and "display_name" in self.__fields_set__:
68
- _dict['displayName'] = None
69
-
70
65
  # set to None if description (nullable) is None
71
66
  # and __fields_set__ contains the field
72
67
  if self.description is None and "description" in self.__fields_set__:
@@ -30,15 +30,15 @@ class CreditPremiumCashFlowEvent(InstrumentEvent):
30
30
  payment_date: datetime = Field(..., alias="paymentDate", description="The payment date of the cashflow.")
31
31
  currency: StrictStr = Field(..., description="The currency in which the cashflow is paid.")
32
32
  cash_flow_per_unit: Optional[Union[StrictFloat, StrictInt]] = Field(None, alias="cashFlowPerUnit", description="The cashflow amount received for each unit of the instrument held on the ex date.")
33
- instrument_event_type: StrictStr = Field(..., alias="instrumentEventType", description="The Type of Event. The available values are: TransitionEvent, InformationalEvent, OpenEvent, CloseEvent, StockSplitEvent, BondDefaultEvent, CashDividendEvent, AmortisationEvent, CashFlowEvent, ExerciseEvent, ResetEvent, TriggerEvent, RawVendorEvent, InformationalErrorEvent, BondCouponEvent, DividendReinvestmentEvent, AccumulationEvent, BondPrincipalEvent, DividendOptionEvent, MaturityEvent, FxForwardSettlementEvent, ExpiryEvent, ScripDividendEvent, StockDividendEvent, ReverseStockSplitEvent, CapitalDistributionEvent, SpinOffEvent, MergerEvent, FutureExpiryEvent, SwapCashFlowEvent, SwapPrincipalEvent, CreditPremiumCashFlowEvent, CdsCreditEvent, CdxCreditEvent, MbsCouponEvent, MbsPrincipalEvent, BonusIssueEvent, MbsPrincipalWriteOffEvent, MbsInterestDeferralEvent, MbsInterestShortfallEvent, TenderEvent")
33
+ instrument_event_type: StrictStr = Field(..., alias="instrumentEventType", description="The Type of Event. The available values are: TransitionEvent, InformationalEvent, OpenEvent, CloseEvent, StockSplitEvent, BondDefaultEvent, CashDividendEvent, AmortisationEvent, CashFlowEvent, ExerciseEvent, ResetEvent, TriggerEvent, RawVendorEvent, InformationalErrorEvent, BondCouponEvent, DividendReinvestmentEvent, AccumulationEvent, BondPrincipalEvent, DividendOptionEvent, MaturityEvent, FxForwardSettlementEvent, ExpiryEvent, ScripDividendEvent, StockDividendEvent, ReverseStockSplitEvent, CapitalDistributionEvent, SpinOffEvent, MergerEvent, FutureExpiryEvent, SwapCashFlowEvent, SwapPrincipalEvent, CreditPremiumCashFlowEvent, CdsCreditEvent, CdxCreditEvent, MbsCouponEvent, MbsPrincipalEvent, BonusIssueEvent, MbsPrincipalWriteOffEvent, MbsInterestDeferralEvent, MbsInterestShortfallEvent, TenderEvent, CallOnIntermediateSecuritiesEvent, IntermediateSecuritiesDistributionEvent, OptionExercisePhysicalEvent, OptionExerciseCashEvent, ProtectionPayoutCashFlowEvent")
34
34
  additional_properties: Dict[str, Any] = {}
35
35
  __properties = ["instrumentEventType", "exDate", "paymentDate", "currency", "cashFlowPerUnit"]
36
36
 
37
37
  @validator('instrument_event_type')
38
38
  def instrument_event_type_validate_enum(cls, value):
39
39
  """Validates the enum"""
40
- if value not in ('TransitionEvent', 'InformationalEvent', 'OpenEvent', 'CloseEvent', 'StockSplitEvent', 'BondDefaultEvent', 'CashDividendEvent', 'AmortisationEvent', 'CashFlowEvent', 'ExerciseEvent', 'ResetEvent', 'TriggerEvent', 'RawVendorEvent', 'InformationalErrorEvent', 'BondCouponEvent', 'DividendReinvestmentEvent', 'AccumulationEvent', 'BondPrincipalEvent', 'DividendOptionEvent', 'MaturityEvent', 'FxForwardSettlementEvent', 'ExpiryEvent', 'ScripDividendEvent', 'StockDividendEvent', 'ReverseStockSplitEvent', 'CapitalDistributionEvent', 'SpinOffEvent', 'MergerEvent', 'FutureExpiryEvent', 'SwapCashFlowEvent', 'SwapPrincipalEvent', 'CreditPremiumCashFlowEvent', 'CdsCreditEvent', 'CdxCreditEvent', 'MbsCouponEvent', 'MbsPrincipalEvent', 'BonusIssueEvent', 'MbsPrincipalWriteOffEvent', 'MbsInterestDeferralEvent', 'MbsInterestShortfallEvent', 'TenderEvent'):
41
- raise ValueError("must be one of enum values ('TransitionEvent', 'InformationalEvent', 'OpenEvent', 'CloseEvent', 'StockSplitEvent', 'BondDefaultEvent', 'CashDividendEvent', 'AmortisationEvent', 'CashFlowEvent', 'ExerciseEvent', 'ResetEvent', 'TriggerEvent', 'RawVendorEvent', 'InformationalErrorEvent', 'BondCouponEvent', 'DividendReinvestmentEvent', 'AccumulationEvent', 'BondPrincipalEvent', 'DividendOptionEvent', 'MaturityEvent', 'FxForwardSettlementEvent', 'ExpiryEvent', 'ScripDividendEvent', 'StockDividendEvent', 'ReverseStockSplitEvent', 'CapitalDistributionEvent', 'SpinOffEvent', 'MergerEvent', 'FutureExpiryEvent', 'SwapCashFlowEvent', 'SwapPrincipalEvent', 'CreditPremiumCashFlowEvent', 'CdsCreditEvent', 'CdxCreditEvent', 'MbsCouponEvent', 'MbsPrincipalEvent', 'BonusIssueEvent', 'MbsPrincipalWriteOffEvent', 'MbsInterestDeferralEvent', 'MbsInterestShortfallEvent', 'TenderEvent')")
40
+ if value not in ('TransitionEvent', 'InformationalEvent', 'OpenEvent', 'CloseEvent', 'StockSplitEvent', 'BondDefaultEvent', 'CashDividendEvent', 'AmortisationEvent', 'CashFlowEvent', 'ExerciseEvent', 'ResetEvent', 'TriggerEvent', 'RawVendorEvent', 'InformationalErrorEvent', 'BondCouponEvent', 'DividendReinvestmentEvent', 'AccumulationEvent', 'BondPrincipalEvent', 'DividendOptionEvent', 'MaturityEvent', 'FxForwardSettlementEvent', 'ExpiryEvent', 'ScripDividendEvent', 'StockDividendEvent', 'ReverseStockSplitEvent', 'CapitalDistributionEvent', 'SpinOffEvent', 'MergerEvent', 'FutureExpiryEvent', 'SwapCashFlowEvent', 'SwapPrincipalEvent', 'CreditPremiumCashFlowEvent', 'CdsCreditEvent', 'CdxCreditEvent', 'MbsCouponEvent', 'MbsPrincipalEvent', 'BonusIssueEvent', 'MbsPrincipalWriteOffEvent', 'MbsInterestDeferralEvent', 'MbsInterestShortfallEvent', 'TenderEvent', 'CallOnIntermediateSecuritiesEvent', 'IntermediateSecuritiesDistributionEvent', 'OptionExercisePhysicalEvent', 'OptionExerciseCashEvent', 'ProtectionPayoutCashFlowEvent'):
41
+ raise ValueError("must be one of enum values ('TransitionEvent', 'InformationalEvent', 'OpenEvent', 'CloseEvent', 'StockSplitEvent', 'BondDefaultEvent', 'CashDividendEvent', 'AmortisationEvent', 'CashFlowEvent', 'ExerciseEvent', 'ResetEvent', 'TriggerEvent', 'RawVendorEvent', 'InformationalErrorEvent', 'BondCouponEvent', 'DividendReinvestmentEvent', 'AccumulationEvent', 'BondPrincipalEvent', 'DividendOptionEvent', 'MaturityEvent', 'FxForwardSettlementEvent', 'ExpiryEvent', 'ScripDividendEvent', 'StockDividendEvent', 'ReverseStockSplitEvent', 'CapitalDistributionEvent', 'SpinOffEvent', 'MergerEvent', 'FutureExpiryEvent', 'SwapCashFlowEvent', 'SwapPrincipalEvent', 'CreditPremiumCashFlowEvent', 'CdsCreditEvent', 'CdxCreditEvent', 'MbsCouponEvent', 'MbsPrincipalEvent', 'BonusIssueEvent', 'MbsPrincipalWriteOffEvent', 'MbsInterestDeferralEvent', 'MbsInterestShortfallEvent', 'TenderEvent', 'CallOnIntermediateSecuritiesEvent', 'IntermediateSecuritiesDistributionEvent', 'OptionExercisePhysicalEvent', 'OptionExerciseCashEvent', 'ProtectionPayoutCashFlowEvent')")
42
42
  return value
43
43
 
44
44
  class Config:
@@ -27,7 +27,7 @@ class CustodianAccountRequest(BaseModel):
27
27
  """
28
28
  CustodianAccountRequest
29
29
  """
30
- scope: Optional[constr(strict=True, max_length=64, min_length=1)] = Field(None, description="The Scope assigned to the Custodian Account, where left blank the parent Portfolio Scope will be used")
30
+ scope: Optional[constr(strict=True, max_length=64, min_length=0)] = Field(None, description="The Scope assigned to the Custodian Account, where left blank the parent Portfolio Scope will be used")
31
31
  code: constr(strict=True, max_length=64, min_length=1) = Field(..., description="Unique Code representing the Custodian Account")
32
32
  status: Optional[StrictStr] = Field(None, description="The Account status. Can be Active, Inactive or Deleted.")
33
33
  account_number: constr(strict=True, max_length=64, min_length=1) = Field(..., alias="accountNumber", description="The Custodian Account Number")
@@ -21,14 +21,16 @@ from datetime import datetime
21
21
  from typing import Any, Dict, List, Optional
22
22
  from pydantic.v1 import BaseModel, Field, conlist
23
23
  from lusid.models.link import Link
24
+ from lusid.models.staged_modifications_info import StagedModificationsInfo
24
25
 
25
26
  class DeleteInstrumentPropertiesResponse(BaseModel):
26
27
  """
27
28
  DeleteInstrumentPropertiesResponse
28
29
  """
29
30
  as_at: datetime = Field(..., alias="asAt", description="The as-at datetime at which properties were deleted.")
31
+ staged_modifications: Optional[StagedModificationsInfo] = Field(None, alias="stagedModifications")
30
32
  links: Optional[conlist(Link)] = None
31
- __properties = ["asAt", "links"]
33
+ __properties = ["asAt", "stagedModifications", "links"]
32
34
 
33
35
  class Config:
34
36
  """Pydantic configuration"""
@@ -54,6 +56,9 @@ class DeleteInstrumentPropertiesResponse(BaseModel):
54
56
  exclude={
55
57
  },
56
58
  exclude_none=True)
59
+ # override the default output from pydantic by calling `to_dict()` of staged_modifications
60
+ if self.staged_modifications:
61
+ _dict['stagedModifications'] = self.staged_modifications.to_dict()
57
62
  # override the default output from pydantic by calling `to_dict()` of each item in links (list)
58
63
  _items = []
59
64
  if self.links:
@@ -79,6 +84,7 @@ class DeleteInstrumentPropertiesResponse(BaseModel):
79
84
 
80
85
  _obj = DeleteInstrumentPropertiesResponse.parse_obj({
81
86
  "as_at": obj.get("asAt"),
87
+ "staged_modifications": StagedModificationsInfo.from_dict(obj.get("stagedModifications")) if obj.get("stagedModifications") is not None else None,
82
88
  "links": [Link.from_dict(_item) for _item in obj.get("links")] if obj.get("links") is not None else None
83
89
  })
84
90
  return _obj
@@ -21,6 +21,7 @@ from datetime import datetime
21
21
  from typing import Any, Dict, List, Optional
22
22
  from pydantic.v1 import BaseModel, Field, StrictStr, conlist
23
23
  from lusid.models.link import Link
24
+ from lusid.models.staged_modifications_info import StagedModificationsInfo
24
25
 
25
26
  class DeleteInstrumentResponse(BaseModel):
26
27
  """
@@ -28,8 +29,9 @@ class DeleteInstrumentResponse(BaseModel):
28
29
  """
29
30
  href: Optional[StrictStr] = Field(None, description="The specific Uniform Resource Identifier (URI) for this resource at the requested effective and asAt datetime.")
30
31
  as_at: datetime = Field(..., alias="asAt", description="The as-at datetime at which the instrument was deleted.")
32
+ staged_modifications: Optional[StagedModificationsInfo] = Field(None, alias="stagedModifications")
31
33
  links: Optional[conlist(Link)] = None
32
- __properties = ["href", "asAt", "links"]
34
+ __properties = ["href", "asAt", "stagedModifications", "links"]
33
35
 
34
36
  class Config:
35
37
  """Pydantic configuration"""
@@ -55,6 +57,9 @@ class DeleteInstrumentResponse(BaseModel):
55
57
  exclude={
56
58
  },
57
59
  exclude_none=True)
60
+ # override the default output from pydantic by calling `to_dict()` of staged_modifications
61
+ if self.staged_modifications:
62
+ _dict['stagedModifications'] = self.staged_modifications.to_dict()
58
63
  # override the default output from pydantic by calling `to_dict()` of each item in links (list)
59
64
  _items = []
60
65
  if self.links:
@@ -86,6 +91,7 @@ class DeleteInstrumentResponse(BaseModel):
86
91
  _obj = DeleteInstrumentResponse.parse_obj({
87
92
  "href": obj.get("href"),
88
93
  "as_at": obj.get("asAt"),
94
+ "staged_modifications": StagedModificationsInfo.from_dict(obj.get("stagedModifications")) if obj.get("stagedModifications") is not None else None,
89
95
  "links": [Link.from_dict(_item) for _item in obj.get("links")] if obj.get("links") is not None else None
90
96
  })
91
97
  return _obj
@@ -21,6 +21,7 @@ from datetime import datetime
21
21
  from typing import Any, Dict, List, Optional
22
22
  from pydantic.v1 import BaseModel, Field, StrictStr, conlist
23
23
  from lusid.models.link import Link
24
+ from lusid.models.staged_modifications_info import StagedModificationsInfo
24
25
 
25
26
  class DeleteInstrumentsResponse(BaseModel):
26
27
  """
@@ -28,8 +29,9 @@ class DeleteInstrumentsResponse(BaseModel):
28
29
  """
29
30
  href: Optional[StrictStr] = Field(None, description="The specific Uniform Resource Identifier (URI) for this resource at the requested effective and asAt datetime.")
30
31
  as_at: datetime = Field(..., alias="asAt", description="The as-at datetime at which the instrument was deleted.")
32
+ staged: Optional[Dict[str, StagedModificationsInfo]] = Field(None, description="Information about the pending staged modifications for the current entity.")
31
33
  links: Optional[conlist(Link)] = None
32
- __properties = ["href", "asAt", "links"]
34
+ __properties = ["href", "asAt", "staged", "links"]
33
35
 
34
36
  class Config:
35
37
  """Pydantic configuration"""
@@ -53,8 +55,16 @@ class DeleteInstrumentsResponse(BaseModel):
53
55
  """Returns the dictionary representation of the model using alias"""
54
56
  _dict = self.dict(by_alias=True,
55
57
  exclude={
58
+ "staged",
56
59
  },
57
60
  exclude_none=True)
61
+ # override the default output from pydantic by calling `to_dict()` of each value in staged (dict)
62
+ _field_dict = {}
63
+ if self.staged:
64
+ for _key in self.staged:
65
+ if self.staged[_key]:
66
+ _field_dict[_key] = self.staged[_key].to_dict()
67
+ _dict['staged'] = _field_dict
58
68
  # override the default output from pydantic by calling `to_dict()` of each item in links (list)
59
69
  _items = []
60
70
  if self.links:
@@ -67,6 +77,11 @@ class DeleteInstrumentsResponse(BaseModel):
67
77
  if self.href is None and "href" in self.__fields_set__:
68
78
  _dict['href'] = None
69
79
 
80
+ # set to None if staged (nullable) is None
81
+ # and __fields_set__ contains the field
82
+ if self.staged is None and "staged" in self.__fields_set__:
83
+ _dict['staged'] = None
84
+
70
85
  # set to None if links (nullable) is None
71
86
  # and __fields_set__ contains the field
72
87
  if self.links is None and "links" in self.__fields_set__:
@@ -86,6 +101,12 @@ class DeleteInstrumentsResponse(BaseModel):
86
101
  _obj = DeleteInstrumentsResponse.parse_obj({
87
102
  "href": obj.get("href"),
88
103
  "as_at": obj.get("asAt"),
104
+ "staged": dict(
105
+ (_k, StagedModificationsInfo.from_dict(_v))
106
+ for _k, _v in obj.get("staged").items()
107
+ )
108
+ if obj.get("staged") is not None
109
+ else None,
89
110
  "links": [Link.from_dict(_item) for _item in obj.get("links")] if obj.get("links") is not None else None
90
111
  })
91
112
  return _obj
@@ -21,6 +21,7 @@ from datetime import datetime
21
21
  from typing import Any, Dict, List, Optional
22
22
  from pydantic.v1 import BaseModel, Field, StrictStr, conlist
23
23
  from lusid.models.link import Link
24
+ from lusid.models.staged_modifications_info import StagedModificationsInfo
24
25
 
25
26
  class DeletedEntityResponse(BaseModel):
26
27
  """
@@ -31,8 +32,9 @@ class DeletedEntityResponse(BaseModel):
31
32
  as_at: datetime = Field(..., alias="asAt", description="The asAt datetime at which the deletion was committed to LUSID.")
32
33
  entity_type: Optional[StrictStr] = Field(None, alias="entityType", description="The type of the entity that the deleted response applies to.")
33
34
  entity_unique_id: Optional[StrictStr] = Field(None, alias="entityUniqueId", description="The unique Id of the entity that the deleted response applies to.")
35
+ staged_modifications: Optional[StagedModificationsInfo] = Field(None, alias="stagedModifications")
34
36
  links: Optional[conlist(Link)] = None
35
- __properties = ["href", "effectiveFrom", "asAt", "entityType", "entityUniqueId", "links"]
37
+ __properties = ["href", "effectiveFrom", "asAt", "entityType", "entityUniqueId", "stagedModifications", "links"]
36
38
 
37
39
  class Config:
38
40
  """Pydantic configuration"""
@@ -58,6 +60,9 @@ class DeletedEntityResponse(BaseModel):
58
60
  exclude={
59
61
  },
60
62
  exclude_none=True)
63
+ # override the default output from pydantic by calling `to_dict()` of staged_modifications
64
+ if self.staged_modifications:
65
+ _dict['stagedModifications'] = self.staged_modifications.to_dict()
61
66
  # override the default output from pydantic by calling `to_dict()` of each item in links (list)
62
67
  _items = []
63
68
  if self.links:
@@ -107,6 +112,7 @@ class DeletedEntityResponse(BaseModel):
107
112
  "as_at": obj.get("asAt"),
108
113
  "entity_type": obj.get("entityType"),
109
114
  "entity_unique_id": obj.get("entityUniqueId"),
115
+ "staged_modifications": StagedModificationsInfo.from_dict(obj.get("stagedModifications")) if obj.get("stagedModifications") is not None else None,
110
116
  "links": [Link.from_dict(_item) for _item in obj.get("links")] if obj.get("links") is not None else None
111
117
  })
112
118
  return _obj
@@ -35,15 +35,15 @@ class DividendOptionEvent(InstrumentEvent):
35
35
  record_date: Optional[datetime] = Field(None, alias="recordDate", description="Date you have to be the holder of record in order to participate in the tender.")
36
36
  security_elections: conlist(SecurityElection) = Field(..., alias="securityElections", description="SecurityElection for this DividendReinvestmentEvent")
37
37
  security_settlement_date: Optional[datetime] = Field(None, alias="securitySettlementDate", description="The settlement date of the additional units. Equal to the PaymentDate if not provided.")
38
- instrument_event_type: StrictStr = Field(..., alias="instrumentEventType", description="The Type of Event. The available values are: TransitionEvent, InformationalEvent, OpenEvent, CloseEvent, StockSplitEvent, BondDefaultEvent, CashDividendEvent, AmortisationEvent, CashFlowEvent, ExerciseEvent, ResetEvent, TriggerEvent, RawVendorEvent, InformationalErrorEvent, BondCouponEvent, DividendReinvestmentEvent, AccumulationEvent, BondPrincipalEvent, DividendOptionEvent, MaturityEvent, FxForwardSettlementEvent, ExpiryEvent, ScripDividendEvent, StockDividendEvent, ReverseStockSplitEvent, CapitalDistributionEvent, SpinOffEvent, MergerEvent, FutureExpiryEvent, SwapCashFlowEvent, SwapPrincipalEvent, CreditPremiumCashFlowEvent, CdsCreditEvent, CdxCreditEvent, MbsCouponEvent, MbsPrincipalEvent, BonusIssueEvent, MbsPrincipalWriteOffEvent, MbsInterestDeferralEvent, MbsInterestShortfallEvent, TenderEvent")
38
+ instrument_event_type: StrictStr = Field(..., alias="instrumentEventType", description="The Type of Event. The available values are: TransitionEvent, InformationalEvent, OpenEvent, CloseEvent, StockSplitEvent, BondDefaultEvent, CashDividendEvent, AmortisationEvent, CashFlowEvent, ExerciseEvent, ResetEvent, TriggerEvent, RawVendorEvent, InformationalErrorEvent, BondCouponEvent, DividendReinvestmentEvent, AccumulationEvent, BondPrincipalEvent, DividendOptionEvent, MaturityEvent, FxForwardSettlementEvent, ExpiryEvent, ScripDividendEvent, StockDividendEvent, ReverseStockSplitEvent, CapitalDistributionEvent, SpinOffEvent, MergerEvent, FutureExpiryEvent, SwapCashFlowEvent, SwapPrincipalEvent, CreditPremiumCashFlowEvent, CdsCreditEvent, CdxCreditEvent, MbsCouponEvent, MbsPrincipalEvent, BonusIssueEvent, MbsPrincipalWriteOffEvent, MbsInterestDeferralEvent, MbsInterestShortfallEvent, TenderEvent, CallOnIntermediateSecuritiesEvent, IntermediateSecuritiesDistributionEvent, OptionExercisePhysicalEvent, OptionExerciseCashEvent, ProtectionPayoutCashFlowEvent")
39
39
  additional_properties: Dict[str, Any] = {}
40
40
  __properties = ["instrumentEventType", "announcementDate", "cashElections", "exDate", "paymentDate", "recordDate", "securityElections", "securitySettlementDate"]
41
41
 
42
42
  @validator('instrument_event_type')
43
43
  def instrument_event_type_validate_enum(cls, value):
44
44
  """Validates the enum"""
45
- if value not in ('TransitionEvent', 'InformationalEvent', 'OpenEvent', 'CloseEvent', 'StockSplitEvent', 'BondDefaultEvent', 'CashDividendEvent', 'AmortisationEvent', 'CashFlowEvent', 'ExerciseEvent', 'ResetEvent', 'TriggerEvent', 'RawVendorEvent', 'InformationalErrorEvent', 'BondCouponEvent', 'DividendReinvestmentEvent', 'AccumulationEvent', 'BondPrincipalEvent', 'DividendOptionEvent', 'MaturityEvent', 'FxForwardSettlementEvent', 'ExpiryEvent', 'ScripDividendEvent', 'StockDividendEvent', 'ReverseStockSplitEvent', 'CapitalDistributionEvent', 'SpinOffEvent', 'MergerEvent', 'FutureExpiryEvent', 'SwapCashFlowEvent', 'SwapPrincipalEvent', 'CreditPremiumCashFlowEvent', 'CdsCreditEvent', 'CdxCreditEvent', 'MbsCouponEvent', 'MbsPrincipalEvent', 'BonusIssueEvent', 'MbsPrincipalWriteOffEvent', 'MbsInterestDeferralEvent', 'MbsInterestShortfallEvent', 'TenderEvent'):
46
- raise ValueError("must be one of enum values ('TransitionEvent', 'InformationalEvent', 'OpenEvent', 'CloseEvent', 'StockSplitEvent', 'BondDefaultEvent', 'CashDividendEvent', 'AmortisationEvent', 'CashFlowEvent', 'ExerciseEvent', 'ResetEvent', 'TriggerEvent', 'RawVendorEvent', 'InformationalErrorEvent', 'BondCouponEvent', 'DividendReinvestmentEvent', 'AccumulationEvent', 'BondPrincipalEvent', 'DividendOptionEvent', 'MaturityEvent', 'FxForwardSettlementEvent', 'ExpiryEvent', 'ScripDividendEvent', 'StockDividendEvent', 'ReverseStockSplitEvent', 'CapitalDistributionEvent', 'SpinOffEvent', 'MergerEvent', 'FutureExpiryEvent', 'SwapCashFlowEvent', 'SwapPrincipalEvent', 'CreditPremiumCashFlowEvent', 'CdsCreditEvent', 'CdxCreditEvent', 'MbsCouponEvent', 'MbsPrincipalEvent', 'BonusIssueEvent', 'MbsPrincipalWriteOffEvent', 'MbsInterestDeferralEvent', 'MbsInterestShortfallEvent', 'TenderEvent')")
45
+ if value not in ('TransitionEvent', 'InformationalEvent', 'OpenEvent', 'CloseEvent', 'StockSplitEvent', 'BondDefaultEvent', 'CashDividendEvent', 'AmortisationEvent', 'CashFlowEvent', 'ExerciseEvent', 'ResetEvent', 'TriggerEvent', 'RawVendorEvent', 'InformationalErrorEvent', 'BondCouponEvent', 'DividendReinvestmentEvent', 'AccumulationEvent', 'BondPrincipalEvent', 'DividendOptionEvent', 'MaturityEvent', 'FxForwardSettlementEvent', 'ExpiryEvent', 'ScripDividendEvent', 'StockDividendEvent', 'ReverseStockSplitEvent', 'CapitalDistributionEvent', 'SpinOffEvent', 'MergerEvent', 'FutureExpiryEvent', 'SwapCashFlowEvent', 'SwapPrincipalEvent', 'CreditPremiumCashFlowEvent', 'CdsCreditEvent', 'CdxCreditEvent', 'MbsCouponEvent', 'MbsPrincipalEvent', 'BonusIssueEvent', 'MbsPrincipalWriteOffEvent', 'MbsInterestDeferralEvent', 'MbsInterestShortfallEvent', 'TenderEvent', 'CallOnIntermediateSecuritiesEvent', 'IntermediateSecuritiesDistributionEvent', 'OptionExercisePhysicalEvent', 'OptionExerciseCashEvent', 'ProtectionPayoutCashFlowEvent'):
46
+ raise ValueError("must be one of enum values ('TransitionEvent', 'InformationalEvent', 'OpenEvent', 'CloseEvent', 'StockSplitEvent', 'BondDefaultEvent', 'CashDividendEvent', 'AmortisationEvent', 'CashFlowEvent', 'ExerciseEvent', 'ResetEvent', 'TriggerEvent', 'RawVendorEvent', 'InformationalErrorEvent', 'BondCouponEvent', 'DividendReinvestmentEvent', 'AccumulationEvent', 'BondPrincipalEvent', 'DividendOptionEvent', 'MaturityEvent', 'FxForwardSettlementEvent', 'ExpiryEvent', 'ScripDividendEvent', 'StockDividendEvent', 'ReverseStockSplitEvent', 'CapitalDistributionEvent', 'SpinOffEvent', 'MergerEvent', 'FutureExpiryEvent', 'SwapCashFlowEvent', 'SwapPrincipalEvent', 'CreditPremiumCashFlowEvent', 'CdsCreditEvent', 'CdxCreditEvent', 'MbsCouponEvent', 'MbsPrincipalEvent', 'BonusIssueEvent', 'MbsPrincipalWriteOffEvent', 'MbsInterestDeferralEvent', 'MbsInterestShortfallEvent', 'TenderEvent', 'CallOnIntermediateSecuritiesEvent', 'IntermediateSecuritiesDistributionEvent', 'OptionExercisePhysicalEvent', 'OptionExerciseCashEvent', 'ProtectionPayoutCashFlowEvent')")
47
47
  return value
48
48
 
49
49
  class Config:
@@ -32,18 +32,18 @@ class DividendReinvestmentEvent(InstrumentEvent):
32
32
  cash_elections: conlist(CashElection) = Field(..., alias="cashElections", description="CashElection for this DividendReinvestmentEvent")
33
33
  ex_date: datetime = Field(..., alias="exDate", description="The first business day on which the dividend is not owed to the buying party. Typically this is T-1 from the RecordDate.")
34
34
  payment_date: datetime = Field(..., alias="paymentDate", description="The date the company pays out dividends to shareholders.")
35
- record_date: datetime = Field(..., alias="recordDate", description="Date you have to be the holder of record in order to participate in the tender.")
35
+ record_date: Optional[datetime] = Field(None, alias="recordDate", description="Date you have to be the holder of record in order to participate in the tender.")
36
36
  security_elections: conlist(SecurityElection) = Field(..., alias="securityElections", description="SecurityElection for this DividendReinvestmentEvent")
37
37
  security_settlement_date: Optional[datetime] = Field(None, alias="securitySettlementDate", description="The settlement date of the additional units. Equal to the PaymentDate if not provided.")
38
- instrument_event_type: StrictStr = Field(..., alias="instrumentEventType", description="The Type of Event. The available values are: TransitionEvent, InformationalEvent, OpenEvent, CloseEvent, StockSplitEvent, BondDefaultEvent, CashDividendEvent, AmortisationEvent, CashFlowEvent, ExerciseEvent, ResetEvent, TriggerEvent, RawVendorEvent, InformationalErrorEvent, BondCouponEvent, DividendReinvestmentEvent, AccumulationEvent, BondPrincipalEvent, DividendOptionEvent, MaturityEvent, FxForwardSettlementEvent, ExpiryEvent, ScripDividendEvent, StockDividendEvent, ReverseStockSplitEvent, CapitalDistributionEvent, SpinOffEvent, MergerEvent, FutureExpiryEvent, SwapCashFlowEvent, SwapPrincipalEvent, CreditPremiumCashFlowEvent, CdsCreditEvent, CdxCreditEvent, MbsCouponEvent, MbsPrincipalEvent, BonusIssueEvent, MbsPrincipalWriteOffEvent, MbsInterestDeferralEvent, MbsInterestShortfallEvent, TenderEvent")
38
+ instrument_event_type: StrictStr = Field(..., alias="instrumentEventType", description="The Type of Event. The available values are: TransitionEvent, InformationalEvent, OpenEvent, CloseEvent, StockSplitEvent, BondDefaultEvent, CashDividendEvent, AmortisationEvent, CashFlowEvent, ExerciseEvent, ResetEvent, TriggerEvent, RawVendorEvent, InformationalErrorEvent, BondCouponEvent, DividendReinvestmentEvent, AccumulationEvent, BondPrincipalEvent, DividendOptionEvent, MaturityEvent, FxForwardSettlementEvent, ExpiryEvent, ScripDividendEvent, StockDividendEvent, ReverseStockSplitEvent, CapitalDistributionEvent, SpinOffEvent, MergerEvent, FutureExpiryEvent, SwapCashFlowEvent, SwapPrincipalEvent, CreditPremiumCashFlowEvent, CdsCreditEvent, CdxCreditEvent, MbsCouponEvent, MbsPrincipalEvent, BonusIssueEvent, MbsPrincipalWriteOffEvent, MbsInterestDeferralEvent, MbsInterestShortfallEvent, TenderEvent, CallOnIntermediateSecuritiesEvent, IntermediateSecuritiesDistributionEvent, OptionExercisePhysicalEvent, OptionExerciseCashEvent, ProtectionPayoutCashFlowEvent")
39
39
  additional_properties: Dict[str, Any] = {}
40
40
  __properties = ["instrumentEventType", "announcementDate", "cashElections", "exDate", "paymentDate", "recordDate", "securityElections", "securitySettlementDate"]
41
41
 
42
42
  @validator('instrument_event_type')
43
43
  def instrument_event_type_validate_enum(cls, value):
44
44
  """Validates the enum"""
45
- if value not in ('TransitionEvent', 'InformationalEvent', 'OpenEvent', 'CloseEvent', 'StockSplitEvent', 'BondDefaultEvent', 'CashDividendEvent', 'AmortisationEvent', 'CashFlowEvent', 'ExerciseEvent', 'ResetEvent', 'TriggerEvent', 'RawVendorEvent', 'InformationalErrorEvent', 'BondCouponEvent', 'DividendReinvestmentEvent', 'AccumulationEvent', 'BondPrincipalEvent', 'DividendOptionEvent', 'MaturityEvent', 'FxForwardSettlementEvent', 'ExpiryEvent', 'ScripDividendEvent', 'StockDividendEvent', 'ReverseStockSplitEvent', 'CapitalDistributionEvent', 'SpinOffEvent', 'MergerEvent', 'FutureExpiryEvent', 'SwapCashFlowEvent', 'SwapPrincipalEvent', 'CreditPremiumCashFlowEvent', 'CdsCreditEvent', 'CdxCreditEvent', 'MbsCouponEvent', 'MbsPrincipalEvent', 'BonusIssueEvent', 'MbsPrincipalWriteOffEvent', 'MbsInterestDeferralEvent', 'MbsInterestShortfallEvent', 'TenderEvent'):
46
- raise ValueError("must be one of enum values ('TransitionEvent', 'InformationalEvent', 'OpenEvent', 'CloseEvent', 'StockSplitEvent', 'BondDefaultEvent', 'CashDividendEvent', 'AmortisationEvent', 'CashFlowEvent', 'ExerciseEvent', 'ResetEvent', 'TriggerEvent', 'RawVendorEvent', 'InformationalErrorEvent', 'BondCouponEvent', 'DividendReinvestmentEvent', 'AccumulationEvent', 'BondPrincipalEvent', 'DividendOptionEvent', 'MaturityEvent', 'FxForwardSettlementEvent', 'ExpiryEvent', 'ScripDividendEvent', 'StockDividendEvent', 'ReverseStockSplitEvent', 'CapitalDistributionEvent', 'SpinOffEvent', 'MergerEvent', 'FutureExpiryEvent', 'SwapCashFlowEvent', 'SwapPrincipalEvent', 'CreditPremiumCashFlowEvent', 'CdsCreditEvent', 'CdxCreditEvent', 'MbsCouponEvent', 'MbsPrincipalEvent', 'BonusIssueEvent', 'MbsPrincipalWriteOffEvent', 'MbsInterestDeferralEvent', 'MbsInterestShortfallEvent', 'TenderEvent')")
45
+ if value not in ('TransitionEvent', 'InformationalEvent', 'OpenEvent', 'CloseEvent', 'StockSplitEvent', 'BondDefaultEvent', 'CashDividendEvent', 'AmortisationEvent', 'CashFlowEvent', 'ExerciseEvent', 'ResetEvent', 'TriggerEvent', 'RawVendorEvent', 'InformationalErrorEvent', 'BondCouponEvent', 'DividendReinvestmentEvent', 'AccumulationEvent', 'BondPrincipalEvent', 'DividendOptionEvent', 'MaturityEvent', 'FxForwardSettlementEvent', 'ExpiryEvent', 'ScripDividendEvent', 'StockDividendEvent', 'ReverseStockSplitEvent', 'CapitalDistributionEvent', 'SpinOffEvent', 'MergerEvent', 'FutureExpiryEvent', 'SwapCashFlowEvent', 'SwapPrincipalEvent', 'CreditPremiumCashFlowEvent', 'CdsCreditEvent', 'CdxCreditEvent', 'MbsCouponEvent', 'MbsPrincipalEvent', 'BonusIssueEvent', 'MbsPrincipalWriteOffEvent', 'MbsInterestDeferralEvent', 'MbsInterestShortfallEvent', 'TenderEvent', 'CallOnIntermediateSecuritiesEvent', 'IntermediateSecuritiesDistributionEvent', 'OptionExercisePhysicalEvent', 'OptionExerciseCashEvent', 'ProtectionPayoutCashFlowEvent'):
46
+ raise ValueError("must be one of enum values ('TransitionEvent', 'InformationalEvent', 'OpenEvent', 'CloseEvent', 'StockSplitEvent', 'BondDefaultEvent', 'CashDividendEvent', 'AmortisationEvent', 'CashFlowEvent', 'ExerciseEvent', 'ResetEvent', 'TriggerEvent', 'RawVendorEvent', 'InformationalErrorEvent', 'BondCouponEvent', 'DividendReinvestmentEvent', 'AccumulationEvent', 'BondPrincipalEvent', 'DividendOptionEvent', 'MaturityEvent', 'FxForwardSettlementEvent', 'ExpiryEvent', 'ScripDividendEvent', 'StockDividendEvent', 'ReverseStockSplitEvent', 'CapitalDistributionEvent', 'SpinOffEvent', 'MergerEvent', 'FutureExpiryEvent', 'SwapCashFlowEvent', 'SwapPrincipalEvent', 'CreditPremiumCashFlowEvent', 'CdsCreditEvent', 'CdxCreditEvent', 'MbsCouponEvent', 'MbsPrincipalEvent', 'BonusIssueEvent', 'MbsPrincipalWriteOffEvent', 'MbsInterestDeferralEvent', 'MbsInterestShortfallEvent', 'TenderEvent', 'CallOnIntermediateSecuritiesEvent', 'IntermediateSecuritiesDistributionEvent', 'OptionExercisePhysicalEvent', 'OptionExerciseCashEvent', 'ProtectionPayoutCashFlowEvent')")
47
47
  return value
48
48
 
49
49
  class Config:
@@ -95,6 +95,11 @@ class DividendReinvestmentEvent(InstrumentEvent):
95
95
  if self.announcement_date is None and "announcement_date" in self.__fields_set__:
96
96
  _dict['announcementDate'] = None
97
97
 
98
+ # set to None if record_date (nullable) is None
99
+ # and __fields_set__ contains the field
100
+ if self.record_date is None and "record_date" in self.__fields_set__:
101
+ _dict['recordDate'] = None
102
+
98
103
  return _dict
99
104
 
100
105
  @classmethod
@@ -34,15 +34,16 @@ class EquityOption(LusidInstrument):
34
34
  option_type: constr(strict=True, min_length=1) = Field(..., alias="optionType", description="Type of optionality for the option Supported string (enumeration) values are: [Call, Put].")
35
35
  strike: Union[StrictFloat, StrictInt] = Field(..., description="The strike of the option.")
36
36
  dom_ccy: StrictStr = Field(..., alias="domCcy", description="The domestic currency of the instrument.")
37
- underlying_identifier: constr(strict=True, min_length=1) = Field(..., alias="underlyingIdentifier", description="The market identifier type of the underlying code, e.g RIC. Supported string (enumeration) values are: [LusidInstrumentId, Isin, Sedol, Cusip, ClientInternal, Figi, RIC, QuotePermId, REDCode, BBGId, ICECode].")
38
- code: constr(strict=True, min_length=1) = Field(..., description="The identifying code for the equity underlying, e.g. 'IBM.N'.")
37
+ underlying_identifier: Optional[StrictStr] = Field(None, alias="underlyingIdentifier", description="The market identifier type of the underlying code, e.g RIC. Supported string (enumeration) values are: [LusidInstrumentId, Isin, Sedol, Cusip, ClientInternal, Figi, RIC, QuotePermId, REDCode, BBGId, ICECode]. Optional field, should be used in combination with the Code field. Not compatible with the Underlying field.")
38
+ code: Optional[StrictStr] = Field(None, description="The identifying code for the equity underlying, e.g. 'IBM.N'. Optional field, should be used in combination with the UnderlyingIdentifier field. Not compatible with the Underlying field.")
39
39
  equity_option_type: Optional[StrictStr] = Field(None, alias="equityOptionType", description="Equity option types. E.g. Vanilla (default), RightsIssue, Warrant. Supported string (enumeration) values are: [Vanilla, RightsIssue, Warrant].")
40
40
  number_of_shares: Optional[Union[StrictFloat, StrictInt]] = Field(None, alias="numberOfShares", description="The amount of shares to exchange if the option is exercised.")
41
41
  premium: Optional[Premium] = None
42
42
  exercise_type: Optional[StrictStr] = Field(None, alias="exerciseType", description="Type of optionality that is present; European, American. Supported string (enumeration) values are: [European, American].")
43
+ underlying: Optional[LusidInstrument] = None
43
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")
44
45
  additional_properties: Dict[str, Any] = {}
45
- __properties = ["instrumentType", "startDate", "optionMaturityDate", "optionSettlementDate", "deliveryType", "optionType", "strike", "domCcy", "underlyingIdentifier", "code", "equityOptionType", "numberOfShares", "premium", "exerciseType"]
46
+ __properties = ["instrumentType", "startDate", "optionMaturityDate", "optionSettlementDate", "deliveryType", "optionType", "strike", "domCcy", "underlyingIdentifier", "code", "equityOptionType", "numberOfShares", "premium", "exerciseType", "underlying"]
46
47
 
47
48
  @validator('instrument_type')
48
49
  def instrument_type_validate_enum(cls, value):
@@ -79,11 +80,24 @@ class EquityOption(LusidInstrument):
79
80
  # override the default output from pydantic by calling `to_dict()` of premium
80
81
  if self.premium:
81
82
  _dict['premium'] = self.premium.to_dict()
83
+ # override the default output from pydantic by calling `to_dict()` of underlying
84
+ if self.underlying:
85
+ _dict['underlying'] = self.underlying.to_dict()
82
86
  # puts key-value pairs in additional_properties in the top level
83
87
  if self.additional_properties is not None:
84
88
  for _key, _value in self.additional_properties.items():
85
89
  _dict[_key] = _value
86
90
 
91
+ # set to None if underlying_identifier (nullable) is None
92
+ # and __fields_set__ contains the field
93
+ if self.underlying_identifier is None and "underlying_identifier" in self.__fields_set__:
94
+ _dict['underlyingIdentifier'] = None
95
+
96
+ # set to None if code (nullable) is None
97
+ # and __fields_set__ contains the field
98
+ if self.code is None and "code" in self.__fields_set__:
99
+ _dict['code'] = None
100
+
87
101
  # set to None if equity_option_type (nullable) is None
88
102
  # and __fields_set__ contains the field
89
103
  if self.equity_option_type is None and "equity_option_type" in self.__fields_set__:
@@ -124,7 +138,8 @@ class EquityOption(LusidInstrument):
124
138
  "equity_option_type": obj.get("equityOptionType"),
125
139
  "number_of_shares": obj.get("numberOfShares"),
126
140
  "premium": Premium.from_dict(obj.get("premium")) if obj.get("premium") is not None else None,
127
- "exercise_type": obj.get("exerciseType")
141
+ "exercise_type": obj.get("exerciseType"),
142
+ "underlying": LusidInstrument.from_dict(obj.get("underlying")) if obj.get("underlying") is not None else None
128
143
  })
129
144
  # store additional fields in additional_properties
130
145
  for _key in obj.keys():
@@ -33,7 +33,7 @@ class ExchangeTradedOptionContractDetails(BaseModel):
33
33
  delivery_type: constr(strict=True, min_length=1) = Field(..., alias="deliveryType", description="The delivery type, cash or physical. An option on a future is physically settled if upon exercising the holder receives a future. Supported string (enumeration) values are: [Cash, Physical].")
34
34
  description: constr(strict=True, min_length=1) = Field(..., description="Description of contract")
35
35
  exchange_code: constr(strict=True, min_length=1) = Field(..., alias="exchangeCode", description="Exchange code for contract. This can be any string to uniquely identify the exchange (e.g. Exchange Name, MIC, BBG code).")
36
- exercise_date: datetime = Field(..., alias="exerciseDate", description="Exercise Date.")
36
+ exercise_date: datetime = Field(..., alias="exerciseDate", description="The last exercise date of the option.")
37
37
  exercise_type: constr(strict=True, min_length=1) = Field(..., alias="exerciseType", description="The exercise type, European, American or Bermudan. Supported string (enumeration) values are: [European, Bermudan, American].")
38
38
  option_code: constr(strict=True, min_length=1) = Field(..., alias="optionCode", description="Option Contract Code, typically one or two letters, e.g. OG => Option on Gold.")
39
39
  option_type: constr(strict=True, min_length=1) = Field(..., alias="optionType", description="The option type, Call or Put. Supported string (enumeration) values are: [Call, Put].")
@@ -30,15 +30,15 @@ class ExerciseEvent(InstrumentEvent):
30
30
  instrument: LusidInstrument = Field(...)
31
31
  anchor_date: datetime = Field(..., alias="anchorDate", description="The date the exercise window starts, or point it takes effect on.")
32
32
  event_window_end: Optional[datetime] = Field(None, alias="eventWindowEnd", description="The date the exercise window ends, or point it takes effect on.")
33
- instrument_event_type: StrictStr = Field(..., alias="instrumentEventType", description="The Type of Event. The available values are: TransitionEvent, InformationalEvent, OpenEvent, CloseEvent, StockSplitEvent, BondDefaultEvent, CashDividendEvent, AmortisationEvent, CashFlowEvent, ExerciseEvent, ResetEvent, TriggerEvent, RawVendorEvent, InformationalErrorEvent, BondCouponEvent, DividendReinvestmentEvent, AccumulationEvent, BondPrincipalEvent, DividendOptionEvent, MaturityEvent, FxForwardSettlementEvent, ExpiryEvent, ScripDividendEvent, StockDividendEvent, ReverseStockSplitEvent, CapitalDistributionEvent, SpinOffEvent, MergerEvent, FutureExpiryEvent, SwapCashFlowEvent, SwapPrincipalEvent, CreditPremiumCashFlowEvent, CdsCreditEvent, CdxCreditEvent, MbsCouponEvent, MbsPrincipalEvent, BonusIssueEvent, MbsPrincipalWriteOffEvent, MbsInterestDeferralEvent, MbsInterestShortfallEvent, TenderEvent")
33
+ instrument_event_type: StrictStr = Field(..., alias="instrumentEventType", description="The Type of Event. The available values are: TransitionEvent, InformationalEvent, OpenEvent, CloseEvent, StockSplitEvent, BondDefaultEvent, CashDividendEvent, AmortisationEvent, CashFlowEvent, ExerciseEvent, ResetEvent, TriggerEvent, RawVendorEvent, InformationalErrorEvent, BondCouponEvent, DividendReinvestmentEvent, AccumulationEvent, BondPrincipalEvent, DividendOptionEvent, MaturityEvent, FxForwardSettlementEvent, ExpiryEvent, ScripDividendEvent, StockDividendEvent, ReverseStockSplitEvent, CapitalDistributionEvent, SpinOffEvent, MergerEvent, FutureExpiryEvent, SwapCashFlowEvent, SwapPrincipalEvent, CreditPremiumCashFlowEvent, CdsCreditEvent, CdxCreditEvent, MbsCouponEvent, MbsPrincipalEvent, BonusIssueEvent, MbsPrincipalWriteOffEvent, MbsInterestDeferralEvent, MbsInterestShortfallEvent, TenderEvent, CallOnIntermediateSecuritiesEvent, IntermediateSecuritiesDistributionEvent, OptionExercisePhysicalEvent, OptionExerciseCashEvent, ProtectionPayoutCashFlowEvent")
34
34
  additional_properties: Dict[str, Any] = {}
35
35
  __properties = ["instrumentEventType", "instrument", "anchorDate", "eventWindowEnd"]
36
36
 
37
37
  @validator('instrument_event_type')
38
38
  def instrument_event_type_validate_enum(cls, value):
39
39
  """Validates the enum"""
40
- if value not in ('TransitionEvent', 'InformationalEvent', 'OpenEvent', 'CloseEvent', 'StockSplitEvent', 'BondDefaultEvent', 'CashDividendEvent', 'AmortisationEvent', 'CashFlowEvent', 'ExerciseEvent', 'ResetEvent', 'TriggerEvent', 'RawVendorEvent', 'InformationalErrorEvent', 'BondCouponEvent', 'DividendReinvestmentEvent', 'AccumulationEvent', 'BondPrincipalEvent', 'DividendOptionEvent', 'MaturityEvent', 'FxForwardSettlementEvent', 'ExpiryEvent', 'ScripDividendEvent', 'StockDividendEvent', 'ReverseStockSplitEvent', 'CapitalDistributionEvent', 'SpinOffEvent', 'MergerEvent', 'FutureExpiryEvent', 'SwapCashFlowEvent', 'SwapPrincipalEvent', 'CreditPremiumCashFlowEvent', 'CdsCreditEvent', 'CdxCreditEvent', 'MbsCouponEvent', 'MbsPrincipalEvent', 'BonusIssueEvent', 'MbsPrincipalWriteOffEvent', 'MbsInterestDeferralEvent', 'MbsInterestShortfallEvent', 'TenderEvent'):
41
- raise ValueError("must be one of enum values ('TransitionEvent', 'InformationalEvent', 'OpenEvent', 'CloseEvent', 'StockSplitEvent', 'BondDefaultEvent', 'CashDividendEvent', 'AmortisationEvent', 'CashFlowEvent', 'ExerciseEvent', 'ResetEvent', 'TriggerEvent', 'RawVendorEvent', 'InformationalErrorEvent', 'BondCouponEvent', 'DividendReinvestmentEvent', 'AccumulationEvent', 'BondPrincipalEvent', 'DividendOptionEvent', 'MaturityEvent', 'FxForwardSettlementEvent', 'ExpiryEvent', 'ScripDividendEvent', 'StockDividendEvent', 'ReverseStockSplitEvent', 'CapitalDistributionEvent', 'SpinOffEvent', 'MergerEvent', 'FutureExpiryEvent', 'SwapCashFlowEvent', 'SwapPrincipalEvent', 'CreditPremiumCashFlowEvent', 'CdsCreditEvent', 'CdxCreditEvent', 'MbsCouponEvent', 'MbsPrincipalEvent', 'BonusIssueEvent', 'MbsPrincipalWriteOffEvent', 'MbsInterestDeferralEvent', 'MbsInterestShortfallEvent', 'TenderEvent')")
40
+ if value not in ('TransitionEvent', 'InformationalEvent', 'OpenEvent', 'CloseEvent', 'StockSplitEvent', 'BondDefaultEvent', 'CashDividendEvent', 'AmortisationEvent', 'CashFlowEvent', 'ExerciseEvent', 'ResetEvent', 'TriggerEvent', 'RawVendorEvent', 'InformationalErrorEvent', 'BondCouponEvent', 'DividendReinvestmentEvent', 'AccumulationEvent', 'BondPrincipalEvent', 'DividendOptionEvent', 'MaturityEvent', 'FxForwardSettlementEvent', 'ExpiryEvent', 'ScripDividendEvent', 'StockDividendEvent', 'ReverseStockSplitEvent', 'CapitalDistributionEvent', 'SpinOffEvent', 'MergerEvent', 'FutureExpiryEvent', 'SwapCashFlowEvent', 'SwapPrincipalEvent', 'CreditPremiumCashFlowEvent', 'CdsCreditEvent', 'CdxCreditEvent', 'MbsCouponEvent', 'MbsPrincipalEvent', 'BonusIssueEvent', 'MbsPrincipalWriteOffEvent', 'MbsInterestDeferralEvent', 'MbsInterestShortfallEvent', 'TenderEvent', 'CallOnIntermediateSecuritiesEvent', 'IntermediateSecuritiesDistributionEvent', 'OptionExercisePhysicalEvent', 'OptionExerciseCashEvent', 'ProtectionPayoutCashFlowEvent'):
41
+ raise ValueError("must be one of enum values ('TransitionEvent', 'InformationalEvent', 'OpenEvent', 'CloseEvent', 'StockSplitEvent', 'BondDefaultEvent', 'CashDividendEvent', 'AmortisationEvent', 'CashFlowEvent', 'ExerciseEvent', 'ResetEvent', 'TriggerEvent', 'RawVendorEvent', 'InformationalErrorEvent', 'BondCouponEvent', 'DividendReinvestmentEvent', 'AccumulationEvent', 'BondPrincipalEvent', 'DividendOptionEvent', 'MaturityEvent', 'FxForwardSettlementEvent', 'ExpiryEvent', 'ScripDividendEvent', 'StockDividendEvent', 'ReverseStockSplitEvent', 'CapitalDistributionEvent', 'SpinOffEvent', 'MergerEvent', 'FutureExpiryEvent', 'SwapCashFlowEvent', 'SwapPrincipalEvent', 'CreditPremiumCashFlowEvent', 'CdsCreditEvent', 'CdxCreditEvent', 'MbsCouponEvent', 'MbsPrincipalEvent', 'BonusIssueEvent', 'MbsPrincipalWriteOffEvent', 'MbsInterestDeferralEvent', 'MbsInterestShortfallEvent', 'TenderEvent', 'CallOnIntermediateSecuritiesEvent', 'IntermediateSecuritiesDistributionEvent', 'OptionExercisePhysicalEvent', 'OptionExerciseCashEvent', 'ProtectionPayoutCashFlowEvent')")
42
42
  return value
43
43
 
44
44
  class Config:
@@ -27,15 +27,15 @@ class ExpiryEvent(InstrumentEvent):
27
27
  Definition of an Expiry Event This is an event that describes the expiry of the instrument. # noqa: E501
28
28
  """
29
29
  expiry_date: datetime = Field(..., alias="expiryDate", description="Expiry date of the instrument")
30
- instrument_event_type: StrictStr = Field(..., alias="instrumentEventType", description="The Type of Event. The available values are: TransitionEvent, InformationalEvent, OpenEvent, CloseEvent, StockSplitEvent, BondDefaultEvent, CashDividendEvent, AmortisationEvent, CashFlowEvent, ExerciseEvent, ResetEvent, TriggerEvent, RawVendorEvent, InformationalErrorEvent, BondCouponEvent, DividendReinvestmentEvent, AccumulationEvent, BondPrincipalEvent, DividendOptionEvent, MaturityEvent, FxForwardSettlementEvent, ExpiryEvent, ScripDividendEvent, StockDividendEvent, ReverseStockSplitEvent, CapitalDistributionEvent, SpinOffEvent, MergerEvent, FutureExpiryEvent, SwapCashFlowEvent, SwapPrincipalEvent, CreditPremiumCashFlowEvent, CdsCreditEvent, CdxCreditEvent, MbsCouponEvent, MbsPrincipalEvent, BonusIssueEvent, MbsPrincipalWriteOffEvent, MbsInterestDeferralEvent, MbsInterestShortfallEvent, TenderEvent")
30
+ instrument_event_type: StrictStr = Field(..., alias="instrumentEventType", description="The Type of Event. The available values are: TransitionEvent, InformationalEvent, OpenEvent, CloseEvent, StockSplitEvent, BondDefaultEvent, CashDividendEvent, AmortisationEvent, CashFlowEvent, ExerciseEvent, ResetEvent, TriggerEvent, RawVendorEvent, InformationalErrorEvent, BondCouponEvent, DividendReinvestmentEvent, AccumulationEvent, BondPrincipalEvent, DividendOptionEvent, MaturityEvent, FxForwardSettlementEvent, ExpiryEvent, ScripDividendEvent, StockDividendEvent, ReverseStockSplitEvent, CapitalDistributionEvent, SpinOffEvent, MergerEvent, FutureExpiryEvent, SwapCashFlowEvent, SwapPrincipalEvent, CreditPremiumCashFlowEvent, CdsCreditEvent, CdxCreditEvent, MbsCouponEvent, MbsPrincipalEvent, BonusIssueEvent, MbsPrincipalWriteOffEvent, MbsInterestDeferralEvent, MbsInterestShortfallEvent, TenderEvent, CallOnIntermediateSecuritiesEvent, IntermediateSecuritiesDistributionEvent, OptionExercisePhysicalEvent, OptionExerciseCashEvent, ProtectionPayoutCashFlowEvent")
31
31
  additional_properties: Dict[str, Any] = {}
32
32
  __properties = ["instrumentEventType", "expiryDate"]
33
33
 
34
34
  @validator('instrument_event_type')
35
35
  def instrument_event_type_validate_enum(cls, value):
36
36
  """Validates the enum"""
37
- if value not in ('TransitionEvent', 'InformationalEvent', 'OpenEvent', 'CloseEvent', 'StockSplitEvent', 'BondDefaultEvent', 'CashDividendEvent', 'AmortisationEvent', 'CashFlowEvent', 'ExerciseEvent', 'ResetEvent', 'TriggerEvent', 'RawVendorEvent', 'InformationalErrorEvent', 'BondCouponEvent', 'DividendReinvestmentEvent', 'AccumulationEvent', 'BondPrincipalEvent', 'DividendOptionEvent', 'MaturityEvent', 'FxForwardSettlementEvent', 'ExpiryEvent', 'ScripDividendEvent', 'StockDividendEvent', 'ReverseStockSplitEvent', 'CapitalDistributionEvent', 'SpinOffEvent', 'MergerEvent', 'FutureExpiryEvent', 'SwapCashFlowEvent', 'SwapPrincipalEvent', 'CreditPremiumCashFlowEvent', 'CdsCreditEvent', 'CdxCreditEvent', 'MbsCouponEvent', 'MbsPrincipalEvent', 'BonusIssueEvent', 'MbsPrincipalWriteOffEvent', 'MbsInterestDeferralEvent', 'MbsInterestShortfallEvent', 'TenderEvent'):
38
- raise ValueError("must be one of enum values ('TransitionEvent', 'InformationalEvent', 'OpenEvent', 'CloseEvent', 'StockSplitEvent', 'BondDefaultEvent', 'CashDividendEvent', 'AmortisationEvent', 'CashFlowEvent', 'ExerciseEvent', 'ResetEvent', 'TriggerEvent', 'RawVendorEvent', 'InformationalErrorEvent', 'BondCouponEvent', 'DividendReinvestmentEvent', 'AccumulationEvent', 'BondPrincipalEvent', 'DividendOptionEvent', 'MaturityEvent', 'FxForwardSettlementEvent', 'ExpiryEvent', 'ScripDividendEvent', 'StockDividendEvent', 'ReverseStockSplitEvent', 'CapitalDistributionEvent', 'SpinOffEvent', 'MergerEvent', 'FutureExpiryEvent', 'SwapCashFlowEvent', 'SwapPrincipalEvent', 'CreditPremiumCashFlowEvent', 'CdsCreditEvent', 'CdxCreditEvent', 'MbsCouponEvent', 'MbsPrincipalEvent', 'BonusIssueEvent', 'MbsPrincipalWriteOffEvent', 'MbsInterestDeferralEvent', 'MbsInterestShortfallEvent', 'TenderEvent')")
37
+ if value not in ('TransitionEvent', 'InformationalEvent', 'OpenEvent', 'CloseEvent', 'StockSplitEvent', 'BondDefaultEvent', 'CashDividendEvent', 'AmortisationEvent', 'CashFlowEvent', 'ExerciseEvent', 'ResetEvent', 'TriggerEvent', 'RawVendorEvent', 'InformationalErrorEvent', 'BondCouponEvent', 'DividendReinvestmentEvent', 'AccumulationEvent', 'BondPrincipalEvent', 'DividendOptionEvent', 'MaturityEvent', 'FxForwardSettlementEvent', 'ExpiryEvent', 'ScripDividendEvent', 'StockDividendEvent', 'ReverseStockSplitEvent', 'CapitalDistributionEvent', 'SpinOffEvent', 'MergerEvent', 'FutureExpiryEvent', 'SwapCashFlowEvent', 'SwapPrincipalEvent', 'CreditPremiumCashFlowEvent', 'CdsCreditEvent', 'CdxCreditEvent', 'MbsCouponEvent', 'MbsPrincipalEvent', 'BonusIssueEvent', 'MbsPrincipalWriteOffEvent', 'MbsInterestDeferralEvent', 'MbsInterestShortfallEvent', 'TenderEvent', 'CallOnIntermediateSecuritiesEvent', 'IntermediateSecuritiesDistributionEvent', 'OptionExercisePhysicalEvent', 'OptionExerciseCashEvent', 'ProtectionPayoutCashFlowEvent'):
38
+ raise ValueError("must be one of enum values ('TransitionEvent', 'InformationalEvent', 'OpenEvent', 'CloseEvent', 'StockSplitEvent', 'BondDefaultEvent', 'CashDividendEvent', 'AmortisationEvent', 'CashFlowEvent', 'ExerciseEvent', 'ResetEvent', 'TriggerEvent', 'RawVendorEvent', 'InformationalErrorEvent', 'BondCouponEvent', 'DividendReinvestmentEvent', 'AccumulationEvent', 'BondPrincipalEvent', 'DividendOptionEvent', 'MaturityEvent', 'FxForwardSettlementEvent', 'ExpiryEvent', 'ScripDividendEvent', 'StockDividendEvent', 'ReverseStockSplitEvent', 'CapitalDistributionEvent', 'SpinOffEvent', 'MergerEvent', 'FutureExpiryEvent', 'SwapCashFlowEvent', 'SwapPrincipalEvent', 'CreditPremiumCashFlowEvent', 'CdsCreditEvent', 'CdxCreditEvent', 'MbsCouponEvent', 'MbsPrincipalEvent', 'BonusIssueEvent', 'MbsPrincipalWriteOffEvent', 'MbsInterestDeferralEvent', 'MbsInterestShortfallEvent', 'TenderEvent', 'CallOnIntermediateSecuritiesEvent', 'IntermediateSecuritiesDistributionEvent', 'OptionExercisePhysicalEvent', 'OptionExerciseCashEvent', 'ProtectionPayoutCashFlowEvent')")
39
39
  return value
40
40
 
41
41
  class Config:
lusid/models/fee.py CHANGED
@@ -36,21 +36,22 @@ class Fee(BaseModel):
36
36
  display_name: constr(strict=True, max_length=50, min_length=0) = Field(..., alias="displayName", description="The name of the Fee.")
37
37
  description: Optional[constr(strict=True, max_length=1024, min_length=0)] = Field(None, description="A description for the Fee.")
38
38
  origin: Optional[constr(strict=True, max_length=512, min_length=1)] = Field(None, description="The origin or source of the Fee accrual.")
39
- calculation_base: Optional[constr(strict=True, max_length=1024, min_length=0)] = Field(None, alias="calculationBase", description="The calculation base for the Fee that is calculated using a percentage. (TotalAnnualAccrualAmount and CalculationBase cannot both be present)")
39
+ calculation_base: Optional[constr(strict=True, max_length=1024, min_length=0)] = Field(None, alias="calculationBase", description="The calculation base for a Fee that is calculated using a percentage (TotalAnnualAccrualAmount and CalculationBase cannot both be present). When the Fee is a ShareClass Fee (i.e: when ShareClasses contains at least one value), each of the following would be a valid CalculationBase: \"10000.00\", \"ShareClass.GAV\", \"ShareClass.GAV - ShareClass.Fees[ShareClassFeeCode1].Amount\", \"ShareClass.Fees[ShareClassFeeCode1].CalculationBase\". When the Fee is a NonShareClassSpecific Fee (i.e: when ShareClasses contains no values), each of the following would be a valid CalculationBase: \"10000.00\", \"GAV\", \"GAV - Fees[NonClassSpecificFeeCode1].Amount\", \"Fees[NonClassSpecificFeeCode1].CalculationBase\". ")
40
40
  accrual_currency: constr(strict=True, max_length=3, min_length=0) = Field(..., alias="accrualCurrency", description="The accrual currency.")
41
41
  treatment: constr(strict=True, min_length=1) = Field(..., description="The accrual period of the Fee; 'Monthly' or 'Daily'.")
42
42
  total_annual_accrual_amount: Optional[Union[StrictFloat, StrictInt]] = Field(None, alias="totalAnnualAccrualAmount", description="The total annual accrued amount for the Fee. (TotalAnnualAccrualAmount and CalculationBase cannot both be present)")
43
43
  fee_rate_percentage: Optional[Union[StrictFloat, StrictInt]] = Field(None, alias="feeRatePercentage", description="The fee rate percentage. (Required when CalculationBase is present and not compatible with TotalAnnualAccrualAmount)")
44
44
  payable_frequency: constr(strict=True, min_length=1) = Field(..., alias="payableFrequency", description="The payable frequency for the Fee; 'Annually', 'Quarterly' or 'Monthly'.")
45
- business_day_convention: constr(strict=True, min_length=1) = Field(..., alias="businessDayConvention", description="The business day convention to use for Fee calculations on weekends. Supported string values are: [Previous, P, Following, F].")
45
+ business_day_convention: constr(strict=True, min_length=1) = Field(..., alias="businessDayConvention", description="The business day convention to use for Fee calculations on weekends or holidays. Supported string values are: [Previous, P, Following, F, None].")
46
46
  start_date: datetime = Field(..., alias="startDate", description="The start date of the Fee.")
47
47
  end_date: Optional[datetime] = Field(None, alias="endDate", description="The end date of the Fee.")
48
48
  anchor_date: Optional[DayMonth] = Field(None, alias="anchorDate")
49
49
  properties: Optional[Dict[str, ModelProperty]] = Field(None, description="The Fee properties. These will be from the 'Fee' domain.")
50
50
  version: Optional[Version] = None
51
51
  portfolio_id: Optional[ResourceId] = Field(None, alias="portfolioId")
52
+ share_classes: Optional[conlist(StrictStr)] = Field(None, alias="shareClasses", description="The short codes of the ShareClasses that the Fee should be applied to. Optional: if this is null or empty, then the Fee will be divided between all the ShareClasses of the Fund according to the capital ratio.")
52
53
  links: Optional[conlist(Link)] = None
53
- __properties = ["href", "feeCode", "feeTypeId", "displayName", "description", "origin", "calculationBase", "accrualCurrency", "treatment", "totalAnnualAccrualAmount", "feeRatePercentage", "payableFrequency", "businessDayConvention", "startDate", "endDate", "anchorDate", "properties", "version", "portfolioId", "links"]
54
+ __properties = ["href", "feeCode", "feeTypeId", "displayName", "description", "origin", "calculationBase", "accrualCurrency", "treatment", "totalAnnualAccrualAmount", "feeRatePercentage", "payableFrequency", "businessDayConvention", "startDate", "endDate", "anchorDate", "properties", "version", "portfolioId", "shareClasses", "links"]
54
55
 
55
56
  @validator('fee_code')
56
57
  def fee_code_validate_regular_expression(cls, value):
@@ -162,6 +163,11 @@ class Fee(BaseModel):
162
163
  if self.properties is None and "properties" in self.__fields_set__:
163
164
  _dict['properties'] = None
164
165
 
166
+ # set to None if share_classes (nullable) is None
167
+ # and __fields_set__ contains the field
168
+ if self.share_classes is None and "share_classes" in self.__fields_set__:
169
+ _dict['shareClasses'] = None
170
+
165
171
  # set to None if links (nullable) is None
166
172
  # and __fields_set__ contains the field
167
173
  if self.links is None and "links" in self.__fields_set__:
@@ -203,6 +209,7 @@ class Fee(BaseModel):
203
209
  else None,
204
210
  "version": Version.from_dict(obj.get("version")) if obj.get("version") is not None else None,
205
211
  "portfolio_id": ResourceId.from_dict(obj.get("portfolioId")) if obj.get("portfolioId") is not None else None,
212
+ "share_classes": obj.get("shareClasses"),
206
213
  "links": [Link.from_dict(_item) for _item in obj.get("links")] if obj.get("links") is not None else None
207
214
  })
208
215
  return _obj
@@ -18,8 +18,8 @@ import re # noqa: F401
18
18
  import json
19
19
 
20
20
  from datetime import datetime
21
- from typing import Any, Dict, Optional, Union
22
- from pydantic.v1 import BaseModel, Field, StrictFloat, StrictInt, constr, validator
21
+ from typing import Any, Dict, List, Optional, Union
22
+ from pydantic.v1 import BaseModel, Field, StrictFloat, StrictInt, StrictStr, conlist, constr, validator
23
23
  from lusid.models.day_month import DayMonth
24
24
  from lusid.models.model_property import ModelProperty
25
25
  from lusid.models.resource_id import ResourceId
@@ -33,19 +33,20 @@ class FeeRequest(BaseModel):
33
33
  display_name: constr(strict=True, max_length=256, min_length=1) = Field(..., alias="displayName", description="The name of the Fee.")
34
34
  description: Optional[constr(strict=True, max_length=1024, min_length=0)] = Field(None, description="A description for the Fee.")
35
35
  origin: Optional[constr(strict=True, max_length=512, min_length=1)] = Field(None, description="The origin or source of the Fee accrual.")
36
- calculation_base: Optional[constr(strict=True, max_length=1024, min_length=0)] = Field(None, alias="calculationBase", description="The calculation base for the Fee that is calculated using a percentage. (TotalAnnualAccrualAmount and CalculationBase cannot both be present)")
36
+ calculation_base: Optional[constr(strict=True, max_length=1024, min_length=0)] = Field(None, alias="calculationBase", description="The calculation base for a Fee that is calculated using a percentage (TotalAnnualAccrualAmount and CalculationBase cannot both be present). When the Fee is a ShareClass Fee (i.e: when ShareClasses contains at least one value), each of the following would be a valid CalculationBase: \"10000.00\", \"ShareClass.GAV\", \"ShareClass.GAV - ShareClass.Fees[ShareClassFeeCode1].Amount\", \"ShareClass.Fees[ShareClassFeeCode1].CalculationBase\". When the Fee is a NonShareClassSpecific Fee (i.e: when ShareClasses contains no values), each of the following would be a valid CalculationBase: \"10000.00\", \"GAV\", \"GAV - Fees[NonClassSpecificFeeCode1].Amount\", \"Fees[NonClassSpecificFeeCode1].CalculationBase\". ")
37
37
  accrual_currency: constr(strict=True, max_length=3, min_length=0) = Field(..., alias="accrualCurrency", description="The accrual currency.")
38
38
  treatment: constr(strict=True, min_length=1) = Field(..., description="The accrual period of the Fee; 'Monthly' or 'Daily'.")
39
39
  total_annual_accrual_amount: Optional[Union[StrictFloat, StrictInt]] = Field(None, alias="totalAnnualAccrualAmount", description="The total annual accrued amount for the Fee. (TotalAnnualAccrualAmount and CalculationBase cannot both be present)")
40
40
  fee_rate_percentage: Optional[Union[StrictFloat, StrictInt]] = Field(None, alias="feeRatePercentage", description="The fee rate percentage. (Required when CalculationBase is present and not compatible with TotalAnnualAccrualAmount)")
41
41
  payable_frequency: constr(strict=True, min_length=1) = Field(..., alias="payableFrequency", description="The payable frequency for the Fee; 'Annually', 'Quarterly' or 'Monthly'.")
42
- business_day_convention: constr(strict=True, min_length=1) = Field(..., alias="businessDayConvention", description="The business day convention to use for Fee calculations on weekends. Supported string values are: [Previous, P, Following, F].")
42
+ business_day_convention: constr(strict=True, min_length=1) = Field(..., alias="businessDayConvention", description="The business day convention to use for Fee calculations on weekends or holidays. Supported string values are: [Previous, P, Following, F, None].")
43
43
  start_date: datetime = Field(..., alias="startDate", description="The start date of the Fee.")
44
44
  end_date: Optional[datetime] = Field(None, alias="endDate", description="The end date of the Fee.")
45
45
  anchor_date: Optional[DayMonth] = Field(None, alias="anchorDate")
46
46
  properties: Optional[Dict[str, ModelProperty]] = Field(None, description="The Fee properties. These will be from the 'Fee' domain.")
47
47
  portfolio_id: Optional[ResourceId] = Field(None, alias="portfolioId")
48
- __properties = ["code", "feeTypeId", "displayName", "description", "origin", "calculationBase", "accrualCurrency", "treatment", "totalAnnualAccrualAmount", "feeRatePercentage", "payableFrequency", "businessDayConvention", "startDate", "endDate", "anchorDate", "properties", "portfolioId"]
48
+ share_classes: Optional[conlist(StrictStr)] = Field(None, alias="shareClasses", description="The short codes of the ShareClasses that the Fee should be applied to. Optional: if this is null or empty, then the Fee will be divided between all the ShareClasses of the Fund according to the capital ratio.")
49
+ __properties = ["code", "feeTypeId", "displayName", "description", "origin", "calculationBase", "accrualCurrency", "treatment", "totalAnnualAccrualAmount", "feeRatePercentage", "payableFrequency", "businessDayConvention", "startDate", "endDate", "anchorDate", "properties", "portfolioId", "shareClasses"]
49
50
 
50
51
  @validator('code')
51
52
  def code_validate_regular_expression(cls, value):
@@ -139,6 +140,11 @@ class FeeRequest(BaseModel):
139
140
  if self.properties is None and "properties" in self.__fields_set__:
140
141
  _dict['properties'] = None
141
142
 
143
+ # set to None if share_classes (nullable) is None
144
+ # and __fields_set__ contains the field
145
+ if self.share_classes is None and "share_classes" in self.__fields_set__:
146
+ _dict['shareClasses'] = None
147
+
142
148
  return _dict
143
149
 
144
150
  @classmethod
@@ -172,6 +178,7 @@ class FeeRequest(BaseModel):
172
178
  )
173
179
  if obj.get("properties") is not None
174
180
  else None,
175
- "portfolio_id": ResourceId.from_dict(obj.get("portfolioId")) if obj.get("portfolioId") is not None else None
181
+ "portfolio_id": ResourceId.from_dict(obj.get("portfolioId")) if obj.get("portfolioId") is not None else None,
182
+ "share_classes": obj.get("shareClasses")
176
183
  })
177
184
  return _obj