lusid-sdk 2.1.254__py3-none-any.whl → 2.1.286__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.

Potentially problematic release.


This version of lusid-sdk might be problematic. Click here for more details.

Files changed (82) hide show
  1. lusid/__init__.py +44 -0
  2. lusid/api/__init__.py +2 -0
  3. lusid/api/fund_configurations_api.py +944 -0
  4. lusid/api/funds_api.py +1 -1
  5. lusid/api/order_management_api.py +161 -2
  6. lusid/configuration.py +1 -1
  7. lusid/models/__init__.py +42 -0
  8. lusid/models/accounting_method.py +3 -0
  9. lusid/models/accumulation_event.py +3 -3
  10. lusid/models/amortisation_event.py +3 -3
  11. lusid/models/bond_coupon_event.py +3 -3
  12. lusid/models/bond_default_event.py +3 -3
  13. lusid/models/bond_principal_event.py +3 -3
  14. lusid/models/cancel_placements_response.py +153 -0
  15. lusid/models/cancelled_placement_result.py +83 -0
  16. lusid/models/capital_distribution_event.py +3 -3
  17. lusid/models/cash.py +93 -0
  18. lusid/models/cash_dividend_event.py +3 -3
  19. lusid/models/cash_flow_event.py +3 -3
  20. lusid/models/close_event.py +3 -3
  21. lusid/models/component_filter.py +85 -0
  22. lusid/models/component_rule.py +77 -0
  23. lusid/models/contract_for_difference.py +4 -2
  24. lusid/models/create_derived_transaction_portfolio_request.py +3 -3
  25. lusid/models/create_transaction_portfolio_request.py +3 -3
  26. lusid/models/dividend_option_event.py +3 -3
  27. lusid/models/dividend_reinvestment_event.py +3 -3
  28. lusid/models/exercise_event.py +3 -3
  29. lusid/models/expiry_event.py +3 -3
  30. lusid/models/fund.py +6 -1
  31. lusid/models/fund_amount.py +69 -0
  32. lusid/models/fund_configuration.py +151 -0
  33. lusid/models/fund_configuration_properties.py +115 -0
  34. lusid/models/fund_configuration_request.py +136 -0
  35. lusid/models/fund_previous_nav.py +69 -0
  36. lusid/models/fund_request.py +6 -1
  37. lusid/models/fund_valuation_point_data.py +160 -0
  38. lusid/models/future_expiry_event.py +100 -0
  39. lusid/models/futures_contract_details.py +9 -2
  40. lusid/models/fx_forward_settlement_event.py +3 -3
  41. lusid/models/informational_error_event.py +3 -3
  42. lusid/models/informational_event.py +3 -3
  43. lusid/models/instrument_event.py +6 -5
  44. lusid/models/instrument_event_type.py +1 -0
  45. lusid/models/lusid_instrument.py +3 -2
  46. lusid/models/market_data_key_rule.py +3 -3
  47. lusid/models/market_data_specific_rule.py +3 -3
  48. lusid/models/market_quote.py +3 -3
  49. lusid/models/maturity_event.py +3 -3
  50. lusid/models/merger_event.py +3 -3
  51. lusid/models/model_selection.py +3 -3
  52. lusid/models/open_event.py +3 -3
  53. lusid/models/paged_resource_list_of_fund_configuration.py +113 -0
  54. lusid/models/portfolio.py +3 -3
  55. lusid/models/portfolio_details.py +3 -3
  56. lusid/models/portfolio_without_href.py +3 -3
  57. lusid/models/previous_fund_valuation_point_data.py +79 -0
  58. lusid/models/previous_nav.py +73 -0
  59. lusid/models/previous_share_class_breakdown.py +81 -0
  60. lusid/models/pricing_model.py +1 -0
  61. lusid/models/property_definition.py +7 -1
  62. lusid/models/quote_series_id.py +4 -20
  63. lusid/models/quote_type.py +3 -0
  64. lusid/models/raw_vendor_event.py +3 -3
  65. lusid/models/reset_event.py +3 -3
  66. lusid/models/reverse_stock_split_event.py +3 -3
  67. lusid/models/scrip_dividend_event.py +3 -3
  68. lusid/models/share_class_amount.py +73 -0
  69. lusid/models/share_class_breakdown.py +171 -0
  70. lusid/models/share_class_data.py +79 -0
  71. lusid/models/share_class_details.py +108 -0
  72. lusid/models/spin_off_event.py +3 -3
  73. lusid/models/stock_dividend_event.py +3 -3
  74. lusid/models/stock_split_event.py +3 -3
  75. lusid/models/transaction_field_map.py +8 -3
  76. lusid/models/transition_event.py +3 -3
  77. lusid/models/trigger_event.py +3 -3
  78. lusid/models/unitisation_data.py +73 -0
  79. lusid/models/valuation_point_data_response.py +30 -9
  80. {lusid_sdk-2.1.254.dist-info → lusid_sdk-2.1.286.dist-info}/METADATA +31 -4
  81. {lusid_sdk-2.1.254.dist-info → lusid_sdk-2.1.286.dist-info}/RECORD +82 -60
  82. {lusid_sdk-2.1.254.dist-info → lusid_sdk-2.1.286.dist-info}/WHEEL +0 -0
