lusid-sdk 2.1.940__py3-none-any.whl → 2.1.941__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 +2 -0
- lusid/api/custom_entities_api.py +196 -0
- lusid/configuration.py +1 -1
- lusid/models/__init__.py +2 -0
- lusid/models/alias.py +1 -1
- lusid/models/custom_entity_properties.py +130 -0
- lusid/models/realised_gain_loss.py +14 -2
- lusid/models/recommended_sort_by.py +1 -1
- {lusid_sdk-2.1.940.dist-info → lusid_sdk-2.1.941.dist-info}/METADATA +3 -1
- {lusid_sdk-2.1.940.dist-info → lusid_sdk-2.1.941.dist-info}/RECORD +11 -10
- {lusid_sdk-2.1.940.dist-info → lusid_sdk-2.1.941.dist-info}/WHEEL +0 -0
lusid/__init__.py
CHANGED
@@ -401,6 +401,7 @@ from lusid.models.custom_entity_entity import CustomEntityEntity
|
|
401
401
|
from lusid.models.custom_entity_field import CustomEntityField
|
402
402
|
from lusid.models.custom_entity_field_definition import CustomEntityFieldDefinition
|
403
403
|
from lusid.models.custom_entity_id import CustomEntityId
|
404
|
+
from lusid.models.custom_entity_properties import CustomEntityProperties
|
404
405
|
from lusid.models.custom_entity_request import CustomEntityRequest
|
405
406
|
from lusid.models.custom_entity_response import CustomEntityResponse
|
406
407
|
from lusid.models.custom_entity_type import CustomEntityType
|
@@ -1781,6 +1782,7 @@ __all__ = [
|
|
1781
1782
|
"CustomEntityField",
|
1782
1783
|
"CustomEntityFieldDefinition",
|
1783
1784
|
"CustomEntityId",
|
1785
|
+
"CustomEntityProperties",
|
1784
1786
|
"CustomEntityRequest",
|
1785
1787
|
"CustomEntityResponse",
|
1786
1788
|
"CustomEntityType",
|
lusid/api/custom_entities_api.py
CHANGED
@@ -28,6 +28,7 @@ from typing import Dict, List, Optional
|
|
28
28
|
|
29
29
|
from lusid.models.access_metadata_operation import AccessMetadataOperation
|
30
30
|
from lusid.models.access_metadata_value import AccessMetadataValue
|
31
|
+
from lusid.models.custom_entity_properties import CustomEntityProperties
|
31
32
|
from lusid.models.custom_entity_request import CustomEntityRequest
|
32
33
|
from lusid.models.custom_entity_response import CustomEntityResponse
|
33
34
|
from lusid.models.deleted_entity_response import DeletedEntityResponse
|
@@ -636,6 +637,201 @@ class CustomEntitiesApi:
|
|
636
637
|
_request_auth=_params.get('_request_auth'))
|
637
638
|
|
638
639
|
|
640
|
+
@overload
|
641
|
+
async def get_all_custom_entity_properties(self, entity_type : Annotated[StrictStr, Field(..., description="The type of Custom Entity.")], identifier_type : Annotated[StrictStr, Field(..., description="An identifier type attached to the Custom Entity instance.")], identifier_value : Annotated[StrictStr, Field(..., description="The identifier value.")], identifier_scope : Annotated[StrictStr, Field(..., description="The identifier scope.")], as_at : Annotated[Optional[datetime], Field(description="The AsAt datetime at which to retrieve the Custom Entity properties.")] = None, effective_at : Annotated[Optional[StrictStr], Field( description="The effective datetime at which to get the Custom Entity properties. Defaults to the current LUSID system datetime if not specified.")] = None, **kwargs) -> CustomEntityProperties: # noqa: E501
|
642
|
+
...
|
643
|
+
|
644
|
+
@overload
|
645
|
+
def get_all_custom_entity_properties(self, entity_type : Annotated[StrictStr, Field(..., description="The type of Custom Entity.")], identifier_type : Annotated[StrictStr, Field(..., description="An identifier type attached to the Custom Entity instance.")], identifier_value : Annotated[StrictStr, Field(..., description="The identifier value.")], identifier_scope : Annotated[StrictStr, Field(..., description="The identifier scope.")], as_at : Annotated[Optional[datetime], Field(description="The AsAt datetime at which to retrieve the Custom Entity properties.")] = None, effective_at : Annotated[Optional[StrictStr], Field( description="The effective datetime at which to get the Custom Entity properties. Defaults to the current LUSID system datetime if not specified.")] = None, async_req: Optional[bool]=True, **kwargs) -> CustomEntityProperties: # noqa: E501
|
646
|
+
...
|
647
|
+
|
648
|
+
@validate_arguments
|
649
|
+
def get_all_custom_entity_properties(self, entity_type : Annotated[StrictStr, Field(..., description="The type of Custom Entity.")], identifier_type : Annotated[StrictStr, Field(..., description="An identifier type attached to the Custom Entity instance.")], identifier_value : Annotated[StrictStr, Field(..., description="The identifier value.")], identifier_scope : Annotated[StrictStr, Field(..., description="The identifier scope.")], as_at : Annotated[Optional[datetime], Field(description="The AsAt datetime at which to retrieve the Custom Entity properties.")] = None, effective_at : Annotated[Optional[StrictStr], Field( description="The effective datetime at which to get the Custom Entity properties. Defaults to the current LUSID system datetime if not specified.")] = None, async_req: Optional[bool]=None, **kwargs) -> Union[CustomEntityProperties, Awaitable[CustomEntityProperties]]: # noqa: E501
|
650
|
+
"""[EARLY ACCESS] GetAllCustomEntityProperties: Get all properties related to a Custom Entity instance. # noqa: E501
|
651
|
+
|
652
|
+
Returns only properties that a user has permissions to read and that are applicable to the specific entity type as per PropertyDefinition CustomEntityTypes. # noqa: E501
|
653
|
+
This method makes a synchronous HTTP request by default. To make an
|
654
|
+
asynchronous HTTP request, please pass async_req=True
|
655
|
+
|
656
|
+
>>> thread = api.get_all_custom_entity_properties(entity_type, identifier_type, identifier_value, identifier_scope, as_at, effective_at, async_req=True)
|
657
|
+
>>> result = thread.get()
|
658
|
+
|
659
|
+
:param entity_type: The type of Custom Entity. (required)
|
660
|
+
:type entity_type: str
|
661
|
+
:param identifier_type: An identifier type attached to the Custom Entity instance. (required)
|
662
|
+
:type identifier_type: str
|
663
|
+
:param identifier_value: The identifier value. (required)
|
664
|
+
:type identifier_value: str
|
665
|
+
:param identifier_scope: The identifier scope. (required)
|
666
|
+
:type identifier_scope: str
|
667
|
+
:param as_at: The AsAt datetime at which to retrieve the Custom Entity properties.
|
668
|
+
:type as_at: datetime
|
669
|
+
:param effective_at: The effective datetime at which to get the Custom Entity properties. Defaults to the current LUSID system datetime if not specified.
|
670
|
+
:type effective_at: str
|
671
|
+
:param async_req: Whether to execute the request asynchronously.
|
672
|
+
:type async_req: bool, optional
|
673
|
+
:param _request_timeout: Timeout setting. Do not use - use the opts parameter instead
|
674
|
+
:param opts: Configuration options for this request
|
675
|
+
:type opts: ConfigurationOptions, optional
|
676
|
+
:return: Returns the result object.
|
677
|
+
If the method is called asynchronously,
|
678
|
+
returns the request thread.
|
679
|
+
:rtype: CustomEntityProperties
|
680
|
+
"""
|
681
|
+
kwargs['_return_http_data_only'] = True
|
682
|
+
if '_preload_content' in kwargs:
|
683
|
+
message = "Error! Please call the get_all_custom_entity_properties_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501
|
684
|
+
raise ValueError(message)
|
685
|
+
if async_req is not None:
|
686
|
+
kwargs['async_req'] = async_req
|
687
|
+
return self.get_all_custom_entity_properties_with_http_info(entity_type, identifier_type, identifier_value, identifier_scope, as_at, effective_at, **kwargs) # noqa: E501
|
688
|
+
|
689
|
+
@validate_arguments
|
690
|
+
def get_all_custom_entity_properties_with_http_info(self, entity_type : Annotated[StrictStr, Field(..., description="The type of Custom Entity.")], identifier_type : Annotated[StrictStr, Field(..., description="An identifier type attached to the Custom Entity instance.")], identifier_value : Annotated[StrictStr, Field(..., description="The identifier value.")], identifier_scope : Annotated[StrictStr, Field(..., description="The identifier scope.")], as_at : Annotated[Optional[datetime], Field(description="The AsAt datetime at which to retrieve the Custom Entity properties.")] = None, effective_at : Annotated[Optional[StrictStr], Field( description="The effective datetime at which to get the Custom Entity properties. Defaults to the current LUSID system datetime if not specified.")] = None, **kwargs) -> ApiResponse: # noqa: E501
|
691
|
+
"""[EARLY ACCESS] GetAllCustomEntityProperties: Get all properties related to a Custom Entity instance. # noqa: E501
|
692
|
+
|
693
|
+
Returns only properties that a user has permissions to read and that are applicable to the specific entity type as per PropertyDefinition CustomEntityTypes. # noqa: E501
|
694
|
+
This method makes a synchronous HTTP request by default. To make an
|
695
|
+
asynchronous HTTP request, please pass async_req=True
|
696
|
+
|
697
|
+
>>> thread = api.get_all_custom_entity_properties_with_http_info(entity_type, identifier_type, identifier_value, identifier_scope, as_at, effective_at, async_req=True)
|
698
|
+
>>> result = thread.get()
|
699
|
+
|
700
|
+
:param entity_type: The type of Custom Entity. (required)
|
701
|
+
:type entity_type: str
|
702
|
+
:param identifier_type: An identifier type attached to the Custom Entity instance. (required)
|
703
|
+
:type identifier_type: str
|
704
|
+
:param identifier_value: The identifier value. (required)
|
705
|
+
:type identifier_value: str
|
706
|
+
:param identifier_scope: The identifier scope. (required)
|
707
|
+
:type identifier_scope: str
|
708
|
+
:param as_at: The AsAt datetime at which to retrieve the Custom Entity properties.
|
709
|
+
:type as_at: datetime
|
710
|
+
:param effective_at: The effective datetime at which to get the Custom Entity properties. Defaults to the current LUSID system datetime if not specified.
|
711
|
+
:type effective_at: str
|
712
|
+
:param async_req: Whether to execute the request asynchronously.
|
713
|
+
:type async_req: bool, optional
|
714
|
+
:param _preload_content: if False, the ApiResponse.data will
|
715
|
+
be set to none and raw_data will store the
|
716
|
+
HTTP response body without reading/decoding.
|
717
|
+
Default is True.
|
718
|
+
:type _preload_content: bool, optional
|
719
|
+
:param _return_http_data_only: response data instead of ApiResponse
|
720
|
+
object with status code, headers, etc
|
721
|
+
:type _return_http_data_only: bool, optional
|
722
|
+
:param _request_timeout: Timeout setting. Do not use - use the opts parameter instead
|
723
|
+
:param opts: Configuration options for this request
|
724
|
+
:type opts: ConfigurationOptions, optional
|
725
|
+
:param _request_auth: set to override the auth_settings for an a single
|
726
|
+
request; this effectively ignores the authentication
|
727
|
+
in the spec for a single request.
|
728
|
+
:type _request_auth: dict, optional
|
729
|
+
:type _content_type: string, optional: force content-type for the request
|
730
|
+
:return: Returns the result object.
|
731
|
+
If the method is called asynchronously,
|
732
|
+
returns the request thread.
|
733
|
+
:rtype: tuple(CustomEntityProperties, status_code(int), headers(HTTPHeaderDict))
|
734
|
+
"""
|
735
|
+
|
736
|
+
_params = locals()
|
737
|
+
|
738
|
+
_all_params = [
|
739
|
+
'entity_type',
|
740
|
+
'identifier_type',
|
741
|
+
'identifier_value',
|
742
|
+
'identifier_scope',
|
743
|
+
'as_at',
|
744
|
+
'effective_at'
|
745
|
+
]
|
746
|
+
_all_params.extend(
|
747
|
+
[
|
748
|
+
'async_req',
|
749
|
+
'_return_http_data_only',
|
750
|
+
'_preload_content',
|
751
|
+
'_request_timeout',
|
752
|
+
'_request_auth',
|
753
|
+
'_content_type',
|
754
|
+
'_headers',
|
755
|
+
'opts'
|
756
|
+
]
|
757
|
+
)
|
758
|
+
|
759
|
+
# validate the arguments
|
760
|
+
for _key, _val in _params['kwargs'].items():
|
761
|
+
if _key not in _all_params:
|
762
|
+
raise ApiTypeError(
|
763
|
+
"Got an unexpected keyword argument '%s'"
|
764
|
+
" to method get_all_custom_entity_properties" % _key
|
765
|
+
)
|
766
|
+
_params[_key] = _val
|
767
|
+
del _params['kwargs']
|
768
|
+
|
769
|
+
_collection_formats = {}
|
770
|
+
|
771
|
+
# process the path parameters
|
772
|
+
_path_params = {}
|
773
|
+
if _params['entity_type']:
|
774
|
+
_path_params['entityType'] = _params['entity_type']
|
775
|
+
|
776
|
+
if _params['identifier_type']:
|
777
|
+
_path_params['identifierType'] = _params['identifier_type']
|
778
|
+
|
779
|
+
if _params['identifier_value']:
|
780
|
+
_path_params['identifierValue'] = _params['identifier_value']
|
781
|
+
|
782
|
+
|
783
|
+
# process the query parameters
|
784
|
+
_query_params = []
|
785
|
+
if _params.get('identifier_scope') is not None: # noqa: E501
|
786
|
+
_query_params.append(('identifierScope', _params['identifier_scope']))
|
787
|
+
|
788
|
+
if _params.get('as_at') is not None: # noqa: E501
|
789
|
+
if isinstance(_params['as_at'], datetime):
|
790
|
+
_query_params.append(('asAt', _params['as_at'].strftime(self.api_client.configuration.datetime_format)))
|
791
|
+
else:
|
792
|
+
_query_params.append(('asAt', _params['as_at']))
|
793
|
+
|
794
|
+
if _params.get('effective_at') is not None: # noqa: E501
|
795
|
+
_query_params.append(('effectiveAt', _params['effective_at']))
|
796
|
+
|
797
|
+
# process the header parameters
|
798
|
+
_header_params = dict(_params.get('_headers', {}))
|
799
|
+
# process the form parameters
|
800
|
+
_form_params = []
|
801
|
+
_files = {}
|
802
|
+
# process the body parameter
|
803
|
+
_body_params = None
|
804
|
+
# set the HTTP header `Accept`
|
805
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
806
|
+
['text/plain', 'application/json', 'text/json']) # noqa: E501
|
807
|
+
|
808
|
+
# authentication setting
|
809
|
+
_auth_settings = ['oauth2'] # noqa: E501
|
810
|
+
|
811
|
+
_response_types_map = {
|
812
|
+
'200': "CustomEntityProperties",
|
813
|
+
'400': "LusidValidationProblemDetails",
|
814
|
+
}
|
815
|
+
|
816
|
+
return self.api_client.call_api(
|
817
|
+
'/api/customentities/{entityType}/{identifierType}/{identifierValue}/properties', 'GET',
|
818
|
+
_path_params,
|
819
|
+
_query_params,
|
820
|
+
_header_params,
|
821
|
+
body=_body_params,
|
822
|
+
post_params=_form_params,
|
823
|
+
files=_files,
|
824
|
+
response_types_map=_response_types_map,
|
825
|
+
auth_settings=_auth_settings,
|
826
|
+
async_req=_params.get('async_req'),
|
827
|
+
_return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501
|
828
|
+
_preload_content=_params.get('_preload_content', True),
|
829
|
+
_request_timeout=_params.get('_request_timeout'),
|
830
|
+
opts=_params.get('opts'),
|
831
|
+
collection_formats=_collection_formats,
|
832
|
+
_request_auth=_params.get('_request_auth'))
|
833
|
+
|
834
|
+
|
639
835
|
@overload
|
640
836
|
async def get_custom_entity(self, entity_type : Annotated[StrictStr, Field(..., description="The type of Custom Entity to retrieve. An entityType can be created using the \"CreateCustomEntityDefinition\" endpoint for CustomEntityDefinitions.")], identifier_type : Annotated[StrictStr, Field(..., description="An identifier type attached to the Custom Entity instance.")], identifier_value : Annotated[StrictStr, Field(..., description="The identifier value.")], identifier_scope : Annotated[StrictStr, Field(..., description="The identifier scope.")], as_at : Annotated[Optional[datetime], Field(description="The AsAt datetime at which to retrieve the Custom Entity instance.")] = None, effective_at : Annotated[Optional[StrictStr], Field( description="The effective datetime or cut label at which to get the Custom Entity instance. Defaults to the current LUSID system datetime if not specified.")] = None, related_entity_property_keys : Annotated[Optional[conlist(StrictStr)], Field(description="A list of property keys from any domain that supports relationships to decorate onto related entities. These must take the format {domain}/{scope}/{code}, for example 'Portfolio/Manager/Id'.")] = None, relationship_definition_ids : Annotated[Optional[conlist(StrictStr)], Field(description="A list of relationship definitions that are used to decorate related entities onto the entity in the response. These must take the form {relationshipDefinitionScope}/{relationshipDefinitionCode}.")] = None, property_keys : Annotated[Optional[conlist(StrictStr)], Field(description="A list of property keys from the 'CustomEntity' domain to decorate onto the custom entities of any type supported by that property (defined within the property definition CustomEntityTypes). These must have the format {domain}/{scope}/{code}, for example 'CustomEntity/someScope/id'.")] = None, **kwargs) -> CustomEntityResponse: # noqa: E501
|
641
837
|
...
|
lusid/configuration.py
CHANGED
@@ -445,7 +445,7 @@ class Configuration:
|
|
445
445
|
return "Python SDK Debug Report:\n"\
|
446
446
|
"OS: {env}\n"\
|
447
447
|
"Python Version: {pyversion}\n"\
|
448
|
-
"Version of the API: 0.11.
|
448
|
+
"Version of the API: 0.11.8260\n"\
|
449
449
|
"SDK Package Version: {package_version}".\
|
450
450
|
format(env=sys.platform, pyversion=sys.version, package_version=package_version)
|
451
451
|
|
lusid/models/__init__.py
CHANGED
@@ -310,6 +310,7 @@ from lusid.models.custom_entity_entity import CustomEntityEntity
|
|
310
310
|
from lusid.models.custom_entity_field import CustomEntityField
|
311
311
|
from lusid.models.custom_entity_field_definition import CustomEntityFieldDefinition
|
312
312
|
from lusid.models.custom_entity_id import CustomEntityId
|
313
|
+
from lusid.models.custom_entity_properties import CustomEntityProperties
|
313
314
|
from lusid.models.custom_entity_request import CustomEntityRequest
|
314
315
|
from lusid.models.custom_entity_response import CustomEntityResponse
|
315
316
|
from lusid.models.custom_entity_type import CustomEntityType
|
@@ -1600,6 +1601,7 @@ __all__ = [
|
|
1600
1601
|
"CustomEntityField",
|
1601
1602
|
"CustomEntityFieldDefinition",
|
1602
1603
|
"CustomEntityId",
|
1604
|
+
"CustomEntityProperties",
|
1603
1605
|
"CustomEntityRequest",
|
1604
1606
|
"CustomEntityResponse",
|
1605
1607
|
"CustomEntityType",
|
lusid/models/alias.py
CHANGED
@@ -0,0 +1,130 @@
|
|
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 StrictStr, Field, BaseModel, Field, StrictStr, conlist, constr
|
23
|
+
from lusid.models.custom_entity_id import CustomEntityId
|
24
|
+
from lusid.models.link import Link
|
25
|
+
from lusid.models.model_property import ModelProperty
|
26
|
+
from lusid.models.version import Version
|
27
|
+
|
28
|
+
class CustomEntityProperties(BaseModel):
|
29
|
+
"""
|
30
|
+
CustomEntityProperties
|
31
|
+
"""
|
32
|
+
href: StrictStr = Field(...,alias="href", description="The specific Uniform Resource Identifier (URI) for this resource at the requested effective and asAt datetime.")
|
33
|
+
entity_type: StrictStr = Field(...,alias="entityType", description="The type of custom entity this is.")
|
34
|
+
identifiers: conlist(CustomEntityId) = Field(..., description="The identifiers the custom entity will be upserted with.")
|
35
|
+
properties: Optional[Dict[str, ModelProperty]] = Field(None, description="The properties that decorate the custom entity.")
|
36
|
+
version: Version = Field(...)
|
37
|
+
links: Optional[conlist(Link)] = None
|
38
|
+
__properties = ["href", "entityType", "identifiers", "properties", "version", "links"]
|
39
|
+
|
40
|
+
class Config:
|
41
|
+
"""Pydantic configuration"""
|
42
|
+
allow_population_by_field_name = True
|
43
|
+
validate_assignment = True
|
44
|
+
|
45
|
+
def __str__(self):
|
46
|
+
"""For `print` and `pprint`"""
|
47
|
+
return pprint.pformat(self.dict(by_alias=False))
|
48
|
+
|
49
|
+
def __repr__(self):
|
50
|
+
"""For `print` and `pprint`"""
|
51
|
+
return self.to_str()
|
52
|
+
|
53
|
+
def to_str(self) -> str:
|
54
|
+
"""Returns the string representation of the model using alias"""
|
55
|
+
return pprint.pformat(self.dict(by_alias=True))
|
56
|
+
|
57
|
+
def to_json(self) -> str:
|
58
|
+
"""Returns the JSON representation of the model using alias"""
|
59
|
+
return json.dumps(self.to_dict())
|
60
|
+
|
61
|
+
@classmethod
|
62
|
+
def from_json(cls, json_str: str) -> CustomEntityProperties:
|
63
|
+
"""Create an instance of CustomEntityProperties from a JSON string"""
|
64
|
+
return cls.from_dict(json.loads(json_str))
|
65
|
+
|
66
|
+
def to_dict(self):
|
67
|
+
"""Returns the dictionary representation of the model using alias"""
|
68
|
+
_dict = self.dict(by_alias=True,
|
69
|
+
exclude={
|
70
|
+
},
|
71
|
+
exclude_none=True)
|
72
|
+
# override the default output from pydantic by calling `to_dict()` of each item in identifiers (list)
|
73
|
+
_items = []
|
74
|
+
if self.identifiers:
|
75
|
+
for _item in self.identifiers:
|
76
|
+
if _item:
|
77
|
+
_items.append(_item.to_dict())
|
78
|
+
_dict['identifiers'] = _items
|
79
|
+
# override the default output from pydantic by calling `to_dict()` of each value in properties (dict)
|
80
|
+
_field_dict = {}
|
81
|
+
if self.properties:
|
82
|
+
for _key in self.properties:
|
83
|
+
if self.properties[_key]:
|
84
|
+
_field_dict[_key] = self.properties[_key].to_dict()
|
85
|
+
_dict['properties'] = _field_dict
|
86
|
+
# override the default output from pydantic by calling `to_dict()` of version
|
87
|
+
if self.version:
|
88
|
+
_dict['version'] = self.version.to_dict()
|
89
|
+
# override the default output from pydantic by calling `to_dict()` of each item in links (list)
|
90
|
+
_items = []
|
91
|
+
if self.links:
|
92
|
+
for _item in self.links:
|
93
|
+
if _item:
|
94
|
+
_items.append(_item.to_dict())
|
95
|
+
_dict['links'] = _items
|
96
|
+
# set to None if properties (nullable) is None
|
97
|
+
# and __fields_set__ contains the field
|
98
|
+
if self.properties is None and "properties" in self.__fields_set__:
|
99
|
+
_dict['properties'] = None
|
100
|
+
|
101
|
+
# set to None if links (nullable) is None
|
102
|
+
# and __fields_set__ contains the field
|
103
|
+
if self.links is None and "links" in self.__fields_set__:
|
104
|
+
_dict['links'] = None
|
105
|
+
|
106
|
+
return _dict
|
107
|
+
|
108
|
+
@classmethod
|
109
|
+
def from_dict(cls, obj: dict) -> CustomEntityProperties:
|
110
|
+
"""Create an instance of CustomEntityProperties from a dict"""
|
111
|
+
if obj is None:
|
112
|
+
return None
|
113
|
+
|
114
|
+
if not isinstance(obj, dict):
|
115
|
+
return CustomEntityProperties.parse_obj(obj)
|
116
|
+
|
117
|
+
_obj = CustomEntityProperties.parse_obj({
|
118
|
+
"href": obj.get("href"),
|
119
|
+
"entity_type": obj.get("entityType"),
|
120
|
+
"identifiers": [CustomEntityId.from_dict(_item) for _item in obj.get("identifiers")] if obj.get("identifiers") is not None else None,
|
121
|
+
"properties": dict(
|
122
|
+
(_k, ModelProperty.from_dict(_v))
|
123
|
+
for _k, _v in obj.get("properties").items()
|
124
|
+
)
|
125
|
+
if obj.get("properties") is not None
|
126
|
+
else None,
|
127
|
+
"version": Version.from_dict(obj.get("version")) if obj.get("version") is not None else None,
|
128
|
+
"links": [Link.from_dict(_item) for _item in obj.get("links")] if obj.get("links") is not None else None
|
129
|
+
})
|
130
|
+
return _obj
|
@@ -38,7 +38,9 @@ class RealisedGainLoss(BaseModel):
|
|
38
38
|
realised_total: CurrencyAndAmount = Field(..., alias="realisedTotal")
|
39
39
|
realised_market: Optional[CurrencyAndAmount] = Field(None, alias="realisedMarket")
|
40
40
|
realised_currency: Optional[CurrencyAndAmount] = Field(None, alias="realisedCurrency")
|
41
|
-
|
41
|
+
tax_lot_id: Optional[StrictStr] = Field(None,alias="taxLotId", description="The identifier of the tax lot with which this gain or loss is associated.")
|
42
|
+
realised_amortisation: Optional[CurrencyAndAmount] = Field(None, alias="realisedAmortisation")
|
43
|
+
__properties = ["instrumentScope", "instrumentUid", "units", "purchaseTradeDate", "purchaseSettlementDate", "purchasePrice", "costTradeCcy", "costPortfolioCcy", "realisedTradeCcy", "realisedTotal", "realisedMarket", "realisedCurrency", "taxLotId", "realisedAmortisation"]
|
42
44
|
|
43
45
|
class Config:
|
44
46
|
"""Pydantic configuration"""
|
@@ -92,6 +94,9 @@ class RealisedGainLoss(BaseModel):
|
|
92
94
|
# override the default output from pydantic by calling `to_dict()` of realised_currency
|
93
95
|
if self.realised_currency:
|
94
96
|
_dict['realisedCurrency'] = self.realised_currency.to_dict()
|
97
|
+
# override the default output from pydantic by calling `to_dict()` of realised_amortisation
|
98
|
+
if self.realised_amortisation:
|
99
|
+
_dict['realisedAmortisation'] = self.realised_amortisation.to_dict()
|
95
100
|
# set to None if instrument_scope (nullable) is None
|
96
101
|
# and __fields_set__ contains the field
|
97
102
|
if self.instrument_scope is None and "instrument_scope" in self.__fields_set__:
|
@@ -112,6 +117,11 @@ class RealisedGainLoss(BaseModel):
|
|
112
117
|
if self.purchase_price is None and "purchase_price" in self.__fields_set__:
|
113
118
|
_dict['purchasePrice'] = None
|
114
119
|
|
120
|
+
# set to None if tax_lot_id (nullable) is None
|
121
|
+
# and __fields_set__ contains the field
|
122
|
+
if self.tax_lot_id is None and "tax_lot_id" in self.__fields_set__:
|
123
|
+
_dict['taxLotId'] = None
|
124
|
+
|
115
125
|
return _dict
|
116
126
|
|
117
127
|
@classmethod
|
@@ -135,6 +145,8 @@ class RealisedGainLoss(BaseModel):
|
|
135
145
|
"realised_trade_ccy": CurrencyAndAmount.from_dict(obj.get("realisedTradeCcy")) if obj.get("realisedTradeCcy") is not None else None,
|
136
146
|
"realised_total": CurrencyAndAmount.from_dict(obj.get("realisedTotal")) if obj.get("realisedTotal") is not None else None,
|
137
147
|
"realised_market": CurrencyAndAmount.from_dict(obj.get("realisedMarket")) if obj.get("realisedMarket") is not None else None,
|
138
|
-
"realised_currency": CurrencyAndAmount.from_dict(obj.get("realisedCurrency")) if obj.get("realisedCurrency") is not None else None
|
148
|
+
"realised_currency": CurrencyAndAmount.from_dict(obj.get("realisedCurrency")) if obj.get("realisedCurrency") is not None else None,
|
149
|
+
"tax_lot_id": obj.get("taxLotId"),
|
150
|
+
"realised_amortisation": CurrencyAndAmount.from_dict(obj.get("realisedAmortisation")) if obj.get("realisedAmortisation") is not None else None
|
139
151
|
})
|
140
152
|
return _obj
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: lusid-sdk
|
3
|
-
Version: 2.1.
|
3
|
+
Version: 2.1.941
|
4
4
|
Summary: LUSID API
|
5
5
|
Home-page: https://github.com/finbourne/lusid-sdk-python
|
6
6
|
License: MIT
|
@@ -198,6 +198,7 @@ Class | Method | HTTP request | Description
|
|
198
198
|
*CustomEntitiesApi* | [**delete_custom_entity**](docs/CustomEntitiesApi.md#delete_custom_entity) | **DELETE** /api/customentities/{entityType}/{identifierType}/{identifierValue} | DeleteCustomEntity: Delete a Custom Entity instance.
|
199
199
|
*CustomEntitiesApi* | [**delete_custom_entity_access_metadata**](docs/CustomEntitiesApi.md#delete_custom_entity_access_metadata) | **DELETE** /api/customentities/{entityType}/{identifierType}/{identifierValue}/metadata/{metadataKey} | [EARLY ACCESS] DeleteCustomEntityAccessMetadata: Delete a Custom Entity Access Metadata entry
|
200
200
|
*CustomEntitiesApi* | [**get_all_custom_entity_access_metadata**](docs/CustomEntitiesApi.md#get_all_custom_entity_access_metadata) | **GET** /api/customentities/{entityType}/{identifierType}/{identifierValue}/metadata | [EARLY ACCESS] GetAllCustomEntityAccessMetadata: Get all the Access Metadata rules for a Custom Entity
|
201
|
+
*CustomEntitiesApi* | [**get_all_custom_entity_properties**](docs/CustomEntitiesApi.md#get_all_custom_entity_properties) | **GET** /api/customentities/{entityType}/{identifierType}/{identifierValue}/properties | [EARLY ACCESS] GetAllCustomEntityProperties: Get all properties related to a Custom Entity instance.
|
201
202
|
*CustomEntitiesApi* | [**get_custom_entity**](docs/CustomEntitiesApi.md#get_custom_entity) | **GET** /api/customentities/{entityType}/{identifierType}/{identifierValue} | GetCustomEntity: Get a Custom Entity instance.
|
202
203
|
*CustomEntitiesApi* | [**get_custom_entity_access_metadata_by_key**](docs/CustomEntitiesApi.md#get_custom_entity_access_metadata_by_key) | **GET** /api/customentities/{entityType}/{identifierType}/{identifierValue}/metadata/{metadataKey} | [EARLY ACCESS] GetCustomEntityAccessMetadataByKey: Get an entry identified by a metadataKey in the Access Metadata of a Custom Entity
|
203
204
|
*CustomEntitiesApi* | [**get_custom_entity_relationships**](docs/CustomEntitiesApi.md#get_custom_entity_relationships) | **GET** /api/customentities/{entityType}/{identifierType}/{identifierValue}/relationships | [EARLY ACCESS] GetCustomEntityRelationships: Get Relationships for Custom Entity
|
@@ -985,6 +986,7 @@ Class | Method | HTTP request | Description
|
|
985
986
|
- [CustomEntityField](docs/CustomEntityField.md)
|
986
987
|
- [CustomEntityFieldDefinition](docs/CustomEntityFieldDefinition.md)
|
987
988
|
- [CustomEntityId](docs/CustomEntityId.md)
|
989
|
+
- [CustomEntityProperties](docs/CustomEntityProperties.md)
|
988
990
|
- [CustomEntityRequest](docs/CustomEntityRequest.md)
|
989
991
|
- [CustomEntityResponse](docs/CustomEntityResponse.md)
|
990
992
|
- [CustomEntityType](docs/CustomEntityType.md)
|
@@ -1,4 +1,4 @@
|
|
1
|
-
lusid/__init__.py,sha256=
|
1
|
+
lusid/__init__.py,sha256=6JWlRHndkjFpbXJs9goWa2JtMnyWxPqDFfk3JG0W2PU,146143
|
2
2
|
lusid/api/__init__.py,sha256=yCGwgeQBZ1RZovOUo7Jq24Txz4o6naRgnWAzQVGdHAk,6784
|
3
3
|
lusid/api/abor_api.py,sha256=N7Wsh0395mXOvpJI8z0Nrx5OY4nCP5FN9RkbtdHaZbM,165987
|
4
4
|
lusid/api/abor_configuration_api.py,sha256=xQ9HcXm02eDFhCdWUHjqFRWl1oQMxm2LNObJ9kcLauU,84216
|
@@ -19,7 +19,7 @@ lusid/api/conventions_api.py,sha256=dsvB_lAcR5oVQLTqVJj9_zruF7Tyn8aGzD9EmEKvfWY,
|
|
19
19
|
lusid/api/corporate_action_sources_api.py,sha256=7Js9dAFi_HOsYjZvYQew8SjK8x45x-Bi3VJxY-dhDKU,98350
|
20
20
|
lusid/api/counterparties_api.py,sha256=dvRW05miC9_DBYAvJavmNucbNY4ZDwFjqLNXSoP-05A,71156
|
21
21
|
lusid/api/custom_data_models_api.py,sha256=M8heWQrGVNxJm598K-dXFon8HUkS3w-_b2_O6fWlkyk,64982
|
22
|
-
lusid/api/custom_entities_api.py,sha256=
|
22
|
+
lusid/api/custom_entities_api.py,sha256=Cr4KXS9-q_sFfYxoQrTnZhDheA7OW73kcZTEEv4frDE,176254
|
23
23
|
lusid/api/custom_entity_definitions_api.py,sha256=Hcuv2Au9oMpg1E5aMyveiq3dxcwldvZrvRzVdI-T_mo,40202
|
24
24
|
lusid/api/custom_entity_types_api.py,sha256=Ldk2f5BDjzmnFUDR-Rw71tCpNoEnNeHZ5bptJUrV1EQ,40856
|
25
25
|
lusid/api/cut_label_definitions_api.py,sha256=aBnmIqapySIsW4JiWtbGrFVLC1mMZBZqSSCeccO3moQ,46261
|
@@ -80,7 +80,7 @@ lusid/api/translation_api.py,sha256=xpRuTfwQvYBlWe6r_L2EI_uVpXqHFnEOim-i-kVQ85E,
|
|
80
80
|
lusid/api/workspace_api.py,sha256=0pCNi3ZCRbIo0NXKa85XE7vtq0WV5YOKcQKvFlcLUaY,120708
|
81
81
|
lusid/api_client.py,sha256=ewMTmf9SRurY8pYnUx9jy24RdldPCOa4US38pnrVxjA,31140
|
82
82
|
lusid/api_response.py,sha256=6-gnhty6lu8MMAERt3_kTVD7UxQgWFfcjgpcq6iN5IU,855
|
83
|
-
lusid/configuration.py,sha256=
|
83
|
+
lusid/configuration.py,sha256=ggLY4II-9vzc18nRsuMBJ76r8opYrX63VIU-6RUnPdI,17980
|
84
84
|
lusid/exceptions.py,sha256=HIQwgmQrszLlcVCLaqex8dO0laVuejUyOMz7U2ZWJ6s,5326
|
85
85
|
lusid/extensions/__init__.py,sha256=dzDHEzpn-9smd2-_UMWQzeyX6Ha4jGf6fnqx7qxKxNI,630
|
86
86
|
lusid/extensions/api_client.py,sha256=GzygWg_h603QK1QS2HvAijuE2R1TnvoF6-Yg0CeM3ug,30943
|
@@ -95,7 +95,7 @@ lusid/extensions/rest.py,sha256=dp-bD_LMR2zAL1tmC3-urhWKLomXx7r5iGN1VteMBVQ,1601
|
|
95
95
|
lusid/extensions/retry.py,sha256=EhW9OKJmGHipxN3H7eROH5DiMlAnfBVl95NQrttcsdg,14834
|
96
96
|
lusid/extensions/socket_keep_alive.py,sha256=eX5ICvGfVzUCGIm80Q2RknfFZrBQAdnrcpY61M29V_k,1997
|
97
97
|
lusid/extensions/tcp_keep_alive_connector.py,sha256=zaGtUsygRsxB1_4B3x39K3ILwztdhMLDv5bFZV7zmGE,3877
|
98
|
-
lusid/models/__init__.py,sha256=
|
98
|
+
lusid/models/__init__.py,sha256=22WzF9UO8zVpZCewkVuDzbNZhusgfkNSJN1KCURHkhA,138327
|
99
99
|
lusid/models/a2_b_breakdown.py,sha256=-FXgILrvtZXQDmvS0ARaJVGBq5LJ4AH-o3HjujFVmS4,3198
|
100
100
|
lusid/models/a2_b_category.py,sha256=WunXUgx-dCnApPeLC8Qo5tVCX8Ywxkehib1vmNqNgNs,2957
|
101
101
|
lusid/models/a2_b_data_record.py,sha256=qANTmV1_HUEo4l72-F8qzZjlQxOe0Onc9WPz7h-WWuY,9993
|
@@ -146,7 +146,7 @@ lusid/models/aggregation_op.py,sha256=F2n9Nqc-qwyf5W7Fg58FIHf2JJmGuAIfpYsEL2Bxqg
|
|
146
146
|
lusid/models/aggregation_options.py,sha256=eiLFbli-cg667Csk1mLbijmF_tB8vs_-BrwyZ9ITdUs,3360
|
147
147
|
lusid/models/aggregation_query.py,sha256=5OK9lbFhES4uxSRPm-J2NXBaPcDPanURPtNSeL6kDqE,14512
|
148
148
|
lusid/models/aggregation_type.py,sha256=XjHrk2_0OhQyn5RK2-LUzDIjvT_blRVYdvyFdkyxQuw,892
|
149
|
-
lusid/models/alias.py,sha256=
|
149
|
+
lusid/models/alias.py,sha256=H6c8jfB52OeKDS49fzbtsABYDLHIKsQiGq8ELgK0dyc,2369
|
150
150
|
lusid/models/allocation.py,sha256=VIiQLzimvJG6p0bdnFmqgeTMUSO3G7hRU1v44EcoYn0,12399
|
151
151
|
lusid/models/allocation_request.py,sha256=6A9ge706H69-iYUmiU_1za-qoOJLLp4NrEShldwKfH8,10079
|
152
152
|
lusid/models/allocation_service_run_response.py,sha256=y6We5S6O5kaio-XZPguI9qSphzvoJW_xF7qjcsVXyko,3686
|
@@ -392,6 +392,7 @@ lusid/models/custom_entity_entity.py,sha256=OWvLLod8OlH2wdpCgIjz3WY842vwWdQZXhxD
|
|
392
392
|
lusid/models/custom_entity_field.py,sha256=UHC58lTIRvM6vKXxEFfPZ3NdmlJ-GMc4Esa5lj4_1_o,3619
|
393
393
|
lusid/models/custom_entity_field_definition.py,sha256=b0FDClMpHnEmZjQRKWKHTNYT5cwv5w9_nTKMy2joezc,3785
|
394
394
|
lusid/models/custom_entity_id.py,sha256=HlFccZg4pOQJVm-RyeBa_4Zotmqe9FvWsaomzLtMPvI,3745
|
395
|
+
lusid/models/custom_entity_properties.py,sha256=2QHPnsHov0evQVUnHEfHsWJNB3JMcno1IXWhhOrhnbY,5180
|
395
396
|
lusid/models/custom_entity_request.py,sha256=_ExA36h4BwVwB9iliQvtpYEG9BZG7Jo5zVLrDuJo7bM,4890
|
396
397
|
lusid/models/custom_entity_response.py,sha256=WsS19JRDyOJpLq2K2CIJuCYBBjdVMbF1hM8pbKUJnio,7834
|
397
398
|
lusid/models/custom_entity_type.py,sha256=IfTpSkydi-1Erh79z8rPhFiZlSHMeRqXwN5wfRibau0,5482
|
@@ -973,12 +974,12 @@ lusid/models/quote_series_id.py,sha256=qZQBx0N4oYgQHVVdOLyAB8zxkwu5QSZrrwEHbrWxS
|
|
973
974
|
lusid/models/quote_type.py,sha256=PcgNMkDIwcHRwNejD4cQOKdo-NQfRDXb1Cr25QQvAKY,1144
|
974
975
|
lusid/models/raw_vendor_event.py,sha256=Bn12F_No3U2JVkXxZ5kJGP8Xq0JtjND9TQ2d5-osJ7s,12013
|
975
976
|
lusid/models/re_open_period_diary_entry_request.py,sha256=cbx4lBx2lCXSe2eaVTSMaDhWcPmBCg5WchApthismAc,2620
|
976
|
-
lusid/models/realised_gain_loss.py,sha256=
|
977
|
+
lusid/models/realised_gain_loss.py,sha256=nbkgUDVpVz1Yfiqm4pRh-CUoaFSDMytPj5IU5kJlvY8,8333
|
977
978
|
lusid/models/recipe_block.py,sha256=MauNNfDpekT772II8DK56pQ-Hg_r7YYMeAr3-vCtL2I,3108
|
978
979
|
lusid/models/recipe_composer.py,sha256=MACZJaGTjNQtY9n-0yNO0PL2dLgIf3fIfUXwmKmQzz4,3306
|
979
980
|
lusid/models/recipe_value.py,sha256=R7kvGV3nF9xV7Wb1swNF_bgUfJB0HYji5FnS9-bM8nc,3566
|
980
981
|
lusid/models/recombine_step.py,sha256=hK5xLid_wTSz_lHoTRt_QN_9mhUT-q4-K2yCYN5PJYc,7188
|
981
|
-
lusid/models/recommended_sort_by.py,sha256=
|
982
|
+
lusid/models/recommended_sort_by.py,sha256=Jh8ydLzFrulMAHT0SXykelevOeJayFGEGpwOSnUnLLU,2650
|
982
983
|
lusid/models/reconcile_date_time_rule.py,sha256=lEJUCcMR8aHPhRrIm3THtTsZlK1PaWXPrOoEWTlKAGk,10855
|
983
984
|
lusid/models/reconcile_numeric_rule.py,sha256=nTkpFqCfz2xoAgYU9syxtwEw-ELJ71HOAm6BnZu4OM8,10886
|
984
985
|
lusid/models/reconcile_string_rule.py,sha256=4fbU5FISqa-rwvDiiGMKQzgJP2klZ-l9dGv8z7XJCZE,12079
|
@@ -1385,6 +1386,6 @@ lusid/models/year_month_day.py,sha256=gwSoxFwlD_wffKdddo1wfvAcLq3Cht3FHQidiaHzAA
|
|
1385
1386
|
lusid/models/yield_curve_data.py,sha256=I1ZSWxHMgUxj9OQt6i9a4S91KB4_XtmrfFxpN_PV3YQ,9561
|
1386
1387
|
lusid/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
1387
1388
|
lusid/rest.py,sha256=HQT__5LQEMu6_1sLKvYj-DI4FH1DJXBIPYfZCTTyrY4,13431
|
1388
|
-
lusid_sdk-2.1.
|
1389
|
-
lusid_sdk-2.1.
|
1390
|
-
lusid_sdk-2.1.
|
1389
|
+
lusid_sdk-2.1.941.dist-info/METADATA,sha256=4bPsRQaAtd8upkKhPTD1biLAfYlj1jBuqQGq-iA4N20,232300
|
1390
|
+
lusid_sdk-2.1.941.dist-info/WHEEL,sha256=Nq82e9rUAnEjt98J6MlVmMCZb-t9cYE2Ir1kpBmnWfs,88
|
1391
|
+
lusid_sdk-2.1.941.dist-info/RECORD,,
|
File without changes
|