lusid-sdk 2.1.403__py3-none-any.whl → 2.1.414__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 +4 -4
- lusid/api/abor_api.py +8 -16
- lusid/api/entities_api.py +180 -0
- lusid/api/group_reconciliations_api.py +160 -0
- lusid/api/portfolios_api.py +25 -28
- lusid/configuration.py +1 -1
- lusid/models/__init__.py +4 -4
- lusid/models/access_metadata_value.py +1 -1
- 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/custom_entity_entity.py +146 -0
- lusid/models/diary_entry_request.py +10 -1
- lusid/models/flow_conventions.py +7 -1
- 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_sdk-2.1.403.dist-info → lusid_sdk-2.1.414.dist-info}/METADATA +7 -5
- {lusid_sdk-2.1.403.dist-info → lusid_sdk-2.1.414.dist-info}/RECORD +20 -20
- lusid/models/metadata_key_value_response.py +0 -86
- {lusid_sdk-2.1.403.dist-info → lusid_sdk-2.1.414.dist-info}/WHEEL +0 -0
lusid/configuration.py
CHANGED
@@ -382,7 +382,7 @@ class Configuration:
|
|
382
382
|
return "Python SDK Debug Report:\n"\
|
383
383
|
"OS: {env}\n"\
|
384
384
|
"Python Version: {pyversion}\n"\
|
385
|
-
"Version of the API: 0.11.
|
385
|
+
"Version of the API: 0.11.6844\n"\
|
386
386
|
"SDK Package Version: {package_version}".\
|
387
387
|
format(env=sys.platform, pyversion=sys.version, package_version=package_version)
|
388
388
|
|
lusid/models/__init__.py
CHANGED
@@ -80,6 +80,7 @@ from lusid.models.batch_adjust_holdings_response import BatchAdjustHoldingsRespo
|
|
80
80
|
from lusid.models.batch_upsert_instrument_properties_response import BatchUpsertInstrumentPropertiesResponse
|
81
81
|
from lusid.models.batch_upsert_portfolio_access_metadata_request import BatchUpsertPortfolioAccessMetadataRequest
|
82
82
|
from lusid.models.batch_upsert_portfolio_access_metadata_response import BatchUpsertPortfolioAccessMetadataResponse
|
83
|
+
from lusid.models.batch_upsert_portfolio_access_metadata_response_item import BatchUpsertPortfolioAccessMetadataResponseItem
|
83
84
|
from lusid.models.batch_upsert_portfolio_transactions_response import BatchUpsertPortfolioTransactionsResponse
|
84
85
|
from lusid.models.batch_upsert_property_definition_properties_response import BatchUpsertPropertyDefinitionPropertiesResponse
|
85
86
|
from lusid.models.block import Block
|
@@ -249,6 +250,7 @@ from lusid.models.custodian_account_request import CustodianAccountRequest
|
|
249
250
|
from lusid.models.custodian_accounts_upsert_response import CustodianAccountsUpsertResponse
|
250
251
|
from lusid.models.custom_entity_definition import CustomEntityDefinition
|
251
252
|
from lusid.models.custom_entity_definition_request import CustomEntityDefinitionRequest
|
253
|
+
from lusid.models.custom_entity_entity import CustomEntityEntity
|
252
254
|
from lusid.models.custom_entity_field import CustomEntityField
|
253
255
|
from lusid.models.custom_entity_field_definition import CustomEntityFieldDefinition
|
254
256
|
from lusid.models.custom_entity_id import CustomEntityId
|
@@ -519,8 +521,6 @@ from lusid.models.market_quote import MarketQuote
|
|
519
521
|
from lusid.models.match_criterion import MatchCriterion
|
520
522
|
from lusid.models.maturity_event import MaturityEvent
|
521
523
|
from lusid.models.merger_event import MergerEvent
|
522
|
-
from lusid.models.metadata_key_value import MetadataKeyValue
|
523
|
-
from lusid.models.metadata_key_value_response import MetadataKeyValueResponse
|
524
524
|
from lusid.models.metric_value import MetricValue
|
525
525
|
from lusid.models.model_options import ModelOptions
|
526
526
|
from lusid.models.model_options_type import ModelOptionsType
|
@@ -1150,6 +1150,7 @@ __all__ = [
|
|
1150
1150
|
"BatchUpsertInstrumentPropertiesResponse",
|
1151
1151
|
"BatchUpsertPortfolioAccessMetadataRequest",
|
1152
1152
|
"BatchUpsertPortfolioAccessMetadataResponse",
|
1153
|
+
"BatchUpsertPortfolioAccessMetadataResponseItem",
|
1153
1154
|
"BatchUpsertPortfolioTransactionsResponse",
|
1154
1155
|
"BatchUpsertPropertyDefinitionPropertiesResponse",
|
1155
1156
|
"Block",
|
@@ -1319,6 +1320,7 @@ __all__ = [
|
|
1319
1320
|
"CustodianAccountsUpsertResponse",
|
1320
1321
|
"CustomEntityDefinition",
|
1321
1322
|
"CustomEntityDefinitionRequest",
|
1323
|
+
"CustomEntityEntity",
|
1322
1324
|
"CustomEntityField",
|
1323
1325
|
"CustomEntityFieldDefinition",
|
1324
1326
|
"CustomEntityId",
|
@@ -1589,8 +1591,6 @@ __all__ = [
|
|
1589
1591
|
"MatchCriterion",
|
1590
1592
|
"MaturityEvent",
|
1591
1593
|
"MergerEvent",
|
1592
|
-
"MetadataKeyValue",
|
1593
|
-
"MetadataKeyValueResponse",
|
1594
1594
|
"MetricValue",
|
1595
1595
|
"ModelOptions",
|
1596
1596
|
"ModelOptionsType",
|
@@ -23,7 +23,7 @@ from pydantic.v1 import BaseModel, Field, constr
|
|
23
23
|
|
24
24
|
class AccessMetadataValue(BaseModel):
|
25
25
|
"""
|
26
|
-
An access control value. Provider should only be used if you are a service
|
26
|
+
An access control value. Provider should only be used if you are a service provider licensing data. In that case the provider value must match your domain. # noqa: E501
|
27
27
|
"""
|
28
28
|
value: constr(strict=True, max_length=2048, min_length=0) = Field(...)
|
29
29
|
provider: Optional[constr(strict=True, max_length=50, min_length=0)] = None
|
@@ -18,16 +18,18 @@ import re # noqa: F401
|
|
18
18
|
import json
|
19
19
|
|
20
20
|
|
21
|
-
from typing import Any, Dict
|
22
|
-
from pydantic.v1 import BaseModel, Field
|
23
|
-
from lusid.models.
|
21
|
+
from typing import Any, Dict, List
|
22
|
+
from pydantic.v1 import BaseModel, Field, conlist
|
23
|
+
from lusid.models.access_metadata_value import AccessMetadataValue
|
24
|
+
from lusid.models.resource_id import ResourceId
|
24
25
|
|
25
26
|
class BatchUpsertPortfolioAccessMetadataRequest(BaseModel):
|
26
27
|
"""
|
27
28
|
BatchUpsertPortfolioAccessMetadataRequest
|
28
29
|
"""
|
29
|
-
|
30
|
-
|
30
|
+
portfolio_id: ResourceId = Field(..., alias="portfolioId")
|
31
|
+
metadata: Dict[str, conlist(AccessMetadataValue)] = Field(...)
|
32
|
+
__properties = ["portfolioId", "metadata"]
|
31
33
|
|
32
34
|
class Config:
|
33
35
|
"""Pydantic configuration"""
|
@@ -53,13 +55,18 @@ class BatchUpsertPortfolioAccessMetadataRequest(BaseModel):
|
|
53
55
|
exclude={
|
54
56
|
},
|
55
57
|
exclude_none=True)
|
56
|
-
# override the default output from pydantic by calling `to_dict()` of
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
58
|
+
# override the default output from pydantic by calling `to_dict()` of portfolio_id
|
59
|
+
if self.portfolio_id:
|
60
|
+
_dict['portfolioId'] = self.portfolio_id.to_dict()
|
61
|
+
# override the default output from pydantic by calling `to_dict()` of each value in metadata (dict of array)
|
62
|
+
_field_dict_of_array = {}
|
63
|
+
if self.metadata:
|
64
|
+
for _key in self.metadata:
|
65
|
+
if self.metadata[_key]:
|
66
|
+
_field_dict_of_array[_key] = [
|
67
|
+
_item.to_dict() for _item in self.metadata[_key]
|
68
|
+
]
|
69
|
+
_dict['metadata'] = _field_dict_of_array
|
63
70
|
return _dict
|
64
71
|
|
65
72
|
@classmethod
|
@@ -72,11 +79,14 @@ class BatchUpsertPortfolioAccessMetadataRequest(BaseModel):
|
|
72
79
|
return BatchUpsertPortfolioAccessMetadataRequest.parse_obj(obj)
|
73
80
|
|
74
81
|
_obj = BatchUpsertPortfolioAccessMetadataRequest.parse_obj({
|
75
|
-
"
|
76
|
-
|
77
|
-
|
82
|
+
"portfolio_id": ResourceId.from_dict(obj.get("portfolioId")) if obj.get("portfolioId") is not None else None,
|
83
|
+
"metadata": dict(
|
84
|
+
(_k,
|
85
|
+
[AccessMetadataValue.from_dict(_item) for _item in _v]
|
86
|
+
if _v is not None
|
87
|
+
else None
|
88
|
+
)
|
89
|
+
for _k, _v in obj.get("metadata").items()
|
78
90
|
)
|
79
|
-
if obj.get("portfoliosWithMetadata") is not None
|
80
|
-
else None
|
81
91
|
})
|
82
92
|
return _obj
|
@@ -18,16 +18,20 @@ import re # noqa: F401
|
|
18
18
|
import json
|
19
19
|
|
20
20
|
|
21
|
-
from typing import Any, Dict
|
22
|
-
from pydantic.v1 import BaseModel, Field
|
23
|
-
from lusid.models.
|
21
|
+
from typing import Any, Dict, List, Optional
|
22
|
+
from pydantic.v1 import BaseModel, Field, conlist
|
23
|
+
from lusid.models.batch_upsert_portfolio_access_metadata_response_item import BatchUpsertPortfolioAccessMetadataResponseItem
|
24
|
+
from lusid.models.error_detail import ErrorDetail
|
25
|
+
from lusid.models.link import Link
|
24
26
|
|
25
27
|
class BatchUpsertPortfolioAccessMetadataResponse(BaseModel):
|
26
28
|
"""
|
27
29
|
BatchUpsertPortfolioAccessMetadataResponse
|
28
30
|
"""
|
29
|
-
|
30
|
-
|
31
|
+
values: Optional[Dict[str, BatchUpsertPortfolioAccessMetadataResponseItem]] = Field(None, description="The items have been successfully updated or created.")
|
32
|
+
failed: Optional[Dict[str, ErrorDetail]] = Field(None, description="The items that could not be updated or created along with a reason for their failure.")
|
33
|
+
links: Optional[conlist(Link)] = None
|
34
|
+
__properties = ["values", "failed", "links"]
|
31
35
|
|
32
36
|
class Config:
|
33
37
|
"""Pydantic configuration"""
|
@@ -53,13 +57,42 @@ class BatchUpsertPortfolioAccessMetadataResponse(BaseModel):
|
|
53
57
|
exclude={
|
54
58
|
},
|
55
59
|
exclude_none=True)
|
56
|
-
# override the default output from pydantic by calling `to_dict()` of each value in
|
60
|
+
# override the default output from pydantic by calling `to_dict()` of each value in values (dict)
|
57
61
|
_field_dict = {}
|
58
|
-
if self.
|
59
|
-
for _key in self.
|
60
|
-
if self.
|
61
|
-
_field_dict[_key] = self.
|
62
|
-
_dict['
|
62
|
+
if self.values:
|
63
|
+
for _key in self.values:
|
64
|
+
if self.values[_key]:
|
65
|
+
_field_dict[_key] = self.values[_key].to_dict()
|
66
|
+
_dict['values'] = _field_dict
|
67
|
+
# override the default output from pydantic by calling `to_dict()` of each value in failed (dict)
|
68
|
+
_field_dict = {}
|
69
|
+
if self.failed:
|
70
|
+
for _key in self.failed:
|
71
|
+
if self.failed[_key]:
|
72
|
+
_field_dict[_key] = self.failed[_key].to_dict()
|
73
|
+
_dict['failed'] = _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 values (nullable) is None
|
82
|
+
# and __fields_set__ contains the field
|
83
|
+
if self.values is None and "values" in self.__fields_set__:
|
84
|
+
_dict['values'] = None
|
85
|
+
|
86
|
+
# set to None if failed (nullable) is None
|
87
|
+
# and __fields_set__ contains the field
|
88
|
+
if self.failed is None and "failed" in self.__fields_set__:
|
89
|
+
_dict['failed'] = 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
|
+
|
63
96
|
return _dict
|
64
97
|
|
65
98
|
@classmethod
|
@@ -72,11 +105,18 @@ class BatchUpsertPortfolioAccessMetadataResponse(BaseModel):
|
|
72
105
|
return BatchUpsertPortfolioAccessMetadataResponse.parse_obj(obj)
|
73
106
|
|
74
107
|
_obj = BatchUpsertPortfolioAccessMetadataResponse.parse_obj({
|
75
|
-
"
|
76
|
-
(_k,
|
77
|
-
for _k, _v in obj.get("
|
108
|
+
"values": dict(
|
109
|
+
(_k, BatchUpsertPortfolioAccessMetadataResponseItem.from_dict(_v))
|
110
|
+
for _k, _v in obj.get("values").items()
|
111
|
+
)
|
112
|
+
if obj.get("values") is not None
|
113
|
+
else None,
|
114
|
+
"failed": dict(
|
115
|
+
(_k, ErrorDetail.from_dict(_v))
|
116
|
+
for _k, _v in obj.get("failed").items()
|
78
117
|
)
|
79
|
-
if obj.get("
|
80
|
-
else None
|
118
|
+
if obj.get("failed") is not None
|
119
|
+
else None,
|
120
|
+
"links": [Link.from_dict(_item) for _item in obj.get("links")] if obj.get("links") is not None else None
|
81
121
|
})
|
82
122
|
return _obj
|
lusid/models/{metadata_key_value.py → batch_upsert_portfolio_access_metadata_response_item.py}
RENAMED
@@ -21,13 +21,15 @@ import json
|
|
21
21
|
from typing import Any, Dict, List
|
22
22
|
from pydantic.v1 import BaseModel, Field, conlist
|
23
23
|
from lusid.models.access_metadata_value import AccessMetadataValue
|
24
|
+
from lusid.models.resource_id import ResourceId
|
24
25
|
|
25
|
-
class
|
26
|
+
class BatchUpsertPortfolioAccessMetadataResponseItem(BaseModel):
|
26
27
|
"""
|
27
|
-
|
28
|
+
BatchUpsertPortfolioAccessMetadataResponseItem
|
28
29
|
"""
|
30
|
+
portfolio_id: ResourceId = Field(..., alias="portfolioId")
|
29
31
|
metadata: Dict[str, conlist(AccessMetadataValue)] = Field(...)
|
30
|
-
__properties = ["metadata"]
|
32
|
+
__properties = ["portfolioId", "metadata"]
|
31
33
|
|
32
34
|
class Config:
|
33
35
|
"""Pydantic configuration"""
|
@@ -43,8 +45,8 @@ class MetadataKeyValue(BaseModel):
|
|
43
45
|
return json.dumps(self.to_dict())
|
44
46
|
|
45
47
|
@classmethod
|
46
|
-
def from_json(cls, json_str: str) ->
|
47
|
-
"""Create an instance of
|
48
|
+
def from_json(cls, json_str: str) -> BatchUpsertPortfolioAccessMetadataResponseItem:
|
49
|
+
"""Create an instance of BatchUpsertPortfolioAccessMetadataResponseItem from a JSON string"""
|
48
50
|
return cls.from_dict(json.loads(json_str))
|
49
51
|
|
50
52
|
def to_dict(self):
|
@@ -53,6 +55,9 @@ class MetadataKeyValue(BaseModel):
|
|
53
55
|
exclude={
|
54
56
|
},
|
55
57
|
exclude_none=True)
|
58
|
+
# override the default output from pydantic by calling `to_dict()` of portfolio_id
|
59
|
+
if self.portfolio_id:
|
60
|
+
_dict['portfolioId'] = self.portfolio_id.to_dict()
|
56
61
|
# override the default output from pydantic by calling `to_dict()` of each value in metadata (dict of array)
|
57
62
|
_field_dict_of_array = {}
|
58
63
|
if self.metadata:
|
@@ -65,15 +70,16 @@ class MetadataKeyValue(BaseModel):
|
|
65
70
|
return _dict
|
66
71
|
|
67
72
|
@classmethod
|
68
|
-
def from_dict(cls, obj: dict) ->
|
69
|
-
"""Create an instance of
|
73
|
+
def from_dict(cls, obj: dict) -> BatchUpsertPortfolioAccessMetadataResponseItem:
|
74
|
+
"""Create an instance of BatchUpsertPortfolioAccessMetadataResponseItem from a dict"""
|
70
75
|
if obj is None:
|
71
76
|
return None
|
72
77
|
|
73
78
|
if not isinstance(obj, dict):
|
74
|
-
return
|
79
|
+
return BatchUpsertPortfolioAccessMetadataResponseItem.parse_obj(obj)
|
75
80
|
|
76
|
-
_obj =
|
81
|
+
_obj = BatchUpsertPortfolioAccessMetadataResponseItem.parse_obj({
|
82
|
+
"portfolio_id": ResourceId.from_dict(obj.get("portfolioId")) if obj.get("portfolioId") is not None else None,
|
77
83
|
"metadata": dict(
|
78
84
|
(_k,
|
79
85
|
[AccessMetadataValue.from_dict(_item) for _item in _v]
|
@@ -0,0 +1,146 @@
|
|
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
|
22
|
+
from pydantic.v1 import BaseModel, Field, StrictInt, StrictStr, conlist, constr
|
23
|
+
from lusid.models.custom_entity_response import CustomEntityResponse
|
24
|
+
from lusid.models.link import Link
|
25
|
+
|
26
|
+
class CustomEntityEntity(BaseModel):
|
27
|
+
"""
|
28
|
+
CustomEntityEntity
|
29
|
+
"""
|
30
|
+
href: StrictStr = Field(..., description="The specific Uniform Resource Identifier (URI) for this resource at the requested effective and asAt datetime.")
|
31
|
+
entity_unique_id: constr(strict=True, min_length=1) = Field(..., alias="entityUniqueId", description="The unique id of the entity.")
|
32
|
+
as_at_version_number: Optional[StrictInt] = Field(None, alias="asAtVersionNumber", description="The integer version number for the entity (the entity was created at version 1)")
|
33
|
+
status: constr(strict=True, min_length=1) = Field(..., description="The status of the entity at the current time.")
|
34
|
+
as_at_deleted: Optional[datetime] = Field(None, alias="asAtDeleted", description="The asAt datetime at which the entity was deleted.")
|
35
|
+
user_id_deleted: Optional[StrictStr] = Field(None, alias="userIdDeleted", description="The unique id of the user who deleted the entity.")
|
36
|
+
request_id_deleted: Optional[StrictStr] = Field(None, alias="requestIdDeleted", description="The unique request id of the command that deleted the entity.")
|
37
|
+
effective_at_created: Optional[datetime] = Field(None, alias="effectiveAtCreated", description="The EffectiveAt this Entity is created, if entity does not currently exist in EffectiveAt.")
|
38
|
+
prevailing_custom_entity: Optional[CustomEntityResponse] = Field(None, alias="prevailingCustomEntity")
|
39
|
+
deleted_custom_entity: Optional[CustomEntityResponse] = Field(None, alias="deletedCustomEntity")
|
40
|
+
previewed_status: Optional[StrictStr] = Field(None, alias="previewedStatus", description="The status of the previewed entity.")
|
41
|
+
previewed_custom_entity: Optional[CustomEntityResponse] = Field(None, alias="previewedCustomEntity")
|
42
|
+
links: Optional[conlist(Link)] = None
|
43
|
+
__properties = ["href", "entityUniqueId", "asAtVersionNumber", "status", "asAtDeleted", "userIdDeleted", "requestIdDeleted", "effectiveAtCreated", "prevailingCustomEntity", "deletedCustomEntity", "previewedStatus", "previewedCustomEntity", "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) -> CustomEntityEntity:
|
60
|
+
"""Create an instance of CustomEntityEntity 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 prevailing_custom_entity
|
70
|
+
if self.prevailing_custom_entity:
|
71
|
+
_dict['prevailingCustomEntity'] = self.prevailing_custom_entity.to_dict()
|
72
|
+
# override the default output from pydantic by calling `to_dict()` of deleted_custom_entity
|
73
|
+
if self.deleted_custom_entity:
|
74
|
+
_dict['deletedCustomEntity'] = self.deleted_custom_entity.to_dict()
|
75
|
+
# override the default output from pydantic by calling `to_dict()` of previewed_custom_entity
|
76
|
+
if self.previewed_custom_entity:
|
77
|
+
_dict['previewedCustomEntity'] = self.previewed_custom_entity.to_dict()
|
78
|
+
# override the default output from pydantic by calling `to_dict()` of each item in links (list)
|
79
|
+
_items = []
|
80
|
+
if self.links:
|
81
|
+
for _item in self.links:
|
82
|
+
if _item:
|
83
|
+
_items.append(_item.to_dict())
|
84
|
+
_dict['links'] = _items
|
85
|
+
# set to None if as_at_version_number (nullable) is None
|
86
|
+
# and __fields_set__ contains the field
|
87
|
+
if self.as_at_version_number is None and "as_at_version_number" in self.__fields_set__:
|
88
|
+
_dict['asAtVersionNumber'] = None
|
89
|
+
|
90
|
+
# set to None if as_at_deleted (nullable) is None
|
91
|
+
# and __fields_set__ contains the field
|
92
|
+
if self.as_at_deleted is None and "as_at_deleted" in self.__fields_set__:
|
93
|
+
_dict['asAtDeleted'] = None
|
94
|
+
|
95
|
+
# set to None if user_id_deleted (nullable) is None
|
96
|
+
# and __fields_set__ contains the field
|
97
|
+
if self.user_id_deleted is None and "user_id_deleted" in self.__fields_set__:
|
98
|
+
_dict['userIdDeleted'] = None
|
99
|
+
|
100
|
+
# set to None if request_id_deleted (nullable) is None
|
101
|
+
# and __fields_set__ contains the field
|
102
|
+
if self.request_id_deleted is None and "request_id_deleted" in self.__fields_set__:
|
103
|
+
_dict['requestIdDeleted'] = None
|
104
|
+
|
105
|
+
# set to None if effective_at_created (nullable) is None
|
106
|
+
# and __fields_set__ contains the field
|
107
|
+
if self.effective_at_created is None and "effective_at_created" in self.__fields_set__:
|
108
|
+
_dict['effectiveAtCreated'] = None
|
109
|
+
|
110
|
+
# set to None if previewed_status (nullable) is None
|
111
|
+
# and __fields_set__ contains the field
|
112
|
+
if self.previewed_status is None and "previewed_status" in self.__fields_set__:
|
113
|
+
_dict['previewedStatus'] = None
|
114
|
+
|
115
|
+
# set to None if links (nullable) is None
|
116
|
+
# and __fields_set__ contains the field
|
117
|
+
if self.links is None and "links" in self.__fields_set__:
|
118
|
+
_dict['links'] = None
|
119
|
+
|
120
|
+
return _dict
|
121
|
+
|
122
|
+
@classmethod
|
123
|
+
def from_dict(cls, obj: dict) -> CustomEntityEntity:
|
124
|
+
"""Create an instance of CustomEntityEntity from a dict"""
|
125
|
+
if obj is None:
|
126
|
+
return None
|
127
|
+
|
128
|
+
if not isinstance(obj, dict):
|
129
|
+
return CustomEntityEntity.parse_obj(obj)
|
130
|
+
|
131
|
+
_obj = CustomEntityEntity.parse_obj({
|
132
|
+
"href": obj.get("href"),
|
133
|
+
"entity_unique_id": obj.get("entityUniqueId"),
|
134
|
+
"as_at_version_number": obj.get("asAtVersionNumber"),
|
135
|
+
"status": obj.get("status"),
|
136
|
+
"as_at_deleted": obj.get("asAtDeleted"),
|
137
|
+
"user_id_deleted": obj.get("userIdDeleted"),
|
138
|
+
"request_id_deleted": obj.get("requestIdDeleted"),
|
139
|
+
"effective_at_created": obj.get("effectiveAtCreated"),
|
140
|
+
"prevailing_custom_entity": CustomEntityResponse.from_dict(obj.get("prevailingCustomEntity")) if obj.get("prevailingCustomEntity") is not None else None,
|
141
|
+
"deleted_custom_entity": CustomEntityResponse.from_dict(obj.get("deletedCustomEntity")) if obj.get("deletedCustomEntity") is not None else None,
|
142
|
+
"previewed_status": obj.get("previewedStatus"),
|
143
|
+
"previewed_custom_entity": CustomEntityResponse.from_dict(obj.get("previewedCustomEntity")) if obj.get("previewedCustomEntity") is not None else None,
|
144
|
+
"links": [Link.from_dict(_item) for _item in obj.get("links")] if obj.get("links") is not None else None
|
145
|
+
})
|
146
|
+
return _obj
|
@@ -26,12 +26,20 @@ class DiaryEntryRequest(BaseModel):
|
|
26
26
|
"""
|
27
27
|
The request to add a diary entry # noqa: E501
|
28
28
|
"""
|
29
|
+
diary_entry_code: constr(strict=True, max_length=64, min_length=1) = Field(..., alias="diaryEntryCode", description="The code of the diary entry.")
|
29
30
|
name: Optional[constr(strict=True, max_length=512, min_length=1)] = Field(None, description="The name of the diary entry.")
|
30
31
|
status: Optional[StrictStr] = Field(None, description="The status of a Diary Entry of Type 'Other'. Defaults to 'Undefined' and supports 'Undefined', 'Estimate', 'Candidate', and 'Final'.")
|
31
32
|
effective_at: datetime = Field(..., alias="effectiveAt", description="The effective time of the diary entry.")
|
32
33
|
query_as_at: Optional[datetime] = Field(None, alias="queryAsAt", description="The query time of the diary entry. Defaults to latest.")
|
33
34
|
properties: Optional[Dict[str, ModelProperty]] = Field(None, description="A set of properties for the diary entry.")
|
34
|
-
__properties = ["name", "status", "effectiveAt", "queryAsAt", "properties"]
|
35
|
+
__properties = ["diaryEntryCode", "name", "status", "effectiveAt", "queryAsAt", "properties"]
|
36
|
+
|
37
|
+
@validator('diary_entry_code')
|
38
|
+
def diary_entry_code_validate_regular_expression(cls, value):
|
39
|
+
"""Validates the regular expression"""
|
40
|
+
if not re.match(r"^[a-zA-Z0-9\-_]+$", value):
|
41
|
+
raise ValueError(r"must validate the regular expression /^[a-zA-Z0-9\-_]+$/")
|
42
|
+
return value
|
35
43
|
|
36
44
|
@validator('name')
|
37
45
|
def name_validate_regular_expression(cls, value):
|
@@ -106,6 +114,7 @@ class DiaryEntryRequest(BaseModel):
|
|
106
114
|
return DiaryEntryRequest.parse_obj(obj)
|
107
115
|
|
108
116
|
_obj = DiaryEntryRequest.parse_obj({
|
117
|
+
"diary_entry_code": obj.get("diaryEntryCode"),
|
109
118
|
"name": obj.get("name"),
|
110
119
|
"status": obj.get("status"),
|
111
120
|
"effective_at": obj.get("effectiveAt"),
|
lusid/models/flow_conventions.py
CHANGED
@@ -20,6 +20,7 @@ import json
|
|
20
20
|
|
21
21
|
from typing import Any, Dict, List, Optional
|
22
22
|
from pydantic.v1 import BaseModel, Field, StrictBool, StrictInt, StrictStr, conlist, constr, validator
|
23
|
+
from lusid.models.relative_date_offset import RelativeDateOffset
|
23
24
|
|
24
25
|
class FlowConventions(BaseModel):
|
25
26
|
"""
|
@@ -37,9 +38,10 @@ class FlowConventions(BaseModel):
|
|
37
38
|
accrual_date_adjustment: Optional[constr(strict=True, max_length=50, min_length=0)] = Field(None, alias="accrualDateAdjustment", description="Indicates if the accrual dates are adjusted using the business day convention. The default value is 'Adjusted'. Supported string (enumeration) values are: [Adjusted, Unadjusted].")
|
38
39
|
business_day_convention: Optional[StrictStr] = Field(None, alias="businessDayConvention", description="When generating a set of dates, what convention should be used for adjusting dates that coincide with a non-business day. Supported string (enumeration) values are: [NoAdjustment, None, Previous, P, Following, F, ModifiedPrevious, MP, ModifiedFollowing, MF, HalfMonthModifiedFollowing, Nearest].")
|
39
40
|
accrual_day_count_convention: Optional[constr(strict=True, max_length=50, min_length=0)] = Field(None, alias="accrualDayCountConvention", description="Optional, if not set the main DayCountConvention is used for all accrual calculations. This only needs to be set when accrual uses a different day count to the coupon calculation.")
|
41
|
+
coupon_payment_lag: Optional[RelativeDateOffset] = Field(None, alias="couponPaymentLag")
|
40
42
|
scope: Optional[constr(strict=True, max_length=256, min_length=1)] = Field(None, description="The scope used when updating or inserting the convention.")
|
41
43
|
code: Optional[constr(strict=True, max_length=256, min_length=1)] = Field(None, description="The code of the convention.")
|
42
|
-
__properties = ["currency", "paymentFrequency", "dayCountConvention", "rollConvention", "paymentCalendars", "resetCalendars", "settleDays", "resetDays", "leapDaysIncluded", "accrualDateAdjustment", "businessDayConvention", "accrualDayCountConvention", "scope", "code"]
|
44
|
+
__properties = ["currency", "paymentFrequency", "dayCountConvention", "rollConvention", "paymentCalendars", "resetCalendars", "settleDays", "resetDays", "leapDaysIncluded", "accrualDateAdjustment", "businessDayConvention", "accrualDayCountConvention", "couponPaymentLag", "scope", "code"]
|
43
45
|
|
44
46
|
@validator('scope')
|
45
47
|
def scope_validate_regular_expression(cls, value):
|
@@ -85,6 +87,9 @@ class FlowConventions(BaseModel):
|
|
85
87
|
exclude={
|
86
88
|
},
|
87
89
|
exclude_none=True)
|
90
|
+
# override the default output from pydantic by calling `to_dict()` of coupon_payment_lag
|
91
|
+
if self.coupon_payment_lag:
|
92
|
+
_dict['couponPaymentLag'] = self.coupon_payment_lag.to_dict()
|
88
93
|
# set to None if leap_days_included (nullable) is None
|
89
94
|
# and __fields_set__ contains the field
|
90
95
|
if self.leap_days_included is None and "leap_days_included" in self.__fields_set__:
|
@@ -139,6 +144,7 @@ class FlowConventions(BaseModel):
|
|
139
144
|
"accrual_date_adjustment": obj.get("accrualDateAdjustment"),
|
140
145
|
"business_day_convention": obj.get("businessDayConvention"),
|
141
146
|
"accrual_day_count_convention": obj.get("accrualDayCountConvention"),
|
147
|
+
"coupon_payment_lag": RelativeDateOffset.from_dict(obj.get("couponPaymentLag")) if obj.get("couponPaymentLag") is not None else None,
|
142
148
|
"scope": obj.get("scope"),
|
143
149
|
"code": obj.get("code")
|
144
150
|
})
|
@@ -18,7 +18,7 @@ import re # noqa: F401
|
|
18
18
|
import json
|
19
19
|
|
20
20
|
|
21
|
-
from typing import Any, Dict
|
21
|
+
from typing import Any, Dict, Optional
|
22
22
|
from pydantic.v1 import BaseModel, Field
|
23
23
|
from lusid.models.group_reconciliation_aggregate_comparison_rule_operand import GroupReconciliationAggregateComparisonRuleOperand
|
24
24
|
from lusid.models.group_reconciliation_comparison_rule_tolerance import GroupReconciliationComparisonRuleTolerance
|
@@ -29,7 +29,7 @@ class GroupReconciliationAggregateAttributeRule(BaseModel):
|
|
29
29
|
"""
|
30
30
|
left: GroupReconciliationAggregateComparisonRuleOperand = Field(...)
|
31
31
|
right: GroupReconciliationAggregateComparisonRuleOperand = Field(...)
|
32
|
-
tolerance: GroupReconciliationComparisonRuleTolerance =
|
32
|
+
tolerance: Optional[GroupReconciliationComparisonRuleTolerance] = None
|
33
33
|
__properties = ["left", "right", "tolerance"]
|
34
34
|
|
35
35
|
class Config:
|
@@ -25,7 +25,7 @@ class GroupReconciliationAggregateComparisonRuleOperand(BaseModel):
|
|
25
25
|
"""
|
26
26
|
GroupReconciliationAggregateComparisonRuleOperand
|
27
27
|
"""
|
28
|
-
key: constr(strict=True, max_length=
|
28
|
+
key: constr(strict=True, max_length=1024, min_length=0) = Field(..., description="The key of the value to compare")
|
29
29
|
operation: constr(strict=True, min_length=1) = Field(..., description="What to do with the value pointed to by the key, e.g. Sum. Only \"Value is allowed for core rules\"")
|
30
30
|
__properties = ["key", "operation"]
|
31
31
|
|
@@ -25,7 +25,7 @@ class GroupReconciliationCoreComparisonRuleOperand(BaseModel):
|
|
25
25
|
"""
|
26
26
|
GroupReconciliationCoreComparisonRuleOperand
|
27
27
|
"""
|
28
|
-
key: constr(strict=True, max_length=
|
28
|
+
key: constr(strict=True, max_length=1024, min_length=0) = Field(..., description="The key of the value to compare")
|
29
29
|
operation: constr(strict=True, min_length=1) = Field(..., description="What to do with the value pointed to by the key, e.g. Sum. Only \"Value is allowed for core rules\"")
|
30
30
|
__properties = ["key", "operation"]
|
31
31
|
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: lusid-sdk
|
3
|
-
Version: 2.1.
|
3
|
+
Version: 2.1.414
|
4
4
|
Summary: LUSID API
|
5
5
|
Home-page: https://github.com/finbourne/lusid-sdk-python
|
6
6
|
License: MIT
|
@@ -31,7 +31,7 @@ All URIs are relative to *https://www.lusid.com/api*
|
|
31
31
|
|
32
32
|
Class | Method | HTTP request | Description
|
33
33
|
------------ | ------------- | ------------- | -------------
|
34
|
-
*AborApi* | [**add_diary_entry**](docs/AborApi.md#add_diary_entry) | **POST** /api/abor/{scope}/{code}/accountingdiary
|
34
|
+
*AborApi* | [**add_diary_entry**](docs/AborApi.md#add_diary_entry) | **POST** /api/abor/{scope}/{code}/accountingdiary | [EXPERIMENTAL] AddDiaryEntry: Add a diary entry to the specified Abor.
|
35
35
|
*AborApi* | [**close_period**](docs/AborApi.md#close_period) | **POST** /api/abor/{scope}/{code}/accountingdiary/$closeperiod | [EXPERIMENTAL] ClosePeriod: Closes or locks the current period for the given Abor.
|
36
36
|
*AborApi* | [**create_abor**](docs/AborApi.md#create_abor) | **POST** /api/abor/{scope} | [EXPERIMENTAL] CreateAbor: Create an Abor.
|
37
37
|
*AborApi* | [**delete_abor**](docs/AborApi.md#delete_abor) | **DELETE** /api/abor/{scope}/{code} | [EXPERIMENTAL] DeleteAbor: Delete an Abor.
|
@@ -209,6 +209,7 @@ Class | Method | HTTP request | Description
|
|
209
209
|
*DataTypesApi* | [**update_reference_values**](docs/DataTypesApi.md#update_reference_values) | **PUT** /api/datatypes/{scope}/{code}/referencedatavalues | [EARLY ACCESS] UpdateReferenceValues: Update reference data on a data type
|
210
210
|
*DerivedTransactionPortfoliosApi* | [**create_derived_portfolio**](docs/DerivedTransactionPortfoliosApi.md#create_derived_portfolio) | **POST** /api/derivedtransactionportfolios/{scope} | CreateDerivedPortfolio: Create derived portfolio
|
211
211
|
*DerivedTransactionPortfoliosApi* | [**delete_derived_portfolio_details**](docs/DerivedTransactionPortfoliosApi.md#delete_derived_portfolio_details) | **DELETE** /api/derivedtransactionportfolios/{scope}/{code}/details | [EARLY ACCESS] DeleteDerivedPortfolioDetails: Delete derived portfolio details
|
212
|
+
*EntitiesApi* | [**get_custom_entity_by_entity_unique_id**](docs/EntitiesApi.md#get_custom_entity_by_entity_unique_id) | **GET** /api/entities/customentities/{entityUniqueId} | [EXPERIMENTAL] GetCustomEntityByEntityUniqueId: Get a Custom Entity instance by its EntityUniqueId
|
212
213
|
*EntitiesApi* | [**get_data_type_by_entity_unique_id**](docs/EntitiesApi.md#get_data_type_by_entity_unique_id) | **GET** /api/entities/datatypes/{entityUniqueId} | [EXPERIMENTAL] GetDataTypeByEntityUniqueId: Get DataType by EntityUniqueId
|
213
214
|
*EntitiesApi* | [**get_instrument_by_entity_unique_id**](docs/EntitiesApi.md#get_instrument_by_entity_unique_id) | **GET** /api/entities/instruments/{entityUniqueId} | [EXPERIMENTAL] GetInstrumentByEntityUniqueId: Get instrument by EntityUniqueId
|
214
215
|
*EntitiesApi* | [**get_portfolio_by_entity_unique_id**](docs/EntitiesApi.md#get_portfolio_by_entity_unique_id) | **GET** /api/entities/portfolios/{entityUniqueId} | [EXPERIMENTAL] GetPortfolioByEntityUniqueId: Get portfolio by EntityUniqueId
|
@@ -248,6 +249,7 @@ Class | Method | HTTP request | Description
|
|
248
249
|
*FundsApi* | [**upsert_fee_properties**](docs/FundsApi.md#upsert_fee_properties) | **POST** /api/funds/{scope}/{code}/fees/{feeCode}/properties/$upsert | [EXPERIMENTAL] UpsertFeeProperties: Upsert Fee properties.
|
249
250
|
*FundsApi* | [**upsert_fund_properties**](docs/FundsApi.md#upsert_fund_properties) | **POST** /api/funds/{scope}/{code}/properties/$upsert | [EXPERIMENTAL] UpsertFundProperties: Upsert Fund properties.
|
250
251
|
*GroupReconciliationsApi* | [**create_comparison_ruleset**](docs/GroupReconciliationsApi.md#create_comparison_ruleset) | **POST** /api/reconciliations/comparisonrulesets | [EXPERIMENTAL] CreateComparisonRuleset: Create a Group Reconciliation Comparison Ruleset
|
252
|
+
*GroupReconciliationsApi* | [**delete_comparison_ruleset**](docs/GroupReconciliationsApi.md#delete_comparison_ruleset) | **DELETE** /api/reconciliations/comparisonrulesets/{scope}/{code} | [EXPERIMENTAL] DeleteComparisonRuleset: Deletes a particular Group Reconciliation Comparison Ruleset
|
251
253
|
*GroupReconciliationsApi* | [**get_comparison_ruleset**](docs/GroupReconciliationsApi.md#get_comparison_ruleset) | **GET** /api/reconciliations/comparisonrulesets/{scope}/{code} | [EXPERIMENTAL] GetComparisonRuleset: Get a single Group Reconciliation Comparison Ruleset by scope and code
|
252
254
|
*InstrumentEventTypesApi* | [**create_transaction_template**](docs/InstrumentEventTypesApi.md#create_transaction_template) | **POST** /api/instrumenteventtypes/{instrumentEventType}/transactiontemplates/{instrumentType}/{scope} | [EXPERIMENTAL] CreateTransactionTemplate: Create Transaction Template
|
253
255
|
*InstrumentEventTypesApi* | [**delete_transaction_template**](docs/InstrumentEventTypesApi.md#delete_transaction_template) | **DELETE** /api/instrumenteventtypes/{instrumentEventType}/transactiontemplates/{instrumentType}/{scope} | [EXPERIMENTAL] DeleteTransactionTemplate: Delete Transaction Template
|
@@ -384,7 +386,7 @@ Class | Method | HTTP request | Description
|
|
384
386
|
*PortfolioGroupsApi* | [**update_portfolio_group**](docs/PortfolioGroupsApi.md#update_portfolio_group) | **PUT** /api/portfoliogroups/{scope}/{code} | [EARLY ACCESS] UpdatePortfolioGroup: Update portfolio group
|
385
387
|
*PortfolioGroupsApi* | [**upsert_group_properties**](docs/PortfolioGroupsApi.md#upsert_group_properties) | **POST** /api/portfoliogroups/{scope}/{code}/properties/$upsert | [EARLY ACCESS] UpsertGroupProperties: Upsert group properties
|
386
388
|
*PortfolioGroupsApi* | [**upsert_portfolio_group_access_metadata**](docs/PortfolioGroupsApi.md#upsert_portfolio_group_access_metadata) | **PUT** /api/portfoliogroups/{scope}/{code}/metadata/{metadataKey} | UpsertPortfolioGroupAccessMetadata: Upsert a Portfolio Group Access Metadata entry associated with a specific metadataKey. This creates or updates the data in LUSID.
|
387
|
-
*PortfoliosApi* | [**batch_upsert_portfolio_access_metadata**](docs/PortfoliosApi.md#batch_upsert_portfolio_access_metadata) | **PUT** /api/portfolios/metadata | [
|
389
|
+
*PortfoliosApi* | [**batch_upsert_portfolio_access_metadata**](docs/PortfoliosApi.md#batch_upsert_portfolio_access_metadata) | **PUT** /api/portfolios/metadata | [EARLY ACCESS] BatchUpsertPortfolioAccessMetadata: Upsert multiple Portfolio Access Metadata Rules to multiple Portfolios
|
388
390
|
*PortfoliosApi* | [**delete_instrument_event_instruction**](docs/PortfoliosApi.md#delete_instrument_event_instruction) | **DELETE** /api/portfolios/{scope}/{code}/instrumenteventinstructions/{instrumentEventInstructionId} | [EARLY ACCESS] DeleteInstrumentEventInstruction: Delete Instrument Event Instruction
|
389
391
|
*PortfoliosApi* | [**delete_key_from_portfolio_access_metadata**](docs/PortfoliosApi.md#delete_key_from_portfolio_access_metadata) | **DELETE** /api/portfolios/{scope}/{code}/metadata/{metadataKey} | DeleteKeyFromPortfolioAccessMetadata: Delete a Portfolio Access Metadata Rule
|
390
392
|
*PortfoliosApi* | [**delete_portfolio**](docs/PortfoliosApi.md#delete_portfolio) | **DELETE** /api/portfolios/{scope}/{code} | DeletePortfolio: Delete portfolio
|
@@ -668,6 +670,7 @@ Class | Method | HTTP request | Description
|
|
668
670
|
- [BatchUpsertInstrumentPropertiesResponse](docs/BatchUpsertInstrumentPropertiesResponse.md)
|
669
671
|
- [BatchUpsertPortfolioAccessMetadataRequest](docs/BatchUpsertPortfolioAccessMetadataRequest.md)
|
670
672
|
- [BatchUpsertPortfolioAccessMetadataResponse](docs/BatchUpsertPortfolioAccessMetadataResponse.md)
|
673
|
+
- [BatchUpsertPortfolioAccessMetadataResponseItem](docs/BatchUpsertPortfolioAccessMetadataResponseItem.md)
|
671
674
|
- [BatchUpsertPortfolioTransactionsResponse](docs/BatchUpsertPortfolioTransactionsResponse.md)
|
672
675
|
- [BatchUpsertPropertyDefinitionPropertiesResponse](docs/BatchUpsertPropertyDefinitionPropertiesResponse.md)
|
673
676
|
- [Block](docs/Block.md)
|
@@ -837,6 +840,7 @@ Class | Method | HTTP request | Description
|
|
837
840
|
- [CustodianAccountsUpsertResponse](docs/CustodianAccountsUpsertResponse.md)
|
838
841
|
- [CustomEntityDefinition](docs/CustomEntityDefinition.md)
|
839
842
|
- [CustomEntityDefinitionRequest](docs/CustomEntityDefinitionRequest.md)
|
843
|
+
- [CustomEntityEntity](docs/CustomEntityEntity.md)
|
840
844
|
- [CustomEntityField](docs/CustomEntityField.md)
|
841
845
|
- [CustomEntityFieldDefinition](docs/CustomEntityFieldDefinition.md)
|
842
846
|
- [CustomEntityId](docs/CustomEntityId.md)
|
@@ -1107,8 +1111,6 @@ Class | Method | HTTP request | Description
|
|
1107
1111
|
- [MatchCriterion](docs/MatchCriterion.md)
|
1108
1112
|
- [MaturityEvent](docs/MaturityEvent.md)
|
1109
1113
|
- [MergerEvent](docs/MergerEvent.md)
|
1110
|
-
- [MetadataKeyValue](docs/MetadataKeyValue.md)
|
1111
|
-
- [MetadataKeyValueResponse](docs/MetadataKeyValueResponse.md)
|
1112
1114
|
- [MetricValue](docs/MetricValue.md)
|
1113
1115
|
- [ModelOptions](docs/ModelOptions.md)
|
1114
1116
|
- [ModelOptionsType](docs/ModelOptionsType.md)
|