@@ -0,0 +1,81 @@
1
+ # coding: utf-8
2
+
3
+ """
4
+ LUSID API
5
+
6
+ FINBOURNE Technology # noqa: E501
7
+
8
+ Contact: info@finbourne.com
9
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
10
+
11
+ Do not edit the class manually.
12
+ """
13
+
14
+
15
+ from __future__ import annotations
16
+ import pprint
17
+ import re # noqa: F401
18
+ import json
19
+
20
+
21
+ from typing import Any, Dict, Optional, Union
22
+ from pydantic.v1 import BaseModel, Field, StrictFloat, StrictInt
23
+ from lusid.models.previous_nav import PreviousNAV
24
+ from lusid.models.unitisation_data import UnitisationData
25
+
26
+ class PreviousShareClassBreakdown(BaseModel):
27
+ """
28
+ The data for a Share Class at the previous valuation point. # noqa: E501
29
+ """
30
+ nav: PreviousNAV = Field(...)
31
+ unitisation: Optional[UnitisationData] = None
32
+ share_class_to_fund_fx_rate: Union[StrictFloat, StrictInt] = Field(..., alias="shareClassToFundFxRate", description="The fx rate from the Share Class currency to the fund currency at this valuation point.")
33
+ __properties = ["nav", "unitisation", "shareClassToFundFxRate"]
34
+
35
+ class Config:
36
+ """Pydantic configuration"""
37
+ allow_population_by_field_name = True
38
+ validate_assignment = True
39
+
40
+ def to_str(self) -> str:
41
+ """Returns the string representation of the model using alias"""
42
+ return pprint.pformat(self.dict(by_alias=True))
43
+
44
+ def to_json(self) -> str:
45
+ """Returns the JSON representation of the model using alias"""
46
+ return json.dumps(self.to_dict())
47
+
48
+ @classmethod
49
+ def from_json(cls, json_str: str) -> PreviousShareClassBreakdown:
50
+ """Create an instance of PreviousShareClassBreakdown from a JSON string"""
51
+ return cls.from_dict(json.loads(json_str))
52
+
53
+ def to_dict(self):
54
+ """Returns the dictionary representation of the model using alias"""
55
+ _dict = self.dict(by_alias=True,
56
+ exclude={
57
+ },
58
+ exclude_none=True)
59
+ # override the default output from pydantic by calling `to_dict()` of nav
60
+ if self.nav:
61
+ _dict['nav'] = self.nav.to_dict()
62
+ # override the default output from pydantic by calling `to_dict()` of unitisation
63
+ if self.unitisation:
64
+ _dict['unitisation'] = self.unitisation.to_dict()
65
+ return _dict
66
+
67
+ @classmethod
68
+ def from_dict(cls, obj: dict) -> PreviousShareClassBreakdown:
69
+ """Create an instance of PreviousShareClassBreakdown from a dict"""
70
+ if obj is None:
71
+ return None
72
+
73
+ if not isinstance(obj, dict):
74
+ return PreviousShareClassBreakdown.parse_obj(obj)
75
+
76
+ _obj = PreviousShareClassBreakdown.parse_obj({
77
+ "nav": PreviousNAV.from_dict(obj.get("nav")) if obj.get("nav") is not None else None,
78
+ "unitisation": UnitisationData.from_dict(obj.get("unitisation")) if obj.get("unitisation") is not None else None,
79
+ "share_class_to_fund_fx_rate": obj.get("shareClassToFundFxRate")
80
+ })
81
+ return _obj
@@ -48,6 +48,7 @@ class PricingModel(str, Enum):
48
48
  BJERKSUNDSTENSLAND1993 = 'BjerksundStensland1993'
49
49
  BONDLOOKUPPRICER = 'BondLookupPricer'
50
50
  FLEXIBLELOANPRICER = 'FlexibleLoanPricer'
51
+ CDSLOOKUPPRICER = 'CdsLookupPricer'
51
52
 
52
53
  @classmethod
53
54
  def from_json(cls, json_str: str) -> PricingModel:
@@ -23,6 +23,7 @@ from pydantic.v1 import BaseModel, Field, StrictBool, StrictStr, conlist, valida
23
23
  from lusid.models.link import Link
