lusid-sdk 2.1.242__py3-none-any.whl → 2.1.320__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 +66 -0
  2. lusid/api/__init__.py +2 -0
  3. lusid/api/compliance_api.py +191 -0
  4. lusid/api/entities_api.py +360 -0
  5. lusid/api/fee_types_api.py +143 -0
  6. lusid/api/fund_configurations_api.py +944 -0
  7. lusid/api/funds_api.py +1 -1
  8. lusid/api/order_management_api.py +479 -1
  9. lusid/api/scopes_api.py +38 -9
  10. lusid/configuration.py +1 -1
  11. lusid/extensions/configuration_loaders.py +9 -1
  12. lusid/models/__init__.py +64 -0
  13. lusid/models/accounting_method.py +3 -0
  14. lusid/models/accumulation_event.py +3 -3
  15. lusid/models/amortisation_event.py +3 -3
  16. lusid/models/bond_coupon_event.py +3 -3
  17. lusid/models/bond_default_event.py +3 -3
  18. lusid/models/bond_principal_event.py +3 -3
  19. lusid/models/cancel_orders_response.py +153 -0
  20. lusid/models/cancel_placements_response.py +153 -0
  21. lusid/models/cancelled_order_result.py +73 -0
  22. lusid/models/cancelled_placement_result.py +83 -0
  23. lusid/models/capital_distribution_event.py +3 -3
  24. lusid/models/cash.py +93 -0
  25. lusid/models/cash_dividend_event.py +3 -3
  26. lusid/models/cash_flow_event.py +3 -3
  27. lusid/models/close_event.py +3 -3
  28. lusid/models/compliance_run_configuration.py +73 -0
  29. lusid/models/component_filter.py +85 -0
  30. lusid/models/component_rule.py +77 -0
  31. lusid/models/contract_for_difference.py +4 -2
  32. lusid/models/create_derived_transaction_portfolio_request.py +3 -3
  33. lusid/models/create_transaction_portfolio_request.py +3 -3
  34. lusid/models/dependency_source_filter.py +9 -2
  35. lusid/models/dividend_option_event.py +3 -3
  36. lusid/models/dividend_reinvestment_event.py +3 -3
  37. lusid/models/exercise_event.py +3 -3
  38. lusid/models/expiry_event.py +3 -3
  39. lusid/models/fee_transaction_template_specification.py +79 -0
  40. lusid/models/fund.py +6 -1
  41. lusid/models/fund_amount.py +69 -0
  42. lusid/models/fund_configuration.py +151 -0
  43. lusid/models/fund_configuration_properties.py +115 -0
  44. lusid/models/fund_configuration_request.py +136 -0
  45. lusid/models/fund_pnl_breakdown.py +110 -0
  46. lusid/models/fund_previous_nav.py +69 -0
  47. lusid/models/fund_request.py +6 -1
  48. lusid/models/fund_valuation_point_data.py +152 -0
  49. lusid/models/future_expiry_event.py +100 -0
  50. lusid/models/futures_contract_details.py +9 -2
  51. lusid/models/fx_forward_settlement_event.py +3 -3
  52. lusid/models/informational_error_event.py +3 -3
  53. lusid/models/informational_event.py +3 -3
  54. lusid/models/instrument_entity.py +146 -0
  55. lusid/models/instrument_event.py +6 -5
  56. lusid/models/instrument_event_type.py +1 -0
  57. lusid/models/lusid_instrument.py +3 -2
  58. lusid/models/market_data_key_rule.py +3 -3
  59. lusid/models/market_data_specific_rule.py +3 -3
  60. lusid/models/market_quote.py +3 -3
  61. lusid/models/maturity_event.py +3 -3
  62. lusid/models/merger_event.py +3 -3
  63. lusid/models/model_selection.py +3 -3
  64. lusid/models/open_event.py +3 -3
  65. lusid/models/paged_resource_list_of_fund_configuration.py +113 -0
  66. lusid/models/placement_update_request.py +116 -0
  67. lusid/models/portfolio.py +3 -3
  68. lusid/models/portfolio_details.py +3 -3
  69. lusid/models/portfolio_without_href.py +3 -3
  70. lusid/models/pre_trade_configuration.py +69 -0
  71. lusid/models/previous_fund_valuation_point_data.py +79 -0
  72. lusid/models/previous_nav.py +73 -0
  73. lusid/models/previous_share_class_breakdown.py +81 -0
  74. lusid/models/pricing_model.py +1 -0
  75. lusid/models/property_definition.py +7 -1
  76. lusid/models/property_definition_entity.py +146 -0
  77. lusid/models/quote_series_id.py +4 -20
  78. lusid/models/quote_type.py +3 -0
  79. lusid/models/raw_vendor_event.py +3 -3
  80. lusid/models/reset_event.py +3 -3
  81. lusid/models/reverse_stock_split_event.py +3 -3
  82. lusid/models/scrip_dividend_event.py +3 -3
  83. lusid/models/share_class_amount.py +73 -0
  84. lusid/models/share_class_breakdown.py +163 -0
  85. lusid/models/share_class_data.py +79 -0
  86. lusid/models/share_class_details.py +108 -0
  87. lusid/models/share_class_pnl_breakdown.py +110 -0
  88. lusid/models/spin_off_event.py +3 -3
  89. lusid/models/staged_modification.py +8 -1
  90. lusid/models/stock_dividend_event.py +3 -3
  91. lusid/models/stock_split_event.py +3 -3
  92. lusid/models/template_field.py +3 -1
  93. lusid/models/transaction_configuration_movement_data.py +2 -2
  94. lusid/models/transaction_configuration_movement_data_request.py +1 -1
  95. lusid/models/transaction_field_map.py +8 -3
  96. lusid/models/transaction_type_movement.py +2 -2
  97. lusid/models/transition_event.py +3 -3
  98. lusid/models/trigger_event.py +3 -3
  99. lusid/models/unitisation_data.py +73 -0
  100. lusid/models/update_placements_response.py +153 -0
  101. lusid/models/valuation_point_data_response.py +30 -9
  102. {lusid_sdk-2.1.242.dist-info → lusid_sdk-2.1.320.dist-info}/METADATA +53 -215
  103. {lusid_sdk-2.1.242.dist-info → lusid_sdk-2.1.320.dist-info}/RECORD +104 -71
  104. {lusid_sdk-2.1.242.dist-info → lusid_sdk-2.1.320.dist-info}/WHEEL +0 -0
