lusid-sdk 2.1.405__py3-none-any.whl → 2.1.423__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.
Files changed (72) hide show
  1. lusid/__init__.py +40 -8
  2. lusid/api/__init__.py +2 -2
  3. lusid/api/abor_api.py +8 -16
  4. lusid/api/allocations_api.py +2 -2
  5. lusid/api/chart_of_accounts_api.py +174 -0
  6. lusid/api/custom_entities_api.py +2 -2
  7. lusid/api/entities_api.py +180 -0
  8. lusid/api/{fund_configurations_api.py → fund_configuration_entities_api.py} +1 -1
  9. lusid/api/group_reconciliations_api.py +1418 -27
  10. lusid/api/instruments_api.py +6 -6
  11. lusid/api/legal_entities_api.py +4 -4
  12. lusid/api/order_graph_api.py +4 -4
  13. lusid/api/portfolios_api.py +27 -30
  14. lusid/api/reference_lists_api.py +2 -2
  15. lusid/api/reference_portfolio_api.py +176 -0
  16. lusid/api/transaction_portfolios_api.py +2 -2
  17. lusid/configuration.py +1 -1
  18. lusid/models/__init__.py +38 -6
  19. lusid/models/access_metadata_value.py +1 -1
  20. lusid/models/address_key_list.py +3 -3
  21. lusid/models/amount.py +69 -0
  22. lusid/models/batch_upsert_portfolio_access_metadata_request.py +27 -17
  23. lusid/models/batch_upsert_portfolio_access_metadata_response.py +56 -16
  24. lusid/models/{metadata_key_value.py → batch_upsert_portfolio_access_metadata_response_item.py} +15 -9
  25. lusid/models/{component_rule.py → break_code_source.py} +17 -21
  26. lusid/models/create_group_reconciliation_definition_request.py +113 -0
  27. lusid/models/custom_entity_entity.py +146 -0
  28. lusid/models/decimal_list.py +3 -3
  29. lusid/models/diary_entry_request.py +10 -1
  30. lusid/models/fixed_schedule.py +3 -3
  31. lusid/models/float_schedule.py +4 -4
  32. lusid/models/flow_conventions.py +7 -1
  33. lusid/models/fund_configuration.py +44 -17
  34. lusid/models/fund_configuration_request.py +31 -19
  35. lusid/models/fund_id_list.py +99 -0
  36. lusid/models/group_reconciliation_aggregate_attribute_rule.py +2 -2
  37. lusid/models/group_reconciliation_aggregate_comparison_rule_operand.py +1 -1
  38. lusid/models/group_reconciliation_core_comparison_rule_operand.py +1 -1
  39. lusid/models/group_reconciliation_definition.py +136 -0
  40. lusid/models/group_reconciliation_definition_comparison_ruleset_ids.py +83 -0
  41. lusid/models/group_reconciliation_definition_currencies.py +71 -0
  42. lusid/models/group_reconciliation_definition_portfolio_entity_ids.py +86 -0
  43. lusid/models/group_reconciliation_definition_recipe_ids.py +78 -0
  44. lusid/models/instrument.py +7 -1
  45. lusid/models/instrument_definition.py +8 -2
  46. lusid/models/instrument_list.py +3 -3
  47. lusid/models/market_data_key_rule.py +5 -3
  48. lusid/models/market_data_specific_rule.py +5 -3
  49. lusid/models/merger_event.py +19 -19
  50. lusid/models/output_transaction.py +9 -2
  51. lusid/models/paged_resource_list_of_group_reconciliation_comparison_ruleset.py +113 -0
  52. lusid/models/paged_resource_list_of_group_reconciliation_definition.py +113 -0
  53. lusid/models/portfolio_group_id_list.py +3 -3
  54. lusid/models/portfolio_id_list.py +3 -3
  55. lusid/models/property_list.py +3 -3
  56. lusid/models/reference_list.py +6 -5
  57. lusid/models/reference_list_type.py +1 -0
  58. lusid/models/settlement_cycle.py +79 -0
  59. lusid/models/share_class_dealing_breakdown.py +3 -2
  60. lusid/models/stock_dividend_event.py +17 -3
  61. lusid/models/string_list.py +3 -3
  62. lusid/models/transaction.py +9 -2
  63. lusid/models/transaction_date_windows.py +85 -0
  64. lusid/models/transaction_request.py +9 -2
  65. lusid/models/update_group_reconciliation_comparison_ruleset_request.py +91 -0
  66. lusid/models/update_group_reconciliation_definition_request.py +107 -0
  67. lusid/models/upsert_reference_portfolio_constituent_properties_request.py +84 -0
  68. lusid/models/upsert_reference_portfolio_constituent_properties_response.py +115 -0
  69. {lusid_sdk-2.1.405.dist-info → lusid_sdk-2.1.423.dist-info}/METADATA +50 -23
  70. {lusid_sdk-2.1.405.dist-info → lusid_sdk-2.1.423.dist-info}/RECORD +71 -55
  71. lusid/models/metadata_key_value_response.py +0 -86
  72. {lusid_sdk-2.1.405.dist-info → lusid_sdk-2.1.423.dist-info}/WHEEL +0 -0