24
24
  from lusid.models.model_property import ModelProperty
25
25
  from lusid.models.resource_id import ResourceId
26
+ from lusid.models.staged_modifications_info import StagedModificationsInfo
26
27
  from lusid.models.version import Version
27
28
 
28
29
  class PropertyDefinition(BaseModel):
@@ -48,8 +49,9 @@ class PropertyDefinition(BaseModel):
48
49
  collection_type: Optional[StrictStr] = Field(None, alias="collectionType", description="Describes whether a collection property should behave as a set or as an array.")
49
50
  properties: Optional[Dict[str, ModelProperty]] = Field(None, description="Set of unique property definition properties and associated values to store with the property definition. Each property must be from the 'PropertyDefinition' domain.")
50
51
  version: Optional[Version] = None
52
+ staged_modifications: Optional[StagedModificationsInfo] = Field(None, alias="stagedModifications")
51
53
  links: Optional[conlist(Link)] = None
52
- __properties = ["href", "key", "valueType", "displayName", "dataTypeId", "type", "unitSchema", "domain", "scope", "code", "valueRequired", "lifeTime", "constraintStyle", "propertyDefinitionType", "propertyDescription", "derivationFormula", "collectionType", "properties", "version", "links"]
54
+ __properties = ["href", "key", "valueType", "displayName", "dataTypeId", "type", "unitSchema", "domain", "scope", "code", "valueRequired", "lifeTime", "constraintStyle", "propertyDefinitionType", "propertyDescription", "derivationFormula", "collectionType", "properties", "version", "stagedModifications", "links"]
53
55
 
54
56
  @validator('value_type')
55
57
  def value_type_validate_enum(cls, value):
@@ -150,6 +152,9 @@ class PropertyDefinition(BaseModel):
150
152
  # override the default output from pydantic by calling `to_dict()` of version
151
153
  if self.version:
152
154
  _dict['version'] = self.version.to_dict()
155
+ # override the default output from pydantic by calling `to_dict()` of staged_modifications
156
+ if self.staged_modifications:
157
+ _dict['stagedModifications'] = self.staged_modifications.to_dict()
153
158
  # override the default output from pydantic by calling `to_dict()` of each item in links (list)
154
159
  _items = []
155
160
  if self.links:
@@ -248,6 +253,7 @@ class PropertyDefinition(BaseModel):
248
253
  if obj.get("properties") is not None
249
254
  else None,
250
255
  "version": Version.from_dict(obj.get("version")) if obj.get("version") is not None else None,
256
+ "staged_modifications": StagedModificationsInfo.from_dict(obj.get("stagedModifications")) if obj.get("stagedModifications") is not None else None,
251
257
  "links": [Link.from_dict(_item) for _item in obj.get("links")] if obj.get("links") is not None else None
252
258
  })
253
259
  return _obj
@@ -28,17 +28,14 @@ class QuoteSeriesId(BaseModel):
28
28
  provider: constr(strict=True, min_length=1) = Field(..., description="The platform or vendor that provided the quote. The available values are: Client, DataScope, Lusid, Edi, TraderMade, FactSet, SIX, Bloomberg, Rimes, ICE")
29
29
  price_source: Optional[StrictStr] = Field(None, alias="priceSource", description="The source or originator of the quote, e.g. a bank or financial institution.")
30
30
  instrument_id: constr(strict=True, min_length=1) = Field(..., alias="instrumentId", description="The value of the instrument identifier that uniquely identifies the instrument that the quote is for, e.g. 'BBG00JX0P539'.")