@@ -18,7 +18,7 @@ import re # noqa: F401
18
18
  import json
19
19
 
20
20
 
21
- from typing import Any, Dict
21
+ from typing import Any, Dict, Optional
22
22
  from pydantic.v1 import BaseModel, Field, constr
23
23
  from lusid.models.transaction_currency_and_amount import TransactionCurrencyAndAmount
24
24
  from lusid.models.transaction_price_and_type import TransactionPriceAndType
@@ -34,9 +34,9 @@ class TransactionFieldMap(BaseModel):
34
34
  transaction_date: constr(strict=True, max_length=1024, min_length=0) = Field(..., alias="transactionDate")
35
35
  settlement_date: constr(strict=True, max_length=1024, min_length=0) = Field(..., alias="settlementDate")
36
36
  units: constr(strict=True, max_length=1024, min_length=0) = Field(...)
37
- transaction_price: TransactionPriceAndType = Field(..., alias="transactionPrice")
37
+ transaction_price: Optional[TransactionPriceAndType] = Field(None, alias="transactionPrice")
38
38
  transaction_currency: constr(strict=True, max_length=1024, min_length=0) = Field(..., alias="transactionCurrency")
39
- exchange_rate: constr(strict=True, max_length=1024, min_length=0) = Field(..., alias="exchangeRate")
39
+ exchange_rate: Optional[constr(strict=True, max_length=1024, min_length=0)] = Field(None, alias="exchangeRate")
40
40
  total_consideration: TransactionCurrencyAndAmount = Field(..., alias="totalConsideration")
41
41
  __properties = ["transactionId", "type", "source", "instrument", "transactionDate", "settlementDate", "units", "transactionPrice", "transactionCurrency", "exchangeRate", "totalConsideration"]
42
42
 
@@ -70,6 +70,11 @@ class TransactionFieldMap(BaseModel):
70
70
  # override the default output from pydantic by calling `to_dict()` of total_consideration
