lusid-sdk 2.1.320__py3-none-any.whl → 2.1.351__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 +30 -0
- lusid/api/__init__.py +3 -1
- lusid/api/data_types_api.py +160 -0
- lusid/api/entities_api.py +172 -0
- lusid/api/funds_api.py +212 -0
- lusid/api/order_management_api.py +160 -0
- lusid/api/workspace_api.py +3433 -0
- lusid/configuration.py +16 -7
- lusid/models/__init__.py +28 -0
- lusid/models/close_period_diary_entry_request.py +1 -1
- lusid/models/data_type.py +8 -8
- lusid/models/data_type_entity.py +131 -0
- lusid/models/diary_entry.py +1 -1
- lusid/models/diary_entry_request.py +1 -1
- lusid/models/fund_configuration.py +6 -6
- lusid/models/fund_configuration_request.py +6 -6
- lusid/models/instrument_resolution_detail.py +19 -5
- lusid/models/journal_entry_line.py +5 -3
- lusid/models/order_update_request.py +116 -0
- lusid/models/paged_resource_list_of_valuation_point_overview.py +113 -0
- lusid/models/paged_resource_list_of_workspace.py +113 -0
- lusid/models/paged_resource_list_of_workspace_item.py +113 -0
- lusid/models/posting_module_rule.py +7 -32
- lusid/models/quote_access_metadata_rule_id.py +2 -2
- lusid/models/quote_series_id.py +2 -2
- lusid/models/scrip_dividend_event.py +17 -3
- lusid/models/share_class_breakdown.py +5 -13
- lusid/models/share_class_dealing_breakdown.py +96 -0
- lusid/models/share_class_details.py +5 -3
- lusid/models/stock_split_event.py +18 -4
- lusid/models/update_orders_response.py +153 -0
- lusid/models/valuation_point_data_response.py +1 -1
- lusid/models/valuation_point_overview.py +125 -0
- lusid/models/workspace.py +92 -0
- lusid/models/workspace_creation_request.py +78 -0
- lusid/models/workspace_item.py +105 -0
- lusid/models/workspace_item_creation_request.py +91 -0
- lusid/models/workspace_item_update_request.py +82 -0
- lusid/models/workspace_update_request.py +69 -0
- {lusid_sdk-2.1.320.dist-info → lusid_sdk-2.1.351.dist-info}/METADATA +39 -1
- {lusid_sdk-2.1.320.dist-info → lusid_sdk-2.1.351.dist-info}/RECORD +42 -27
- {lusid_sdk-2.1.320.dist-info → lusid_sdk-2.1.351.dist-info}/WHEEL +0 -0
@@ -24,6 +24,7 @@ from lusid.models.fee_accrual import FeeAccrual
|
|
24
24
|
from lusid.models.multi_currency_amounts import MultiCurrencyAmounts
|
25
25
|
from lusid.models.previous_share_class_breakdown import PreviousShareClassBreakdown
|
26
26
|
from lusid.models.share_class_amount import ShareClassAmount
|
27
|
+
from lusid.models.share_class_dealing_breakdown import ShareClassDealingBreakdown
|
27
28
|
from lusid.models.share_class_pnl_breakdown import ShareClassPnlBreakdown
|
28
29
|
from lusid.models.unitisation_data import UnitisationData
|
29
30
|
|
@@ -32,7 +33,7 @@ class ShareClassBreakdown(BaseModel):
|
|
32
33
|
The Valuation Point Data for a Share Class on a specified date. # noqa: E501
|
33
34
|
"""
|
34
35
|
back_out: Dict[str, ShareClassAmount] = Field(..., alias="backOut", description="Bucket of detail for the Valuation Point where data points have been 'backed out'.")
|
35
|
-
dealing:
|
36
|
+
dealing: ShareClassDealingBreakdown = Field(...)
|
36
37
|
pn_l: ShareClassPnlBreakdown = Field(..., alias="pnL")
|
37
38
|
gav: MultiCurrencyAmounts = Field(...)
|
38
39
|
fees: Dict[str, FeeAccrual] = Field(..., description="Bucket of detail for any 'Fees' that have been charged in the selected period.")
|
@@ -75,13 +76,9 @@ class ShareClassBreakdown(BaseModel):
|
|
75
76
|
if self.back_out[_key]:
|
76
77
|
_field_dict[_key] = self.back_out[_key].to_dict()
|
77
78
|
_dict['backOut'] = _field_dict
|
78
|
-
# override the default output from pydantic by calling `to_dict()` of
|
79
|
-
_field_dict = {}
|
79
|
+
# override the default output from pydantic by calling `to_dict()` of dealing
|
80
80
|
if self.dealing:
|
81
|
-
|
82
|
-
if self.dealing[_key]:
|
83
|
-
_field_dict[_key] = self.dealing[_key].to_dict()
|
84
|
-
_dict['dealing'] = _field_dict
|
81
|
+
_dict['dealing'] = self.dealing.to_dict()
|
85
82
|
# override the default output from pydantic by calling `to_dict()` of pn_l
|
86
83
|
if self.pn_l:
|
87
84
|
_dict['pnL'] = self.pn_l.to_dict()
|
@@ -134,12 +131,7 @@ class ShareClassBreakdown(BaseModel):
|
|
134
131
|
)
|
135
132
|
if obj.get("backOut") is not None
|
136
133
|
else None,
|
137
|
-
"dealing":
|
138
|
-
(_k, ShareClassAmount.from_dict(_v))
|
139
|
-
for _k, _v in obj.get("dealing").items()
|
140
|
-
)
|
141
|
-
if obj.get("dealing") is not None
|
142
|
-
else None,
|
134
|
+
"dealing": ShareClassDealingBreakdown.from_dict(obj.get("dealing")) if obj.get("dealing") is not None else None,
|
143
135
|
"pn_l": ShareClassPnlBreakdown.from_dict(obj.get("pnL")) if obj.get("pnL") is not None else None,
|
144
136
|
"gav": MultiCurrencyAmounts.from_dict(obj.get("gav")) if obj.get("gav") is not None else None,
|
145
137
|
"fees": dict(
|
@@ -0,0 +1,96 @@
|
|
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
|
22
|
+
from pydantic.v1 import BaseModel, Field
|
23
|
+
from lusid.models.share_class_amount import ShareClassAmount
|
24
|
+
|
25
|
+
class ShareClassDealingBreakdown(BaseModel):
|
26
|
+
"""
|
27
|
+
The breakdown of Dealing for a Share Class. # noqa: E501
|
28
|
+
"""
|
29
|
+
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, ShareClassAmount] = Field(..., alias="classDealingUnits", description="Bucket of detail for any 'Dealing' units specific to the share class that has occured inside the queried period.")
|
31
|
+
__properties = ["classDealing", "classDealingUnits"]
|
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) -> ShareClassDealingBreakdown:
|
48
|
+
"""Create an instance of ShareClassDealingBreakdown 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 value in class_dealing (dict)
|
58
|
+
_field_dict = {}
|
59
|
+
if self.class_dealing:
|
60
|
+
for _key in self.class_dealing:
|
61
|
+
if self.class_dealing[_key]:
|
62
|
+
_field_dict[_key] = self.class_dealing[_key].to_dict()
|
63
|
+
_dict['classDealing'] = _field_dict
|
64
|
+
# override the default output from pydantic by calling `to_dict()` of each value in class_dealing_units (dict)
|
65
|
+
_field_dict = {}
|
66
|
+
if self.class_dealing_units:
|
67
|
+
for _key in self.class_dealing_units:
|
68
|
+
if self.class_dealing_units[_key]:
|
69
|
+
_field_dict[_key] = self.class_dealing_units[_key].to_dict()
|
70
|
+
_dict['classDealingUnits'] = _field_dict
|
71
|
+
return _dict
|
72
|
+
|
73
|
+
@classmethod
|
74
|
+
def from_dict(cls, obj: dict) -> ShareClassDealingBreakdown:
|
75
|
+
"""Create an instance of ShareClassDealingBreakdown from a dict"""
|
76
|
+
if obj is None:
|
77
|
+
return None
|
78
|
+
|
79
|
+
if not isinstance(obj, dict):
|
80
|
+
return ShareClassDealingBreakdown.parse_obj(obj)
|
81
|
+
|
82
|
+
_obj = ShareClassDealingBreakdown.parse_obj({
|
83
|
+
"class_dealing": dict(
|
84
|
+
(_k, ShareClassAmount.from_dict(_v))
|
85
|
+
for _k, _v in obj.get("classDealing").items()
|
86
|
+
)
|
87
|
+
if obj.get("classDealing") is not None
|
88
|
+
else None,
|
89
|
+
"class_dealing_units": dict(
|
90
|
+
(_k, ShareClassAmount.from_dict(_v))
|
91
|
+
for _k, _v in obj.get("classDealingUnits").items()
|
92
|
+
)
|
93
|
+
if obj.get("classDealingUnits") is not None
|
94
|
+
else None
|
95
|
+
})
|
96
|
+
return _obj
|
@@ -19,7 +19,7 @@ import json
|
|
19
19
|
|
20
20
|
|
21
21
|
from typing import Any, Dict, Optional
|
22
|
-
from pydantic.v1 import BaseModel, Field, StrictStr, constr, validator
|
22
|
+
from pydantic.v1 import BaseModel, Field, StrictBool, StrictStr, constr, validator
|
23
23
|
|
24
24
|
class ShareClassDetails(BaseModel):
|
25
25
|
"""
|
@@ -28,7 +28,8 @@ class ShareClassDetails(BaseModel):
|
|
28
28
|
lusid_instrument_id: Optional[constr(strict=True, max_length=64, min_length=1)] = Field(None, alias="lusidInstrumentId", description="LUSID's internal unique instrument identifier, resolved from the share class' instrument identifiers")
|
29
29
|
instrument_scope: Optional[constr(strict=True, max_length=64, min_length=1)] = Field(None, alias="instrumentScope", description="The scope in which the share class instrument lies.")
|
30
30
|
dom_currency: Optional[StrictStr] = Field(None, alias="domCurrency", description="The domestic currency of the share class instrument")
|
31
|
-
|
31
|
+
instrument_active: Optional[StrictBool] = Field(None, alias="instrumentActive", description="If the instrument of the share class is active.")
|
32
|
+
__properties = ["lusidInstrumentId", "instrumentScope", "domCurrency", "instrumentActive"]
|
32
33
|
|
33
34
|
@validator('lusid_instrument_id')
|
34
35
|
def lusid_instrument_id_validate_regular_expression(cls, value):
|
@@ -103,6 +104,7 @@ class ShareClassDetails(BaseModel):
|
|
103
104
|
_obj = ShareClassDetails.parse_obj({
|
104
105
|
"lusid_instrument_id": obj.get("lusidInstrumentId"),
|
105
106
|
"instrument_scope": obj.get("instrumentScope"),
|
106
|
-
"dom_currency": obj.get("domCurrency")
|
107
|
+
"dom_currency": obj.get("domCurrency"),
|
108
|
+
"instrument_active": obj.get("instrumentActive")
|
107
109
|
})
|
108
110
|
return _obj
|
@@ -18,8 +18,8 @@ import re # noqa: F401
|
|
18
18
|
import json
|
19
19
|
|
20
20
|
from datetime import datetime
|
21
|
-
from typing import Any, Dict, Optional
|
22
|
-
from pydantic.v1 import Field, StrictStr, validator
|
21
|
+
from typing import Any, Dict, Optional, Union
|
22
|
+
from pydantic.v1 import Field, StrictFloat, StrictInt, StrictStr, validator
|
23
23
|
from lusid.models.instrument_event import InstrumentEvent
|
24
24
|
from lusid.models.units_ratio import UnitsRatio
|
25
25
|
|
@@ -32,9 +32,11 @@ class StockSplitEvent(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 receive the additional shares.")
|
34
34
|
announcement_date: Optional[datetime] = Field(None, alias="announcementDate", description="Date the stock split was announced.")
|
35
|
+
fractional_units_cash_price: Optional[Union[StrictFloat, StrictInt]] = Field(None, alias="fractionalUnitsCashPrice", description="The cash price per unit paid in lieu when fractional units can not be distributed.")
|
36
|
+
fractional_units_cash_currency: Optional[StrictStr] = Field(None, alias="fractionalUnitsCashCurrency", description="The currency of the cash paid in lieu of fractional units.")
|
35
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")
|
36
38
|
additional_properties: Dict[str, Any] = {}
|
37
|
-
__properties = ["instrumentEventType", "paymentDate", "exDate", "unitsRatio", "recordDate", "announcementDate"]
|
39
|
+
__properties = ["instrumentEventType", "paymentDate", "exDate", "unitsRatio", "recordDate", "announcementDate", "fractionalUnitsCashPrice", "fractionalUnitsCashCurrency"]
|
38
40
|
|
39
41
|
@validator('instrument_event_type')
|
40
42
|
def instrument_event_type_validate_enum(cls, value):
|
@@ -86,6 +88,16 @@ class StockSplitEvent(InstrumentEvent):
|
|
86
88
|
if self.announcement_date is None and "announcement_date" in self.__fields_set__:
|
87
89
|
_dict['announcementDate'] = None
|
88
90
|
|
91
|
+
# set to None if fractional_units_cash_price (nullable) is None
|
92
|
+
# and __fields_set__ contains the field
|
93
|
+
if self.fractional_units_cash_price is None and "fractional_units_cash_price" in self.__fields_set__:
|
94
|
+
_dict['fractionalUnitsCashPrice'] = None
|
95
|
+
|
96
|
+
# set to None if fractional_units_cash_currency (nullable) is None
|
97
|
+
# and __fields_set__ contains the field
|
98
|
+
if self.fractional_units_cash_currency is None and "fractional_units_cash_currency" in self.__fields_set__:
|
99
|
+
_dict['fractionalUnitsCashCurrency'] = None
|
100
|
+
|
89
101
|
return _dict
|
90
102
|
|
91
103
|
@classmethod
|
@@ -103,7 +115,9 @@ class StockSplitEvent(InstrumentEvent):
|
|
103
115
|
"ex_date": obj.get("exDate"),
|
104
116
|
"units_ratio": UnitsRatio.from_dict(obj.get("unitsRatio")) if obj.get("unitsRatio") is not None else None,
|
105
117
|
"record_date": obj.get("recordDate"),
|
106
|
-
"announcement_date": obj.get("announcementDate")
|
118
|
+
"announcement_date": obj.get("announcementDate"),
|
119
|
+
"fractional_units_cash_price": obj.get("fractionalUnitsCashPrice"),
|
120
|
+
"fractional_units_cash_currency": obj.get("fractionalUnitsCashCurrency")
|
107
121
|
})
|
108
122
|
# store additional fields in additional_properties
|
109
123
|
for _key in obj.keys():
|
@@ -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.order import Order
|
26
|
+
from lusid.models.response_meta_data import ResponseMetaData
|
27
|
+
|
28
|
+
class UpdateOrdersResponse(BaseModel):
|
29
|
+
"""
|
30
|
+
UpdateOrdersResponse
|
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, Order]] = Field(None, description="The orders which have been successfully updated.")
|
34
|
+
failed: Optional[Dict[str, ErrorDetail]] = Field(None, description="The orders 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) -> UpdateOrdersResponse:
|
54
|
+
"""Create an instance of UpdateOrdersResponse 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) -> UpdateOrdersResponse:
|
122
|
+
"""Create an instance of UpdateOrdersResponse from a dict"""
|
123
|
+
if obj is None:
|
124
|
+
return None
|
125
|
+
|
126
|
+
if not isinstance(obj, dict):
|
127
|
+
return UpdateOrdersResponse.parse_obj(obj)
|
128
|
+
|
129
|
+
_obj = UpdateOrdersResponse.parse_obj({
|
130
|
+
"href": obj.get("href"),
|
131
|
+
"values": dict(
|
132
|
+
(_k, Order.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
|
@@ -31,7 +31,7 @@ class ValuationPointDataResponse(BaseModel):
|
|
31
31
|
"""
|
32
32
|
href: Optional[StrictStr] = Field(None, description="The specific Uniform Resource Identifier (URI) for this resource at the requested effective and asAt datetime.")
|
33
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).")
|
34
|
-
status: constr(strict=True, min_length=1) = Field(..., description="The
|
34
|
+
status: constr(strict=True, min_length=1) = Field(..., description="The status of a Diary Entry of Type 'ValuationPoint'. Defaults to 'Estimate' when upserting a diary entry, moves to 'Candidate' or 'Final' when a ValuationPoint is accepted, and 'Final' when it is finalised. The status of a Diary Entry becomes 'Unofficial' when a diary entry wasn't used.")
|
35
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
36
|
dealing: Dict[str, Union[StrictFloat, StrictInt]] = Field(..., description="DEPRECATED. Bucket of detail for any 'Dealing' that has occured inside the queried period.")
|
37
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.")
|
@@ -0,0 +1,125 @@
|
|
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
|
+
from datetime import datetime
|
21
|
+
from typing import Any, Dict, List, Optional, Union
|
22
|
+
from pydantic.v1 import BaseModel, Field, StrictFloat, StrictInt, StrictStr, conlist, constr
|
23
|
+
from lusid.models.link import Link
|
24
|
+
from lusid.models.model_property import ModelProperty
|
25
|
+
|
26
|
+
class ValuationPointOverview(BaseModel):
|
27
|
+
"""
|
28
|
+
ValuationPointOverview
|
29
|
+
"""
|
30
|
+
href: Optional[StrictStr] = Field(None, description="The specific Uniform Resource Identifier (URI) for this resource at the requested effective and asAt datetime.")
|
31
|
+
diary_entry_code: StrictStr = Field(..., alias="diaryEntryCode", description="The code for the Valuation Point.")
|
32
|
+
effective_from: datetime = Field(..., alias="effectiveFrom", description="The effective time of the last Valuation Point.")
|
33
|
+
effective_to: datetime = Field(..., alias="effectiveTo", description="The effective time of the current Valuation Point.")
|
34
|
+
query_as_at: Optional[datetime] = Field(None, alias="queryAsAt", description="The query time of the Valuation Point. Defaults to latest.")
|
35
|
+
type: constr(strict=True, min_length=1) = Field(..., description="The type of the diary entry. This is 'ValuationPoint'.")
|
36
|
+
status: constr(strict=True, min_length=1) = Field(..., description="The status of the Valuation Point. Can be 'Estimate', 'Candidate' or 'Final'.")
|
37
|
+
gav: Union[StrictFloat, StrictInt] = Field(..., description="The Gross Asset Value of the Fund or Share Class at the Valuation Point. This is effectively a summation of all Trial balance entries linked to accounts of types 'Asset' and 'Liabilities'.")
|
38
|
+
nav: Union[StrictFloat, StrictInt] = Field(..., description="The Net Asset Value of the Fund or Share Class at the Valuation Point. This represents the GAV with any fees applied in the period.")
|
39
|
+
properties: Optional[Dict[str, ModelProperty]] = Field(None, description="The Fee properties. These will be from the 'Fee' domain.")
|
40
|
+
links: Optional[conlist(Link)] = None
|
41
|
+
__properties = ["href", "diaryEntryCode", "effectiveFrom", "effectiveTo", "queryAsAt", "type", "status", "gav", "nav", "properties", "links"]
|
42
|
+
|
43
|
+
class Config:
|
44
|
+
"""Pydantic configuration"""
|
45
|
+
allow_population_by_field_name = True
|
46
|
+
validate_assignment = True
|
47
|
+
|
48
|
+
def to_str(self) -> str:
|
49
|
+
"""Returns the string representation of the model using alias"""
|
50
|
+
return pprint.pformat(self.dict(by_alias=True))
|
51
|
+
|
52
|
+
def to_json(self) -> str:
|
53
|
+
"""Returns the JSON representation of the model using alias"""
|
54
|
+
return json.dumps(self.to_dict())
|
55
|
+
|
56
|
+
@classmethod
|
57
|
+
def from_json(cls, json_str: str) -> ValuationPointOverview:
|
58
|
+
"""Create an instance of ValuationPointOverview from a JSON string"""
|
59
|
+
return cls.from_dict(json.loads(json_str))
|
60
|
+
|
61
|
+
def to_dict(self):
|
62
|
+
"""Returns the dictionary representation of the model using alias"""
|
63
|
+
_dict = self.dict(by_alias=True,
|
64
|
+
exclude={
|
65
|
+
},
|
66
|
+
exclude_none=True)
|
67
|
+
# override the default output from pydantic by calling `to_dict()` of each value in properties (dict)
|
68
|
+
_field_dict = {}
|
69
|
+
if self.properties:
|
70
|
+
for _key in self.properties:
|
71
|
+
if self.properties[_key]:
|
72
|
+
_field_dict[_key] = self.properties[_key].to_dict()
|
73
|
+
_dict['properties'] = _field_dict
|
74
|
+
# override the default output from pydantic by calling `to_dict()` of each item in links (list)
|
75
|
+
_items = []
|
76
|
+
if self.links:
|
77
|
+
for _item in self.links:
|
78
|
+
if _item:
|
79
|
+
_items.append(_item.to_dict())
|
80
|
+
_dict['links'] = _items
|
81
|
+
# set to None if href (nullable) is None
|
82
|
+
# and __fields_set__ contains the field
|
83
|
+
if self.href is None and "href" in self.__fields_set__:
|
84
|
+
_dict['href'] = None
|
85
|
+
|
86
|
+
# set to None if properties (nullable) is None
|
87
|
+
# and __fields_set__ contains the field
|
88
|
+
if self.properties is None and "properties" in self.__fields_set__:
|
89
|
+
_dict['properties'] = None
|
90
|
+
|
91
|
+
# set to None if links (nullable) is None
|
92
|
+
# and __fields_set__ contains the field
|
93
|
+
if self.links is None and "links" in self.__fields_set__:
|
94
|
+
_dict['links'] = None
|
95
|
+
|
96
|
+
return _dict
|
97
|
+
|
98
|
+
@classmethod
|
99
|
+
def from_dict(cls, obj: dict) -> ValuationPointOverview:
|
100
|
+
"""Create an instance of ValuationPointOverview from a dict"""
|
101
|
+
if obj is None:
|
102
|
+
return None
|
103
|
+
|
104
|
+
if not isinstance(obj, dict):
|
105
|
+
return ValuationPointOverview.parse_obj(obj)
|
106
|
+
|
107
|
+
_obj = ValuationPointOverview.parse_obj({
|
108
|
+
"href": obj.get("href"),
|
109
|
+
"diary_entry_code": obj.get("diaryEntryCode"),
|
110
|
+
"effective_from": obj.get("effectiveFrom"),
|
111
|
+
"effective_to": obj.get("effectiveTo"),
|
112
|
+
"query_as_at": obj.get("queryAsAt"),
|
113
|
+
"type": obj.get("type"),
|
114
|
+
"status": obj.get("status"),
|
115
|
+
"gav": obj.get("gav"),
|
116
|
+
"nav": obj.get("nav"),
|
117
|
+
"properties": dict(
|
118
|
+
(_k, ModelProperty.from_dict(_v))
|
119
|
+
for _k, _v in obj.get("properties").items()
|
120
|
+
)
|
121
|
+
if obj.get("properties") is not None
|
122
|
+
else None,
|
123
|
+
"links": [Link.from_dict(_item) for _item in obj.get("links")] if obj.get("links") is not None else None
|
124
|
+
})
|
125
|
+
return _obj
|
@@ -0,0 +1,92 @@
|
|
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, conlist, constr
|
23
|
+
from lusid.models.link import Link
|
24
|
+
from lusid.models.version import Version
|
25
|
+
|
26
|
+
class Workspace(BaseModel):
|
27
|
+
"""
|
28
|
+
A workspace. # noqa: E501
|
29
|
+
"""
|
30
|
+
name: constr(strict=True, min_length=1) = Field(..., description="A workspace's name; a unique identifier.")
|
31
|
+
description: constr(strict=True, max_length=6000, min_length=0) = Field(..., description="A friendly description for the workspace.")
|
32
|
+
version: Optional[Version] = None
|
33
|
+
links: Optional[conlist(Link)] = None
|
34
|
+
__properties = ["name", "description", "version", "links"]
|
35
|
+
|
36
|
+
class Config:
|
37
|
+
"""Pydantic configuration"""
|
38
|
+
allow_population_by_field_name = True
|
39
|
+
validate_assignment = True
|
40
|
+
|
41
|
+
def to_str(self) -> str:
|
42
|
+
"""Returns the string representation of the model using alias"""
|
43
|
+
return pprint.pformat(self.dict(by_alias=True))
|
44
|
+
|
45
|
+
def to_json(self) -> str:
|
46
|
+
"""Returns the JSON representation of the model using alias"""
|
47
|
+
return json.dumps(self.to_dict())
|
48
|
+
|
49
|
+
@classmethod
|
50
|
+
def from_json(cls, json_str: str) -> Workspace:
|
51
|
+
"""Create an instance of Workspace from a JSON string"""
|
52
|
+
return cls.from_dict(json.loads(json_str))
|
53
|
+
|
54
|
+
def to_dict(self):
|
55
|
+
"""Returns the dictionary representation of the model using alias"""
|
56
|
+
_dict = self.dict(by_alias=True,
|
57
|
+
exclude={
|
58
|
+
},
|
59
|
+
exclude_none=True)
|
60
|
+
# override the default output from pydantic by calling `to_dict()` of version
|
61
|
+
if self.version:
|
62
|
+
_dict['version'] = self.version.to_dict()
|
63
|
+
# override the default output from pydantic by calling `to_dict()` of each item in links (list)
|
64
|
+
_items = []
|
65
|
+
if self.links:
|
66
|
+
for _item in self.links:
|
67
|
+
if _item:
|
68
|
+
_items.append(_item.to_dict())
|
69
|
+
_dict['links'] = _items
|
70
|
+
# set to None if links (nullable) is None
|
71
|
+
# and __fields_set__ contains the field
|
72
|
+
if self.links is None and "links" in self.__fields_set__:
|
73
|
+
_dict['links'] = None
|
74
|
+
|
75
|
+
return _dict
|
76
|
+
|
77
|
+
@classmethod
|
78
|
+
def from_dict(cls, obj: dict) -> Workspace:
|
79
|
+
"""Create an instance of Workspace from a dict"""
|
80
|
+
if obj is None:
|
81
|
+
return None
|
82
|
+
|
83
|
+
if not isinstance(obj, dict):
|
84
|
+
return Workspace.parse_obj(obj)
|
85
|
+
|
86
|
+
_obj = Workspace.parse_obj({
|
87
|
+
"name": obj.get("name"),
|
88
|
+
"description": obj.get("description"),
|
89
|
+
"version": Version.from_dict(obj.get("version")) if obj.get("version") is not None else None,
|
90
|
+
"links": [Link.from_dict(_item) for _item in obj.get("links")] if obj.get("links") is not None else None
|
91
|
+
})
|
92
|
+
return _obj
|