31
- instrument_id_type: Optional[StrictStr] = Field(..., alias="instrumentIdType", description="The type of instrument identifier used to uniquely identify the instrument that the quote is for, e.g. 'Figi'. The available values are: LusidInstrumentId, Figi, RIC, QuotePermId, Isin, CurrencyPair, ClientInternal, Sedol, Cusip")
32
- quote_type: Optional[StrictStr] = Field(..., alias="quoteType", description="The type of the quote. This allows for quotes other than prices e.g. rates or spreads to be used. The available values are: Price, Spread, Rate, LogNormalVol, NormalVol, ParSpread, IsdaSpread, Upfront, Index, Ratio, Delta, PoolFactor, InflationAssumption, DirtyPrice")
31
+ instrument_id_type: StrictStr = Field(..., alias="instrumentIdType", description="The type of instrument identifier used to uniquely identify the instrument that the quote is for, e.g. 'Figi'. The available values are: LusidInstrumentId, Figi, RIC, QuotePermId, Isin, CurrencyPair, ClientInternal, Sedol, Cusip")
32
+ quote_type: StrictStr = Field(..., alias="quoteType", description="The type of the quote. This allows for quotes other than prices e.g. rates or spreads to be used. The available values are: Price, Spread, Rate, LogNormalVol, NormalVol, ParSpread, IsdaSpread, Upfront, Index, Ratio, Delta, PoolFactor, InflationAssumption, DirtyPrice, PrincipalWriteOff, InterestDeferred, InterestShortfall")
33
33
  field: constr(strict=True, min_length=1) = Field(..., description="The field of the quote e.g. bid, mid, ask etc. This should be consistent across a time series of quotes. The allowed values depend on the provider according to the following rules: Client : *Any value is accepted*; DataScope : 'bid', 'mid', 'ask'; Lusid : *Any value is accepted*; Edi : 'bid', 'mid', 'ask', 'open', 'close', 'last'; TraderMade : 'bid', 'mid', 'ask', 'open', 'close', 'high', 'low'; FactSet : 'bid', 'mid', 'ask', 'open', 'close'; SIX : 'bid', 'mid', 'ask', 'open', 'close', 'last', 'referencePrice', 'highPrice', 'lowPrice', 'maxRedemptionPrice', 'maxSubscriptionPrice', 'openPrice', 'bestBidPrice', 'lastBidPrice', 'bestAskPrice', 'lastAskPrice'; Bloomberg : 'bid', 'mid', 'ask', 'open', 'close', 'last'; Rimes : 'bid', 'mid', 'ask', 'open', 'close', 'last'; ICE : 'ask', 'bid'")
34
34
  __properties = ["provider", "priceSource", "instrumentId", "instrumentIdType", "quoteType", "field"]
35
35
 
36
36
  @validator('instrument_id_type')
37
37
  def instrument_id_type_validate_enum(cls, value):
38
38
  """Validates the enum"""
39
- if value is None:
40
- return value
41
-
42
39
  if value not in ('LusidInstrumentId', 'Figi', 'RIC', 'QuotePermId', 'Isin', 'CurrencyPair', 'ClientInternal', 'Sedol', 'Cusip'):
43
40
  raise ValueError("must be one of enum values ('LusidInstrumentId', 'Figi', 'RIC', 'QuotePermId', 'Isin', 'CurrencyPair', 'ClientInternal', 'Sedol', 'Cusip')")
44
41
  return value
@@ -46,11 +43,8 @@ class QuoteSeriesId(BaseModel):
46
43
  @validator('quote_type')
47
44
  def quote_type_validate_enum(cls, value):
48
45
  """Validates the enum"""
49
- if value is None:
50
- return value
51
-
52
- if value not in ('Price', 'Spread', 'Rate', 'LogNormalVol', 'NormalVol', 'ParSpread', 'IsdaSpread', 'Upfront', 'Index', 'Ratio', 'Delta', 'PoolFactor', 'InflationAssumption', 'DirtyPrice'):
53
- raise ValueError("must be one of enum values ('Price', 'Spread', 'Rate', 'LogNormalVol', 'NormalVol', 'ParSpread', 'IsdaSpread', 'Upfront', 'Index', 'Ratio', 'Delta', 'PoolFactor', 'InflationAssumption', 'DirtyPrice')")
46
+ if value not in ('Price', 'Spread', 'Rate', 'LogNormalVol', 'NormalVol', 'ParSpread', 'IsdaSpread', 'Upfront', 'Index', 'Ratio', 'Delta', 'PoolFactor', 'InflationAssumption', 'DirtyPrice', 'PrincipalWriteOff', 'InterestDeferred', 'InterestShortfall'):
47
+ raise ValueError("must be one of enum values ('Price', 'Spread', 'Rate', 'LogNormalVol', 'NormalVol', 'ParSpread', 'IsdaSpread', 'Upfront', 'Index', 'Ratio', 'Delta', 'PoolFactor', 'InflationAssumption', 'DirtyPrice', 'PrincipalWriteOff', 'InterestDeferred', 'InterestShortfall')")
54
48
  return value
55
49
 
56
50
  class Config:
@@ -82,16 +76,6 @@ class QuoteSeriesId(BaseModel):
82
76
  if self.price_source is None and "price_source" in self.__fields_set__:
83
77
  _dict['priceSource'] = None
84
78
 
85
- # set to None if instrument_id_type (nullable) is None
86
- # and __fields_set__ contains the field
87
- if self.instrument_id_type is None and "instrument_id_type" in self.__fields_set__:
88
- _dict['instrumentIdType'] = None
89
-
90
- # set to None if quote_type (nullable) is None
91
- # and __fields_set__ contains the field
92
- if self.quote_type is None and "quote_type" in self.__fields_set__:
93
- _dict['quoteType'] = None
94
-
95
79
  return _dict
96
80
 
97
81
  @classmethod
@@ -43,6 +43,9 @@ class QuoteType(str, Enum):
43
43
  POOLFACTOR = 'PoolFactor'