71
71
  if self.total_consideration:
72
72
  _dict['totalConsideration'] = self.total_consideration.to_dict()
73
+ # set to None if exchange_rate (nullable) is None
74
+ # and __fields_set__ contains the field
75
+ if self.exchange_rate is None and "exchange_rate" in self.__fields_set__:
76
+ _dict['exchangeRate'] = None
77
+
73
78
  return _dict
74
79
 
75
80
  @classmethod
@@ -27,13 +27,13 @@ class TransactionTypeMovement(BaseModel):
27
27
  """
28
28
  TransactionTypeMovement
29
29
  """
30
- movement_types: constr(strict=True, min_length=1) = Field(..., alias="movementTypes", description="Movement types determine the impact of the movement on the holdings")
30
+ movement_types: constr(strict=True, min_length=1) = Field(..., alias="movementTypes", description="Movement types determine the impact of the movement on the holdings. The available values are: Settlement, Traded, StockMovement, FutureCash, Commitment, Receivable, CashSettlement, CashForward, CashCommitment, CashReceivable, Accrual, CashAccrual, ForwardFx, CashFxForward, UnsettledCashTypes, Carry, CarryAsPnl, VariationMargin, Capital, Fee.")
31
31
  side: constr(strict=True, max_length=64, min_length=1) = Field(..., description="The Side determines which of the fields from our transaction are used to generate the Movement. Side1 means the 'security' side of the transaction, ie the Instrument and Units; Side2 means the 'cash' side, ie the Total Consideration")
32
32
  direction: StrictInt = Field(..., description=" A multiplier to apply to Transaction amounts; the values are -1 to indicate to reverse the signs and 1 to indicate to use the signed values from the Transaction directly. For a typical Transaction with unsigned values, 1 means increase, -1 means decrease")
33
33
  properties: Optional[Dict[str, PerpetualProperty]] = Field(None, description="The properties associated with the underlying Movement")
34
34
  mappings: Optional[conlist(TransactionTypePropertyMapping, max_items=5000)] = Field(None, description="This allows you to map a transaction property to a property on the underlying holding")
35
35
  name: Optional[constr(strict=True, max_length=512, min_length=1)] = Field(None, description="The movement name (optional)")
36
- movement_options: Optional[conlist(StrictStr)] = Field(None, alias="movementOptions", description="Allows extra specifications for the movement. The options currently available are 'DirectAdjustment' and 'IncludesTradedInterest'. A movement type of 'StockMovement' with an option of 'DirectAdjusment' will allow you to adjust the units of a holding without affecting its cost base. You will, therefore, be able to reflect the impact of a stock split by loading a Transaction.")
36
+ movement_options: Optional[conlist(StrictStr)] = Field(None, alias="movementOptions", description="Allows extra specifications for the movement. The options currently available are 'DirectAdjustment', 'IncludesTradedInterest' and 'Virtual' (works only with the movement type 'StockMovement'). A movement type of 'StockMovement' with an option of 'DirectAdjusment' will allow you to adjust the units of a holding without affecting its cost base. You will, therefore, be able to reflect the impact of a stock split by loading a Transaction.")
37
37
  settlement_date_override: Optional[StrictStr] = Field(None, alias="settlementDateOverride", description="Optional property key that must be in the Transaction domain when specified. When the movement is processed and the transaction has this property set to a valid date, then the property value will override the SettlementDate of the transaction.")
38
38
  condition: Optional[constr(strict=True, max_length=16384, min_length=0)] = Field(None, description="The condition that the transaction must satisfy to generate the movement, such as: Portfolio.BaseCurrency eq 'GBP'. The condition can contain fields and properties from transactions and portfolios. If no condition is provided, the movement will apply for all transactions of this type.")
39
39
  __properties = ["movementTypes", "side", "direction", "properties", "mappings", "name", "movementOptions", "settlementDateOverride", "condition"]
@@ -34,15 +34,15 @@ class TransitionEvent(InstrumentEvent):
34
34
  payment_date: Optional[datetime] = Field(None, alias="paymentDate", description="The payment date of the corporate action")
