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.
- lusid/__init__.py +66 -0
- lusid/api/__init__.py +2 -0
- lusid/api/compliance_api.py +191 -0
- lusid/api/entities_api.py +360 -0
- lusid/api/fee_types_api.py +143 -0
- lusid/api/fund_configurations_api.py +944 -0
- lusid/api/funds_api.py +1 -1
- lusid/api/order_management_api.py +479 -1
- lusid/api/scopes_api.py +38 -9
- lusid/configuration.py +1 -1
- lusid/extensions/configuration_loaders.py +9 -1
- lusid/models/__init__.py +64 -0
- lusid/models/accounting_method.py +3 -0
- lusid/models/accumulation_event.py +3 -3
- lusid/models/amortisation_event.py +3 -3
- lusid/models/bond_coupon_event.py +3 -3
- lusid/models/bond_default_event.py +3 -3
- lusid/models/bond_principal_event.py +3 -3
- lusid/models/cancel_orders_response.py +153 -0
- lusid/models/cancel_placements_response.py +153 -0
- lusid/models/cancelled_order_result.py +73 -0
- lusid/models/cancelled_placement_result.py +83 -0
- lusid/models/capital_distribution_event.py +3 -3
- lusid/models/cash.py +93 -0
- lusid/models/cash_dividend_event.py +3 -3
- lusid/models/cash_flow_event.py +3 -3
- lusid/models/close_event.py +3 -3
- lusid/models/compliance_run_configuration.py +73 -0
- lusid/models/component_filter.py +85 -0
- lusid/models/component_rule.py +77 -0
- lusid/models/contract_for_difference.py +4 -2
- lusid/models/create_derived_transaction_portfolio_request.py +3 -3
- lusid/models/create_transaction_portfolio_request.py +3 -3
- lusid/models/dependency_source_filter.py +9 -2
- lusid/models/dividend_option_event.py +3 -3
- lusid/models/dividend_reinvestment_event.py +3 -3
- lusid/models/exercise_event.py +3 -3
- lusid/models/expiry_event.py +3 -3
- lusid/models/fee_transaction_template_specification.py +79 -0
- lusid/models/fund.py +6 -1
- lusid/models/fund_amount.py +69 -0
- lusid/models/fund_configuration.py +151 -0
- lusid/models/fund_configuration_properties.py +115 -0
- lusid/models/fund_configuration_request.py +136 -0
- lusid/models/fund_pnl_breakdown.py +110 -0
- lusid/models/fund_previous_nav.py +69 -0
- lusid/models/fund_request.py +6 -1
- lusid/models/fund_valuation_point_data.py +152 -0
- lusid/models/future_expiry_event.py +100 -0
- lusid/models/futures_contract_details.py +9 -2
- lusid/models/fx_forward_settlement_event.py +3 -3
- lusid/models/informational_error_event.py +3 -3
- lusid/models/informational_event.py +3 -3
- lusid/models/instrument_entity.py +146 -0
- lusid/models/instrument_event.py +6 -5
- lusid/models/instrument_event_type.py +1 -0
- lusid/models/lusid_instrument.py +3 -2
- lusid/models/market_data_key_rule.py +3 -3
- lusid/models/market_data_specific_rule.py +3 -3
- lusid/models/market_quote.py +3 -3
- lusid/models/maturity_event.py +3 -3
- lusid/models/merger_event.py +3 -3
- lusid/models/model_selection.py +3 -3
- lusid/models/open_event.py +3 -3
- lusid/models/paged_resource_list_of_fund_configuration.py +113 -0
- lusid/models/placement_update_request.py +116 -0
- lusid/models/portfolio.py +3 -3
- lusid/models/portfolio_details.py +3 -3
- lusid/models/portfolio_without_href.py +3 -3
- lusid/models/pre_trade_configuration.py +69 -0
- lusid/models/previous_fund_valuation_point_data.py +79 -0
- lusid/models/previous_nav.py +73 -0
- lusid/models/previous_share_class_breakdown.py +81 -0
- lusid/models/pricing_model.py +1 -0
- lusid/models/property_definition.py +7 -1
- lusid/models/property_definition_entity.py +146 -0
- lusid/models/quote_series_id.py +4 -20
- lusid/models/quote_type.py +3 -0
- lusid/models/raw_vendor_event.py +3 -3
- lusid/models/reset_event.py +3 -3
- lusid/models/reverse_stock_split_event.py +3 -3
- lusid/models/scrip_dividend_event.py +3 -3
- lusid/models/share_class_amount.py +73 -0
- lusid/models/share_class_breakdown.py +163 -0
- lusid/models/share_class_data.py +79 -0
- lusid/models/share_class_details.py +108 -0
- lusid/models/share_class_pnl_breakdown.py +110 -0
- lusid/models/spin_off_event.py +3 -3
- lusid/models/staged_modification.py +8 -1
- lusid/models/stock_dividend_event.py +3 -3
- lusid/models/stock_split_event.py +3 -3
- lusid/models/template_field.py +3 -1
- lusid/models/transaction_configuration_movement_data.py +2 -2
- lusid/models/transaction_configuration_movement_data_request.py +1 -1
- lusid/models/transaction_field_map.py +8 -3
- lusid/models/transaction_type_movement.py +2 -2
- lusid/models/transition_event.py +3 -3
- lusid/models/trigger_event.py +3 -3
- lusid/models/unitisation_data.py +73 -0
- lusid/models/update_placements_response.py +153 -0
- lusid/models/valuation_point_data_response.py +30 -9
- {lusid_sdk-2.1.242.dist-info → lusid_sdk-2.1.320.dist-info}/METADATA +53 -215
- {lusid_sdk-2.1.242.dist-info → lusid_sdk-2.1.320.dist-info}/RECORD +104 -71
- {lusid_sdk-2.1.242.dist-info → lusid_sdk-2.1.320.dist-info}/WHEEL +0 -0
@@ -0,0 +1,151 @@
|
|
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.component_rule import ComponentRule
|
24
|
+
from lusid.models.link import Link
|
25
|
+
from lusid.models.model_property import ModelProperty
|
26
|
+
from lusid.models.resource_id import ResourceId
|
27
|
+
from lusid.models.version import Version
|
28
|
+
|
29
|
+
class FundConfiguration(BaseModel):
|
30
|
+
"""
|
31
|
+
FundConfiguration
|
32
|
+
"""
|
33
|
+
href: Optional[StrictStr] = Field(None, description="The specific Uniform Resource Identifier (URI) for this resource at the requested effective and asAt datetime.")
|
34
|
+
id: ResourceId = Field(...)
|
35
|
+
display_name: Optional[StrictStr] = Field(None, alias="displayName", description="The name of the FundConfiguration.")
|
36
|
+
description: Optional[StrictStr] = Field(None, description="A description for the FundConfiguration.")
|
37
|
+
dealing_rule: Optional[ComponentRule] = Field(None, alias="dealingRule")
|
38
|
+
fund_pnl_rule: Optional[ComponentRule] = Field(None, alias="fundPnlRule")
|
39
|
+
back_out_rule: Optional[ComponentRule] = Field(None, alias="backOutRule")
|
40
|
+
properties: Optional[Dict[str, ModelProperty]] = Field(None, description="A set of properties for the Fund Configuration.")
|
41
|
+
version: Optional[Version] = None
|
42
|
+
links: Optional[conlist(Link)] = None
|
43
|
+
__properties = ["href", "id", "displayName", "description", "dealingRule", "fundPnlRule", "backOutRule", "properties", "version", "links"]
|
44
|
+
|
45
|
+
class Config:
|
46
|
+
"""Pydantic configuration"""
|
47
|
+
allow_population_by_field_name = True
|
48
|
+
validate_assignment = True
|
49
|
+
|
50
|
+
def to_str(self) -> str:
|
51
|
+
"""Returns the string representation of the model using alias"""
|
52
|
+
return pprint.pformat(self.dict(by_alias=True))
|
53
|
+
|
54
|
+
def to_json(self) -> str:
|
55
|
+
"""Returns the JSON representation of the model using alias"""
|
56
|
+
return json.dumps(self.to_dict())
|
57
|
+
|
58
|
+
@classmethod
|
59
|
+
def from_json(cls, json_str: str) -> FundConfiguration:
|
60
|
+
"""Create an instance of FundConfiguration from a JSON string"""
|
61
|
+
return cls.from_dict(json.loads(json_str))
|
62
|
+
|
63
|
+
def to_dict(self):
|
64
|
+
"""Returns the dictionary representation of the model using alias"""
|
65
|
+
_dict = self.dict(by_alias=True,
|
66
|
+
exclude={
|
67
|
+
},
|
68
|
+
exclude_none=True)
|
69
|
+
# override the default output from pydantic by calling `to_dict()` of id
|
70
|
+
if self.id:
|
71
|
+
_dict['id'] = self.id.to_dict()
|
72
|
+
# override the default output from pydantic by calling `to_dict()` of dealing_rule
|
73
|
+
if self.dealing_rule:
|
74
|
+
_dict['dealingRule'] = self.dealing_rule.to_dict()
|
75
|
+
# override the default output from pydantic by calling `to_dict()` of fund_pnl_rule
|
76
|
+
if self.fund_pnl_rule:
|
77
|
+
_dict['fundPnlRule'] = self.fund_pnl_rule.to_dict()
|
78
|
+
# override the default output from pydantic by calling `to_dict()` of back_out_rule
|
79
|
+
if self.back_out_rule:
|
80
|
+
_dict['backOutRule'] = self.back_out_rule.to_dict()
|
81
|
+
# override the default output from pydantic by calling `to_dict()` of each value in properties (dict)
|
82
|
+
_field_dict = {}
|
83
|
+
if self.properties:
|
84
|
+
for _key in self.properties:
|
85
|
+
if self.properties[_key]:
|
86
|
+
_field_dict[_key] = self.properties[_key].to_dict()
|
87
|
+
_dict['properties'] = _field_dict
|
88
|
+
# override the default output from pydantic by calling `to_dict()` of version
|
89
|
+
if self.version:
|
90
|
+
_dict['version'] = self.version.to_dict()
|
91
|
+
# override the default output from pydantic by calling `to_dict()` of each item in links (list)
|
92
|
+
_items = []
|
93
|
+
if self.links:
|
94
|
+
for _item in self.links:
|
95
|
+
if _item:
|
96
|
+
_items.append(_item.to_dict())
|
97
|
+
_dict['links'] = _items
|
98
|
+
# set to None if href (nullable) is None
|
99
|
+
# and __fields_set__ contains the field
|
100
|
+
if self.href is None and "href" in self.__fields_set__:
|
101
|
+
_dict['href'] = None
|
102
|
+
|
103
|
+
# set to None if display_name (nullable) is None
|
104
|
+
# and __fields_set__ contains the field
|
105
|
+
if self.display_name is None and "display_name" in self.__fields_set__:
|
106
|
+
_dict['displayName'] = None
|
107
|
+
|
108
|
+
# set to None if description (nullable) is None
|
109
|
+
# and __fields_set__ contains the field
|
110
|
+
if self.description is None and "description" in self.__fields_set__:
|
111
|
+
_dict['description'] = None
|
112
|
+
|
113
|
+
# set to None if properties (nullable) is None
|
114
|
+
# and __fields_set__ contains the field
|
115
|
+
if self.properties is None and "properties" in self.__fields_set__:
|
116
|
+
_dict['properties'] = None
|
117
|
+
|
118
|
+
# set to None if links (nullable) is None
|
119
|
+
# and __fields_set__ contains the field
|
120
|
+
if self.links is None and "links" in self.__fields_set__:
|
121
|
+
_dict['links'] = None
|
122
|
+
|
123
|
+
return _dict
|
124
|
+
|
125
|
+
@classmethod
|
126
|
+
def from_dict(cls, obj: dict) -> FundConfiguration:
|
127
|
+
"""Create an instance of FundConfiguration from a dict"""
|
128
|
+
if obj is None:
|
129
|
+
return None
|
130
|
+
|
131
|
+
if not isinstance(obj, dict):
|
132
|
+
return FundConfiguration.parse_obj(obj)
|
133
|
+
|
134
|
+
_obj = FundConfiguration.parse_obj({
|
135
|
+
"href": obj.get("href"),
|
136
|
+
"id": ResourceId.from_dict(obj.get("id")) if obj.get("id") is not None else None,
|
137
|
+
"display_name": obj.get("displayName"),
|
138
|
+
"description": obj.get("description"),
|
139
|
+
"dealing_rule": ComponentRule.from_dict(obj.get("dealingRule")) if obj.get("dealingRule") is not None else None,
|
140
|
+
"fund_pnl_rule": ComponentRule.from_dict(obj.get("fundPnlRule")) if obj.get("fundPnlRule") is not None else None,
|
141
|
+
"back_out_rule": ComponentRule.from_dict(obj.get("backOutRule")) if obj.get("backOutRule") is not None else None,
|
142
|
+
"properties": dict(
|
143
|
+
(_k, ModelProperty.from_dict(_v))
|
144
|
+
for _k, _v in obj.get("properties").items()
|
145
|
+
)
|
146
|
+
if obj.get("properties") is not None
|
147
|
+
else None,
|
148
|
+
"version": Version.from_dict(obj.get("version")) if obj.get("version") is not None else None,
|
149
|
+
"links": [Link.from_dict(_item) for _item in obj.get("links")] if obj.get("links") is not None else None
|
150
|
+
})
|
151
|
+
return _obj
|
@@ -0,0 +1,115 @@
|
|
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.link import Link
|
24
|
+
from lusid.models.model_property import ModelProperty
|
25
|
+
from lusid.models.version import Version
|
26
|
+
|
27
|
+
class FundConfigurationProperties(BaseModel):
|
28
|
+
"""
|
29
|
+
FundConfigurationProperties
|
30
|
+
"""
|
31
|
+
href: Optional[StrictStr] = Field(None, description="The specific Uniform Resource Identifier (URI) for this resource at the requested effective and asAt datetime.")
|
32
|
+
properties: Optional[Dict[str, ModelProperty]] = Field(None, description="The Fund Configuration properties. These will be from the 'FundConfiguration' domain.")
|
33
|
+
version: Optional[Version] = None
|
34
|
+
links: Optional[conlist(Link)] = None
|
35
|
+
__properties = ["href", "properties", "version", "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) -> FundConfigurationProperties:
|
52
|
+
"""Create an instance of FundConfigurationProperties 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 value in properties (dict)
|
62
|
+
_field_dict = {}
|
63
|
+
if self.properties:
|
64
|
+
for _key in self.properties:
|
65
|
+
if self.properties[_key]:
|
66
|
+
_field_dict[_key] = self.properties[_key].to_dict()
|
67
|
+
_dict['properties'] = _field_dict
|
68
|
+
# override the default output from pydantic by calling `to_dict()` of version
|
69
|
+
if self.version:
|
70
|
+
_dict['version'] = self.version.to_dict()
|
71
|
+
# override the default output from pydantic by calling `to_dict()` of each item in links (list)
|
72
|
+
_items = []
|
73
|
+
if self.links:
|
74
|
+
for _item in self.links:
|
75
|
+
if _item:
|
76
|
+
_items.append(_item.to_dict())
|
77
|
+
_dict['links'] = _items
|
78
|
+
# set to None if href (nullable) is None
|
79
|
+
# and __fields_set__ contains the field
|
80
|
+
if self.href is None and "href" in self.__fields_set__:
|
81
|
+
_dict['href'] = None
|
82
|
+
|
83
|
+
# set to None if properties (nullable) is None
|
84
|
+
# and __fields_set__ contains the field
|
85
|
+
if self.properties is None and "properties" in self.__fields_set__:
|
86
|
+
_dict['properties'] = None
|
87
|
+
|
88
|
+
# set to None if links (nullable) is None
|
89
|
+
# and __fields_set__ contains the field
|
90
|
+
if self.links is None and "links" in self.__fields_set__:
|
91
|
+
_dict['links'] = None
|
92
|
+
|
93
|
+
return _dict
|
94
|
+
|
95
|
+
@classmethod
|
96
|
+
def from_dict(cls, obj: dict) -> FundConfigurationProperties:
|
97
|
+
"""Create an instance of FundConfigurationProperties from a dict"""
|
98
|
+
if obj is None:
|
99
|
+
return None
|
100
|
+
|
101
|
+
if not isinstance(obj, dict):
|
102
|
+
return FundConfigurationProperties.parse_obj(obj)
|
103
|
+
|
104
|
+
_obj = FundConfigurationProperties.parse_obj({
|
105
|
+
"href": obj.get("href"),
|
106
|
+
"properties": dict(
|
107
|
+
(_k, ModelProperty.from_dict(_v))
|
108
|
+
for _k, _v in obj.get("properties").items()
|
109
|
+
)
|
110
|
+
if obj.get("properties") is not None
|
111
|
+
else None,
|
112
|
+
"version": Version.from_dict(obj.get("version")) if obj.get("version") is not None else None,
|
113
|
+
"links": [Link.from_dict(_item) for _item in obj.get("links")] if obj.get("links") is not None else None
|
114
|
+
})
|
115
|
+
return _obj
|
@@ -0,0 +1,136 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
|
3
|
+
"""
|
4
|
+
LUSID API
|
5
|
+
|
6
|
+
FINBOURNE Technology # noqa: E501
|
7
|
+
|
8
|
+
Contact: info@finbourne.com
|
9
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
10
|
+
|
11
|
+
Do not edit the class manually.
|
12
|
+
"""
|
13
|
+
|
14
|
+
|
15
|
+
from __future__ import annotations
|
16
|
+
import pprint
|
17
|
+
import re # noqa: F401
|
18
|
+
import json
|
19
|
+
|
20
|
+
|
21
|
+
from typing import Any, Dict, Optional
|
22
|
+
from pydantic.v1 import BaseModel, Field, constr, validator
|
23
|
+
from lusid.models.component_rule import ComponentRule
|
24
|
+
from lusid.models.model_property import ModelProperty
|
25
|
+
|
26
|
+
class FundConfigurationRequest(BaseModel):
|
27
|
+
"""
|
28
|
+
FundConfigurationRequest
|
29
|
+
"""
|
30
|
+
code: constr(strict=True, max_length=64, min_length=1) = Field(...)
|
31
|
+
display_name: Optional[constr(strict=True, max_length=256, min_length=1)] = Field(None, alias="displayName", description="The name of the Fund.")
|
32
|
+
description: Optional[constr(strict=True, max_length=1024, min_length=0)] = Field(None, description="A description for the Fund.")
|
33
|
+
dealing_rule: ComponentRule = Field(..., alias="dealingRule")
|
34
|
+
fund_pnl_rule: ComponentRule = Field(..., alias="fundPnlRule")
|
35
|
+
back_out_rule: ComponentRule = Field(..., alias="backOutRule")
|
36
|
+
properties: Optional[Dict[str, ModelProperty]] = Field(None, description="A set of properties for the Fund Configuration.")
|
37
|
+
__properties = ["code", "displayName", "description", "dealingRule", "fundPnlRule", "backOutRule", "properties"]
|
38
|
+
|
39
|
+
@validator('code')
|
40
|
+
def code_validate_regular_expression(cls, value):
|
41
|
+
"""Validates the regular expression"""
|
42
|
+
if not re.match(r"^[a-zA-Z0-9\-_]+$", value):
|
43
|
+
raise ValueError(r"must validate the regular expression /^[a-zA-Z0-9\-_]+$/")
|
44
|
+
return value
|
45
|
+
|
46
|
+
@validator('description')
|
47
|
+
def description_validate_regular_expression(cls, value):
|
48
|
+
"""Validates the regular expression"""
|
49
|
+
if value is None:
|
50
|
+
return value
|
51
|
+
|
52
|
+
if not re.match(r"^[\s\S]*$", value):
|
53
|
+
raise ValueError(r"must validate the regular expression /^[\s\S]*$/")
|
54
|
+
return value
|
55
|
+
|
56
|
+
class Config:
|
57
|
+
"""Pydantic configuration"""
|
58
|
+
allow_population_by_field_name = True
|
59
|
+
validate_assignment = True
|
60
|
+
|
61
|
+
def to_str(self) -> str:
|
62
|
+
"""Returns the string representation of the model using alias"""
|
63
|
+
return pprint.pformat(self.dict(by_alias=True))
|
64
|
+
|
65
|
+
def to_json(self) -> str:
|
66
|
+
"""Returns the JSON representation of the model using alias"""
|
67
|
+
return json.dumps(self.to_dict())
|
68
|
+
|
69
|
+
@classmethod
|
70
|
+
def from_json(cls, json_str: str) -> FundConfigurationRequest:
|
71
|
+
"""Create an instance of FundConfigurationRequest from a JSON string"""
|
72
|
+
return cls.from_dict(json.loads(json_str))
|
73
|
+
|
74
|
+
def to_dict(self):
|
75
|
+
"""Returns the dictionary representation of the model using alias"""
|
76
|
+
_dict = self.dict(by_alias=True,
|
77
|
+
exclude={
|
78
|
+
},
|
79
|
+
exclude_none=True)
|
80
|
+
# override the default output from pydantic by calling `to_dict()` of dealing_rule
|
81
|
+
if self.dealing_rule:
|
82
|
+
_dict['dealingRule'] = self.dealing_rule.to_dict()
|
83
|
+
# override the default output from pydantic by calling `to_dict()` of fund_pnl_rule
|
84
|
+
if self.fund_pnl_rule:
|
85
|
+
_dict['fundPnlRule'] = self.fund_pnl_rule.to_dict()
|
86
|
+
# override the default output from pydantic by calling `to_dict()` of back_out_rule
|
87
|
+
if self.back_out_rule:
|
88
|
+
_dict['backOutRule'] = self.back_out_rule.to_dict()
|
89
|
+
# override the default output from pydantic by calling `to_dict()` of each value in properties (dict)
|
90
|
+
_field_dict = {}
|
91
|
+
if self.properties:
|
92
|
+
for _key in self.properties:
|
93
|
+
if self.properties[_key]:
|
94
|
+
_field_dict[_key] = self.properties[_key].to_dict()
|
95
|
+
_dict['properties'] = _field_dict
|
96
|
+
# set to None if display_name (nullable) is None
|
97
|
+
# and __fields_set__ contains the field
|
98
|
+
if self.display_name is None and "display_name" in self.__fields_set__:
|
99
|
+
_dict['displayName'] = None
|
100
|
+
|
101
|
+
# set to None if description (nullable) is None
|
102
|
+
# and __fields_set__ contains the field
|
103
|
+
if self.description is None and "description" in self.__fields_set__:
|
104
|
+
_dict['description'] = None
|
105
|
+
|
106
|
+
# set to None if properties (nullable) is None
|
107
|
+
# and __fields_set__ contains the field
|
108
|
+
if self.properties is None and "properties" in self.__fields_set__:
|
109
|
+
_dict['properties'] = None
|
110
|
+
|
111
|
+
return _dict
|
112
|
+
|
113
|
+
@classmethod
|
114
|
+
def from_dict(cls, obj: dict) -> FundConfigurationRequest:
|
115
|
+
"""Create an instance of FundConfigurationRequest from a dict"""
|
116
|
+
if obj is None:
|
117
|
+
return None
|
118
|
+
|
119
|
+
if not isinstance(obj, dict):
|
120
|
+
return FundConfigurationRequest.parse_obj(obj)
|
121
|
+
|
122
|
+
_obj = FundConfigurationRequest.parse_obj({
|
123
|
+
"code": obj.get("code"),
|
124
|
+
"display_name": obj.get("displayName"),
|
125
|
+
"description": obj.get("description"),
|
126
|
+
"dealing_rule": ComponentRule.from_dict(obj.get("dealingRule")) if obj.get("dealingRule") is not None else None,
|
127
|
+
"fund_pnl_rule": ComponentRule.from_dict(obj.get("fundPnlRule")) if obj.get("fundPnlRule") is not None else None,
|
128
|
+
"back_out_rule": ComponentRule.from_dict(obj.get("backOutRule")) if obj.get("backOutRule") is not None else None,
|
129
|
+
"properties": dict(
|
130
|
+
(_k, ModelProperty.from_dict(_v))
|
131
|
+
for _k, _v in obj.get("properties").items()
|
132
|
+
)
|
133
|
+
if obj.get("properties") is not None
|
134
|
+
else None
|
135
|
+
})
|
136
|
+
return _obj
|
@@ -0,0 +1,110 @@
|
|
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.fund_amount import FundAmount
|
24
|
+
|
25
|
+
class FundPnlBreakdown(BaseModel):
|
26
|
+
"""
|
27
|
+
The breakdown of PnL for a Fund on a specified date. # noqa: E501
|
28
|
+
"""
|
29
|
+
non_class_specific_pnl: Dict[str, FundAmount] = Field(..., alias="nonClassSpecificPnl", description="Bucket of detail for PnL within the queried period that is not specific to any share class.")
|
30
|
+
aggregated_class_pnl: Dict[str, FundAmount] = Field(..., alias="aggregatedClassPnl", description="Bucket of detail for the sum of class PnL across all share classes in a fund and within the queried period.")
|
31
|
+
total_pnl: Dict[str, FundAmount] = Field(..., alias="totalPnl", description="Bucket of detail for the sum of class PnL and PnL not specific to a class within the queried period.")
|
32
|
+
__properties = ["nonClassSpecificPnl", "aggregatedClassPnl", "totalPnl"]
|
33
|
+
|
34
|
+
class Config:
|
35
|
+
"""Pydantic configuration"""
|
36
|
+
allow_population_by_field_name = True
|
37
|
+
validate_assignment = True
|
38
|
+
|
39
|
+
def to_str(self) -> str:
|
40
|
+
"""Returns the string representation of the model using alias"""
|
41
|
+
return pprint.pformat(self.dict(by_alias=True))
|
42
|
+
|
43
|
+
def to_json(self) -> str:
|
44
|
+
"""Returns the JSON representation of the model using alias"""
|
45
|
+
return json.dumps(self.to_dict())
|
46
|
+
|
47
|
+
@classmethod
|
48
|
+
def from_json(cls, json_str: str) -> FundPnlBreakdown:
|
49
|
+
"""Create an instance of FundPnlBreakdown from a JSON string"""
|
50
|
+
return cls.from_dict(json.loads(json_str))
|
51
|
+
|
52
|
+
def to_dict(self):
|
53
|
+
"""Returns the dictionary representation of the model using alias"""
|
54
|
+
_dict = self.dict(by_alias=True,
|
55
|
+
exclude={
|
56
|
+
},
|
57
|
+
exclude_none=True)
|
58
|
+
# override the default output from pydantic by calling `to_dict()` of each value in non_class_specific_pnl (dict)
|
59
|
+
_field_dict = {}
|
60
|
+
if self.non_class_specific_pnl:
|
61
|
+
for _key in self.non_class_specific_pnl:
|
62
|
+
if self.non_class_specific_pnl[_key]:
|
63
|
+
_field_dict[_key] = self.non_class_specific_pnl[_key].to_dict()
|
64
|
+
_dict['nonClassSpecificPnl'] = _field_dict
|
65
|
+
# override the default output from pydantic by calling `to_dict()` of each value in aggregated_class_pnl (dict)
|
66
|
+
_field_dict = {}
|
67
|
+
if self.aggregated_class_pnl:
|
68
|
+
for _key in self.aggregated_class_pnl:
|
69
|
+
if self.aggregated_class_pnl[_key]:
|
70
|
+
_field_dict[_key] = self.aggregated_class_pnl[_key].to_dict()
|
71
|
+
_dict['aggregatedClassPnl'] = _field_dict
|
72
|
+
# override the default output from pydantic by calling `to_dict()` of each value in total_pnl (dict)
|
73
|
+
_field_dict = {}
|
74
|
+
if self.total_pnl:
|
75
|
+
for _key in self.total_pnl:
|
76
|
+
if self.total_pnl[_key]:
|
77
|
+
_field_dict[_key] = self.total_pnl[_key].to_dict()
|
78
|
+
_dict['totalPnl'] = _field_dict
|
79
|
+
return _dict
|
80
|
+
|
81
|
+
@classmethod
|
82
|
+
def from_dict(cls, obj: dict) -> FundPnlBreakdown:
|
83
|
+
"""Create an instance of FundPnlBreakdown from a dict"""
|
84
|
+
if obj is None:
|
85
|
+
return None
|
86
|
+
|
87
|
+
if not isinstance(obj, dict):
|
88
|
+
return FundPnlBreakdown.parse_obj(obj)
|
89
|
+
|
90
|
+
_obj = FundPnlBreakdown.parse_obj({
|
91
|
+
"non_class_specific_pnl": dict(
|
92
|
+
(_k, FundAmount.from_dict(_v))
|
93
|
+
for _k, _v in obj.get("nonClassSpecificPnl").items()
|
94
|
+
)
|
95
|
+
if obj.get("nonClassSpecificPnl") is not None
|
96
|
+
else None,
|
97
|
+
"aggregated_class_pnl": dict(
|
98
|
+
(_k, FundAmount.from_dict(_v))
|
99
|
+
for _k, _v in obj.get("aggregatedClassPnl").items()
|
100
|
+
)
|
101
|
+
if obj.get("aggregatedClassPnl") is not None
|
102
|
+
else None,
|
103
|
+
"total_pnl": dict(
|
104
|
+
(_k, FundAmount.from_dict(_v))
|
105
|
+
for _k, _v in obj.get("totalPnl").items()
|
106
|
+
)
|
107
|
+
if obj.get("totalPnl") is not None
|
108
|
+
else None
|
109
|
+
})
|
110
|
+
return _obj
|
@@ -0,0 +1,69 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
|
3
|
+
"""
|
4
|
+
LUSID API
|
5
|
+
|
6
|
+
FINBOURNE Technology # noqa: E501
|
7
|
+
|
8
|
+
Contact: info@finbourne.com
|
9
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
10
|
+
|
11
|
+
Do not edit the class manually.
|
12
|
+
"""
|
13
|
+
|
14
|
+
|
15
|
+
from __future__ import annotations
|
16
|
+
import pprint
|
17
|
+
import re # noqa: F401
|
18
|
+
import json
|
19
|
+
|
20
|
+
|
21
|
+
from typing import Any, Dict, Optional, Union
|
22
|
+
from pydantic.v1 import BaseModel, Field, StrictFloat, StrictInt
|
23
|
+
|
24
|
+
class FundPreviousNAV(BaseModel):
|
25
|
+
"""
|
26
|
+
FundPreviousNAV
|
27
|
+
"""
|
28
|
+
amount: Optional[Union[StrictFloat, StrictInt]] = Field(None, description="The amount of the previous NAV.")
|
29
|
+
__properties = ["amount"]
|
30
|
+
|
31
|
+
class Config:
|
32
|
+
"""Pydantic configuration"""
|
33
|
+
allow_population_by_field_name = True
|
34
|
+
validate_assignment = True
|
35
|
+
|
36
|
+
def to_str(self) -> str:
|
37
|
+
"""Returns the string representation of the model using alias"""
|
38
|
+
return pprint.pformat(self.dict(by_alias=True))
|
39
|
+
|
40
|
+
def to_json(self) -> str:
|
41
|
+
"""Returns the JSON representation of the model using alias"""
|
42
|
+
return json.dumps(self.to_dict())
|
43
|
+
|
44
|
+
@classmethod
|
45
|
+
def from_json(cls, json_str: str) -> FundPreviousNAV:
|
46
|
+
"""Create an instance of FundPreviousNAV from a JSON string"""
|
47
|
+
return cls.from_dict(json.loads(json_str))
|
48
|
+
|
49
|
+
def to_dict(self):
|
50
|
+
"""Returns the dictionary representation of the model using alias"""
|
51
|
+
_dict = self.dict(by_alias=True,
|
52
|
+
exclude={
|
53
|
+
},
|
54
|
+
exclude_none=True)
|
55
|
+
return _dict
|
56
|
+
|
57
|
+
@classmethod
|
58
|
+
def from_dict(cls, obj: dict) -> FundPreviousNAV:
|
59
|
+
"""Create an instance of FundPreviousNAV from a dict"""
|
60
|
+
if obj is None:
|
61
|
+
return None
|
62
|
+
|
63
|
+
if not isinstance(obj, dict):
|
64
|
+
return FundPreviousNAV.parse_obj(obj)
|
65
|
+
|
66
|
+
_obj = FundPreviousNAV.parse_obj({
|
67
|
+
"amount": obj.get("amount")
|
68
|
+
})
|
69
|
+
return _obj
|
lusid/models/fund_request.py
CHANGED
@@ -32,6 +32,7 @@ class FundRequest(BaseModel):
|
|
32
32
|
code: constr(strict=True, max_length=64, min_length=1) = Field(..., description="The code given for the Fund.")
|
33
33
|
display_name: Optional[constr(strict=True, max_length=256, min_length=1)] = Field(None, alias="displayName", description="The name of the Fund.")
|
34
34
|
description: Optional[constr(strict=True, max_length=1024, min_length=0)] = Field(None, description="A description for the Fund.")
|
35
|
+
fund_configuration_id: Optional[ResourceId] = Field(None, alias="fundConfigurationId")
|
35
36
|
abor_id: ResourceId = Field(..., alias="aborId")
|
36
37
|
share_class_instrument_scopes: Optional[conlist(StrictStr, max_items=1)] = Field(None, alias="shareClassInstrumentScopes", description="The scopes in which the instruments lie, currently limited to one.")
|
37
38
|
share_class_instruments: Optional[conlist(InstrumentResolutionDetail)] = Field(None, alias="shareClassInstruments", description="Details the user-provided instrument identifiers and the instrument resolved from them.")
|
@@ -40,7 +41,7 @@ class FundRequest(BaseModel):
|
|
40
41
|
decimal_places: Optional[conint(strict=True, le=30, ge=0)] = Field(None, alias="decimalPlaces", description="Number of decimal places for reporting")
|
41
42
|
year_end_date: DayMonth = Field(..., alias="yearEndDate")
|
42
43
|
properties: Optional[Dict[str, ModelProperty]] = Field(None, description="A set of properties for the Fund.")
|
43
|
-
__properties = ["code", "displayName", "description", "aborId", "shareClassInstrumentScopes", "shareClassInstruments", "type", "inceptionDate", "decimalPlaces", "yearEndDate", "properties"]
|
44
|
+
__properties = ["code", "displayName", "description", "fundConfigurationId", "aborId", "shareClassInstrumentScopes", "shareClassInstruments", "type", "inceptionDate", "decimalPlaces", "yearEndDate", "properties"]
|
44
45
|
|
45
46
|
@validator('code')
|
46
47
|
def code_validate_regular_expression(cls, value):
|
@@ -83,6 +84,9 @@ class FundRequest(BaseModel):
|
|
83
84
|
exclude={
|
84
85
|
},
|
85
86
|
exclude_none=True)
|
87
|
+
# override the default output from pydantic by calling `to_dict()` of fund_configuration_id
|
88
|
+
if self.fund_configuration_id:
|
89
|
+
_dict['fundConfigurationId'] = self.fund_configuration_id.to_dict()
|
86
90
|
# override the default output from pydantic by calling `to_dict()` of abor_id
|
87
91
|
if self.abor_id:
|
88
92
|
_dict['aborId'] = self.abor_id.to_dict()
|
@@ -148,6 +152,7 @@ class FundRequest(BaseModel):
|
|
148
152
|
"code": obj.get("code"),
|
149
153
|
"display_name": obj.get("displayName"),
|
150
154
|
"description": obj.get("description"),
|
155
|
+
"fund_configuration_id": ResourceId.from_dict(obj.get("fundConfigurationId")) if obj.get("fundConfigurationId") is not None else None,
|
151
156
|
"abor_id": ResourceId.from_dict(obj.get("aborId")) if obj.get("aborId") is not None else None,
|
152
157
|
"share_class_instrument_scopes": obj.get("shareClassInstrumentScopes"),
|
153
158
|
"share_class_instruments": [InstrumentResolutionDetail.from_dict(_item) for _item in obj.get("shareClassInstruments")] if obj.get("shareClassInstruments") is not None else None,
|