lusid-sdk 2.1.401__py3-none-any.whl → 2.1.423__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.
- lusid/__init__.py +44 -12
- lusid/api/__init__.py +2 -2
- lusid/api/abor_api.py +8 -16
- lusid/api/allocations_api.py +2 -2
- lusid/api/chart_of_accounts_api.py +174 -0
- lusid/api/custom_entities_api.py +2 -2
- lusid/api/entities_api.py +180 -0
- lusid/api/{fund_configurations_api.py → fund_configuration_entities_api.py} +1 -1
- lusid/api/group_reconciliations_api.py +1418 -27
- lusid/api/instruments_api.py +6 -6
- lusid/api/legal_entities_api.py +4 -4
- lusid/api/order_graph_api.py +4 -4
- lusid/api/order_management_api.py +25 -12
- lusid/api/persons_api.py +4 -4
- lusid/api/portfolios_api.py +27 -30
- lusid/api/reference_lists_api.py +2 -2
- lusid/api/reference_portfolio_api.py +176 -0
- lusid/api/transaction_portfolios_api.py +2 -2
- lusid/configuration.py +1 -1
- lusid/models/__init__.py +42 -10
- lusid/models/access_metadata_value.py +1 -1
- lusid/models/address_key_list.py +3 -3
- lusid/models/amount.py +69 -0
- lusid/models/batch_upsert_portfolio_access_metadata_request.py +27 -17
- lusid/models/batch_upsert_portfolio_access_metadata_response.py +56 -16
- lusid/models/{metadata_key_value.py → batch_upsert_portfolio_access_metadata_response_item.py} +15 -9
- lusid/models/{component_rule.py → break_code_source.py} +17 -21
- lusid/models/change_interval_with_order_management_detail.py +137 -0
- lusid/models/create_group_reconciliation_definition_request.py +113 -0
- lusid/models/custom_entity_entity.py +146 -0
- lusid/models/decimal_list.py +3 -3
- lusid/models/diary_entry_request.py +10 -1
- lusid/models/fixed_schedule.py +3 -3
- lusid/models/float_schedule.py +4 -4
- lusid/models/flow_conventions.py +7 -1
- lusid/models/fund_configuration.py +44 -17
- lusid/models/fund_configuration_request.py +31 -19
- lusid/models/fund_id_list.py +99 -0
- lusid/models/group_reconciliation_aggregate_attribute_rule.py +2 -2
- lusid/models/group_reconciliation_aggregate_comparison_rule_operand.py +1 -1
- lusid/models/group_reconciliation_core_comparison_rule_operand.py +1 -1
- lusid/models/group_reconciliation_definition.py +136 -0
- lusid/models/group_reconciliation_definition_comparison_ruleset_ids.py +83 -0
- lusid/models/group_reconciliation_definition_currencies.py +71 -0
- lusid/models/group_reconciliation_definition_portfolio_entity_ids.py +86 -0
- lusid/models/group_reconciliation_definition_recipe_ids.py +78 -0
- lusid/models/instrument.py +7 -1
- lusid/models/instrument_definition.py +8 -2
- lusid/models/instrument_list.py +3 -3
- lusid/models/market_data_key_rule.py +5 -3
- lusid/models/market_data_specific_rule.py +5 -3
- lusid/models/merger_event.py +19 -19
- lusid/models/output_transaction.py +9 -2
- lusid/models/paged_resource_list_of_group_reconciliation_comparison_ruleset.py +113 -0
- lusid/models/paged_resource_list_of_group_reconciliation_definition.py +113 -0
- lusid/models/portfolio_group_id_list.py +3 -3
- lusid/models/portfolio_id_list.py +3 -3
- lusid/models/property_list.py +3 -3
- lusid/models/reference_list.py +6 -5
- lusid/models/reference_list_type.py +1 -0
- lusid/models/{resource_list_of_entity_change_item.py → resource_list_of_change_interval_with_order_management_detail.py} +11 -11
- lusid/models/settlement_cycle.py +79 -0
- lusid/models/share_class_dealing_breakdown.py +3 -2
- lusid/models/stock_dividend_event.py +17 -3
- lusid/models/string_list.py +3 -3
- lusid/models/transaction.py +9 -2
- lusid/models/transaction_date_windows.py +85 -0
- lusid/models/transaction_request.py +9 -2
- lusid/models/update_group_reconciliation_comparison_ruleset_request.py +91 -0
- lusid/models/update_group_reconciliation_definition_request.py +107 -0
- lusid/models/upsert_reference_portfolio_constituent_properties_request.py +84 -0
- lusid/models/upsert_reference_portfolio_constituent_properties_response.py +115 -0
- {lusid_sdk-2.1.401.dist-info → lusid_sdk-2.1.423.dist-info}/METADATA +54 -27
- {lusid_sdk-2.1.401.dist-info → lusid_sdk-2.1.423.dist-info}/RECORD +75 -59
- lusid/models/entity_change_item.py +0 -121
- lusid/models/metadata_key_value_response.py +0 -86
- {lusid_sdk-2.1.401.dist-info → lusid_sdk-2.1.423.dist-info}/WHEEL +0 -0
lusid/models/merger_event.py
CHANGED
@@ -32,17 +32,17 @@ class MergerEvent(InstrumentEvent):
|
|
32
32
|
"""
|
33
33
|
announcement_date: Optional[datetime] = Field(None, alias="announcementDate", description="The date the merger is announced.")
|
34
34
|
cash_and_security_offer_elections: Optional[conlist(CashAndSecurityOfferElection)] = Field(None, alias="cashAndSecurityOfferElections", description="List of possible CashAndSecurityOfferElections for this merger event")
|
35
|
-
|
35
|
+
cash_offer_elections: Optional[conlist(CashOfferElection)] = Field(None, alias="cashOfferElections", description="List of possible CashOfferElections for this merger event")
|
36
36
|
ex_date: datetime = Field(..., alias="exDate", description="The first date on which the holder of record of the original shares has entitled ownership of the new shares.")
|
37
37
|
fractional_units_cash_currency: Optional[StrictStr] = Field(None, alias="fractionalUnitsCashCurrency", description="Optional. Used in calculating cash-in-lieu of fractional shares.")
|
38
38
|
fractional_units_cash_price: Optional[Union[StrictFloat, StrictInt]] = Field(None, alias="fractionalUnitsCashPrice", description="Optional. Used in calculating cash-in-lieu of fractional shares.")
|
39
39
|
new_instrument: NewInstrument = Field(..., alias="newInstrument")
|
40
40
|
payment_date: datetime = Field(..., alias="paymentDate", description="Date on which the merger takes place.")
|
41
41
|
record_date: Optional[datetime] = Field(None, alias="recordDate", description="Optional. Date you have to be the holder of record of the original shares in order to receive the new shares.")
|
42
|
-
|
42
|
+
security_offer_elections: Optional[conlist(SecurityOfferElection)] = Field(None, alias="securityOfferElections", description="List of possible SecurityOfferElections for this merger event")
|
43
43
|
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")
|
44
44
|
additional_properties: Dict[str, Any] = {}
|
45
|
-
__properties = ["instrumentEventType", "announcementDate", "cashAndSecurityOfferElections", "
|
45
|
+
__properties = ["instrumentEventType", "announcementDate", "cashAndSecurityOfferElections", "cashOfferElections", "exDate", "fractionalUnitsCashCurrency", "fractionalUnitsCashPrice", "newInstrument", "paymentDate", "recordDate", "securityOfferElections"]
|
46
46
|
|
47
47
|
@validator('instrument_event_type')
|
48
48
|
def instrument_event_type_validate_enum(cls, value):
|
@@ -83,23 +83,23 @@ class MergerEvent(InstrumentEvent):
|
|
83
83
|
if _item:
|
84
84
|
_items.append(_item.to_dict())
|
85
85
|
_dict['cashAndSecurityOfferElections'] = _items
|
86
|
-
# override the default output from pydantic by calling `to_dict()` of each item in
|
86
|
+
# override the default output from pydantic by calling `to_dict()` of each item in cash_offer_elections (list)
|
87
87
|
_items = []
|
88
|
-
if self.
|
89
|
-
for _item in self.
|
88
|
+
if self.cash_offer_elections:
|
89
|
+
for _item in self.cash_offer_elections:
|
90
90
|
if _item:
|
91
91
|
_items.append(_item.to_dict())
|
92
|
-
_dict['
|
92
|
+
_dict['cashOfferElections'] = _items
|
93
93
|
# override the default output from pydantic by calling `to_dict()` of new_instrument
|
94
94
|
if self.new_instrument:
|
95
95
|
_dict['newInstrument'] = self.new_instrument.to_dict()
|
96
|
-
# override the default output from pydantic by calling `to_dict()` of each item in
|
96
|
+
# override the default output from pydantic by calling `to_dict()` of each item in security_offer_elections (list)
|
97
97
|
_items = []
|
98
|
-
if self.
|
99
|
-
for _item in self.
|
98
|
+
if self.security_offer_elections:
|
99
|
+
for _item in self.security_offer_elections:
|
100
100
|
if _item:
|
101
101
|
_items.append(_item.to_dict())
|
102
|
-
_dict['
|
102
|
+
_dict['securityOfferElections'] = _items
|
103
103
|
# puts key-value pairs in additional_properties in the top level
|
104
104
|
if self.additional_properties is not None:
|
105
105
|
for _key, _value in self.additional_properties.items():
|
@@ -115,10 +115,10 @@ class MergerEvent(InstrumentEvent):
|
|
115
115
|
if self.cash_and_security_offer_elections is None and "cash_and_security_offer_elections" in self.__fields_set__:
|
116
116
|
_dict['cashAndSecurityOfferElections'] = None
|
117
117
|
|
118
|
-
# set to None if
|
118
|
+
# set to None if cash_offer_elections (nullable) is None
|
119
119
|
# and __fields_set__ contains the field
|
120
|
-
if self.
|
121
|
-
_dict['
|
120
|
+
if self.cash_offer_elections is None and "cash_offer_elections" in self.__fields_set__:
|
121
|
+
_dict['cashOfferElections'] = None
|
122
122
|
|
123
123
|
# set to None if fractional_units_cash_currency (nullable) is None
|
124
124
|
# and __fields_set__ contains the field
|
@@ -135,10 +135,10 @@ class MergerEvent(InstrumentEvent):
|
|
135
135
|
if self.record_date is None and "record_date" in self.__fields_set__:
|
136
136
|
_dict['recordDate'] = None
|
137
137
|
|
138
|
-
# set to None if
|
138
|
+
# set to None if security_offer_elections (nullable) is None
|
139
139
|
# and __fields_set__ contains the field
|
140
|
-
if self.
|
141
|
-
_dict['
|
140
|
+
if self.security_offer_elections is None and "security_offer_elections" in self.__fields_set__:
|
141
|
+
_dict['securityOfferElections'] = None
|
142
142
|
|
143
143
|
return _dict
|
144
144
|
|
@@ -155,14 +155,14 @@ class MergerEvent(InstrumentEvent):
|
|
155
155
|
"instrument_event_type": obj.get("instrumentEventType"),
|
156
156
|
"announcement_date": obj.get("announcementDate"),
|
157
157
|
"cash_and_security_offer_elections": [CashAndSecurityOfferElection.from_dict(_item) for _item in obj.get("cashAndSecurityOfferElections")] if obj.get("cashAndSecurityOfferElections") is not None else None,
|
158
|
-
"
|
158
|
+
"cash_offer_elections": [CashOfferElection.from_dict(_item) for _item in obj.get("cashOfferElections")] if obj.get("cashOfferElections") is not None else None,
|
159
159
|
"ex_date": obj.get("exDate"),
|
160
160
|
"fractional_units_cash_currency": obj.get("fractionalUnitsCashCurrency"),
|
161
161
|
"fractional_units_cash_price": obj.get("fractionalUnitsCashPrice"),
|
162
162
|
"new_instrument": NewInstrument.from_dict(obj.get("newInstrument")) if obj.get("newInstrument") is not None else None,
|
163
163
|
"payment_date": obj.get("paymentDate"),
|
164
164
|
"record_date": obj.get("recordDate"),
|
165
|
-
"
|
165
|
+
"security_offer_elections": [SecurityOfferElection.from_dict(_item) for _item in obj.get("securityOfferElections")] if obj.get("securityOfferElections") is not None else None
|
166
166
|
})
|
167
167
|
# store additional fields in additional_properties
|
168
168
|
for _key in obj.keys():
|
@@ -54,7 +54,8 @@ class OutputTransaction(BaseModel):
|
|
54
54
|
holding_ids: Optional[conlist(StrictInt)] = Field(None, alias="holdingIds", description="The collection of single identifiers for the holding within the portfolio. The holdingId is constructed from the LusidInstrumentId, sub-holding keys and currrency and is unique within the portfolio.")
|
55
55
|
source_type: Optional[StrictStr] = Field(None, alias="sourceType", description="The type of source that the transaction originated from, eg: InputTransaction, InstrumentEvent, HoldingAdjustment")
|
56
56
|
source_instrument_event_id: Optional[StrictStr] = Field(None, alias="sourceInstrumentEventId", description="The unique ID of the instrument event that the transaction is related to.")
|
57
|
-
|
57
|
+
transaction_group_id: Optional[StrictStr] = Field(None, alias="transactionGroupId", description="The identifier for grouping economic events across multiple transactions")
|
58
|
+
__properties = ["transactionId", "type", "description", "instrumentIdentifiers", "instrumentScope", "instrumentUid", "transactionDate", "settlementDate", "units", "transactionAmount", "transactionPrice", "totalConsideration", "exchangeRate", "transactionToPortfolioRate", "transactionCurrency", "properties", "counterpartyId", "source", "transactionStatus", "entryDateTime", "cancelDateTime", "realisedGainLoss", "holdingIds", "sourceType", "sourceInstrumentEventId", "transactionGroupId"]
|
58
59
|
|
59
60
|
@validator('transaction_status')
|
60
61
|
def transaction_status_validate_enum(cls, value):
|
@@ -175,6 +176,11 @@ class OutputTransaction(BaseModel):
|
|
175
176
|
if self.source_instrument_event_id is None and "source_instrument_event_id" in self.__fields_set__:
|
176
177
|
_dict['sourceInstrumentEventId'] = None
|
177
178
|
|
179
|
+
# set to None if transaction_group_id (nullable) is None
|
180
|
+
# and __fields_set__ contains the field
|
181
|
+
if self.transaction_group_id is None and "transaction_group_id" in self.__fields_set__:
|
182
|
+
_dict['transactionGroupId'] = None
|
183
|
+
|
178
184
|
return _dict
|
179
185
|
|
180
186
|
@classmethod
|
@@ -216,6 +222,7 @@ class OutputTransaction(BaseModel):
|
|
216
222
|
"realised_gain_loss": [RealisedGainLoss.from_dict(_item) for _item in obj.get("realisedGainLoss")] if obj.get("realisedGainLoss") is not None else None,
|
217
223
|
"holding_ids": obj.get("holdingIds"),
|
218
224
|
"source_type": obj.get("sourceType"),
|
219
|
-
"source_instrument_event_id": obj.get("sourceInstrumentEventId")
|
225
|
+
"source_instrument_event_id": obj.get("sourceInstrumentEventId"),
|
226
|
+
"transaction_group_id": obj.get("transactionGroupId")
|
220
227
|
})
|
221
228
|
return _obj
|
@@ -0,0 +1,113 @@
|
|
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.group_reconciliation_comparison_ruleset import GroupReconciliationComparisonRuleset
|
24
|
+
from lusid.models.link import Link
|
25
|
+
|
26
|
+
class PagedResourceListOfGroupReconciliationComparisonRuleset(BaseModel):
|
27
|
+
"""
|
28
|
+
PagedResourceListOfGroupReconciliationComparisonRuleset
|
29
|
+
"""
|
30
|
+
next_page: Optional[StrictStr] = Field(None, alias="nextPage")
|
31
|
+
previous_page: Optional[StrictStr] = Field(None, alias="previousPage")
|
32
|
+
values: conlist(GroupReconciliationComparisonRuleset) = Field(...)
|
33
|
+
href: Optional[StrictStr] = None
|
34
|
+
links: Optional[conlist(Link)] = None
|
35
|
+
__properties = ["nextPage", "previousPage", "values", "href", "links"]
|
36
|
+
|
37
|
+
class Config:
|
38
|
+
"""Pydantic configuration"""
|
39
|
+
allow_population_by_field_name = True
|
40
|
+
validate_assignment = True
|
41
|
+
|
42
|
+
def to_str(self) -> str:
|
43
|
+
"""Returns the string representation of the model using alias"""
|
44
|
+
return pprint.pformat(self.dict(by_alias=True))
|
45
|
+
|
46
|
+
def to_json(self) -> str:
|
47
|
+
"""Returns the JSON representation of the model using alias"""
|
48
|
+
return json.dumps(self.to_dict())
|
49
|
+
|
50
|
+
@classmethod
|
51
|
+
def from_json(cls, json_str: str) -> PagedResourceListOfGroupReconciliationComparisonRuleset:
|
52
|
+
"""Create an instance of PagedResourceListOfGroupReconciliationComparisonRuleset from a JSON string"""
|
53
|
+
return cls.from_dict(json.loads(json_str))
|
54
|
+
|
55
|
+
def to_dict(self):
|
56
|
+
"""Returns the dictionary representation of the model using alias"""
|
57
|
+
_dict = self.dict(by_alias=True,
|
58
|
+
exclude={
|
59
|
+
},
|
60
|
+
exclude_none=True)
|
61
|
+
# override the default output from pydantic by calling `to_dict()` of each item in values (list)
|
62
|
+
_items = []
|
63
|
+
if self.values:
|
64
|
+
for _item in self.values:
|
65
|
+
if _item:
|
66
|
+
_items.append(_item.to_dict())
|
67
|
+
_dict['values'] = _items
|
68
|
+
# override the default output from pydantic by calling `to_dict()` of each item in links (list)
|
69
|
+
_items = []
|
70
|
+
if self.links:
|
71
|
+
for _item in self.links:
|
72
|
+
if _item:
|
73
|
+
_items.append(_item.to_dict())
|
74
|
+
_dict['links'] = _items
|
75
|
+
# set to None if next_page (nullable) is None
|
76
|
+
# and __fields_set__ contains the field
|
77
|
+
if self.next_page is None and "next_page" in self.__fields_set__:
|
78
|
+
_dict['nextPage'] = None
|
79
|
+
|
80
|
+
# set to None if previous_page (nullable) is None
|
81
|
+
# and __fields_set__ contains the field
|
82
|
+
if self.previous_page is None and "previous_page" in self.__fields_set__:
|
83
|
+
_dict['previousPage'] = None
|
84
|
+
|
85
|
+
# set to None if href (nullable) is None
|
86
|
+
# and __fields_set__ contains the field
|
87
|
+
if self.href is None and "href" in self.__fields_set__:
|
88
|
+
_dict['href'] = None
|
89
|
+
|
90
|
+
# set to None if links (nullable) is None
|
91
|
+
# and __fields_set__ contains the field
|
92
|
+
if self.links is None and "links" in self.__fields_set__:
|
93
|
+
_dict['links'] = None
|
94
|
+
|
95
|
+
return _dict
|
96
|
+
|
97
|
+
@classmethod
|
98
|
+
def from_dict(cls, obj: dict) -> PagedResourceListOfGroupReconciliationComparisonRuleset:
|
99
|
+
"""Create an instance of PagedResourceListOfGroupReconciliationComparisonRuleset from a dict"""
|
100
|
+
if obj is None:
|
101
|
+
return None
|
102
|
+
|
103
|
+
if not isinstance(obj, dict):
|
104
|
+
return PagedResourceListOfGroupReconciliationComparisonRuleset.parse_obj(obj)
|
105
|
+
|
106
|
+
_obj = PagedResourceListOfGroupReconciliationComparisonRuleset.parse_obj({
|
107
|
+
"next_page": obj.get("nextPage"),
|
108
|
+
"previous_page": obj.get("previousPage"),
|
109
|
+
"values": [GroupReconciliationComparisonRuleset.from_dict(_item) for _item in obj.get("values")] if obj.get("values") is not None else None,
|
110
|
+
"href": obj.get("href"),
|
111
|
+
"links": [Link.from_dict(_item) for _item in obj.get("links")] if obj.get("links") is not None else None
|
112
|
+
})
|
113
|
+
return _obj
|
@@ -0,0 +1,113 @@
|
|
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.group_reconciliation_definition import GroupReconciliationDefinition
|
24
|
+
from lusid.models.link import Link
|
25
|
+
|
26
|
+
class PagedResourceListOfGroupReconciliationDefinition(BaseModel):
|
27
|
+
"""
|
28
|
+
PagedResourceListOfGroupReconciliationDefinition
|
29
|
+
"""
|
30
|
+
next_page: Optional[StrictStr] = Field(None, alias="nextPage")
|
31
|
+
previous_page: Optional[StrictStr] = Field(None, alias="previousPage")
|
32
|
+
values: conlist(GroupReconciliationDefinition) = Field(...)
|
33
|
+
href: Optional[StrictStr] = None
|
34
|
+
links: Optional[conlist(Link)] = None
|
35
|
+
__properties = ["nextPage", "previousPage", "values", "href", "links"]
|
36
|
+
|
37
|
+
class Config:
|
38
|
+
"""Pydantic configuration"""
|
39
|
+
allow_population_by_field_name = True
|
40
|
+
validate_assignment = True
|
41
|
+
|
42
|
+
def to_str(self) -> str:
|
43
|
+
"""Returns the string representation of the model using alias"""
|
44
|
+
return pprint.pformat(self.dict(by_alias=True))
|
45
|
+
|
46
|
+
def to_json(self) -> str:
|
47
|
+
"""Returns the JSON representation of the model using alias"""
|
48
|
+
return json.dumps(self.to_dict())
|
49
|
+
|
50
|
+
@classmethod
|
51
|
+
def from_json(cls, json_str: str) -> PagedResourceListOfGroupReconciliationDefinition:
|
52
|
+
"""Create an instance of PagedResourceListOfGroupReconciliationDefinition from a JSON string"""
|
53
|
+
return cls.from_dict(json.loads(json_str))
|
54
|
+
|
55
|
+
def to_dict(self):
|
56
|
+
"""Returns the dictionary representation of the model using alias"""
|
57
|
+
_dict = self.dict(by_alias=True,
|
58
|
+
exclude={
|
59
|
+
},
|
60
|
+
exclude_none=True)
|
61
|
+
# override the default output from pydantic by calling `to_dict()` of each item in values (list)
|
62
|
+
_items = []
|
63
|
+
if self.values:
|
64
|
+
for _item in self.values:
|
65
|
+
if _item:
|
66
|
+
_items.append(_item.to_dict())
|
67
|
+
_dict['values'] = _items
|
68
|
+
# override the default output from pydantic by calling `to_dict()` of each item in links (list)
|
69
|
+
_items = []
|
70
|
+
if self.links:
|
71
|
+
for _item in self.links:
|
72
|
+
if _item:
|
73
|
+
_items.append(_item.to_dict())
|
74
|
+
_dict['links'] = _items
|
75
|
+
# set to None if next_page (nullable) is None
|
76
|
+
# and __fields_set__ contains the field
|
77
|
+
if self.next_page is None and "next_page" in self.__fields_set__:
|
78
|
+
_dict['nextPage'] = None
|
79
|
+
|
80
|
+
# set to None if previous_page (nullable) is None
|
81
|
+
# and __fields_set__ contains the field
|
82
|
+
if self.previous_page is None and "previous_page" in self.__fields_set__:
|
83
|
+
_dict['previousPage'] = None
|
84
|
+
|
85
|
+
# set to None if href (nullable) is None
|
86
|
+
# and __fields_set__ contains the field
|
87
|
+
if self.href is None and "href" in self.__fields_set__:
|
88
|
+
_dict['href'] = None
|
89
|
+
|
90
|
+
# set to None if links (nullable) is None
|
91
|
+
# and __fields_set__ contains the field
|
92
|
+
if self.links is None and "links" in self.__fields_set__:
|
93
|
+
_dict['links'] = None
|
94
|
+
|
95
|
+
return _dict
|
96
|
+
|
97
|
+
@classmethod
|
98
|
+
def from_dict(cls, obj: dict) -> PagedResourceListOfGroupReconciliationDefinition:
|
99
|
+
"""Create an instance of PagedResourceListOfGroupReconciliationDefinition from a dict"""
|
100
|
+
if obj is None:
|
101
|
+
return None
|
102
|
+
|
103
|
+
if not isinstance(obj, dict):
|
104
|
+
return PagedResourceListOfGroupReconciliationDefinition.parse_obj(obj)
|
105
|
+
|
106
|
+
_obj = PagedResourceListOfGroupReconciliationDefinition.parse_obj({
|
107
|
+
"next_page": obj.get("nextPage"),
|
108
|
+
"previous_page": obj.get("previousPage"),
|
109
|
+
"values": [GroupReconciliationDefinition.from_dict(_item) for _item in obj.get("values")] if obj.get("values") is not None else None,
|
110
|
+
"href": obj.get("href"),
|
111
|
+
"links": [Link.from_dict(_item) for _item in obj.get("links")] if obj.get("links") is not None else None
|
112
|
+
})
|
113
|
+
return _obj
|
@@ -28,15 +28,15 @@ class PortfolioGroupIdList(ReferenceList):
|
|
28
28
|
PortfolioGroupIdList
|
29
29
|
"""
|
30
30
|
values: conlist(ResourceId, max_items=100) = Field(...)
|
31
|
-
reference_list_type: StrictStr = Field(..., alias="referenceListType", description="The reference list values. The available values are: PortfolioGroupIdList, PortfolioIdList, AddressKeyList, StringList, InstrumentList, DecimalList, PropertyList")
|
31
|
+
reference_list_type: StrictStr = Field(..., alias="referenceListType", description="The reference list values. The available values are: PortfolioGroupIdList, PortfolioIdList, AddressKeyList, StringList, InstrumentList, DecimalList, PropertyList, FundIdList")
|
32
32
|
additional_properties: Dict[str, Any] = {}
|
33
33
|
__properties = ["referenceListType", "values"]
|
34
34
|
|
35
35
|
@validator('reference_list_type')
|
36
36
|
def reference_list_type_validate_enum(cls, value):
|
37
37
|
"""Validates the enum"""
|
38
|
-
if value not in ('PortfolioGroupIdList', 'PortfolioIdList', 'AddressKeyList', 'StringList', 'InstrumentList', 'DecimalList', 'PropertyList'):
|
39
|
-
raise ValueError("must be one of enum values ('PortfolioGroupIdList', 'PortfolioIdList', 'AddressKeyList', 'StringList', 'InstrumentList', 'DecimalList', 'PropertyList')")
|
38
|
+
if value not in ('PortfolioGroupIdList', 'PortfolioIdList', 'AddressKeyList', 'StringList', 'InstrumentList', 'DecimalList', 'PropertyList', 'FundIdList'):
|
39
|
+
raise ValueError("must be one of enum values ('PortfolioGroupIdList', 'PortfolioIdList', 'AddressKeyList', 'StringList', 'InstrumentList', 'DecimalList', 'PropertyList', 'FundIdList')")
|
40
40
|
return value
|
41
41
|
|
42
42
|
class Config:
|
@@ -28,15 +28,15 @@ class PortfolioIdList(ReferenceList):
|
|
28
28
|
PortfolioIdList
|
29
29
|
"""
|
30
30
|
values: conlist(ResourceId, max_items=100) = Field(...)
|
31
|
-
reference_list_type: StrictStr = Field(..., alias="referenceListType", description="The reference list values. The available values are: PortfolioGroupIdList, PortfolioIdList, AddressKeyList, StringList, InstrumentList, DecimalList, PropertyList")
|
31
|
+
reference_list_type: StrictStr = Field(..., alias="referenceListType", description="The reference list values. The available values are: PortfolioGroupIdList, PortfolioIdList, AddressKeyList, StringList, InstrumentList, DecimalList, PropertyList, FundIdList")
|
32
32
|
additional_properties: Dict[str, Any] = {}
|
33
33
|
__properties = ["referenceListType", "values"]
|
34
34
|
|
35
35
|
@validator('reference_list_type')
|
36
36
|
def reference_list_type_validate_enum(cls, value):
|
37
37
|
"""Validates the enum"""
|
38
|
-
if value not in ('PortfolioGroupIdList', 'PortfolioIdList', 'AddressKeyList', 'StringList', 'InstrumentList', 'DecimalList', 'PropertyList'):
|
39
|
-
raise ValueError("must be one of enum values ('PortfolioGroupIdList', 'PortfolioIdList', 'AddressKeyList', 'StringList', 'InstrumentList', 'DecimalList', 'PropertyList')")
|
38
|
+
if value not in ('PortfolioGroupIdList', 'PortfolioIdList', 'AddressKeyList', 'StringList', 'InstrumentList', 'DecimalList', 'PropertyList', 'FundIdList'):
|
39
|
+
raise ValueError("must be one of enum values ('PortfolioGroupIdList', 'PortfolioIdList', 'AddressKeyList', 'StringList', 'InstrumentList', 'DecimalList', 'PropertyList', 'FundIdList')")
|
40
40
|
return value
|
41
41
|
|
42
42
|
class Config:
|
lusid/models/property_list.py
CHANGED
@@ -28,15 +28,15 @@ class PropertyList(ReferenceList):
|
|
28
28
|
PropertyList
|
29
29
|
"""
|
30
30
|
values: conlist(ModelProperty, max_items=100, min_items=0) = Field(...)
|
31
|
-
reference_list_type: StrictStr = Field(..., alias="referenceListType", description="The reference list values. The available values are: PortfolioGroupIdList, PortfolioIdList, AddressKeyList, StringList, InstrumentList, DecimalList, PropertyList")
|
31
|
+
reference_list_type: StrictStr = Field(..., alias="referenceListType", description="The reference list values. The available values are: PortfolioGroupIdList, PortfolioIdList, AddressKeyList, StringList, InstrumentList, DecimalList, PropertyList, FundIdList")
|
32
32
|
additional_properties: Dict[str, Any] = {}
|
33
33
|
__properties = ["referenceListType", "values"]
|
34
34
|
|
35
35
|
@validator('reference_list_type')
|
36
36
|
def reference_list_type_validate_enum(cls, value):
|
37
37
|
"""Validates the enum"""
|
38
|
-
if value not in ('PortfolioGroupIdList', 'PortfolioIdList', 'AddressKeyList', 'StringList', 'InstrumentList', 'DecimalList', 'PropertyList'):
|
39
|
-
raise ValueError("must be one of enum values ('PortfolioGroupIdList', 'PortfolioIdList', 'AddressKeyList', 'StringList', 'InstrumentList', 'DecimalList', 'PropertyList')")
|
38
|
+
if value not in ('PortfolioGroupIdList', 'PortfolioIdList', 'AddressKeyList', 'StringList', 'InstrumentList', 'DecimalList', 'PropertyList', 'FundIdList'):
|
39
|
+
raise ValueError("must be one of enum values ('PortfolioGroupIdList', 'PortfolioIdList', 'AddressKeyList', 'StringList', 'InstrumentList', 'DecimalList', 'PropertyList', 'FundIdList')")
|
40
40
|
return value
|
41
41
|
|
42
42
|
class Config:
|
lusid/models/reference_list.py
CHANGED
@@ -26,14 +26,14 @@ class ReferenceList(BaseModel):
|
|
26
26
|
"""
|
27
27
|
ReferenceList
|
28
28
|
"""
|
29
|
-
reference_list_type: StrictStr = Field(..., alias="referenceListType", description="The reference list values. The available values are: PortfolioGroupIdList, PortfolioIdList, AddressKeyList, StringList, InstrumentList, DecimalList, PropertyList")
|
29
|
+
reference_list_type: StrictStr = Field(..., alias="referenceListType", description="The reference list values. The available values are: PortfolioGroupIdList, PortfolioIdList, AddressKeyList, StringList, InstrumentList, DecimalList, PropertyList, FundIdList")
|
30
30
|
__properties = ["referenceListType"]
|
31
31
|
|
32
32
|
@validator('reference_list_type')
|
33
33
|
def reference_list_type_validate_enum(cls, value):
|
34
34
|
"""Validates the enum"""
|
35
|
-
if value not in ('PortfolioGroupIdList', 'PortfolioIdList', 'AddressKeyList', 'StringList', 'InstrumentList', 'DecimalList', 'PropertyList'):
|
36
|
-
raise ValueError("must be one of enum values ('PortfolioGroupIdList', 'PortfolioIdList', 'AddressKeyList', 'StringList', 'InstrumentList', 'DecimalList', 'PropertyList')")
|
35
|
+
if value not in ('PortfolioGroupIdList', 'PortfolioIdList', 'AddressKeyList', 'StringList', 'InstrumentList', 'DecimalList', 'PropertyList', 'FundIdList'):
|
36
|
+
raise ValueError("must be one of enum values ('PortfolioGroupIdList', 'PortfolioIdList', 'AddressKeyList', 'StringList', 'InstrumentList', 'DecimalList', 'PropertyList', 'FundIdList')")
|
37
37
|
return value
|
38
38
|
|
39
39
|
class Config:
|
@@ -48,6 +48,7 @@ class ReferenceList(BaseModel):
|
|
48
48
|
__discriminator_value_class_map = {
|
49
49
|
'AddressKeyList': 'AddressKeyList',
|
50
50
|
'DecimalList': 'DecimalList',
|
51
|
+
'FundIdList': 'FundIdList',
|
51
52
|
'InstrumentList': 'InstrumentList',
|
52
53
|
'PortfolioGroupIdList': 'PortfolioGroupIdList',
|
53
54
|
'PortfolioIdList': 'PortfolioIdList',
|
@@ -73,7 +74,7 @@ class ReferenceList(BaseModel):
|
|
73
74
|
return json.dumps(self.to_dict())
|
74
75
|
|
75
76
|
@classmethod
|
76
|
-
def from_json(cls, json_str: str) -> Union(AddressKeyList, DecimalList, InstrumentList, PortfolioGroupIdList, PortfolioIdList, PropertyList, StringList):
|
77
|
+
def from_json(cls, json_str: str) -> Union(AddressKeyList, DecimalList, FundIdList, InstrumentList, PortfolioGroupIdList, PortfolioIdList, PropertyList, StringList):
|
77
78
|
"""Create an instance of ReferenceList from a JSON string"""
|
78
79
|
return cls.from_dict(json.loads(json_str))
|
79
80
|
|
@@ -86,7 +87,7 @@ class ReferenceList(BaseModel):
|
|
86
87
|
return _dict
|
87
88
|
|
88
89
|
@classmethod
|
89
|
-
def from_dict(cls, obj: dict) -> Union(AddressKeyList, DecimalList, InstrumentList, PortfolioGroupIdList, PortfolioIdList, PropertyList, StringList):
|
90
|
+
def from_dict(cls, obj: dict) -> Union(AddressKeyList, DecimalList, FundIdList, InstrumentList, PortfolioGroupIdList, PortfolioIdList, PropertyList, StringList):
|
90
91
|
"""Create an instance of ReferenceList from a dict"""
|
91
92
|
# look up the object type based on discriminator mapping
|
92
93
|
object_type = cls.get_discriminator_value(obj)
|
@@ -20,14 +20,14 @@ import json
|
|
20
20
|
|
21
21
|
from typing import Any, Dict, List, Optional
|
22
22
|
from pydantic.v1 import BaseModel, Field, StrictStr, conlist
|
23
|
-
from lusid.models.
|
23
|
+
from lusid.models.change_interval_with_order_management_detail import ChangeIntervalWithOrderManagementDetail
|
24
24
|
from lusid.models.link import Link
|
25
25
|
|
26
|
-
class
|
26
|
+
class ResourceListOfChangeIntervalWithOrderManagementDetail(BaseModel):
|
27
27
|
"""
|
28
|
-
|
28
|
+
ResourceListOfChangeIntervalWithOrderManagementDetail
|
29
29
|
"""
|
30
|
-
values: conlist(
|
30
|
+
values: conlist(ChangeIntervalWithOrderManagementDetail) = Field(...)
|
31
31
|
href: Optional[StrictStr] = None
|
32
32
|
links: Optional[conlist(Link)] = None
|
33
33
|
next_page: Optional[StrictStr] = Field(None, alias="nextPage")
|
@@ -48,8 +48,8 @@ class ResourceListOfEntityChangeItem(BaseModel):
|
|
48
48
|
return json.dumps(self.to_dict())
|
49
49
|
|
50
50
|
@classmethod
|
51
|
-
def from_json(cls, json_str: str) ->
|
52
|
-
"""Create an instance of
|
51
|
+
def from_json(cls, json_str: str) -> ResourceListOfChangeIntervalWithOrderManagementDetail:
|
52
|
+
"""Create an instance of ResourceListOfChangeIntervalWithOrderManagementDetail from a JSON string"""
|
53
53
|
return cls.from_dict(json.loads(json_str))
|
54
54
|
|
55
55
|
def to_dict(self):
|
@@ -95,16 +95,16 @@ class ResourceListOfEntityChangeItem(BaseModel):
|
|
95
95
|
return _dict
|
96
96
|
|
97
97
|
@classmethod
|
98
|
-
def from_dict(cls, obj: dict) ->
|
99
|
-
"""Create an instance of
|
98
|
+
def from_dict(cls, obj: dict) -> ResourceListOfChangeIntervalWithOrderManagementDetail:
|
99
|
+
"""Create an instance of ResourceListOfChangeIntervalWithOrderManagementDetail from a dict"""
|
100
100
|
if obj is None:
|
101
101
|
return None
|
102
102
|
|
103
103
|
if not isinstance(obj, dict):
|
104
|
-
return
|
104
|
+
return ResourceListOfChangeIntervalWithOrderManagementDetail.parse_obj(obj)
|
105
105
|
|
106
|
-
_obj =
|
107
|
-
"values": [
|
106
|
+
_obj = ResourceListOfChangeIntervalWithOrderManagementDetail.parse_obj({
|
107
|
+
"values": [ChangeIntervalWithOrderManagementDetail.from_dict(_item) for _item in obj.get("values")] if obj.get("values") is not None else None,
|
108
108
|
"href": obj.get("href"),
|
109
109
|
"links": [Link.from_dict(_item) for _item in obj.get("links")] if obj.get("links") is not None else None,
|
110
110
|
"next_page": obj.get("nextPage"),
|
@@ -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, List
|
22
|
+
from pydantic.v1 import BaseModel, Field, conint, conlist
|
23
|
+
from lusid.models.resource_id import ResourceId
|
24
|
+
|
25
|
+
class SettlementCycle(BaseModel):
|
26
|
+
"""
|
27
|
+
The settlement cycle for an instrument # noqa: E501
|
28
|
+
"""
|
29
|
+
business_day_offset: conint(strict=True, le=2147483647, ge=0) = Field(..., alias="businessDayOffset")
|
30
|
+
calendars: conlist(ResourceId) = Field(...)
|
31
|
+
__properties = ["businessDayOffset", "calendars"]
|
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) -> SettlementCycle:
|
48
|
+
"""Create an instance of SettlementCycle 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
|
+
# override the default output from pydantic by calling `to_dict()` of each item in calendars (list)
|
58
|
+
_items = []
|
59
|
+
if self.calendars:
|
60
|
+
for _item in self.calendars:
|
61
|
+
if _item:
|
62
|
+
_items.append(_item.to_dict())
|
63
|
+
_dict['calendars'] = _items
|
64
|
+
return _dict
|
65
|
+
|
66
|
+
@classmethod
|
67
|
+
def from_dict(cls, obj: dict) -> SettlementCycle:
|
68
|
+
"""Create an instance of SettlementCycle from a dict"""
|
69
|
+
if obj is None:
|
70
|
+
return None
|
71
|
+
|
72
|
+
if not isinstance(obj, dict):
|
73
|
+
return SettlementCycle.parse_obj(obj)
|
74
|
+
|
75
|
+
_obj = SettlementCycle.parse_obj({
|
76
|
+
"business_day_offset": obj.get("businessDayOffset"),
|
77
|
+
"calendars": [ResourceId.from_dict(_item) for _item in obj.get("calendars")] if obj.get("calendars") is not None else None
|
78
|
+
})
|
79
|
+
return _obj
|
@@ -20,6 +20,7 @@ import json
|
|
20
20
|
|
21
21
|
from typing import Any, Dict
|
22
22
|
from pydantic.v1 import BaseModel, Field
|
23
|
+
from lusid.models.amount import Amount
|
23
24
|
from lusid.models.share_class_amount import ShareClassAmount
|
24
25
|
|
25
26
|
class ShareClassDealingBreakdown(BaseModel):
|
@@ -27,7 +28,7 @@ class ShareClassDealingBreakdown(BaseModel):
|
|
27
28
|
The breakdown of Dealing for a Share Class. # noqa: E501
|
28
29
|
"""
|
29
30
|
class_dealing: Dict[str, ShareClassAmount] = Field(..., alias="classDealing", description="Bucket of detail for any 'Dealing' specific to the share class that has occured inside the queried period.")
|
30
|
-
class_dealing_units: Dict[str,
|
31
|
+
class_dealing_units: Dict[str, Amount] = Field(..., alias="classDealingUnits", description="Bucket of detail for any 'Dealing' units specific to the share class that has occured inside the queried period.")
|
31
32
|
__properties = ["classDealing", "classDealingUnits"]
|
32
33
|
|
33
34
|
class Config:
|
@@ -87,7 +88,7 @@ class ShareClassDealingBreakdown(BaseModel):
|
|
87
88
|
if obj.get("classDealing") is not None
|
88
89
|
else None,
|
89
90
|
"class_dealing_units": dict(
|
90
|
-
(_k,
|
91
|
+
(_k, Amount.from_dict(_v))
|
91
92
|
for _k, _v in obj.get("classDealingUnits").items()
|
92
93
|
)
|
93
94
|
if obj.get("classDealingUnits") is not None
|