35
35
  input_transition: Optional[InputTransition] = Field(None, alias="inputTransition")
36
36
  output_transitions: Optional[conlist(OutputTransition)] = Field(None, alias="outputTransitions", description="The resulting transitions from this event")
37
- 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")
37
+ 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")
38
38
  additional_properties: Dict[str, Any] = {}
39
39
  __properties = ["instrumentEventType", "announcementDate", "exDate", "recordDate", "paymentDate", "inputTransition", "outputTransitions"]
40
40
 
41
41
  @validator('instrument_event_type')
42
42
  def instrument_event_type_validate_enum(cls, value):
43
43
  """Validates the enum"""
44
- 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'):
45
- 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')")
44
+ 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'):
45
+ 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')")
46
46
  return value
47
47
 
48
48
  class Config:
@@ -31,15 +31,15 @@ class TriggerEvent(InstrumentEvent):
31
31
  trigger_direction: constr(strict=True, min_length=1) = Field(..., alias="triggerDirection", description="The direction of the trigger; valid options are Up and Down")
32
32
  trigger_date: datetime = Field(..., alias="triggerDate", description="The date the trigger happens at.")
33
33
  maturity_date: datetime = Field(..., alias="maturityDate", description="The date the trigger takes effect.")
34
- 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")
34
+ 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")
35
35
  additional_properties: Dict[str, Any] = {}
36
36
  __properties = ["instrumentEventType", "level", "triggerType", "triggerDirection", "triggerDate", "maturityDate"]
37
37
 
38
38
  @validator('instrument_event_type')
39
39
  def instrument_event_type_validate_enum(cls, value):
40
40
  """Validates the enum"""
41
- 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'):
42
- 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')")
41
+ 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'):
42
+ 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')")
43
43
  return value
44
44
 
45
45
  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, Union
