lusid-sdk 2.1.363__py3-none-any.whl → 2.1.386__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 +24 -0
- lusid/api/__init__.py +2 -0
- lusid/api/group_reconciliations_api.py +378 -0
- lusid/api/workspace_api.py +40 -40
- lusid/configuration.py +1 -1
- lusid/models/__init__.py +22 -0
- lusid/models/action_id.py +1 -1
- lusid/models/applicable_instrument_event.py +14 -2
- lusid/models/calendar.py +17 -2
- lusid/models/create_group_reconciliation_comparison_ruleset_request.py +97 -0
- lusid/models/custom_entity_definition.py +17 -2
- lusid/models/custom_entity_type.py +17 -2
- lusid/models/data_type.py +7 -1
- lusid/models/fee.py +1 -1
- lusid/models/fee_request.py +1 -1
- lusid/models/flow_conventions.py +1 -1
- lusid/models/fund_details.py +74 -0
- lusid/models/generated_event_diagnostics.py +75 -0
- lusid/models/group_reconciliation_aggregate_attribute_rule.py +84 -0
- lusid/models/group_reconciliation_aggregate_comparison_rule_operand.py +71 -0
- lusid/models/group_reconciliation_comparison_rule_string_value_map.py +73 -0
- lusid/models/group_reconciliation_comparison_rule_tolerance.py +71 -0
- lusid/models/group_reconciliation_comparison_ruleset.py +125 -0
- lusid/models/group_reconciliation_core_attribute_rule.py +95 -0
- lusid/models/group_reconciliation_core_comparison_rule_operand.py +71 -0
- lusid/models/index_convention.py +1 -1
- lusid/models/instrument_event_instruction.py +19 -4
- lusid/models/new_instrument.py +10 -2
- lusid/models/person.py +17 -2
- lusid/models/placement_update_request.py +6 -1
- lusid/models/transaction_diagnostics.py +71 -0
- lusid/models/valuation_point_data_response.py +21 -1
- {lusid_sdk-2.1.363.dist-info → lusid_sdk-2.1.386.dist-info}/METADATA +34 -21
- {lusid_sdk-2.1.363.dist-info → lusid_sdk-2.1.386.dist-info}/RECORD +35 -23
- {lusid_sdk-2.1.363.dist-info → lusid_sdk-2.1.386.dist-info}/WHEEL +0 -0
@@ -0,0 +1,71 @@
|
|
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, Union
|
22
|
+
from pydantic.v1 import BaseModel, Field, StrictFloat, StrictInt, constr
|
23
|
+
|
24
|
+
class GroupReconciliationComparisonRuleTolerance(BaseModel):
|
25
|
+
"""
|
26
|
+
GroupReconciliationComparisonRuleTolerance
|
27
|
+
"""
|
28
|
+
type: constr(strict=True, min_length=1) = Field(..., description="The type of tolerance to allow. \"Relative\" | \"Absolute\"")
|
29
|
+
value: Union[StrictFloat, StrictInt] = Field(..., description="The decimal value of how much tolerance to allow when comparing in relative (i.e percentage) or absolute terms depending on the ToleranceType specified")
|
30
|
+
__properties = ["type", "value"]
|
31
|
+
|
32
|
+
class Config:
|
33
|
+
"""Pydantic configuration"""
|
34
|
+
allow_population_by_field_name = True
|
35
|
+
validate_assignment = True
|
36
|
+
|
37
|
+
def to_str(self) -> str:
|
38
|
+
"""Returns the string representation of the model using alias"""
|
39
|
+
return pprint.pformat(self.dict(by_alias=True))
|
40
|
+
|
41
|
+
def to_json(self) -> str:
|
42
|
+
"""Returns the JSON representation of the model using alias"""
|
43
|
+
return json.dumps(self.to_dict())
|
44
|
+
|
45
|
+
@classmethod
|
46
|
+
def from_json(cls, json_str: str) -> GroupReconciliationComparisonRuleTolerance:
|
47
|
+
"""Create an instance of GroupReconciliationComparisonRuleTolerance from a JSON string"""
|
48
|
+
return cls.from_dict(json.loads(json_str))
|
49
|
+
|
50
|
+
def to_dict(self):
|
51
|
+
"""Returns the dictionary representation of the model using alias"""
|
52
|
+
_dict = self.dict(by_alias=True,
|
53
|
+
exclude={
|
54
|
+
},
|
55
|
+
exclude_none=True)
|
56
|
+
return _dict
|
57
|
+
|
58
|
+
@classmethod
|
59
|
+
def from_dict(cls, obj: dict) -> GroupReconciliationComparisonRuleTolerance:
|
60
|
+
"""Create an instance of GroupReconciliationComparisonRuleTolerance from a dict"""
|
61
|
+
if obj is None:
|
62
|
+
return None
|
63
|
+
|
64
|
+
if not isinstance(obj, dict):
|
65
|
+
return GroupReconciliationComparisonRuleTolerance.parse_obj(obj)
|
66
|
+
|
67
|
+
_obj = GroupReconciliationComparisonRuleTolerance.parse_obj({
|
68
|
+
"type": obj.get("type"),
|
69
|
+
"value": obj.get("value")
|
70
|
+
})
|
71
|
+
return _obj
|
@@ -0,0 +1,125 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
|
3
|
+
"""
|
4
|
+
LUSID API
|
5
|
+
|
6
|
+
FINBOURNE Technology # noqa: E501
|
7
|
+
|
8
|
+
Contact: info@finbourne.com
|
9
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
10
|
+
|
11
|
+
Do not edit the class manually.
|
12
|
+
"""
|
13
|
+
|
14
|
+
|
15
|
+
from __future__ import annotations
|
16
|
+
import pprint
|
17
|
+
import re # noqa: F401
|
18
|
+
import json
|
19
|
+
|
20
|
+
|
21
|
+
from typing import Any, Dict, List, Optional
|
22
|
+
from pydantic.v1 import BaseModel, Field, StrictStr, conlist, constr
|
23
|
+
from lusid.models.group_reconciliation_aggregate_attribute_rule import GroupReconciliationAggregateAttributeRule
|
24
|
+
from lusid.models.group_reconciliation_core_attribute_rule import GroupReconciliationCoreAttributeRule
|
25
|
+
from lusid.models.link import Link
|
26
|
+
from lusid.models.resource_id import ResourceId
|
27
|
+
from lusid.models.version import Version
|
28
|
+
|
29
|
+
class GroupReconciliationComparisonRuleset(BaseModel):
|
30
|
+
"""
|
31
|
+
GroupReconciliationComparisonRuleset
|
32
|
+
"""
|
33
|
+
id: ResourceId = Field(...)
|
34
|
+
display_name: constr(strict=True, min_length=1) = Field(..., alias="displayName", description="The name of the ruleset")
|
35
|
+
reconciliation_type: constr(strict=True, min_length=1) = Field(..., alias="reconciliationType", description="The type of reconciliation to perform. \"Holding\" | \"Transaction\" | \"Valuation\"")
|
36
|
+
core_attribute_rules: conlist(GroupReconciliationCoreAttributeRule) = Field(..., alias="coreAttributeRules", description="The core comparison rules")
|
37
|
+
aggregate_attribute_rules: conlist(GroupReconciliationAggregateAttributeRule) = Field(..., alias="aggregateAttributeRules", description="The aggregate comparison rules")
|
38
|
+
href: Optional[StrictStr] = Field(None, description="The specific Uniform Resource Identifier (URI) for this resource at the requested effective and asAt datetime.")
|
39
|
+
version: Optional[Version] = None
|
40
|
+
links: Optional[conlist(Link)] = None
|
41
|
+
__properties = ["id", "displayName", "reconciliationType", "coreAttributeRules", "aggregateAttributeRules", "href", "version", "links"]
|
42
|
+
|
43
|
+
class Config:
|
44
|
+
"""Pydantic configuration"""
|
45
|
+
allow_population_by_field_name = True
|
46
|
+
validate_assignment = True
|
47
|
+
|
48
|
+
def to_str(self) -> str:
|
49
|
+
"""Returns the string representation of the model using alias"""
|
50
|
+
return pprint.pformat(self.dict(by_alias=True))
|
51
|
+
|
52
|
+
def to_json(self) -> str:
|
53
|
+
"""Returns the JSON representation of the model using alias"""
|
54
|
+
return json.dumps(self.to_dict())
|
55
|
+
|
56
|
+
@classmethod
|
57
|
+
def from_json(cls, json_str: str) -> GroupReconciliationComparisonRuleset:
|
58
|
+
"""Create an instance of GroupReconciliationComparisonRuleset from a JSON string"""
|
59
|
+
return cls.from_dict(json.loads(json_str))
|
60
|
+
|
61
|
+
def to_dict(self):
|
62
|
+
"""Returns the dictionary representation of the model using alias"""
|
63
|
+
_dict = self.dict(by_alias=True,
|
64
|
+
exclude={
|
65
|
+
},
|
66
|
+
exclude_none=True)
|
67
|
+
# override the default output from pydantic by calling `to_dict()` of id
|
68
|
+
if self.id:
|
69
|
+
_dict['id'] = self.id.to_dict()
|
70
|
+
# override the default output from pydantic by calling `to_dict()` of each item in core_attribute_rules (list)
|
71
|
+
_items = []
|
72
|
+
if self.core_attribute_rules:
|
73
|
+
for _item in self.core_attribute_rules:
|
74
|
+
if _item:
|
75
|
+
_items.append(_item.to_dict())
|
76
|
+
_dict['coreAttributeRules'] = _items
|
77
|
+
# override the default output from pydantic by calling `to_dict()` of each item in aggregate_attribute_rules (list)
|
78
|
+
_items = []
|
79
|
+
if self.aggregate_attribute_rules:
|
80
|
+
for _item in self.aggregate_attribute_rules:
|
81
|
+
if _item:
|
82
|
+
_items.append(_item.to_dict())
|
83
|
+
_dict['aggregateAttributeRules'] = _items
|
84
|
+
# override the default output from pydantic by calling `to_dict()` of version
|
85
|
+
if self.version:
|
86
|
+
_dict['version'] = self.version.to_dict()
|
87
|
+
# override the default output from pydantic by calling `to_dict()` of each item in links (list)
|
88
|
+
_items = []
|
89
|
+
if self.links:
|
90
|
+
for _item in self.links:
|
91
|
+
if _item:
|
92
|
+
_items.append(_item.to_dict())
|
93
|
+
_dict['links'] = _items
|
94
|
+
# set to None if href (nullable) is None
|
95
|
+
# and __fields_set__ contains the field
|
96
|
+
if self.href is None and "href" in self.__fields_set__:
|
97
|
+
_dict['href'] = None
|
98
|
+
|
99
|
+
# set to None if links (nullable) is None
|
100
|
+
# and __fields_set__ contains the field
|
101
|
+
if self.links is None and "links" in self.__fields_set__:
|
102
|
+
_dict['links'] = None
|
103
|
+
|
104
|
+
return _dict
|
105
|
+
|
106
|
+
@classmethod
|
107
|
+
def from_dict(cls, obj: dict) -> GroupReconciliationComparisonRuleset:
|
108
|
+
"""Create an instance of GroupReconciliationComparisonRuleset from a dict"""
|
109
|
+
if obj is None:
|
110
|
+
return None
|
111
|
+
|
112
|
+
if not isinstance(obj, dict):
|
113
|
+
return GroupReconciliationComparisonRuleset.parse_obj(obj)
|
114
|
+
|
115
|
+
_obj = GroupReconciliationComparisonRuleset.parse_obj({
|
116
|
+
"id": ResourceId.from_dict(obj.get("id")) if obj.get("id") is not None else None,
|
117
|
+
"display_name": obj.get("displayName"),
|
118
|
+
"reconciliation_type": obj.get("reconciliationType"),
|
119
|
+
"core_attribute_rules": [GroupReconciliationCoreAttributeRule.from_dict(_item) for _item in obj.get("coreAttributeRules")] if obj.get("coreAttributeRules") is not None else None,
|
120
|
+
"aggregate_attribute_rules": [GroupReconciliationAggregateAttributeRule.from_dict(_item) for _item in obj.get("aggregateAttributeRules")] if obj.get("aggregateAttributeRules") is not None else None,
|
121
|
+
"href": obj.get("href"),
|
122
|
+
"version": Version.from_dict(obj.get("version")) if obj.get("version") is not None else None,
|
123
|
+
"links": [Link.from_dict(_item) for _item in obj.get("links")] if obj.get("links") is not None else None
|
124
|
+
})
|
125
|
+
return _obj
|
@@ -0,0 +1,95 @@
|
|
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, StrictBool, conlist
|
23
|
+
from lusid.models.group_reconciliation_comparison_rule_string_value_map import GroupReconciliationComparisonRuleStringValueMap
|
24
|
+
from lusid.models.group_reconciliation_core_comparison_rule_operand import GroupReconciliationCoreComparisonRuleOperand
|
25
|
+
|
26
|
+
class GroupReconciliationCoreAttributeRule(BaseModel):
|
27
|
+
"""
|
28
|
+
GroupReconciliationCoreAttributeRule
|
29
|
+
"""
|
30
|
+
left: GroupReconciliationCoreComparisonRuleOperand = Field(...)
|
31
|
+
right: GroupReconciliationCoreComparisonRuleOperand = Field(...)
|
32
|
+
allowable_string_mappings: Optional[conlist(GroupReconciliationComparisonRuleStringValueMap)] = Field(None, alias="allowableStringMappings", description="The string mappings to use when comparing")
|
33
|
+
is_comparison_case_sensitive: StrictBool = Field(..., alias="isComparisonCaseSensitive", description="Whether the compare keys and strings mappings case sensitive or not")
|
34
|
+
__properties = ["left", "right", "allowableStringMappings", "isComparisonCaseSensitive"]
|
35
|
+
|
36
|
+
class Config:
|
37
|
+
"""Pydantic configuration"""
|
38
|
+
allow_population_by_field_name = True
|
39
|
+
validate_assignment = True
|
40
|
+
|
41
|
+
def to_str(self) -> str:
|
42
|
+
"""Returns the string representation of the model using alias"""
|
43
|
+
return pprint.pformat(self.dict(by_alias=True))
|
44
|
+
|
45
|
+
def to_json(self) -> str:
|
46
|
+
"""Returns the JSON representation of the model using alias"""
|
47
|
+
return json.dumps(self.to_dict())
|
48
|
+
|
49
|
+
@classmethod
|
50
|
+
def from_json(cls, json_str: str) -> GroupReconciliationCoreAttributeRule:
|
51
|
+
"""Create an instance of GroupReconciliationCoreAttributeRule from a JSON string"""
|
52
|
+
return cls.from_dict(json.loads(json_str))
|
53
|
+
|
54
|
+
def to_dict(self):
|
55
|
+
"""Returns the dictionary representation of the model using alias"""
|
56
|
+
_dict = self.dict(by_alias=True,
|
57
|
+
exclude={
|
58
|
+
},
|
59
|
+
exclude_none=True)
|
60
|
+
# override the default output from pydantic by calling `to_dict()` of left
|
61
|
+
if self.left:
|
62
|
+
_dict['left'] = self.left.to_dict()
|
63
|
+
# override the default output from pydantic by calling `to_dict()` of right
|
64
|
+
if self.right:
|
65
|
+
_dict['right'] = self.right.to_dict()
|
66
|
+
# override the default output from pydantic by calling `to_dict()` of each item in allowable_string_mappings (list)
|
67
|
+
_items = []
|
68
|
+
if self.allowable_string_mappings:
|
69
|
+
for _item in self.allowable_string_mappings:
|
70
|
+
if _item:
|
71
|
+
_items.append(_item.to_dict())
|
72
|
+
_dict['allowableStringMappings'] = _items
|
73
|
+
# set to None if allowable_string_mappings (nullable) is None
|
74
|
+
# and __fields_set__ contains the field
|
75
|
+
if self.allowable_string_mappings is None and "allowable_string_mappings" in self.__fields_set__:
|
76
|
+
_dict['allowableStringMappings'] = None
|
77
|
+
|
78
|
+
return _dict
|
79
|
+
|
80
|
+
@classmethod
|
81
|
+
def from_dict(cls, obj: dict) -> GroupReconciliationCoreAttributeRule:
|
82
|
+
"""Create an instance of GroupReconciliationCoreAttributeRule from a dict"""
|
83
|
+
if obj is None:
|
84
|
+
return None
|
85
|
+
|
86
|
+
if not isinstance(obj, dict):
|
87
|
+
return GroupReconciliationCoreAttributeRule.parse_obj(obj)
|
88
|
+
|
89
|
+
_obj = GroupReconciliationCoreAttributeRule.parse_obj({
|
90
|
+
"left": GroupReconciliationCoreComparisonRuleOperand.from_dict(obj.get("left")) if obj.get("left") is not None else None,
|
91
|
+
"right": GroupReconciliationCoreComparisonRuleOperand.from_dict(obj.get("right")) if obj.get("right") is not None else None,
|
92
|
+
"allowable_string_mappings": [GroupReconciliationComparisonRuleStringValueMap.from_dict(_item) for _item in obj.get("allowableStringMappings")] if obj.get("allowableStringMappings") is not None else None,
|
93
|
+
"is_comparison_case_sensitive": obj.get("isComparisonCaseSensitive")
|
94
|
+
})
|
95
|
+
return _obj
|
@@ -0,0 +1,71 @@
|
|
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, constr
|
23
|
+
|
24
|
+
class GroupReconciliationCoreComparisonRuleOperand(BaseModel):
|
25
|
+
"""
|
26
|
+
GroupReconciliationCoreComparisonRuleOperand
|
27
|
+
"""
|
28
|
+
key: constr(strict=True, max_length=256, min_length=1) = Field(..., description="The key of the value to compare")
|
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
|
+
__properties = ["key", "operation"]
|
31
|
+
|
32
|
+
class Config:
|
33
|
+
"""Pydantic configuration"""
|
34
|
+
allow_population_by_field_name = True
|
35
|
+
validate_assignment = True
|
36
|
+
|
37
|
+
def to_str(self) -> str:
|
38
|
+
"""Returns the string representation of the model using alias"""
|
39
|
+
return pprint.pformat(self.dict(by_alias=True))
|
40
|
+
|
41
|
+
def to_json(self) -> str:
|
42
|
+
"""Returns the JSON representation of the model using alias"""
|
43
|
+
return json.dumps(self.to_dict())
|
44
|
+
|
45
|
+
@classmethod
|
46
|
+
def from_json(cls, json_str: str) -> GroupReconciliationCoreComparisonRuleOperand:
|
47
|
+
"""Create an instance of GroupReconciliationCoreComparisonRuleOperand from a JSON string"""
|
48
|
+
return cls.from_dict(json.loads(json_str))
|
49
|
+
|
50
|
+
def to_dict(self):
|
51
|
+
"""Returns the dictionary representation of the model using alias"""
|
52
|
+
_dict = self.dict(by_alias=True,
|
53
|
+
exclude={
|
54
|
+
},
|
55
|
+
exclude_none=True)
|
56
|
+
return _dict
|
57
|
+
|
58
|
+
@classmethod
|
59
|
+
def from_dict(cls, obj: dict) -> GroupReconciliationCoreComparisonRuleOperand:
|
60
|
+
"""Create an instance of GroupReconciliationCoreComparisonRuleOperand from a dict"""
|
61
|
+
if obj is None:
|
62
|
+
return None
|
63
|
+
|
64
|
+
if not isinstance(obj, dict):
|
65
|
+
return GroupReconciliationCoreComparisonRuleOperand.parse_obj(obj)
|
66
|
+
|
67
|
+
_obj = GroupReconciliationCoreComparisonRuleOperand.parse_obj({
|
68
|
+
"key": obj.get("key"),
|
69
|
+
"operation": obj.get("operation")
|
70
|
+
})
|
71
|
+
return _obj
|
lusid/models/index_convention.py
CHANGED
@@ -30,7 +30,7 @@ class IndexConvention(BaseModel):
|
|
30
30
|
payment_tenor: constr(strict=True, max_length=32, min_length=0) = Field(..., alias="paymentTenor", description="The tenor of the payment. For an OIS index this is always 1 day. For other indices, e.g. LIBOR it will have a variable tenor typically between 1 day and 1 year. For more information on tenors, see [knowledge base article KA-02097](https://support.lusid.com/knowledgebase/article/KA-02097)")
|
31
31
|
day_count_convention: constr(strict=True, max_length=32, min_length=0) = Field(..., alias="dayCountConvention", description="when calculating the fraction of a year between two dates, what convention is used to represent the number of days in a year and difference between them. For more information on day counts, see [knowledge base article KA-01798](https://support.lusid.com/knowledgebase/article/KA-01798) Supported string (enumeration) values are: [Actual360, Act360, MoneyMarket, Actual365, Act365, Thirty360, ThirtyU360, Bond, ThirtyE360, EuroBond, ActualActual, ActAct, ActActIsda, ActActIsma, ActActIcma, OneOne, Act364, Act365F, Act365L, Act365_25, Act252, Bus252, NL360, NL365].")
|
32
32
|
currency: StrictStr = Field(..., description="Currency of the index convention.")
|
33
|
-
index_name: Optional[constr(strict=True, max_length=
|
33
|
+
index_name: Optional[constr(strict=True, max_length=64, min_length=0)] = Field(None, alias="indexName", description="The name of the index for which this represents the conventions of. For instance, \"SOFR\", \"LIBOR\", \"EURIBOR\", etc. Defaults to \"INDEX\" if not specified.")
|
34
34
|
scope: Optional[constr(strict=True, max_length=256, min_length=1)] = Field(None, description="The scope used when updating or inserting the convention.")
|
35
35
|
code: Optional[constr(strict=True, max_length=256, min_length=1)] = Field(None, description="The code of the convention.")
|
36
36
|
__properties = ["fixingReference", "publicationDayLag", "paymentTenor", "dayCountConvention", "currency", "indexName", "scope", "code"]
|
@@ -18,8 +18,9 @@ import re # noqa: F401
|
|
18
18
|
import json
|
19
19
|
|
20
20
|
|
21
|
-
from typing import Any, Dict, Optional
|
22
|
-
from pydantic.v1 import BaseModel, Field, StrictInt, StrictStr
|
21
|
+
from typing import Any, Dict, List, Optional
|
22
|
+
from pydantic.v1 import BaseModel, Field, StrictInt, StrictStr, conlist
|
23
|
+
from lusid.models.link import Link
|
23
24
|
from lusid.models.resource_id import ResourceId
|
24
25
|
from lusid.models.version import Version
|
25
26
|
|
@@ -35,7 +36,8 @@ class InstrumentEventInstruction(BaseModel):
|
|
35
36
|
holding_id: Optional[StrictInt] = Field(None, alias="holdingId", description="For holding instructions, the id of the holding for which the instruction will apply")
|
36
37
|
version: Optional[Version] = None
|
37
38
|
href: Optional[StrictStr] = Field(None, description="The uri for this version of this instruction")
|
38
|
-
|
39
|
+
links: Optional[conlist(Link)] = None
|
40
|
+
__properties = ["instrumentEventInstructionId", "portfolioId", "instrumentEventId", "instructionType", "electionKey", "holdingId", "version", "href", "links"]
|
39
41
|
|
40
42
|
class Config:
|
41
43
|
"""Pydantic configuration"""
|
@@ -67,6 +69,13 @@ class InstrumentEventInstruction(BaseModel):
|
|
67
69
|
# override the default output from pydantic by calling `to_dict()` of version
|
68
70
|
if self.version:
|
69
71
|
_dict['version'] = self.version.to_dict()
|
72
|
+
# override the default output from pydantic by calling `to_dict()` of each item in links (list)
|
73
|
+
_items = []
|
74
|
+
if self.links:
|
75
|
+
for _item in self.links:
|
76
|
+
if _item:
|
77
|
+
_items.append(_item.to_dict())
|
78
|
+
_dict['links'] = _items
|
70
79
|
# set to None if instrument_event_instruction_id (nullable) is None
|
71
80
|
# and __fields_set__ contains the field
|
72
81
|
if self.instrument_event_instruction_id is None and "instrument_event_instruction_id" in self.__fields_set__:
|
@@ -97,6 +106,11 @@ class InstrumentEventInstruction(BaseModel):
|
|
97
106
|
if self.href is None and "href" in self.__fields_set__:
|
98
107
|
_dict['href'] = None
|
99
108
|
|
109
|
+
# set to None if links (nullable) is None
|
110
|
+
# and __fields_set__ contains the field
|
111
|
+
if self.links is None and "links" in self.__fields_set__:
|
112
|
+
_dict['links'] = None
|
113
|
+
|
100
114
|
return _dict
|
101
115
|
|
102
116
|
@classmethod
|
@@ -116,6 +130,7 @@ class InstrumentEventInstruction(BaseModel):
|
|
116
130
|
"election_key": obj.get("electionKey"),
|
117
131
|
"holding_id": obj.get("holdingId"),
|
118
132
|
"version": Version.from_dict(obj.get("version")) if obj.get("version") is not None else None,
|
119
|
-
"href": obj.get("href")
|
133
|
+
"href": obj.get("href"),
|
134
|
+
"links": [Link.from_dict(_item) for _item in obj.get("links")] if obj.get("links") is not None else None
|
120
135
|
})
|
121
136
|
return _obj
|
lusid/models/new_instrument.py
CHANGED
@@ -28,7 +28,8 @@ class NewInstrument(BaseModel):
|
|
28
28
|
instrument_identifiers: Dict[str, StrictStr] = Field(..., alias="instrumentIdentifiers", description="Unique instrument identifiers.")
|
29
29
|
lusid_instrument_id: Optional[StrictStr] = Field(None, alias="lusidInstrumentId", description="LUSID's internal unique instrument identifier, resolved from the instrument identifiers.")
|
30
30
|
instrument_scope: Optional[StrictStr] = Field(None, alias="instrumentScope", description="The scope in which the instrument lies, resolved from the instrument identifiers.")
|
31
|
-
|
31
|
+
dom_ccy: Optional[StrictStr] = Field(None, alias="domCcy", description="The domestic currency of the instrument, resolved from the instrument identifiers.")
|
32
|
+
__properties = ["instrumentIdentifiers", "lusidInstrumentId", "instrumentScope", "domCcy"]
|
32
33
|
|
33
34
|
class Config:
|
34
35
|
"""Pydantic configuration"""
|
@@ -54,6 +55,7 @@ class NewInstrument(BaseModel):
|
|
54
55
|
exclude={
|
55
56
|
"lusid_instrument_id",
|
56
57
|
"instrument_scope",
|
58
|
+
"dom_ccy",
|
57
59
|
},
|
58
60
|
exclude_none=True)
|
59
61
|
# set to None if lusid_instrument_id (nullable) is None
|
@@ -66,6 +68,11 @@ class NewInstrument(BaseModel):
|
|
66
68
|
if self.instrument_scope is None and "instrument_scope" in self.__fields_set__:
|
67
69
|
_dict['instrumentScope'] = None
|
68
70
|
|
71
|
+
# set to None if dom_ccy (nullable) is None
|
72
|
+
# and __fields_set__ contains the field
|
73
|
+
if self.dom_ccy is None and "dom_ccy" in self.__fields_set__:
|
74
|
+
_dict['domCcy'] = None
|
75
|
+
|
69
76
|
return _dict
|
70
77
|
|
71
78
|
@classmethod
|
@@ -80,6 +87,7 @@ class NewInstrument(BaseModel):
|
|
80
87
|
_obj = NewInstrument.parse_obj({
|
81
88
|
"instrument_identifiers": obj.get("instrumentIdentifiers"),
|
82
89
|
"lusid_instrument_id": obj.get("lusidInstrumentId"),
|
83
|
-
"instrument_scope": obj.get("instrumentScope")
|
90
|
+
"instrument_scope": obj.get("instrumentScope"),
|
91
|
+
"dom_ccy": obj.get("domCcy")
|
84
92
|
})
|
85
93
|
return _obj
|
lusid/models/person.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, StrictStr, conlist
|
23
|
+
from lusid.models.link import Link
|
23
24
|
from lusid.models.model_property import ModelProperty
|
24
25
|
from lusid.models.relationship import Relationship
|
25
26
|
from lusid.models.version import Version
|
@@ -36,7 +37,8 @@ class Person(BaseModel):
|
|
36
37
|
properties: Optional[Dict[str, ModelProperty]] = Field(None, description="A set of properties associated to the Person. There can be multiple properties associated with a property key.")
|
37
38
|
relationships: Optional[conlist(Relationship)] = Field(None, description="A set of relationships associated to the Person.")
|
38
39
|
version: Optional[Version] = None
|
39
|
-
|
40
|
+
links: Optional[conlist(Link)] = None
|
41
|
+
__properties = ["displayName", "description", "href", "lusidPersonId", "identifiers", "properties", "relationships", "version", "links"]
|
40
42
|
|
41
43
|
class Config:
|
42
44
|
"""Pydantic configuration"""
|
@@ -86,6 +88,13 @@ class Person(BaseModel):
|
|
86
88
|
# override the default output from pydantic by calling `to_dict()` of version
|
87
89
|
if self.version:
|
88
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
|
89
98
|
# set to None if display_name (nullable) is None
|
90
99
|
# and __fields_set__ contains the field
|
91
100
|
if self.display_name is None and "display_name" in self.__fields_set__:
|
@@ -121,6 +130,11 @@ class Person(BaseModel):
|
|
121
130
|
if self.relationships is None and "relationships" in self.__fields_set__:
|
122
131
|
_dict['relationships'] = None
|
123
132
|
|
133
|
+
# set to None if links (nullable) is None
|
134
|
+
# and __fields_set__ contains the field
|
135
|
+
if self.links is None and "links" in self.__fields_set__:
|
136
|
+
_dict['links'] = None
|
137
|
+
|
124
138
|
return _dict
|
125
139
|
|
126
140
|
@classmethod
|
@@ -150,6 +164,7 @@ class Person(BaseModel):
|
|
150
164
|
if obj.get("properties") is not None
|
151
165
|
else None,
|
152
166
|
"relationships": [Relationship.from_dict(_item) for _item in obj.get("relationships")] if obj.get("relationships") is not None else None,
|
153
|
-
"version": Version.from_dict(obj.get("version")) if obj.get("version") is not None else None
|
167
|
+
"version": Version.from_dict(obj.get("version")) if obj.get("version") is not None else None,
|
168
|
+
"links": [Link.from_dict(_item) for _item in obj.get("links")] if obj.get("links") is not None else None
|
154
169
|
})
|
155
170
|
return _obj
|
@@ -28,7 +28,7 @@ class PlacementUpdateRequest(BaseModel):
|
|
28
28
|
A request to create or update a Placement. # noqa: E501
|
29
29
|
"""
|
30
30
|
id: ResourceId = Field(...)
|
31
|
-
quantity: Union[StrictFloat, StrictInt] = Field(
|
31
|
+
quantity: Optional[Union[StrictFloat, StrictInt]] = Field(None, description="The quantity of given instrument ordered.")
|
32
32
|
properties: Optional[Dict[str, PerpetualProperty]] = Field(None, description="Client-defined properties associated with this placement.")
|
33
33
|
counterparty: Optional[StrictStr] = Field(None, description="Optionally specifies the market entity this placement is placed with.")
|
34
34
|
execution_system: Optional[constr(strict=True, max_length=256, min_length=1)] = Field(None, alias="executionSystem", description="Optionally specifies the execution system in use.")
|
@@ -69,6 +69,11 @@ class PlacementUpdateRequest(BaseModel):
|
|
69
69
|
if self.properties[_key]:
|
70
70
|
_field_dict[_key] = self.properties[_key].to_dict()
|
71
71
|
_dict['properties'] = _field_dict
|
72
|
+
# set to None if quantity (nullable) is None
|
73
|
+
# and __fields_set__ contains the field
|
74
|
+
if self.quantity is None and "quantity" in self.__fields_set__:
|
75
|
+
_dict['quantity'] = None
|
76
|
+
|
72
77
|
# set to None if properties (nullable) is None
|
73
78
|
# and __fields_set__ contains the field
|
74
79
|
if self.properties is None and "properties" in self.__fields_set__:
|
@@ -0,0 +1,71 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
|
3
|
+
"""
|
4
|
+
LUSID API
|
5
|
+
|
6
|
+
FINBOURNE Technology # noqa: E501
|
7
|
+
|
8
|
+
Contact: info@finbourne.com
|
9
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
10
|
+
|
11
|
+
Do not edit the class manually.
|
12
|
+
"""
|
13
|
+
|
14
|
+
|
15
|
+
from __future__ import annotations
|
16
|
+
import pprint
|
17
|
+
import re # noqa: F401
|
18
|
+
import json
|
19
|
+
|
20
|
+
|
21
|
+
from typing import Any, Dict, List
|
22
|
+
from pydantic.v1 import BaseModel, Field, StrictStr, conlist, constr
|
23
|
+
|
24
|
+
class TransactionDiagnostics(BaseModel):
|
25
|
+
"""
|
26
|
+
Represents a set of diagnostics per transaction, where applicable. # noqa: E501
|
27
|
+
"""
|
28
|
+
transaction_display_name: constr(strict=True, min_length=1) = Field(..., alias="transactionDisplayName")
|
29
|
+
error_details: conlist(StrictStr) = Field(..., alias="errorDetails")
|
30
|
+
__properties = ["transactionDisplayName", "errorDetails"]
|
31
|
+
|
32
|
+
class Config:
|
33
|
+
"""Pydantic configuration"""
|
34
|
+
allow_population_by_field_name = True
|
35
|
+
validate_assignment = True
|
36
|
+
|
37
|
+
def to_str(self) -> str:
|
38
|
+
"""Returns the string representation of the model using alias"""
|
39
|
+
return pprint.pformat(self.dict(by_alias=True))
|
40
|
+
|
41
|
+
def to_json(self) -> str:
|
42
|
+
"""Returns the JSON representation of the model using alias"""
|
43
|
+
return json.dumps(self.to_dict())
|
44
|
+
|
45
|
+
@classmethod
|
46
|
+
def from_json(cls, json_str: str) -> TransactionDiagnostics:
|
47
|
+
"""Create an instance of TransactionDiagnostics from a JSON string"""
|
48
|
+
return cls.from_dict(json.loads(json_str))
|
49
|
+
|
50
|
+
def to_dict(self):
|
51
|
+
"""Returns the dictionary representation of the model using alias"""
|
52
|
+
_dict = self.dict(by_alias=True,
|
53
|
+
exclude={
|
54
|
+
},
|
55
|
+
exclude_none=True)
|
56
|
+
return _dict
|
57
|
+
|
58
|
+
@classmethod
|
59
|
+
def from_dict(cls, obj: dict) -> TransactionDiagnostics:
|
60
|
+
"""Create an instance of TransactionDiagnostics from a dict"""
|
61
|
+
if obj is None:
|
62
|
+
return None
|
63
|
+
|
64
|
+
if not isinstance(obj, dict):
|
65
|
+
return TransactionDiagnostics.parse_obj(obj)
|
66
|
+
|
67
|
+
_obj = TransactionDiagnostics.parse_obj({
|
68
|
+
"transaction_display_name": obj.get("transactionDisplayName"),
|
69
|
+
"error_details": obj.get("errorDetails")
|
70
|
+
})
|
71
|
+
return _obj
|