@@ -0,0 +1,99 @@
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 Field, StrictStr, conlist, validator
23
+ from lusid.models.reference_list import ReferenceList
24
+ from lusid.models.resource_id import ResourceId
25
+
26
+ class FundIdList(ReferenceList):
27
+ """
28
+ FundIdList
29
+ """
30
+ values: conlist(ResourceId, max_items=100) = Field(...)
31
+ reference_list_type: StrictStr = Field(..., alias="referenceListType", description="The reference list values. The available values are: PortfolioGroupIdList, PortfolioIdList, AddressKeyList, StringList, InstrumentList, DecimalList, PropertyList, FundIdList")
32
+ additional_properties: Dict[str, Any] = {}
33
+ __properties = ["referenceListType", "values"]
34
+
35
+ @validator('reference_list_type')
36
+ def reference_list_type_validate_enum(cls, value):
37
+ """Validates the enum"""
38
+ if value not in ('PortfolioGroupIdList', 'PortfolioIdList', 'AddressKeyList', 'StringList', 'InstrumentList', 'DecimalList', 'PropertyList', 'FundIdList'):
39
+ raise ValueError("must be one of enum values ('PortfolioGroupIdList', 'PortfolioIdList', 'AddressKeyList', 'StringList', 'InstrumentList', 'DecimalList', 'PropertyList', 'FundIdList')")
40
+ return value
41
+
42
+ class Config:
43
+ """Pydantic configuration"""
44
+ allow_population_by_field_name = True
45
+ validate_assignment = True
46
+
47
+ def to_str(self) -> str:
48
+ """Returns the string representation of the model using alias"""
49
+ return pprint.pformat(self.dict(by_alias=True))
50
+
51
+ def to_json(self) -> str:
52
+ """Returns the JSON representation of the model using alias"""
53
+ return json.dumps(self.to_dict())
54
+
55
+ @classmethod
56
+ def from_json(cls, json_str: str) -> FundIdList:
57
+ """Create an instance of FundIdList from a JSON string"""
58
+ return cls.from_dict(json.loads(json_str))
59
+
60
+ def to_dict(self):
61
+ """Returns the dictionary representation of the model using alias"""
62
+ _dict = self.dict(by_alias=True,
63
+ exclude={
64
+ "additional_properties"
65
+ },
66
+ exclude_none=True)
67
+ # override the default output from pydantic by calling `to_dict()` of each item in values (list)
68
+ _items = []
69
+ if self.values:
70
+ for _item in self.values:
71
+ if _item:
72
+ _items.append(_item.to_dict())
73
+ _dict['values'] = _items
74
+ # puts key-value pairs in additional_properties in the top level
75
+ if self.additional_properties is not None:
76
+ for _key, _value in self.additional_properties.items():
77
+ _dict[_key] = _value
78
+
79
+ return _dict
80
+
81
+ @classmethod
82
+ def from_dict(cls, obj: dict) -> FundIdList:
83
+ """Create an instance of FundIdList from a dict"""
84
+ if obj is None:
85
+ return None
86
+
87
+ if not isinstance(obj, dict):
88
+ return FundIdList.parse_obj(obj)
89
+
90
+ _obj = FundIdList.parse_obj({
91
+ "reference_list_type": obj.get("referenceListType"),
92
+ "values": [ResourceId.from_dict(_item) for _item in obj.get("values")] if obj.get("values") is not None else None
93
+ })
94
+ # store additional fields in additional_properties
95
+ for _key in obj.keys():
96
+ if _key not in cls.__properties:
97
+ _obj.additional_properties[_key] = obj.get(_key)
98
+
99
+ return _obj
@@ -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 = Field(...)
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=256, min_length=1) = Field(..., description="The key of the value to compare")
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=256, min_length=1) = Field(..., description="The key of the value to compare")
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
 