22
+ from pydantic.v1 import BaseModel, Field, StrictFloat, StrictInt
23
+
24
+ class UnitisationData(BaseModel):
25
+ """
26
+ UnitisationData
27
+ """
28
+ shares_in_issue: Union[StrictFloat, StrictInt] = Field(..., alias="sharesInIssue", description="The number of shares in issue at a valuation point.")
29
+ unit_price: Union[StrictFloat, StrictInt] = Field(..., alias="unitPrice", description="The price of one unit of the share class at a valuation point.")
30
+ net_dealing_units: Union[StrictFloat, StrictInt] = Field(..., alias="netDealingUnits", description="The net dealing in units for the share class at a valuation point. This could be the sum of negative redemptions (in units) and positive subscriptions (in units).")
31
+ __properties = ["sharesInIssue", "unitPrice", "netDealingUnits"]
32
+
33
+ class Config:
34
+ """Pydantic configuration"""
35
+ allow_population_by_field_name = True
36
+ validate_assignment = True
37
+
38
+ def to_str(self) -> str:
39
+ """Returns the string representation of the model using alias"""
40
+ return pprint.pformat(self.dict(by_alias=True))
41
+
42
+ def to_json(self) -> str:
43
+ """Returns the JSON representation of the model using alias"""
44
+ return json.dumps(self.to_dict())
45
+
46
+ @classmethod
47
+ def from_json(cls, json_str: str) -> UnitisationData:
48
+ """Create an instance of UnitisationData from a JSON string"""
49
+ return cls.from_dict(json.loads(json_str))
50
+
51
+ def to_dict(self):
52
+ """Returns the dictionary representation of the model using alias"""
53
+ _dict = self.dict(by_alias=True,
54
+ exclude={
55
+ },
56
+ exclude_none=True)
57
+ return _dict
58
+
59
+ @classmethod
60
+ def from_dict(cls, obj: dict) -> UnitisationData:
61
+ """Create an instance of UnitisationData from a dict"""
62
+ if obj is None:
63
+ return None
64
+
65
+ if not isinstance(obj, dict):
66
+ return UnitisationData.parse_obj(obj)
67
+
68
+ _obj = UnitisationData.parse_obj({
69
+ "shares_in_issue": obj.get("sharesInIssue"),
70
+ "unit_price": obj.get("unitPrice"),
71
+ "net_dealing_units": obj.get("netDealingUnits")
72
+ })
73
+ return _obj
@@ -0,0 +1,153 @@
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, List, Optional
22
+ from pydantic.v1 import BaseModel, Field, StrictStr, conlist
23
+ from lusid.models.error_detail import ErrorDetail
24
+ from lusid.models.link import Link
25
+ from lusid.models.placement import Placement
26
+ from lusid.models.response_meta_data import ResponseMetaData
27
+
28
+ class UpdatePlacementsResponse(BaseModel):
29
+ """
30
+ UpdatePlacementsResponse
31
+ """
32
+ href: Optional[StrictStr] = Field(None, description="The specific Uniform Resource Identifier (URI) for this resource at the requested effective and asAt datetime.")
33
+ values: Optional[Dict[str, Placement]] = Field(None, description="The placements which have been successfully updated.")
34
+ failed: Optional[Dict[str, ErrorDetail]] = Field(None, description="The placements that could not be updated, along with a reason for their failure.")
35
+ metadata: Optional[Dict[str, conlist(ResponseMetaData)]] = Field(None, description="Meta data associated with the update event.")
36
+ links: Optional[conlist(Link)] = None
37
+ __properties = ["href", "values", "failed", "metadata", "links"]
38
+
39
+ class Config:
40
+ """Pydantic configuration"""
41
+ allow_population_by_field_name = True
42
+ validate_assignment = True
43
+
44
+ def to_str(self) -> str:
45
+ """Returns the string representation of the model using alias"""
46
+ return pprint.pformat(self.dict(by_alias=True))
47
+
48
+ def to_json(self) -> str:
49
+ """Returns the JSON representation of the model using alias"""
50
+ return json.dumps(self.to_dict())
51
+
52
+ @classmethod
53
+ def from_json(cls, json_str: str) -> UpdatePlacementsResponse:
54
+ """Create an instance of UpdatePlacementsResponse from a JSON string"""
55
+ return cls.from_dict(json.loads(json_str))
56
+
57
+ def to_dict(self):
58
+ """Returns the dictionary representation of the model using alias"""
59
+ _dict = self.dict(by_alias=True,
60
+ exclude={
61
+ },
62
+ exclude_none=True)
63
+ # override the default output from pydantic by calling `to_dict()` of each value in values (dict)
64
+ _field_dict = {}
65
+ if self.values:
66
+ for _key in self.values:
67
+ if self.values[_key]:
68
+ _field_dict[_key] = self.values[_key].to_dict()
69
+ _dict['values'] = _field_dict
70
+ # override the default output from pydantic by calling `to_dict()` of each value in failed (dict)
71
+ _field_dict = {}
72
+ if self.failed:
73
+ for _key in self.failed:
74
+ if self.failed[_key]:
75
+ _field_dict[_key] = self.failed[_key].to_dict()
76
+ _dict['failed'] = _field_dict
77
+ # override the default output from pydantic by calling `to_dict()` of each value in metadata (dict of array)
78
+ _field_dict_of_array = {}
79
+ if self.metadata:
80
+ for _key in self.metadata:
81
+ if self.metadata[_key]:
82
+ _field_dict_of_array[_key] = [
83
+ _item.to_dict() for _item in self.metadata[_key]
84
+ ]
85
+ _dict['metadata'] = _field_dict_of_array
86
+ # override the default output from pydantic by calling `to_dict()` of each item in links (list)
87
+ _items = []
88
+ if self.links:
89
+ for _item in self.links:
90
+ if _item:
91
+ _items.append(_item.to_dict())
92
+ _dict['links'] = _items
93
+ # set to None if href (nullable) is None
94
+ # and __fields_set__ contains the field
95
+ if self.href is None and "href" in self.__fields_set__:
96
+ _dict['href'] = None
97
+
98
+ # set to None if values (nullable) is None
99
+ # and __fields_set__ contains the field
100
+ if self.values is None and "values" in self.__fields_set__:
101
+ _dict['values'] = None
102
+
103
+ # set to None if failed (nullable) is None
104
+ # and __fields_set__ contains the field
105
+ if self.failed is None and "failed" in self.__fields_set__:
106
+ _dict['failed'] = None
107
+
108
+ # set to None if metadata (nullable) is None
109
+ # and __fields_set__ contains the field
110
+ if self.metadata is None and "metadata" in self.__fields_set__:
111
+ _dict['metadata'] = None
112
+
113
+ # set to None if links (nullable) is None
114
+ # and __fields_set__ contains the field
115
+ if self.links is None and "links" in self.__fields_set__:
116
+ _dict['links'] = None
117
+
118
+ return _dict
119
+
120
+ @classmethod
121
+ def from_dict(cls, obj: dict) -> UpdatePlacementsResponse:
122
+ """Create an instance of UpdatePlacementsResponse from a dict"""
123
+ if obj is None:
124
+ return None
125
+
126
+ if not isinstance(obj, dict):
127
+ return UpdatePlacementsResponse.parse_obj(obj)
128
+
129
+ _obj = UpdatePlacementsResponse.parse_obj({
130
+ "href": obj.get("href"),
131
+ "values": dict(
132
+ (_k, Placement.from_dict(_v))
133
+ for _k, _v in obj.get("values").items()
134
+ )
135
+ if obj.get("values") is not None
136
+ else None,
137
+ "failed": dict(
138
+ (_k, ErrorDetail.from_dict(_v))
139
+ for _k, _v in obj.get("failed").items()
140
+ )
141
+ if obj.get("failed") is not None
142
+ else None,
143
+ "metadata": dict(
144
+ (_k,
145
+ [ResponseMetaData.from_dict(_item) for _item in _v]
146
+ if _v is not None
147
+ else None
148
+ )
149
+ for _k, _v in obj.get("metadata").items()
150
+ ),
151
+ "links": [Link.from_dict(_item) for _item in obj.get("links")] if obj.get("links") is not None else None
152
+ })
153
+ return _obj
@@ -21,24 +21,28 @@ import json
21
21
  from typing import Any, Dict, List, Optional, Union