44
44
  INFLATIONASSUMPTION = 'InflationAssumption'
45
45
  DIRTYPRICE = 'DirtyPrice'
46
+ PRINCIPALWRITEOFF = 'PrincipalWriteOff'
47
+ INTERESTDEFERRED = 'InterestDeferred'
48
+ INTERESTSHORTFALL = 'InterestShortfall'
46
49
 
47
50
  @classmethod
48
51
  def from_json(cls, json_str: str) -> QuoteType:
@@ -30,15 +30,15 @@ class RawVendorEvent(InstrumentEvent):
30
30
  effective_at: datetime = Field(..., alias="effectiveAt", description="The effective date of the event")
31
31
  event_value: LifeCycleEventValue = Field(..., alias="eventValue")
32
32
  event_type: constr(strict=True, min_length=1) = Field(..., alias="eventType", description="What type of internal event does this represent; reset, exercise, amortisation etc.")
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")
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")
34
34
  additional_properties: Dict[str, Any] = {}
35
35
  __properties = ["instrumentEventType", "effectiveAt", "eventValue", "eventType"]
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'):
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')")
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'):
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')")
42
42
  return value
43
43
 
44
44
  class Config:
@@ -30,15 +30,15 @@ class ResetEvent(InstrumentEvent):
30
30
  reset_type: constr(strict=True, min_length=1) = Field(..., alias="resetType", description="The type of the reset; e.g. RIC, Currency-pair")
31
31
  fixing_source: Optional[StrictStr] = Field(None, alias="fixingSource", description="Fixing identification source, if available.")
32
32
  fixing_date: datetime = Field(..., alias="fixingDate", description="The date the reset fixes, or is observed upon.")
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")
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")
34
34
  additional_properties: Dict[str, Any] = {}
35
35
  __properties = ["instrumentEventType", "value", "resetType", "fixingSource", "fixingDate"]
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'):
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')")
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'):
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')")
42
42
  return value
43
43
 
44
44
  class Config:
@@ -32,15 +32,15 @@ class ReverseStockSplitEvent(InstrumentEvent):
32
32
  units_ratio: UnitsRatio = Field(..., alias="unitsRatio")
33
33
  record_date: Optional[datetime] = Field(None, alias="recordDate", description="Date you have to be the holder of record in order to have their shares merged.")
34
34
  announcement_date: Optional[datetime] = Field(None, alias="announcementDate", description="Date the reverse stock split was announced.")
35
- 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")
35
+ 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")
36
36
  additional_properties: Dict[str, Any] = {}
37
37
  __properties = ["instrumentEventType", "paymentDate", "exDate", "unitsRatio", "recordDate", "announcementDate"]
38
38
 
39
39
  @validator('instrument_event_type')
40
40
  def instrument_event_type_validate_enum(cls, value):
41
41
  """Validates the enum"""
42
- 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'):
43
- 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')")
42
+ 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'):
43
+ 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')")
44
44
  return value
45
45
 
46
46
  class Config:
@@ -32,15 +32,15 @@ class ScripDividendEvent(InstrumentEvent):
32
32
  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.")
33
33
  payment_date: datetime = Field(..., alias="paymentDate", description="The date the company pays out dividends to shareholders.")
34
34
  units_ratio: UnitsRatio = Field(..., alias="unitsRatio")
35
- 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")
35
+ 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")
36
36
  additional_properties: Dict[str, Any] = {}
37
37
  __properties = ["instrumentEventType", "announcementDate", "exDate", "recordDate", "paymentDate", "unitsRatio"]
38
38
 
39
39
  @validator('instrument_event_type')
40
40
  def instrument_event_type_validate_enum(cls, value):
41
41
  """Validates the enum"""
42
- 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'):
43
- 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')")
42
+ 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'):
43
+ 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')")
44
44
  return value
45
45
 
46
46
  class Config:
@@ -0,0 +1,73 @@
1
+ # coding: utf-8
2
+
3
+ """
4
+ LUSID API
5
+
6
+ FINBOURNE Technology # noqa: E501
7
+
8
+ Contact: info@finbourne.com
9
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
10
+
11
+ Do not edit the class manually.
12
+ """
13
+
14
+
15
+ from __future__ import annotations
16
+ import pprint
17
+ import re # noqa: F401
18
+ import json
19
+
20
+
21
+ from typing import Any, Dict, Optional
22
+ from pydantic.v1 import BaseModel
23
+ from lusid.models.multi_currency_amounts import MultiCurrencyAmounts
24
+
25
+ class ShareClassAmount(BaseModel):
26
+ """
27
+ ShareClassAmount
28
+ """
29
+ value: Optional[MultiCurrencyAmounts] = None
30
+ __properties = ["value"]
31
+
32
+ class Config:
33
+ """Pydantic configuration"""
34
+ allow_population_by_field_name = True
35
+ validate_assignment = True
36
+
37
+ def to_str(self) -> str:
38
+ """Returns the string representation of the model using alias"""
39
+ return pprint.pformat(self.dict(by_alias=True))
40
+
41
+ def to_json(self) -> str:
42
+ """Returns the JSON representation of the model using alias"""
43
+ return json.dumps(self.to_dict())
44
+
45
+ @classmethod
46
+ def from_json(cls, json_str: str) -> ShareClassAmount:
47
+ """Create an instance of ShareClassAmount from a JSON string"""
48
+ return cls.from_dict(json.loads(json_str))
49
+
50
+ def to_dict(self):
51
+ """Returns the dictionary representation of the model using alias"""
52
+ _dict = self.dict(by_alias=True,
53
+ exclude={
54
+ },
55
+ exclude_none=True)
56
+ # override the default output from pydantic by calling `to_dict()` of value
57
+ if self.value:
58
+ _dict['value'] = self.value.to_dict()
59
+ return _dict
60
+
61
+ @classmethod
62
+ def from_dict(cls, obj: dict) -> ShareClassAmount:
63
+ """Create an instance of ShareClassAmount from a dict"""
64
+ if obj is None:
65
+ return None
66
+
67
+ if not isinstance(obj, dict):
68
+ return ShareClassAmount.parse_obj(obj)
69
+
70
+ _obj = ShareClassAmount.parse_obj({
71
+ "value": MultiCurrencyAmounts.from_dict(obj.get("value")) if obj.get("value") is not None else None
72
+ })
73
+ return _obj
@@ -0,0 +1,171 @@
1
+ # coding: utf-8
2
+
3
+ """
4
+ LUSID API
5
+
6
+ FINBOURNE Technology # noqa: E501
7
+
8
+ Contact: info@finbourne.com
9
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
10
+
11
+ Do not edit the class manually.
12
+ """
13
+
14
+
15
+ from __future__ import annotations
16
+ import pprint
17
+ import re # noqa: F401
18
+ import json
19
+
20
+
21
+ from typing import Any, Dict, Optional, Union
22
+ from pydantic.v1 import BaseModel, Field, StrictFloat, StrictInt
23
+ from lusid.models.fee_accrual import FeeAccrual
24
+ from lusid.models.multi_currency_amounts import MultiCurrencyAmounts
25
+ from lusid.models.previous_share_class_breakdown import PreviousShareClassBreakdown
26
+ from lusid.models.share_class_amount import ShareClassAmount
27
+ from lusid.models.unitisation_data import UnitisationData
28
+
29
+ class ShareClassBreakdown(BaseModel):
30
+ """
31
+ The Valuation Point Data for a Share Class on a specified date. # noqa: E501
32
+ """
33
+ back_out: Dict[str, ShareClassAmount] = Field(..., alias="backOut", description="Bucket of detail for the Valuation Point where data points have been 'backed out'.")
34
+ dealing: Dict[str, ShareClassAmount] = Field(..., description="Bucket of detail for any 'Dealing' that has occured inside the queried period.")
35
+ pn_l: Dict[str, ShareClassAmount] = Field(..., alias="pnL", description="Bucket of detail for 'PnL' that has occured inside the queried period.")
36
+ gav: MultiCurrencyAmounts = Field(...)
37
+ fees: Dict[str, FeeAccrual] = Field(..., description="Bucket of detail for any 'Fees' that have been charged in the selected period.")
38
+ nav: MultiCurrencyAmounts = Field(...)
39
+ unitisation: Optional[UnitisationData] = None
40
+ miscellaneous: Optional[Dict[str, ShareClassAmount]] = Field(None, description="Not used directly by the LUSID engines but serves as a holding area for any custom derived data points that may be useful in, for example, fee calculations).")
41
+ share_class_to_fund_fx_rate: Union[StrictFloat, StrictInt] = Field(..., alias="shareClassToFundFxRate", description="The fx rate from the Share Class currency to the fund currency at this valuation point.")
42
+ capital_ratio: Union[StrictFloat, StrictInt] = Field(..., alias="capitalRatio", description="The proportion of the fund's adjusted beginning equity (ie: the sum of the previous NAV and the net dealing) that is invested in the share class.")
43
+ previous_share_class_breakdown: PreviousShareClassBreakdown = Field(..., alias="previousShareClassBreakdown")
44
+ __properties = ["backOut", "dealing", "pnL", "gav", "fees", "nav", "unitisation", "miscellaneous", "shareClassToFundFxRate", "capitalRatio", "previousShareClassBreakdown"]
45
+
46
+ class Config:
47
+ """Pydantic configuration"""
48
+ allow_population_by_field_name = True
49
+ validate_assignment = True
50
+
51
+ def to_str(self) -> str:
52
+ """Returns the string representation of the model using alias"""
53
+ return pprint.pformat(self.dict(by_alias=True))
54
+
55
+ def to_json(self) -> str:
56
+ """Returns the JSON representation of the model using alias"""
57
+ return json.dumps(self.to_dict())
58
+
59
+ @classmethod
60
+ def from_json(cls, json_str: str) -> ShareClassBreakdown:
61
+ """Create an instance of ShareClassBreakdown from a JSON string"""
62
+ return cls.from_dict(json.loads(json_str))
63
+
64
+ def to_dict(self):
65
+ """Returns the dictionary representation of the model using alias"""
66
+ _dict = self.dict(by_alias=True,
67
+ exclude={
68
+ },
69
+ exclude_none=True)
70
+ # override the default output from pydantic by calling `to_dict()` of each value in back_out (dict)
71
+ _field_dict = {}
72
+ if self.back_out:
73
+ for _key in self.back_out:
74
+ if self.back_out[_key]:
75
+ _field_dict[_key] = self.back_out[_key].to_dict()
76
+ _dict['backOut'] = _field_dict
77
+ # override the default output from pydantic by calling `to_dict()` of each value in dealing (dict)
78
+ _field_dict = {}
79
+ if self.dealing:
80
+ for _key in self.dealing:
81
+ if self.dealing[_key]:
82
+ _field_dict[_key] = self.dealing[_key].to_dict()
83
+ _dict['dealing'] = _field_dict
84
+ # override the default output from pydantic by calling `to_dict()` of each value in pn_l (dict)
85
+ _field_dict = {}
86
+ if self.pn_l:
87
+ for _key in self.pn_l:
88
+ if self.pn_l[_key]:
89
+ _field_dict[_key] = self.pn_l[_key].to_dict()
90
+ _dict['pnL'] = _field_dict
91
+ # override the default output from pydantic by calling `to_dict()` of gav
92
+ if self.gav:
93
+ _dict['gav'] = self.gav.to_dict()
94
+ # override the default output from pydantic by calling `to_dict()` of each value in fees (dict)
95
+ _field_dict = {}
96
+ if self.fees:
97
+ for _key in self.fees:
98
+ if self.fees[_key]:
99
+ _field_dict[_key] = self.fees[_key].to_dict()
100
+ _dict['fees'] = _field_dict
101
+ # override the default output from pydantic by calling `to_dict()` of nav
102
+ if self.nav:
103
+ _dict['nav'] = self.nav.to_dict()
104
+ # override the default output from pydantic by calling `to_dict()` of unitisation
105
+ if self.unitisation:
106
+ _dict['unitisation'] = self.unitisation.to_dict()
107
+ # override the default output from pydantic by calling `to_dict()` of each value in miscellaneous (dict)
108
+ _field_dict = {}
109
+ if self.miscellaneous:
110
+ for _key in self.miscellaneous:
111
+ if self.miscellaneous[_key]:
112
+ _field_dict[_key] = self.miscellaneous[_key].to_dict()
113
+ _dict['miscellaneous'] = _field_dict
114
+ # override the default output from pydantic by calling `to_dict()` of previous_share_class_breakdown
115
+ if self.previous_share_class_breakdown:
116
+ _dict['previousShareClassBreakdown'] = self.previous_share_class_breakdown.to_dict()
117
+ # set to None if miscellaneous (nullable) is None
118
+ # and __fields_set__ contains the field
119
+ if self.miscellaneous is None and "miscellaneous" in self.__fields_set__:
120
+ _dict['miscellaneous'] = None
121
+
122
+ return _dict
123
+
124
+ @classmethod
125
+ def from_dict(cls, obj: dict) -> ShareClassBreakdown:
126
+ """Create an instance of ShareClassBreakdown from a dict"""
127
+ if obj is None:
128
+ return None
129
+
130
+ if not isinstance(obj, dict):
131
+ return ShareClassBreakdown.parse_obj(obj)
132
+
133
+ _obj = ShareClassBreakdown.parse_obj({
134
+ "back_out": dict(
135
+ (_k, ShareClassAmount.from_dict(_v))
136
+ for _k, _v in obj.get("backOut").items()
137
+ )
138
+ if obj.get("backOut") is not None
139
+ else None,
140
+ "dealing": dict(
141
+ (_k, ShareClassAmount.from_dict(_v))
142
+ for _k, _v in obj.get("dealing").items()
143
+ )
144
+ if obj.get("dealing") is not None
145
+ else None,
146
+ "pn_l": dict(
147
+ (_k, ShareClassAmount.from_dict(_v))
148
+ for _k, _v in obj.get("pnL").items()
149
+ )
150
+ if obj.get("pnL") is not None
151
+ else None,
152
+ "gav": MultiCurrencyAmounts.from_dict(obj.get("gav")) if obj.get("gav") is not None else None,
153
+ "fees": dict(
154
+ (_k, FeeAccrual.from_dict(_v))
155
+ for _k, _v in obj.get("fees").items()
156
+ )
157
+ if obj.get("fees") is not None
158
+ else None,
159
+ "nav": MultiCurrencyAmounts.from_dict(obj.get("nav")) if obj.get("nav") is not None else None,
160
+ "unitisation": UnitisationData.from_dict(obj.get("unitisation")) if obj.get("unitisation") is not None else None,
161
+ "miscellaneous": dict(
162
+ (_k, ShareClassAmount.from_dict(_v))
163
+ for _k, _v in obj.get("miscellaneous").items()
164
+ )
165
+ if obj.get("miscellaneous") is not None
166
+ else None,
167
+ "share_class_to_fund_fx_rate": obj.get("shareClassToFundFxRate"),
168
+ "capital_ratio": obj.get("capitalRatio"),
169
+ "previous_share_class_breakdown": PreviousShareClassBreakdown.from_dict(obj.get("previousShareClassBreakdown")) if obj.get("previousShareClassBreakdown") is not None else None
170
+ })
171
+ return _obj
@@ -0,0 +1,79 @@
1
+ # coding: utf-8
2
+
3
+ """
4
+ LUSID API
5
+
6
+ FINBOURNE Technology # noqa: E501
7
+
8
+ Contact: info@finbourne.com
9
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
10
+
11
+ Do not edit the class manually.
12
+ """
13
+
14
+
15
+ from __future__ import annotations
16
+ import pprint
17
+ import re # noqa: F401
18
+ import json
19
+
20
+
21
+ from typing import Any, Dict, Optional
22
+ from pydantic.v1 import BaseModel, Field
23
+ from lusid.models.share_class_breakdown import ShareClassBreakdown
24
+ from lusid.models.share_class_details import ShareClassDetails
25
+
26
+ class ShareClassData(BaseModel):
27
+ """
28
+ The data for a Share Class. Includes Valuation Point Data and instrument information. # noqa: E501
29
+ """
30
+ share_class_breakdown: ShareClassBreakdown = Field(..., alias="shareClassBreakdown")
31
+ share_class_details: Optional[ShareClassDetails] = Field(None, alias="shareClassDetails")
32
+ __properties = ["shareClassBreakdown", "shareClassDetails"]
33
+
34
+ class Config:
35
+ """Pydantic configuration"""
36
+ allow_population_by_field_name = True
37
+ validate_assignment = True
38
+
39
+ def to_str(self) -> str:
40
+ """Returns the string representation of the model using alias"""
41
+ return pprint.pformat(self.dict(by_alias=True))
42
+
43
+ def to_json(self) -> str:
44
+ """Returns the JSON representation of the model using alias"""
45
+ return json.dumps(self.to_dict())
46
+
47
+ @classmethod
48
+ def from_json(cls, json_str: str) -> ShareClassData:
49
+ """Create an instance of ShareClassData from a JSON string"""
50
+ return cls.from_dict(json.loads(json_str))
51
+
52
+ def to_dict(self):
53
+ """Returns the dictionary representation of the model using alias"""
54
+ _dict = self.dict(by_alias=True,
55
+ exclude={
56
+ },
57
+ exclude_none=True)
58
+ # override the default output from pydantic by calling `to_dict()` of share_class_breakdown
59
+ if self.share_class_breakdown:
60
+ _dict['shareClassBreakdown'] = self.share_class_breakdown.to_dict()
61
+ # override the default output from pydantic by calling `to_dict()` of share_class_details
62
+ if self.share_class_details:
63
+ _dict['shareClassDetails'] = self.share_class_details.to_dict()
64
+ return _dict
65
+
66
+ @classmethod
67
+ def from_dict(cls, obj: dict) -> ShareClassData:
68
+ """Create an instance of ShareClassData from a dict"""
69
+ if obj is None:
70
+ return None
71
+
72
+ if not isinstance(obj, dict):
73
+ return ShareClassData.parse_obj(obj)
74
+
75
+ _obj = ShareClassData.parse_obj({
76
+ "share_class_breakdown": ShareClassBreakdown.from_dict(obj.get("shareClassBreakdown")) if obj.get("shareClassBreakdown") is not None else None,
77
+ "share_class_details": ShareClassDetails.from_dict(obj.get("shareClassDetails")) if obj.get("shareClassDetails") is not None else None
78
+ })
79
+ return _obj