@@ -0,0 +1,136 @@
1
+ # coding: utf-8
2
+
3
+ """
4
+ LUSID API
5
+
6
+ FINBOURNE Technology # noqa: E501
7
+
8
+ Contact: info@finbourne.com
9
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
10
+
11
+ Do not edit the class manually.
12
+ """
13
+
14
+
15
+ from __future__ import annotations
16
+ import pprint
17
+ import re # noqa: F401
18
+ import json
19
+
20
+
21
+ from typing import Any, Dict, Optional
22
+ from pydantic.v1 import BaseModel, Field, StrictStr
23
+ from lusid.models.break_code_source import BreakCodeSource
24
+ from lusid.models.group_reconciliation_definition_comparison_ruleset_ids import GroupReconciliationDefinitionComparisonRulesetIds
25
+ from lusid.models.group_reconciliation_definition_currencies import GroupReconciliationDefinitionCurrencies
26
+ from lusid.models.group_reconciliation_definition_portfolio_entity_ids import GroupReconciliationDefinitionPortfolioEntityIds
27
+ from lusid.models.group_reconciliation_definition_recipe_ids import GroupReconciliationDefinitionRecipeIds
28
+ from lusid.models.resource_id import ResourceId
29
+ from lusid.models.transaction_date_windows import TransactionDateWindows
30
+ from lusid.models.version import Version
31
+
32
+ class GroupReconciliationDefinition(BaseModel):
33
+ """
34
+ GroupReconciliationDefinition
35
+ """
36
+ id: Optional[ResourceId] = None
37
+ display_name: Optional[StrictStr] = Field(None, alias="displayName", description="The name of the Group Reconciliation Definition")
38
+ description: Optional[StrictStr] = Field(None, description="The description of the Group Reconciliation Definition")
39
+ portfolio_entity_ids: Optional[GroupReconciliationDefinitionPortfolioEntityIds] = Field(None, alias="portfolioEntityIds")
40
+ recipe_ids: Optional[GroupReconciliationDefinitionRecipeIds] = Field(None, alias="recipeIds")
41
+ currencies: Optional[GroupReconciliationDefinitionCurrencies] = None
42
+ transaction_date_windows: Optional[TransactionDateWindows] = Field(None, alias="transactionDateWindows")
43
+ comparison_ruleset_ids: Optional[GroupReconciliationDefinitionComparisonRulesetIds] = Field(None, alias="comparisonRulesetIds")
44
+ break_code_source: Optional[BreakCodeSource] = Field(None, alias="breakCodeSource")
45
+ href: Optional[StrictStr] = Field(None, description="The specific Uniform Resource Identifier (URI) for this resource at the requested effective and asAt datetime.")
46
+ version: Optional[Version] = None
47
+ __properties = ["id", "displayName", "description", "portfolioEntityIds", "recipeIds", "currencies", "transactionDateWindows", "comparisonRulesetIds", "breakCodeSource", "href", "version"]
48
+
49
+ class Config:
50
+ """Pydantic configuration"""
51
+ allow_population_by_field_name = True
52
+ validate_assignment = True
53
+
54
+ def to_str(self) -> str:
55
+ """Returns the string representation of the model using alias"""
56
+ return pprint.pformat(self.dict(by_alias=True))
57
+
58
+ def to_json(self) -> str:
59
+ """Returns the JSON representation of the model using alias"""
60
+ return json.dumps(self.to_dict())
61
+
62
+ @classmethod
63
+ def from_json(cls, json_str: str) -> GroupReconciliationDefinition:
64
+ """Create an instance of GroupReconciliationDefinition from a JSON string"""
65
+ return cls.from_dict(json.loads(json_str))
66
+
67
+ def to_dict(self):
68
+ """Returns the dictionary representation of the model using alias"""
69
+ _dict = self.dict(by_alias=True,
70
+ exclude={
71
+ },
72
+ exclude_none=True)
73
+ # override the default output from pydantic by calling `to_dict()` of id
74
+ if self.id:
75
+ _dict['id'] = self.id.to_dict()
76
+ # override the default output from pydantic by calling `to_dict()` of portfolio_entity_ids
77
+ if self.portfolio_entity_ids:
78
+ _dict['portfolioEntityIds'] = self.portfolio_entity_ids.to_dict()
79
+ # override the default output from pydantic by calling `to_dict()` of recipe_ids
80
+ if self.recipe_ids:
81
+ _dict['recipeIds'] = self.recipe_ids.to_dict()
82
+ # override the default output from pydantic by calling `to_dict()` of currencies
83
+ if self.currencies:
84
+ _dict['currencies'] = self.currencies.to_dict()
85
+ # override the default output from pydantic by calling `to_dict()` of transaction_date_windows
86
+ if self.transaction_date_windows:
87
+ _dict['transactionDateWindows'] = self.transaction_date_windows.to_dict()
88
+ # override the default output from pydantic by calling `to_dict()` of comparison_ruleset_ids
89
+ if self.comparison_ruleset_ids:
90
+ _dict['comparisonRulesetIds'] = self.comparison_ruleset_ids.to_dict()
91
+ # override the default output from pydantic by calling `to_dict()` of break_code_source
92
+ if self.break_code_source:
93
+ _dict['breakCodeSource'] = self.break_code_source.to_dict()
94
+ # override the default output from pydantic by calling `to_dict()` of version
95
+ if self.version:
96
+ _dict['version'] = self.version.to_dict()
97
+ # set to None if display_name (nullable) is None
98
+ # and __fields_set__ contains the field
99
+ if self.display_name is None and "display_name" in self.__fields_set__:
100
+ _dict['displayName'] = None
101
+
102
+ # set to None if description (nullable) is None
103
+ # and __fields_set__ contains the field
104
+ if self.description is None and "description" in self.__fields_set__:
105
+ _dict['description'] = None
106
+
107
+ # set to None if href (nullable) is None
108
+ # and __fields_set__ contains the field
109
+ if self.href is None and "href" in self.__fields_set__:
110
+ _dict['href'] = None
111
+
112
+ return _dict
113
+
114
+ @classmethod
115
+ def from_dict(cls, obj: dict) -> GroupReconciliationDefinition:
116
+ """Create an instance of GroupReconciliationDefinition from a dict"""
117
+ if obj is None:
118
+ return None
119
+
120
+ if not isinstance(obj, dict):
121
+ return GroupReconciliationDefinition.parse_obj(obj)
122
+
123
+ _obj = GroupReconciliationDefinition.parse_obj({
124
+ "id": ResourceId.from_dict(obj.get("id")) if obj.get("id") is not None else None,
125
+ "display_name": obj.get("displayName"),
126
+ "description": obj.get("description"),
127
+ "portfolio_entity_ids": GroupReconciliationDefinitionPortfolioEntityIds.from_dict(obj.get("portfolioEntityIds")) if obj.get("portfolioEntityIds") is not None else None,
128
+ "recipe_ids": GroupReconciliationDefinitionRecipeIds.from_dict(obj.get("recipeIds")) if obj.get("recipeIds") is not None else None,
129
+ "currencies": GroupReconciliationDefinitionCurrencies.from_dict(obj.get("currencies")) if obj.get("currencies") is not None else None,
130
+ "transaction_date_windows": TransactionDateWindows.from_dict(obj.get("transactionDateWindows")) if obj.get("transactionDateWindows") is not None else None,
131
+ "comparison_ruleset_ids": GroupReconciliationDefinitionComparisonRulesetIds.from_dict(obj.get("comparisonRulesetIds")) if obj.get("comparisonRulesetIds") is not None else None,
132
+ "break_code_source": BreakCodeSource.from_dict(obj.get("breakCodeSource")) if obj.get("breakCodeSource") is not None else None,
133
+ "href": obj.get("href"),
134
+ "version": Version.from_dict(obj.get("version")) if obj.get("version") is not None else None
135
+ })
136
+ return _obj
@@ -0,0 +1,83 @@
1
+ # coding: utf-8
2
+
3
+ """
4
+ LUSID API
5
+
6
+ FINBOURNE Technology # noqa: E501
7
+
8
+ Contact: info@finbourne.com
9
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
10
+
11
+ Do not edit the class manually.
12
+ """
13
+
14
+
15
+ from __future__ import annotations
16
+ import pprint
17
+ import re # noqa: F401
18
+ import json
19
+
20
+
21
+ from typing import Any, Dict, Optional
22
+ from pydantic.v1 import BaseModel, Field
23
+ from lusid.models.resource_id import ResourceId
24
+
25
+ class GroupReconciliationDefinitionComparisonRulesetIds(BaseModel):
26
+ """
27
+ GroupReconciliationDefinitionComparisonRulesetIds
28
+ """
29
+ transaction_reconciliation: Optional[ResourceId] = Field(None, alias="transactionReconciliation")
30
+ holding_reconciliation: Optional[ResourceId] = Field(None, alias="holdingReconciliation")
31
+ valuation_reconciliation: Optional[ResourceId] = Field(None, alias="valuationReconciliation")
32
+ __properties = ["transactionReconciliation", "holdingReconciliation", "valuationReconciliation"]
33
+
34
+ class Config:
35
+ """Pydantic configuration"""
36
+ allow_population_by_field_name = True
37
+ validate_assignment = True
38
+
39
+ def to_str(self) -> str:
40
+ """Returns the string representation of the model using alias"""
41
+ return pprint.pformat(self.dict(by_alias=True))
42
+
43
+ def to_json(self) -> str:
44
+ """Returns the JSON representation of the model using alias"""
45
+ return json.dumps(self.to_dict())
46
+
47
+ @classmethod
48
+ def from_json(cls, json_str: str) -> GroupReconciliationDefinitionComparisonRulesetIds:
49
+ """Create an instance of GroupReconciliationDefinitionComparisonRulesetIds from a JSON string"""
50
+ return cls.from_dict(json.loads(json_str))
51
+
52
+ def to_dict(self):
53
+ """Returns the dictionary representation of the model using alias"""
54
+ _dict = self.dict(by_alias=True,
55
+ exclude={
56
+ },
57
+ exclude_none=True)
58
+ # override the default output from pydantic by calling `to_dict()` of transaction_reconciliation
59
+ if self.transaction_reconciliation:
60
+ _dict['transactionReconciliation'] = self.transaction_reconciliation.to_dict()
61
+ # override the default output from pydantic by calling `to_dict()` of holding_reconciliation
62
+ if self.holding_reconciliation:
63
+ _dict['holdingReconciliation'] = self.holding_reconciliation.to_dict()
64
+ # override the default output from pydantic by calling `to_dict()` of valuation_reconciliation
65
+ if self.valuation_reconciliation:
66
+ _dict['valuationReconciliation'] = self.valuation_reconciliation.to_dict()
67
+ return _dict
68
+
69
+ @classmethod
70
+ def from_dict(cls, obj: dict) -> GroupReconciliationDefinitionComparisonRulesetIds:
71
+ """Create an instance of GroupReconciliationDefinitionComparisonRulesetIds from a dict"""
72
+ if obj is None:
73
+ return None
74
+
75
+ if not isinstance(obj, dict):
76
+ return GroupReconciliationDefinitionComparisonRulesetIds.parse_obj(obj)
77
+
78
+ _obj = GroupReconciliationDefinitionComparisonRulesetIds.parse_obj({
79
+ "transaction_reconciliation": ResourceId.from_dict(obj.get("transactionReconciliation")) if obj.get("transactionReconciliation") is not None else None,
80
+ "holding_reconciliation": ResourceId.from_dict(obj.get("holdingReconciliation")) if obj.get("holdingReconciliation") is not None else None,
81
+ "valuation_reconciliation": ResourceId.from_dict(obj.get("valuationReconciliation")) if obj.get("valuationReconciliation") is not None else None
82
+ })
83
+ 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 GroupReconciliationDefinitionCurrencies(BaseModel):
25
+ """
26
+ GroupReconciliationDefinitionCurrencies
27
+ """
28
+ left: constr(strict=True, max_length=3, min_length=0) = Field(..., description="Currency for the left side of a reconciliation")
29
+ right: constr(strict=True, max_length=3, min_length=0) = Field(..., description="Currency for the right side of a reconciliation")
30
+ __properties = ["left", "right"]
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) -> GroupReconciliationDefinitionCurrencies:
47
+ """Create an instance of GroupReconciliationDefinitionCurrencies 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) -> GroupReconciliationDefinitionCurrencies:
60
+ """Create an instance of GroupReconciliationDefinitionCurrencies from a dict"""
61
+ if obj is None:
62
+ return None
63
+
64
+ if not isinstance(obj, dict):
65
+ return GroupReconciliationDefinitionCurrencies.parse_obj(obj)
66
+
67
+ _obj = GroupReconciliationDefinitionCurrencies.parse_obj({
68
+ "left": obj.get("left"),
69
+ "right": obj.get("right")
70
+ })
71
+ return _obj
@@ -0,0 +1,86 @@
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, conlist
23
+ from lusid.models.portfolio_entity_id import PortfolioEntityId
24
+
25
+ class GroupReconciliationDefinitionPortfolioEntityIds(BaseModel):
26
+ """
27
+ GroupReconciliationDefinitionPortfolioEntityIds
28
+ """
29
+ left: conlist(PortfolioEntityId, min_items=1) = Field(..., description="Portfolio Entity Id of the left side of a reconciliation")
30
+ right: conlist(PortfolioEntityId, min_items=1) = Field(..., description="Portfolio Entity Id of the right side of a reconciliation")
31
+ __properties = ["left", "right"]
32
+
33
+ class Config:
34
+ """Pydantic configuration"""
35
+ allow_population_by_field_name = True
36
+ validate_assignment = True
37
+
38
+ def to_str(self) -> str:
39
+ """Returns the string representation of the model using alias"""
40
+ return pprint.pformat(self.dict(by_alias=True))
41
+
42
+ def to_json(self) -> str:
43
+ """Returns the JSON representation of the model using alias"""
44
+ return json.dumps(self.to_dict())
45
+
46
+ @classmethod
47
+ def from_json(cls, json_str: str) -> GroupReconciliationDefinitionPortfolioEntityIds:
48
+ """Create an instance of GroupReconciliationDefinitionPortfolioEntityIds from a JSON string"""
49
+ return cls.from_dict(json.loads(json_str))
50
+
51
+ def to_dict(self):
52
+ """Returns the dictionary representation of the model using alias"""
53
+ _dict = self.dict(by_alias=True,
54
+ exclude={
55
+ },
56
+ exclude_none=True)
57
+ # override the default output from pydantic by calling `to_dict()` of each item in left (list)
58
+ _items = []
59
+ if self.left:
60
+ for _item in self.left:
61
+ if _item:
62
+ _items.append(_item.to_dict())
63
+ _dict['left'] = _items
64
+ # override the default output from pydantic by calling `to_dict()` of each item in right (list)
65
+ _items = []
66
+ if self.right:
67
+ for _item in self.right:
68
+ if _item:
69
+ _items.append(_item.to_dict())
70
+ _dict['right'] = _items
71
+ return _dict
72
+
73
+ @classmethod
74
+ def from_dict(cls, obj: dict) -> GroupReconciliationDefinitionPortfolioEntityIds:
75
+ """Create an instance of GroupReconciliationDefinitionPortfolioEntityIds from a dict"""
76
+ if obj is None:
77
+ return None
78
+
79
+ if not isinstance(obj, dict):
80
+ return GroupReconciliationDefinitionPortfolioEntityIds.parse_obj(obj)
81
+
82
+ _obj = GroupReconciliationDefinitionPortfolioEntityIds.parse_obj({
83
+ "left": [PortfolioEntityId.from_dict(_item) for _item in obj.get("left")] if obj.get("left") is not None else None,
84
+ "right": [PortfolioEntityId.from_dict(_item) for _item in obj.get("right")] if obj.get("right") is not None else None
85
+ })
86
+ return _obj
@@ -0,0 +1,78 @@
1
+ # coding: utf-8
2
+
3
+ """
4
+ LUSID API
5
+
6
+ FINBOURNE Technology # noqa: E501
7
+
8
+ Contact: info@finbourne.com
9
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
10
+
11
+ Do not edit the class manually.
12
+ """
13
+
14
+
15
+ from __future__ import annotations
16
+ import pprint
17
+ import re # noqa: F401
18
+ import json
19
+
20
+
21
+ from typing import Any, Dict
22
+ from pydantic.v1 import BaseModel, Field
23
+ from lusid.models.resource_id import ResourceId
24
+
25
+ class GroupReconciliationDefinitionRecipeIds(BaseModel):
26
+ """
27
+ GroupReconciliationDefinitionRecipeIds
28
+ """
29
+ left: ResourceId = Field(...)
30
+ right: ResourceId = Field(...)
31
+ __properties = ["left", "right"]
32
+
33
+ class Config:
34
+ """Pydantic configuration"""
35
+ allow_population_by_field_name = True
36
+ validate_assignment = True
37
+
38
+ def to_str(self) -> str:
39
+ """Returns the string representation of the model using alias"""
40
+ return pprint.pformat(self.dict(by_alias=True))
41
+
42
+ def to_json(self) -> str:
43
+ """Returns the JSON representation of the model using alias"""
44
+ return json.dumps(self.to_dict())
45
+
46
+ @classmethod
47
+ def from_json(cls, json_str: str) -> GroupReconciliationDefinitionRecipeIds:
48
+ """Create an instance of GroupReconciliationDefinitionRecipeIds from a JSON string"""
49
+ return cls.from_dict(json.loads(json_str))
50
+
51
+ def to_dict(self):
52
+ """Returns the dictionary representation of the model using alias"""
53
+ _dict = self.dict(by_alias=True,
54
+ exclude={
55
+ },
56
+ exclude_none=True)
57
+ # override the default output from pydantic by calling `to_dict()` of left
58
+ if self.left:
59
+ _dict['left'] = self.left.to_dict()
60
+ # override the default output from pydantic by calling `to_dict()` of right
61
+ if self.right:
62
+ _dict['right'] = self.right.to_dict()
63
+ return _dict
64
+
65
+ @classmethod
66
+ def from_dict(cls, obj: dict) -> GroupReconciliationDefinitionRecipeIds:
67
+ """Create an instance of GroupReconciliationDefinitionRecipeIds from a dict"""
68
+ if obj is None:
69
+ return None
70
+
71
+ if not isinstance(obj, dict):
72
+ return GroupReconciliationDefinitionRecipeIds.parse_obj(obj)
73
+
74
+ _obj = GroupReconciliationDefinitionRecipeIds.parse_obj({
75
+ "left": ResourceId.from_dict(obj.get("left")) if obj.get("left") is not None else None,
76
+ "right": ResourceId.from_dict(obj.get("right")) if obj.get("right") is not None else None
77
+ })
78
+ return _obj
@@ -25,6 +25,7 @@ from lusid.models.lusid_instrument import LusidInstrument
25
25
  from lusid.models.model_property import ModelProperty
26
26
  from lusid.models.relationship import Relationship
27
27
  from lusid.models.resource_id import ResourceId
28
+ from lusid.models.settlement_cycle import SettlementCycle
28
29
  from lusid.models.staged_modifications_info import StagedModificationsInfo
29
30
  from lusid.models.version import Version
30
31
 
@@ -46,8 +47,9 @@ class Instrument(BaseModel):
46
47
  asset_class: Optional[StrictStr] = Field(None, alias="assetClass", description="The nominal asset class of the instrument, e.g. InterestRates, FX, Inflation, Equities, Credit, Commodities, etc. The available values are: InterestRates, FX, Inflation, Equities, Credit, Commodities, Money, Unknown")
47
48
  dom_ccy: Optional[StrictStr] = Field(None, alias="domCcy", description="The domestic currency, meaning the currency in which the instrument would typically be expected to pay cashflows, e.g. a share in AAPL being USD.")
48
49
  relationships: Optional[conlist(Relationship)] = Field(None, description="A set of relationships associated to the instrument.")
50
+ settlement_cycle: Optional[SettlementCycle] = Field(None, alias="settlementCycle")
49
51
  links: Optional[conlist(Link)] = None
50
- __properties = ["href", "scope", "lusidInstrumentId", "version", "stagedModifications", "name", "identifiers", "properties", "lookthroughPortfolio", "instrumentDefinition", "state", "assetClass", "domCcy", "relationships", "links"]
52
+ __properties = ["href", "scope", "lusidInstrumentId", "version", "stagedModifications", "name", "identifiers", "properties", "lookthroughPortfolio", "instrumentDefinition", "state", "assetClass", "domCcy", "relationships", "settlementCycle", "links"]
51
53
 
52
54
  @validator('state')
53
55
  def state_validate_enum(cls, value):
@@ -116,6 +118,9 @@ class Instrument(BaseModel):
116
118
  if _item:
117
119
  _items.append(_item.to_dict())
118
120
  _dict['relationships'] = _items
121
+ # override the default output from pydantic by calling `to_dict()` of settlement_cycle
122
+ if self.settlement_cycle:
123
+ _dict['settlementCycle'] = self.settlement_cycle.to_dict()
119
124
  # override the default output from pydantic by calling `to_dict()` of each item in links (list)
120
125
  _items = []
121
126
  if self.links:
@@ -179,6 +184,7 @@ class Instrument(BaseModel):
179
184
  "asset_class": obj.get("assetClass"),
180
185
  "dom_ccy": obj.get("domCcy"),
181
186
  "relationships": [Relationship.from_dict(_item) for _item in obj.get("relationships")] if obj.get("relationships") is not None else None,
187
+ "settlement_cycle": SettlementCycle.from_dict(obj.get("settlementCycle")) if obj.get("settlementCycle") is not None else None,
182
188
  "links": [Link.from_dict(_item) for _item in obj.get("links")] if obj.get("links") is not None else None
183
189
  })
184
190
  return _obj
@@ -24,6 +24,7 @@ from lusid.models.instrument_id_value import InstrumentIdValue
24
24
  from lusid.models.lusid_instrument import LusidInstrument
25
25
  from lusid.models.model_property import ModelProperty
26
26
  from lusid.models.resource_id import ResourceId
27
+ from lusid.models.settlement_cycle import SettlementCycle
27
28
 
28
29
  class InstrumentDefinition(BaseModel):
29
30
  """