22
22
  from pydantic.v1 import BaseModel, Field, StrictFloat, StrictInt, StrictStr, conlist, constr
23
23
  from lusid.models.fee_accrual import FeeAccrual
24
+ from lusid.models.fund_valuation_point_data import FundValuationPointData
24
25
  from lusid.models.link import Link
26
+ from lusid.models.share_class_data import ShareClassData
25
27
 
26
28
  class ValuationPointDataResponse(BaseModel):
27
29
  """
28
30
  The Valuation Point Data Response for the Fund and specified date. # noqa: E501
29
31
  """
30
32
  href: Optional[StrictStr] = Field(None, description="The specific Uniform Resource Identifier (URI) for this resource at the requested effective and asAt datetime.")
31
- type: constr(strict=True, min_length=1) = Field(..., description="The Type of the associated Diary Entry ('PeriodBoundary','ValuationPoint','Other' or 'Adhoc' when a diary Entry wasn't used).")
33
+ type: constr(strict=True, min_length=1) = Field(..., description="The Type of the associated Diary Entry ('PeriodBoundary','ValuationPoint','Other' or 'Adhoc' when a diary entry wasn't used).")
32
34
  status: constr(strict=True, min_length=1) = Field(..., description="The Status of the associated Diary Entry ('Estimate','Final','Candidate' or 'Unofficial').")
33
- backout: Dict[str, Union[StrictFloat, StrictInt]] = Field(..., description="Bucket of detail for the Valuation Point, where data points have been 'backed out'.")
34
- dealing: Dict[str, Union[StrictFloat, StrictInt]] = Field(..., description="Bucket of detail for any 'Dealing' that has occured inside the queried period.")
35
- pn_l: Dict[str, Union[StrictFloat, StrictInt]] = Field(..., alias="pnL", description="Bucket of detail for 'PnL' that has occured inside the queried period.")
36
- gav: Union[StrictFloat, StrictInt] = Field(..., description="The Gross Asset Value of the Fund at the Period end. This is effectively a summation of all Trial balance entries linked to accounts of types 'Asset' and 'Liabilities'.")
37
- fees: Dict[str, FeeAccrual] = Field(..., description="Bucket of detail for any 'Fees' that have been charged in the selected period.")
38
- nav: Union[StrictFloat, StrictInt] = Field(..., description="The Net Asset Value of the Fund at the Period end. This represents the GAV with any fees applied in the period.")
39
- previous_nav: Union[StrictFloat, StrictInt] = Field(..., alias="previousNav", description="The Net Asset Value of the Fund at the End of the last Period.")
35
+ backout: Dict[str, Union[StrictFloat, StrictInt]] = Field(..., description="DEPRECATED. Bucket of detail for the Valuation Point, where data points have been 'backed out'.")
36
+ dealing: Dict[str, Union[StrictFloat, StrictInt]] = Field(..., description="DEPRECATED. Bucket of detail for any 'Dealing' that has occured inside the queried period.")
37
+ pn_l: Dict[str, Union[StrictFloat, StrictInt]] = Field(..., alias="pnL", description="DEPRECATED. Bucket of detail for 'PnL' that has occured inside the queried period.")
38
+ gav: Union[StrictFloat, StrictInt] = Field(..., description="DEPRECATED. The Gross Asset Value of the Fund at the Period end. This is effectively a summation of all Trial balance entries linked to accounts of types 'Asset' and 'Liabilities'.")
39
+ fees: Dict[str, FeeAccrual] = Field(..., description="DEPRECATED. Bucket of detail for any 'Fees' that have been charged in the selected period.")
40
+ nav: Union[StrictFloat, StrictInt] = Field(..., description="DEPRECATED. The Net Asset Value of the Fund at the Period end. This represents the GAV with any fees applied in the period.")
41
+ previous_nav: Union[StrictFloat, StrictInt] = Field(..., alias="previousNav", description="DEPRECATED. The Net Asset Value of the Fund at the End of the last Period.")
42
+ fund_valuation_point_data: FundValuationPointData = Field(..., alias="fundValuationPointData")
43
+ share_class_data: Dict[str, ShareClassData] = Field(..., alias="shareClassData", description="The data for all share classes in fund. Share classes are identified by their short codes.")
40
44
  links: Optional[conlist(Link)] = None
41
- __properties = ["href", "type", "status", "backout", "dealing", "pnL", "gav", "fees", "nav", "previousNav", "links"]
45
+ __properties = ["href", "type", "status", "backout", "dealing", "pnL", "gav", "fees", "nav", "previousNav", "fundValuationPointData", "shareClassData", "links"]
42
46
 
43
47
  class Config:
44
48
  """Pydantic configuration"""
@@ -71,6 +75,16 @@ class ValuationPointDataResponse(BaseModel):
71
75
  if self.fees[_key]:
72
76
  _field_dict[_key] = self.fees[_key].to_dict()
73
77
  _dict['fees'] = _field_dict
78
+ # override the default output from pydantic by calling `to_dict()` of fund_valuation_point_data
79
+ if self.fund_valuation_point_data:
80
+ _dict['fundValuationPointData'] = self.fund_valuation_point_data.to_dict()
81
+ # override the default output from pydantic by calling `to_dict()` of each value in share_class_data (dict)
82
+ _field_dict = {}
83
+ if self.share_class_data:
84
+ for _key in self.share_class_data:
85
+ if self.share_class_data[_key]:
86
+ _field_dict[_key] = self.share_class_data[_key].to_dict()
87
+ _dict['shareClassData'] = _field_dict
74
88
  # override the default output from pydantic by calling `to_dict()` of each item in links (list)
75
89
  _items = []
76
90
  if self.links:
@@ -115,6 +129,13 @@ class ValuationPointDataResponse(BaseModel):
115
129
  else None,
116
130
  "nav": obj.get("nav"),
117
131
  "previous_nav": obj.get("previousNav"),
132
+ "fund_valuation_point_data": FundValuationPointData.from_dict(obj.get("fundValuationPointData")) if obj.get("fundValuationPointData") is not None else None,
133
+ "share_class_data": dict(
134
+ (_k, ShareClassData.from_dict(_v))
135
+ for _k, _v in obj.get("shareClassData").items()
136
+ )
137
+ if obj.get("shareClassData") is not None
138
+ else None,
118
139
  "links": [Link.from_dict(_item) for _item in obj.get("links")] if obj.get("links") is not None else None
119
140
  })
120
141
  return _obj