@@ -34,7 +35,8 @@ class InstrumentDefinition(BaseModel):
34
35
  properties: Optional[conlist(ModelProperty)] = Field(None, description="Set of unique instrument properties and associated values to store with the instrument. Each property must be from the 'Instrument' domain.")
35
36
  look_through_portfolio_id: Optional[ResourceId] = Field(None, alias="lookThroughPortfolioId")
36
37
  definition: Optional[LusidInstrument] = None
37
- __properties = ["name", "identifiers", "properties", "lookThroughPortfolioId", "definition"]
38
+ settlement_cycle: Optional[SettlementCycle] = Field(None, alias="settlementCycle")
39
+ __properties = ["name", "identifiers", "properties", "lookThroughPortfolioId", "definition", "settlementCycle"]
38
40
 
39
41
  class Config:
40
42
  """Pydantic configuration"""
@@ -80,6 +82,9 @@ class InstrumentDefinition(BaseModel):
80
82
  # override the default output from pydantic by calling `to_dict()` of definition
81
83
  if self.definition:
82
84
  _dict['definition'] = self.definition.to_dict()
85
+ # override the default output from pydantic by calling `to_dict()` of settlement_cycle
86
+ if self.settlement_cycle:
87
+ _dict['settlementCycle'] = self.settlement_cycle.to_dict()
83
88
  # set to None if properties (nullable) is None
84
89
  # and __fields_set__ contains the field
85
90
  if self.properties is None and "properties" in self.__fields_set__:
@@ -106,6 +111,7 @@ class InstrumentDefinition(BaseModel):
106
111
  else None,
107
112
  "properties": [ModelProperty.from_dict(_item) for _item in obj.get("properties")] if obj.get("properties") is not None else None,
108
113
  "look_through_portfolio_id": ResourceId.from_dict(obj.get("lookThroughPortfolioId")) if obj.get("lookThroughPortfolioId") is not None else None,
109
- "definition": LusidInstrument.from_dict(obj.get("definition")) if obj.get("definition") is not None else None
114
+ "definition": LusidInstrument.from_dict(obj.get("definition")) if obj.get("definition") is not None else None,
115
+ "settlement_cycle": SettlementCycle.from_dict(obj.get("settlementCycle")) if obj.get("settlementCycle") is not None else None
110
116
  })
111
117
  return _obj