lusid-sdk 2.1.351__py3-none-any.whl → 2.1.390__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 +34 -0
- lusid/api/__init__.py +2 -0
- lusid/api/funds_api.py +9 -8
- lusid/api/group_reconciliations_api.py +378 -0
- lusid/api/order_management_api.py +161 -0
- lusid/api/workspace_api.py +40 -40
- lusid/configuration.py +1 -1
- lusid/models/__init__.py +32 -0
- lusid/models/accept_estimate_valuation_point_response.py +100 -0
- lusid/models/accumulation_event.py +3 -3
- lusid/models/action_id.py +1 -1
- lusid/models/amortisation_event.py +3 -3
- lusid/models/applicable_instrument_event.py +14 -2
- lusid/models/bond_coupon_event.py +3 -3
- lusid/models/bond_default_event.py +3 -3
- lusid/models/bond_principal_event.py +3 -3
- lusid/models/calendar.py +17 -2
- lusid/models/capital_distribution_event.py +3 -3
- lusid/models/cash_dividend_event.py +3 -3
- lusid/models/cash_flow_event.py +3 -3
- lusid/models/close_event.py +3 -3
- lusid/models/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/dividend_option_event.py +3 -3
- lusid/models/dividend_reinvestment_event.py +3 -3
- lusid/models/entity_change_item.py +121 -0
- lusid/models/exercise_event.py +3 -3
- lusid/models/expiry_event.py +3 -3
- lusid/models/fee.py +1 -1
- lusid/models/fee_request.py +1 -1
- lusid/models/flow_conventions.py +1 -1
- lusid/models/fund_amount.py +1 -1
- lusid/models/fund_details.py +74 -0
- lusid/models/future_expiry_event.py +3 -3
- lusid/models/futures_contract_details.py +6 -1
- lusid/models/fx_forward_settlement_event.py +3 -3
- 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/informational_error_event.py +3 -3
- lusid/models/informational_event.py +3 -3
- lusid/models/instrument_event.py +7 -5
- lusid/models/instrument_event_instruction.py +19 -4
- lusid/models/instrument_event_type.py +2 -0
- lusid/models/maturity_event.py +3 -3
- lusid/models/merger_event.py +3 -3
- lusid/models/new_instrument.py +10 -2
- lusid/models/open_event.py +3 -3
- lusid/models/order_graph_block_order_detail.py +1 -1
- lusid/models/order_update_request.py +5 -0
- lusid/models/person.py +17 -2
- lusid/models/placement_update_request.py +6 -1
- lusid/models/previous_nav.py +3 -3
- lusid/models/raw_vendor_event.py +3 -3
- lusid/models/reset_event.py +3 -3
- lusid/models/resource_list_of_entity_change_item.py +113 -0
- lusid/models/reverse_stock_split_event.py +3 -3
- lusid/models/scrip_dividend_event.py +3 -3
- lusid/models/share_class_amount.py +7 -9
- lusid/models/share_class_breakdown.py +4 -5
- lusid/models/spin_off_event.py +3 -3
- lusid/models/stock_dividend_event.py +3 -3
- lusid/models/stock_split_event.py +3 -3
- lusid/models/swap_cash_flow_event.py +97 -0
- lusid/models/swap_principal_event.py +97 -0
- lusid/models/transaction_diagnostics.py +71 -0
- lusid/models/transition_event.py +3 -3
- lusid/models/trigger_event.py +3 -3
- lusid/models/valuation_point_data_response.py +21 -1
- lusid/models/weighted_instrument.py +9 -2
- {lusid_sdk-2.1.351.dist-info → lusid_sdk-2.1.390.dist-info}/METADATA +40 -21
- {lusid_sdk-2.1.351.dist-info → lusid_sdk-2.1.390.dist-info}/RECORD +81 -64
- {lusid_sdk-2.1.351.dist-info → lusid_sdk-2.1.390.dist-info}/WHEEL +0 -0
lusid/models/close_event.py
CHANGED
@@ -28,15 +28,15 @@ class CloseEvent(InstrumentEvent):
|
|
28
28
|
"""
|
29
29
|
start_date: Optional[datetime] = Field(None, alias="startDate", description="The first date on which the instrument could close")
|
30
30
|
end_date: Optional[datetime] = Field(None, alias="endDate", description="The last date on which the instrument could close")
|
31
|
-
instrument_event_type: StrictStr = Field(..., alias="instrumentEventType", description="The Type of Event. The available values are: TransitionEvent, InformationalEvent, OpenEvent, CloseEvent, StockSplitEvent, BondDefaultEvent, CashDividendEvent, AmortisationEvent, CashFlowEvent, ExerciseEvent, ResetEvent, TriggerEvent, RawVendorEvent, InformationalErrorEvent, BondCouponEvent, DividendReinvestmentEvent, AccumulationEvent, BondPrincipalEvent, DividendOptionEvent, MaturityEvent, FxForwardSettlementEvent, ExpiryEvent, ScripDividendEvent, StockDividendEvent, ReverseStockSplitEvent, CapitalDistributionEvent, SpinOffEvent, MergerEvent, FutureExpiryEvent")
|
31
|
+
instrument_event_type: StrictStr = Field(..., alias="instrumentEventType", description="The Type of Event. The available values are: TransitionEvent, InformationalEvent, OpenEvent, CloseEvent, StockSplitEvent, BondDefaultEvent, CashDividendEvent, AmortisationEvent, CashFlowEvent, ExerciseEvent, ResetEvent, TriggerEvent, RawVendorEvent, InformationalErrorEvent, BondCouponEvent, DividendReinvestmentEvent, AccumulationEvent, BondPrincipalEvent, DividendOptionEvent, MaturityEvent, FxForwardSettlementEvent, ExpiryEvent, ScripDividendEvent, StockDividendEvent, ReverseStockSplitEvent, CapitalDistributionEvent, SpinOffEvent, MergerEvent, FutureExpiryEvent, SwapCashFlowEvent, SwapPrincipalEvent")
|
32
32
|
additional_properties: Dict[str, Any] = {}
|
33
33
|
__properties = ["instrumentEventType", "startDate", "endDate"]
|
34
34
|
|
35
35
|
@validator('instrument_event_type')
|
36
36
|
def instrument_event_type_validate_enum(cls, value):
|
37
37
|
"""Validates the enum"""
|
38
|
-
if value not in ('TransitionEvent', 'InformationalEvent', 'OpenEvent', 'CloseEvent', 'StockSplitEvent', 'BondDefaultEvent', 'CashDividendEvent', 'AmortisationEvent', 'CashFlowEvent', 'ExerciseEvent', 'ResetEvent', 'TriggerEvent', 'RawVendorEvent', 'InformationalErrorEvent', 'BondCouponEvent', 'DividendReinvestmentEvent', 'AccumulationEvent', 'BondPrincipalEvent', 'DividendOptionEvent', 'MaturityEvent', 'FxForwardSettlementEvent', 'ExpiryEvent', 'ScripDividendEvent', 'StockDividendEvent', 'ReverseStockSplitEvent', 'CapitalDistributionEvent', 'SpinOffEvent', 'MergerEvent', 'FutureExpiryEvent'):
|
39
|
-
raise ValueError("must be one of enum values ('TransitionEvent', 'InformationalEvent', 'OpenEvent', 'CloseEvent', 'StockSplitEvent', 'BondDefaultEvent', 'CashDividendEvent', 'AmortisationEvent', 'CashFlowEvent', 'ExerciseEvent', 'ResetEvent', 'TriggerEvent', 'RawVendorEvent', 'InformationalErrorEvent', 'BondCouponEvent', 'DividendReinvestmentEvent', 'AccumulationEvent', 'BondPrincipalEvent', 'DividendOptionEvent', 'MaturityEvent', 'FxForwardSettlementEvent', 'ExpiryEvent', 'ScripDividendEvent', 'StockDividendEvent', 'ReverseStockSplitEvent', 'CapitalDistributionEvent', 'SpinOffEvent', 'MergerEvent', 'FutureExpiryEvent')")
|
38
|
+
if value not in ('TransitionEvent', 'InformationalEvent', 'OpenEvent', 'CloseEvent', 'StockSplitEvent', 'BondDefaultEvent', 'CashDividendEvent', 'AmortisationEvent', 'CashFlowEvent', 'ExerciseEvent', 'ResetEvent', 'TriggerEvent', 'RawVendorEvent', 'InformationalErrorEvent', 'BondCouponEvent', 'DividendReinvestmentEvent', 'AccumulationEvent', 'BondPrincipalEvent', 'DividendOptionEvent', 'MaturityEvent', 'FxForwardSettlementEvent', 'ExpiryEvent', 'ScripDividendEvent', 'StockDividendEvent', 'ReverseStockSplitEvent', 'CapitalDistributionEvent', 'SpinOffEvent', 'MergerEvent', 'FutureExpiryEvent', 'SwapCashFlowEvent', 'SwapPrincipalEvent'):
|
39
|
+
raise ValueError("must be one of enum values ('TransitionEvent', 'InformationalEvent', 'OpenEvent', 'CloseEvent', 'StockSplitEvent', 'BondDefaultEvent', 'CashDividendEvent', 'AmortisationEvent', 'CashFlowEvent', 'ExerciseEvent', 'ResetEvent', 'TriggerEvent', 'RawVendorEvent', 'InformationalErrorEvent', 'BondCouponEvent', 'DividendReinvestmentEvent', 'AccumulationEvent', 'BondPrincipalEvent', 'DividendOptionEvent', 'MaturityEvent', 'FxForwardSettlementEvent', 'ExpiryEvent', 'ScripDividendEvent', 'StockDividendEvent', 'ReverseStockSplitEvent', 'CapitalDistributionEvent', 'SpinOffEvent', 'MergerEvent', 'FutureExpiryEvent', 'SwapCashFlowEvent', 'SwapPrincipalEvent')")
|
40
40
|
return value
|
41
41
|
|
42
42
|
class Config:
|
@@ -0,0 +1,97 @@
|
|
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, 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.resource_id import ResourceId
|
26
|
+
|
27
|
+
class CreateGroupReconciliationComparisonRulesetRequest(BaseModel):
|
28
|
+
"""
|
29
|
+
CreateGroupReconciliationComparisonRulesetRequest
|
30
|
+
"""
|
31
|
+
id: ResourceId = Field(...)
|
32
|
+
display_name: constr(strict=True, max_length=256, min_length=1) = Field(..., alias="displayName", description="The name of the ruleset")
|
33
|
+
reconciliation_type: constr(strict=True, min_length=1) = Field(..., alias="reconciliationType", description="The type of reconciliation to perform. \"Holding\" | \"Transaction\" | \"Valuation\"")
|
34
|
+
core_attribute_rules: conlist(GroupReconciliationCoreAttributeRule, min_items=1) = Field(..., alias="coreAttributeRules", description="The core comparison rules")
|
35
|
+
aggregate_attribute_rules: conlist(GroupReconciliationAggregateAttributeRule, min_items=1) = Field(..., alias="aggregateAttributeRules", description="The aggregate comparison rules")
|
36
|
+
__properties = ["id", "displayName", "reconciliationType", "coreAttributeRules", "aggregateAttributeRules"]
|
37
|
+
|
38
|
+
class Config:
|
39
|
+
"""Pydantic configuration"""
|
40
|
+
allow_population_by_field_name = True
|
41
|
+
validate_assignment = True
|
42
|
+
|
43
|
+
def to_str(self) -> str:
|
44
|
+
"""Returns the string representation of the model using alias"""
|
45
|
+
return pprint.pformat(self.dict(by_alias=True))
|
46
|
+
|
47
|
+
def to_json(self) -> str:
|
48
|
+
"""Returns the JSON representation of the model using alias"""
|
49
|
+
return json.dumps(self.to_dict())
|
50
|
+
|
51
|
+
@classmethod
|
52
|
+
def from_json(cls, json_str: str) -> CreateGroupReconciliationComparisonRulesetRequest:
|
53
|
+
"""Create an instance of CreateGroupReconciliationComparisonRulesetRequest from a JSON string"""
|
54
|
+
return cls.from_dict(json.loads(json_str))
|
55
|
+
|
56
|
+
def to_dict(self):
|
57
|
+
"""Returns the dictionary representation of the model using alias"""
|
58
|
+
_dict = self.dict(by_alias=True,
|
59
|
+
exclude={
|
60
|
+
},
|
61
|
+
exclude_none=True)
|
62
|
+
# override the default output from pydantic by calling `to_dict()` of id
|
63
|
+
if self.id:
|
64
|
+
_dict['id'] = self.id.to_dict()
|
65
|
+
# override the default output from pydantic by calling `to_dict()` of each item in core_attribute_rules (list)
|
66
|
+
_items = []
|
67
|
+
if self.core_attribute_rules:
|
68
|
+
for _item in self.core_attribute_rules:
|
69
|
+
if _item:
|
70
|
+
_items.append(_item.to_dict())
|
71
|
+
_dict['coreAttributeRules'] = _items
|
72
|
+
# override the default output from pydantic by calling `to_dict()` of each item in aggregate_attribute_rules (list)
|
73
|
+
_items = []
|
74
|
+
if self.aggregate_attribute_rules:
|
75
|
+
for _item in self.aggregate_attribute_rules:
|
76
|
+
if _item:
|
77
|
+
_items.append(_item.to_dict())
|
78
|
+
_dict['aggregateAttributeRules'] = _items
|
79
|
+
return _dict
|
80
|
+
|
81
|
+
@classmethod
|
82
|
+
def from_dict(cls, obj: dict) -> CreateGroupReconciliationComparisonRulesetRequest:
|
83
|
+
"""Create an instance of CreateGroupReconciliationComparisonRulesetRequest from a dict"""
|
84
|
+
if obj is None:
|
85
|
+
return None
|
86
|
+
|
87
|
+
if not isinstance(obj, dict):
|
88
|
+
return CreateGroupReconciliationComparisonRulesetRequest.parse_obj(obj)
|
89
|
+
|
90
|
+
_obj = CreateGroupReconciliationComparisonRulesetRequest.parse_obj({
|
91
|
+
"id": ResourceId.from_dict(obj.get("id")) if obj.get("id") is not None else None,
|
92
|
+
"display_name": obj.get("displayName"),
|
93
|
+
"reconciliation_type": obj.get("reconciliationType"),
|
94
|
+
"core_attribute_rules": [GroupReconciliationCoreAttributeRule.from_dict(_item) for _item in obj.get("coreAttributeRules")] if obj.get("coreAttributeRules") is not None else None,
|
95
|
+
"aggregate_attribute_rules": [GroupReconciliationAggregateAttributeRule.from_dict(_item) for _item in obj.get("aggregateAttributeRules")] if obj.get("aggregateAttributeRules") is not None else None
|
96
|
+
})
|
97
|
+
return _obj
|
@@ -21,6 +21,7 @@ import json
|
|
21
21
|
from typing import Any, Dict, List, Optional
|
22
22
|
from pydantic.v1 import BaseModel, Field, StrictStr, conlist, constr
|
23
23
|
from lusid.models.custom_entity_field_definition import CustomEntityFieldDefinition
|
24
|
+
from lusid.models.link import Link
|
24
25
|
from lusid.models.version import Version
|
25
26
|
|
26
27
|
class CustomEntityDefinition(BaseModel):
|
@@ -34,7 +35,8 @@ class CustomEntityDefinition(BaseModel):
|
|
34
35
|
entity_type: constr(strict=True, min_length=1) = Field(..., alias="entityType", description="The identifier for the custom entity type, derived from the “entityTypeName” provided on creation.")
|
35
36
|
field_schema: conlist(CustomEntityFieldDefinition) = Field(..., alias="fieldSchema", description="The description of the fields on the custom entity type.")
|
36
37
|
version: Version = Field(...)
|
37
|
-
|
38
|
+
links: Optional[conlist(Link)] = None
|
39
|
+
__properties = ["href", "entityTypeName", "displayName", "description", "entityType", "fieldSchema", "version", "links"]
|
38
40
|
|
39
41
|
class Config:
|
40
42
|
"""Pydantic configuration"""
|
@@ -70,6 +72,13 @@ class CustomEntityDefinition(BaseModel):
|
|
70
72
|
# override the default output from pydantic by calling `to_dict()` of version
|
71
73
|
if self.version:
|
72
74
|
_dict['version'] = self.version.to_dict()
|
75
|
+
# override the default output from pydantic by calling `to_dict()` of each item in links (list)
|
76
|
+
_items = []
|
77
|
+
if self.links:
|
78
|
+
for _item in self.links:
|
79
|
+
if _item:
|
80
|
+
_items.append(_item.to_dict())
|
81
|
+
_dict['links'] = _items
|
73
82
|
# set to None if href (nullable) is None
|
74
83
|
# and __fields_set__ contains the field
|
75
84
|
if self.href is None and "href" in self.__fields_set__:
|
@@ -80,6 +89,11 @@ class CustomEntityDefinition(BaseModel):
|
|
80
89
|
if self.description is None and "description" in self.__fields_set__:
|
81
90
|
_dict['description'] = None
|
82
91
|
|
92
|
+
# set to None if links (nullable) is None
|
93
|
+
# and __fields_set__ contains the field
|
94
|
+
if self.links is None and "links" in self.__fields_set__:
|
95
|
+
_dict['links'] = None
|
96
|
+
|
83
97
|
return _dict
|
84
98
|
|
85
99
|
@classmethod
|
@@ -98,6 +112,7 @@ class CustomEntityDefinition(BaseModel):
|
|
98
112
|
"description": obj.get("description"),
|
99
113
|
"entity_type": obj.get("entityType"),
|
100
114
|
"field_schema": [CustomEntityFieldDefinition.from_dict(_item) for _item in obj.get("fieldSchema")] if obj.get("fieldSchema") is not None else None,
|
101
|
-
"version": Version.from_dict(obj.get("version")) if obj.get("version") is not None else None
|
115
|
+
"version": Version.from_dict(obj.get("version")) if obj.get("version") is not None else None,
|
116
|
+
"links": [Link.from_dict(_item) for _item in obj.get("links")] if obj.get("links") is not None else None
|
102
117
|
})
|
103
118
|
return _obj
|
@@ -21,6 +21,7 @@ import json
|
|
21
21
|
from typing import Any, Dict, List, Optional
|
22
22
|
from pydantic.v1 import BaseModel, Field, StrictStr, conlist, constr
|
23
23
|
from lusid.models.custom_entity_field_definition import CustomEntityFieldDefinition
|
24
|
+
from lusid.models.link import Link
|
24
25
|
from lusid.models.version import Version
|
25
26
|
|
26
27
|
class CustomEntityType(BaseModel):
|
@@ -34,7 +35,8 @@ class CustomEntityType(BaseModel):
|
|
34
35
|
entity_type: constr(strict=True, min_length=1) = Field(..., alias="entityType", description="The identifier for the custom entity type, derived from the “entityTypeName” provided on creation.")
|
35
36
|
field_schema: conlist(CustomEntityFieldDefinition) = Field(..., alias="fieldSchema", description="The description of the fields on the custom entity type.")
|
36
37
|
version: Version = Field(...)
|
37
|
-
|
38
|
+
links: Optional[conlist(Link)] = None
|
39
|
+
__properties = ["href", "entityTypeName", "displayName", "description", "entityType", "fieldSchema", "version", "links"]
|
38
40
|
|
39
41
|
class Config:
|
40
42
|
"""Pydantic configuration"""
|
@@ -70,6 +72,13 @@ class CustomEntityType(BaseModel):
|
|
70
72
|
# override the default output from pydantic by calling `to_dict()` of version
|
71
73
|
if self.version:
|
72
74
|
_dict['version'] = self.version.to_dict()
|
75
|
+
# override the default output from pydantic by calling `to_dict()` of each item in links (list)
|
76
|
+
_items = []
|
77
|
+
if self.links:
|
78
|
+
for _item in self.links:
|
79
|
+
if _item:
|
80
|
+
_items.append(_item.to_dict())
|
81
|
+
_dict['links'] = _items
|
73
82
|
# set to None if href (nullable) is None
|
74
83
|
# and __fields_set__ contains the field
|
75
84
|
if self.href is None and "href" in self.__fields_set__:
|
@@ -80,6 +89,11 @@ class CustomEntityType(BaseModel):
|
|
80
89
|
if self.description is None and "description" in self.__fields_set__:
|
81
90
|
_dict['description'] = None
|
82
91
|
|
92
|
+
# set to None if links (nullable) is None
|
93
|
+
# and __fields_set__ contains the field
|
94
|
+
if self.links is None and "links" in self.__fields_set__:
|
95
|
+
_dict['links'] = None
|
96
|
+
|
83
97
|
return _dict
|
84
98
|
|
85
99
|
@classmethod
|
@@ -98,6 +112,7 @@ class CustomEntityType(BaseModel):
|
|
98
112
|
"description": obj.get("description"),
|
99
113
|
"entity_type": obj.get("entityType"),
|
100
114
|
"field_schema": [CustomEntityFieldDefinition.from_dict(_item) for _item in obj.get("fieldSchema")] if obj.get("fieldSchema") is not None else None,
|
101
|
-
"version": Version.from_dict(obj.get("version")) if obj.get("version") is not None else None
|
115
|
+
"version": Version.from_dict(obj.get("version")) if obj.get("version") is not None else None,
|
116
|
+
"links": [Link.from_dict(_item) for _item in obj.get("links")] if obj.get("links") is not None else None
|
102
117
|
})
|
103
118
|
return _obj
|
lusid/models/data_type.py
CHANGED
@@ -24,6 +24,7 @@ from lusid.models.i_unit_definition_dto import IUnitDefinitionDto
|
|
24
24
|
from lusid.models.link import Link
|
25
25
|
from lusid.models.reference_data import ReferenceData
|
26
26
|
from lusid.models.resource_id import ResourceId
|
27
|
+
from lusid.models.staged_modifications_info import StagedModificationsInfo
|
27
28
|
from lusid.models.version import Version
|
28
29
|
|
29
30
|
class DataType(BaseModel):
|
@@ -41,8 +42,9 @@ class DataType(BaseModel):
|
|
41
42
|
reference_data: Optional[ReferenceData] = Field(None, alias="referenceData")
|
42
43
|
version: Optional[Version] = None
|
43
44
|
href: Optional[StrictStr] = Field(None, description="The specific Uniform Resource Identifier (URI) for this resource at the requested effective and asAt datetime.")
|
45
|
+
staged_modifications: Optional[StagedModificationsInfo] = Field(None, alias="stagedModifications")
|
44
46
|
links: Optional[conlist(Link)] = None
|
45
|
-
__properties = ["typeValueRange", "id", "displayName", "description", "valueType", "acceptableValues", "unitSchema", "acceptableUnits", "referenceData", "version", "href", "links"]
|
47
|
+
__properties = ["typeValueRange", "id", "displayName", "description", "valueType", "acceptableValues", "unitSchema", "acceptableUnits", "referenceData", "version", "href", "stagedModifications", "links"]
|
46
48
|
|
47
49
|
@validator('type_value_range')
|
48
50
|
def type_value_range_validate_enum(cls, value):
|
@@ -108,6 +110,9 @@ class DataType(BaseModel):
|
|
108
110
|
# override the default output from pydantic by calling `to_dict()` of version
|
109
111
|
if self.version:
|
110
112
|
_dict['version'] = self.version.to_dict()
|
113
|
+
# override the default output from pydantic by calling `to_dict()` of staged_modifications
|
114
|
+
if self.staged_modifications:
|
115
|
+
_dict['stagedModifications'] = self.staged_modifications.to_dict()
|
111
116
|
# override the default output from pydantic by calling `to_dict()` of each item in links (list)
|
112
117
|
_items = []
|
113
118
|
if self.links:
|
@@ -158,6 +163,7 @@ class DataType(BaseModel):
|
|
158
163
|
"reference_data": ReferenceData.from_dict(obj.get("referenceData")) if obj.get("referenceData") is not None else None,
|
159
164
|
"version": Version.from_dict(obj.get("version")) if obj.get("version") is not None else None,
|
160
165
|
"href": obj.get("href"),
|
166
|
+
"staged_modifications": StagedModificationsInfo.from_dict(obj.get("stagedModifications")) if obj.get("stagedModifications") is not None else None,
|
161
167
|
"links": [Link.from_dict(_item) for _item in obj.get("links")] if obj.get("links") is not None else None
|
162
168
|
})
|
163
169
|
return _obj
|
@@ -35,15 +35,15 @@ class DividendOptionEvent(InstrumentEvent):
|
|
35
35
|
record_date: Optional[datetime] = Field(None, alias="recordDate", description="Date you have to be the holder of record in order to participate in the tender.")
|
36
36
|
security_elections: conlist(SecurityElection) = Field(..., alias="securityElections", description="SecurityElection for this DividendReinvestmentEvent")
|
37
37
|
security_settlement_date: Optional[datetime] = Field(None, alias="securitySettlementDate", description="The settlement date of the additional units. Equal to the PaymentDate if not provided.")
|
38
|
-
instrument_event_type: StrictStr = Field(..., alias="instrumentEventType", description="The Type of Event. The available values are: TransitionEvent, InformationalEvent, OpenEvent, CloseEvent, StockSplitEvent, BondDefaultEvent, CashDividendEvent, AmortisationEvent, CashFlowEvent, ExerciseEvent, ResetEvent, TriggerEvent, RawVendorEvent, InformationalErrorEvent, BondCouponEvent, DividendReinvestmentEvent, AccumulationEvent, BondPrincipalEvent, DividendOptionEvent, MaturityEvent, FxForwardSettlementEvent, ExpiryEvent, ScripDividendEvent, StockDividendEvent, ReverseStockSplitEvent, CapitalDistributionEvent, SpinOffEvent, MergerEvent, FutureExpiryEvent")
|
38
|
+
instrument_event_type: StrictStr = Field(..., alias="instrumentEventType", description="The Type of Event. The available values are: TransitionEvent, InformationalEvent, OpenEvent, CloseEvent, StockSplitEvent, BondDefaultEvent, CashDividendEvent, AmortisationEvent, CashFlowEvent, ExerciseEvent, ResetEvent, TriggerEvent, RawVendorEvent, InformationalErrorEvent, BondCouponEvent, DividendReinvestmentEvent, AccumulationEvent, BondPrincipalEvent, DividendOptionEvent, MaturityEvent, FxForwardSettlementEvent, ExpiryEvent, ScripDividendEvent, StockDividendEvent, ReverseStockSplitEvent, CapitalDistributionEvent, SpinOffEvent, MergerEvent, FutureExpiryEvent, SwapCashFlowEvent, SwapPrincipalEvent")
|
39
39
|
additional_properties: Dict[str, Any] = {}
|
40
40
|
__properties = ["instrumentEventType", "announcementDate", "cashElections", "exDate", "paymentDate", "recordDate", "securityElections", "securitySettlementDate"]
|
41
41
|
|
42
42
|
@validator('instrument_event_type')
|
43
43
|
def instrument_event_type_validate_enum(cls, value):
|
44
44
|
"""Validates the enum"""
|
45
|
-
if value not in ('TransitionEvent', 'InformationalEvent', 'OpenEvent', 'CloseEvent', 'StockSplitEvent', 'BondDefaultEvent', 'CashDividendEvent', 'AmortisationEvent', 'CashFlowEvent', 'ExerciseEvent', 'ResetEvent', 'TriggerEvent', 'RawVendorEvent', 'InformationalErrorEvent', 'BondCouponEvent', 'DividendReinvestmentEvent', 'AccumulationEvent', 'BondPrincipalEvent', 'DividendOptionEvent', 'MaturityEvent', 'FxForwardSettlementEvent', 'ExpiryEvent', 'ScripDividendEvent', 'StockDividendEvent', 'ReverseStockSplitEvent', 'CapitalDistributionEvent', 'SpinOffEvent', 'MergerEvent', 'FutureExpiryEvent'):
|
46
|
-
raise ValueError("must be one of enum values ('TransitionEvent', 'InformationalEvent', 'OpenEvent', 'CloseEvent', 'StockSplitEvent', 'BondDefaultEvent', 'CashDividendEvent', 'AmortisationEvent', 'CashFlowEvent', 'ExerciseEvent', 'ResetEvent', 'TriggerEvent', 'RawVendorEvent', 'InformationalErrorEvent', 'BondCouponEvent', 'DividendReinvestmentEvent', 'AccumulationEvent', 'BondPrincipalEvent', 'DividendOptionEvent', 'MaturityEvent', 'FxForwardSettlementEvent', 'ExpiryEvent', 'ScripDividendEvent', 'StockDividendEvent', 'ReverseStockSplitEvent', 'CapitalDistributionEvent', 'SpinOffEvent', 'MergerEvent', 'FutureExpiryEvent')")
|
45
|
+
if value not in ('TransitionEvent', 'InformationalEvent', 'OpenEvent', 'CloseEvent', 'StockSplitEvent', 'BondDefaultEvent', 'CashDividendEvent', 'AmortisationEvent', 'CashFlowEvent', 'ExerciseEvent', 'ResetEvent', 'TriggerEvent', 'RawVendorEvent', 'InformationalErrorEvent', 'BondCouponEvent', 'DividendReinvestmentEvent', 'AccumulationEvent', 'BondPrincipalEvent', 'DividendOptionEvent', 'MaturityEvent', 'FxForwardSettlementEvent', 'ExpiryEvent', 'ScripDividendEvent', 'StockDividendEvent', 'ReverseStockSplitEvent', 'CapitalDistributionEvent', 'SpinOffEvent', 'MergerEvent', 'FutureExpiryEvent', 'SwapCashFlowEvent', 'SwapPrincipalEvent'):
|
46
|
+
raise ValueError("must be one of enum values ('TransitionEvent', 'InformationalEvent', 'OpenEvent', 'CloseEvent', 'StockSplitEvent', 'BondDefaultEvent', 'CashDividendEvent', 'AmortisationEvent', 'CashFlowEvent', 'ExerciseEvent', 'ResetEvent', 'TriggerEvent', 'RawVendorEvent', 'InformationalErrorEvent', 'BondCouponEvent', 'DividendReinvestmentEvent', 'AccumulationEvent', 'BondPrincipalEvent', 'DividendOptionEvent', 'MaturityEvent', 'FxForwardSettlementEvent', 'ExpiryEvent', 'ScripDividendEvent', 'StockDividendEvent', 'ReverseStockSplitEvent', 'CapitalDistributionEvent', 'SpinOffEvent', 'MergerEvent', 'FutureExpiryEvent', 'SwapCashFlowEvent', 'SwapPrincipalEvent')")
|
47
47
|
return value
|
48
48
|
|
49
49
|
class Config:
|
@@ -35,15 +35,15 @@ class DividendReinvestmentEvent(InstrumentEvent):
|
|
35
35
|
record_date: datetime = Field(..., alias="recordDate", description="Date you have to be the holder of record in order to participate in the tender.")
|
36
36
|
security_elections: conlist(SecurityElection) = Field(..., alias="securityElections", description="SecurityElection for this DividendReinvestmentEvent")
|
37
37
|
security_settlement_date: Optional[datetime] = Field(None, alias="securitySettlementDate", description="The settlement date of the additional units. Equal to the PaymentDate if not provided.")
|
38
|
-
instrument_event_type: StrictStr = Field(..., alias="instrumentEventType", description="The Type of Event. The available values are: TransitionEvent, InformationalEvent, OpenEvent, CloseEvent, StockSplitEvent, BondDefaultEvent, CashDividendEvent, AmortisationEvent, CashFlowEvent, ExerciseEvent, ResetEvent, TriggerEvent, RawVendorEvent, InformationalErrorEvent, BondCouponEvent, DividendReinvestmentEvent, AccumulationEvent, BondPrincipalEvent, DividendOptionEvent, MaturityEvent, FxForwardSettlementEvent, ExpiryEvent, ScripDividendEvent, StockDividendEvent, ReverseStockSplitEvent, CapitalDistributionEvent, SpinOffEvent, MergerEvent, FutureExpiryEvent")
|
38
|
+
instrument_event_type: StrictStr = Field(..., alias="instrumentEventType", description="The Type of Event. The available values are: TransitionEvent, InformationalEvent, OpenEvent, CloseEvent, StockSplitEvent, BondDefaultEvent, CashDividendEvent, AmortisationEvent, CashFlowEvent, ExerciseEvent, ResetEvent, TriggerEvent, RawVendorEvent, InformationalErrorEvent, BondCouponEvent, DividendReinvestmentEvent, AccumulationEvent, BondPrincipalEvent, DividendOptionEvent, MaturityEvent, FxForwardSettlementEvent, ExpiryEvent, ScripDividendEvent, StockDividendEvent, ReverseStockSplitEvent, CapitalDistributionEvent, SpinOffEvent, MergerEvent, FutureExpiryEvent, SwapCashFlowEvent, SwapPrincipalEvent")
|
39
39
|
additional_properties: Dict[str, Any] = {}
|
40
40
|
__properties = ["instrumentEventType", "announcementDate", "cashElections", "exDate", "paymentDate", "recordDate", "securityElections", "securitySettlementDate"]
|
41
41
|
|
42
42
|
@validator('instrument_event_type')
|
43
43
|
def instrument_event_type_validate_enum(cls, value):
|
44
44
|
"""Validates the enum"""
|
45
|
-
if value not in ('TransitionEvent', 'InformationalEvent', 'OpenEvent', 'CloseEvent', 'StockSplitEvent', 'BondDefaultEvent', 'CashDividendEvent', 'AmortisationEvent', 'CashFlowEvent', 'ExerciseEvent', 'ResetEvent', 'TriggerEvent', 'RawVendorEvent', 'InformationalErrorEvent', 'BondCouponEvent', 'DividendReinvestmentEvent', 'AccumulationEvent', 'BondPrincipalEvent', 'DividendOptionEvent', 'MaturityEvent', 'FxForwardSettlementEvent', 'ExpiryEvent', 'ScripDividendEvent', 'StockDividendEvent', 'ReverseStockSplitEvent', 'CapitalDistributionEvent', 'SpinOffEvent', 'MergerEvent', 'FutureExpiryEvent'):
|
46
|
-
raise ValueError("must be one of enum values ('TransitionEvent', 'InformationalEvent', 'OpenEvent', 'CloseEvent', 'StockSplitEvent', 'BondDefaultEvent', 'CashDividendEvent', 'AmortisationEvent', 'CashFlowEvent', 'ExerciseEvent', 'ResetEvent', 'TriggerEvent', 'RawVendorEvent', 'InformationalErrorEvent', 'BondCouponEvent', 'DividendReinvestmentEvent', 'AccumulationEvent', 'BondPrincipalEvent', 'DividendOptionEvent', 'MaturityEvent', 'FxForwardSettlementEvent', 'ExpiryEvent', 'ScripDividendEvent', 'StockDividendEvent', 'ReverseStockSplitEvent', 'CapitalDistributionEvent', 'SpinOffEvent', 'MergerEvent', 'FutureExpiryEvent')")
|
45
|
+
if value not in ('TransitionEvent', 'InformationalEvent', 'OpenEvent', 'CloseEvent', 'StockSplitEvent', 'BondDefaultEvent', 'CashDividendEvent', 'AmortisationEvent', 'CashFlowEvent', 'ExerciseEvent', 'ResetEvent', 'TriggerEvent', 'RawVendorEvent', 'InformationalErrorEvent', 'BondCouponEvent', 'DividendReinvestmentEvent', 'AccumulationEvent', 'BondPrincipalEvent', 'DividendOptionEvent', 'MaturityEvent', 'FxForwardSettlementEvent', 'ExpiryEvent', 'ScripDividendEvent', 'StockDividendEvent', 'ReverseStockSplitEvent', 'CapitalDistributionEvent', 'SpinOffEvent', 'MergerEvent', 'FutureExpiryEvent', 'SwapCashFlowEvent', 'SwapPrincipalEvent'):
|
46
|
+
raise ValueError("must be one of enum values ('TransitionEvent', 'InformationalEvent', 'OpenEvent', 'CloseEvent', 'StockSplitEvent', 'BondDefaultEvent', 'CashDividendEvent', 'AmortisationEvent', 'CashFlowEvent', 'ExerciseEvent', 'ResetEvent', 'TriggerEvent', 'RawVendorEvent', 'InformationalErrorEvent', 'BondCouponEvent', 'DividendReinvestmentEvent', 'AccumulationEvent', 'BondPrincipalEvent', 'DividendOptionEvent', 'MaturityEvent', 'FxForwardSettlementEvent', 'ExpiryEvent', 'ScripDividendEvent', 'StockDividendEvent', 'ReverseStockSplitEvent', 'CapitalDistributionEvent', 'SpinOffEvent', 'MergerEvent', 'FutureExpiryEvent', 'SwapCashFlowEvent', 'SwapPrincipalEvent')")
|
47
47
|
return value
|
48
48
|
|
49
49
|
class Config:
|
@@ -0,0 +1,121 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
|
3
|
+
"""
|
4
|
+
LUSID API
|
5
|
+
|
6
|
+
FINBOURNE Technology # noqa: E501
|
7
|
+
|
8
|
+
Contact: info@finbourne.com
|
9
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
10
|
+
|
11
|
+
Do not edit the class manually.
|
12
|
+
"""
|
13
|
+
|
14
|
+
|
15
|
+
from __future__ import annotations
|
16
|
+
import pprint
|
17
|
+
import re # noqa: F401
|
18
|
+
import json
|
19
|
+
|
20
|
+
from datetime import datetime
|
21
|
+
from typing import Any, Dict, Optional
|
22
|
+
from pydantic.v1 import BaseModel, Field, StrictInt, StrictStr, constr
|
23
|
+
|
24
|
+
class EntityChangeItem(BaseModel):
|
25
|
+
"""
|
26
|
+
Defines a change that occured for an entity # noqa: E501
|
27
|
+
"""
|
28
|
+
as_at_modified: datetime = Field(..., alias="asAtModified", description="The date/time of the change.")
|
29
|
+
user_id_modified: constr(strict=True, min_length=1) = Field(..., alias="userIdModified", description="The unique identifier of the user that made the change.")
|
30
|
+
request_id_modified: constr(strict=True, min_length=1) = Field(..., alias="requestIdModified", description="The unique identifier of the request that the changes were part of.")
|
31
|
+
as_at_version_number: StrictInt = Field(..., alias="asAtVersionNumber", description="The version number for the entity (the entity was created at version 1). This may refer to the version number of a changed related entity, not a change for the entity itself.")
|
32
|
+
action: constr(strict=True, min_length=1) = Field(..., description="The action performed on the entity.")
|
33
|
+
action_description: constr(strict=True, min_length=1) = Field(..., alias="actionDescription", description="Description of the action performed on the entity.")
|
34
|
+
attribute_name: Optional[StrictStr] = Field(None, alias="attributeName", description="The name of the field or property that has been changed.")
|
35
|
+
previous_value: Optional[Any] = Field(None, alias="previousValue", description="The value of the attribute prior to the change.")
|
36
|
+
new_value: Optional[Any] = Field(None, alias="newValue", description="The value of the attribute following the change.")
|
37
|
+
effective_from: Optional[datetime] = Field(None, alias="effectiveFrom", description="The effective datetime from which the field's new value is valid.")
|
38
|
+
effective_until: Optional[datetime] = Field(None, alias="effectiveUntil", description="The effective datetime until which the field's new value is valid.")
|
39
|
+
detail: Optional[Dict[str, StrictStr]] = Field(None, description="Information about the particular instance of the ChangeItem (supplied information depends on the type of Action).")
|
40
|
+
__properties = ["asAtModified", "userIdModified", "requestIdModified", "asAtVersionNumber", "action", "actionDescription", "attributeName", "previousValue", "newValue", "effectiveFrom", "effectiveUntil", "detail"]
|
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) -> EntityChangeItem:
|
57
|
+
"""Create an instance of EntityChangeItem 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
|
+
},
|
65
|
+
exclude_none=True)
|
66
|
+
# set to None if attribute_name (nullable) is None
|
67
|
+
# and __fields_set__ contains the field
|
68
|
+
if self.attribute_name is None and "attribute_name" in self.__fields_set__:
|
69
|
+
_dict['attributeName'] = None
|
70
|
+
|
71
|
+
# set to None if previous_value (nullable) is None
|
72
|
+
# and __fields_set__ contains the field
|
73
|
+
if self.previous_value is None and "previous_value" in self.__fields_set__:
|
74
|
+
_dict['previousValue'] = None
|
75
|
+
|
76
|
+
# set to None if new_value (nullable) is None
|
77
|
+
# and __fields_set__ contains the field
|
78
|
+
if self.new_value is None and "new_value" in self.__fields_set__:
|
79
|
+
_dict['newValue'] = None
|
80
|
+
|
81
|
+
# set to None if effective_from (nullable) is None
|
82
|
+
# and __fields_set__ contains the field
|
83
|
+
if self.effective_from is None and "effective_from" in self.__fields_set__:
|
84
|
+
_dict['effectiveFrom'] = None
|
85
|
+
|
86
|
+
# set to None if effective_until (nullable) is None
|
87
|
+
# and __fields_set__ contains the field
|
88
|
+
if self.effective_until is None and "effective_until" in self.__fields_set__:
|
89
|
+
_dict['effectiveUntil'] = None
|
90
|
+
|
91
|
+
# set to None if detail (nullable) is None
|
92
|
+
# and __fields_set__ contains the field
|
93
|
+
if self.detail is None and "detail" in self.__fields_set__:
|
94
|
+
_dict['detail'] = None
|
95
|
+
|
96
|
+
return _dict
|
97
|
+
|
98
|
+
@classmethod
|
99
|
+
def from_dict(cls, obj: dict) -> EntityChangeItem:
|
100
|
+
"""Create an instance of EntityChangeItem from a dict"""
|
101
|
+
if obj is None:
|
102
|
+
return None
|
103
|
+
|
104
|
+
if not isinstance(obj, dict):
|
105
|
+
return EntityChangeItem.parse_obj(obj)
|
106
|
+
|
107
|
+
_obj = EntityChangeItem.parse_obj({
|
108
|
+
"as_at_modified": obj.get("asAtModified"),
|
109
|
+
"user_id_modified": obj.get("userIdModified"),
|
110
|
+
"request_id_modified": obj.get("requestIdModified"),
|
111
|
+
"as_at_version_number": obj.get("asAtVersionNumber"),
|
112
|
+
"action": obj.get("action"),
|
113
|
+
"action_description": obj.get("actionDescription"),
|
114
|
+
"attribute_name": obj.get("attributeName"),
|
115
|
+
"previous_value": obj.get("previousValue"),
|
116
|
+
"new_value": obj.get("newValue"),
|
117
|
+
"effective_from": obj.get("effectiveFrom"),
|
118
|
+
"effective_until": obj.get("effectiveUntil"),
|
119
|
+
"detail": obj.get("detail")
|
120
|
+
})
|
121
|
+
return _obj
|
lusid/models/exercise_event.py
CHANGED
@@ -30,15 +30,15 @@ class ExerciseEvent(InstrumentEvent):
|
|
30
30
|
instrument: LusidInstrument = Field(...)
|
31
31
|
anchor_date: datetime = Field(..., alias="anchorDate", description="The date the exercise window starts, or point it takes effect on.")
|
32
32
|
event_window_end: Optional[datetime] = Field(None, alias="eventWindowEnd", description="The date the exercise window ends, or point it takes effect on.")
|
33
|
-
instrument_event_type: StrictStr = Field(..., alias="instrumentEventType", description="The Type of Event. The available values are: TransitionEvent, InformationalEvent, OpenEvent, CloseEvent, StockSplitEvent, BondDefaultEvent, CashDividendEvent, AmortisationEvent, CashFlowEvent, ExerciseEvent, ResetEvent, TriggerEvent, RawVendorEvent, InformationalErrorEvent, BondCouponEvent, DividendReinvestmentEvent, AccumulationEvent, BondPrincipalEvent, DividendOptionEvent, MaturityEvent, FxForwardSettlementEvent, ExpiryEvent, ScripDividendEvent, StockDividendEvent, ReverseStockSplitEvent, CapitalDistributionEvent, SpinOffEvent, MergerEvent, FutureExpiryEvent")
|
33
|
+
instrument_event_type: StrictStr = Field(..., alias="instrumentEventType", description="The Type of Event. The available values are: TransitionEvent, InformationalEvent, OpenEvent, CloseEvent, StockSplitEvent, BondDefaultEvent, CashDividendEvent, AmortisationEvent, CashFlowEvent, ExerciseEvent, ResetEvent, TriggerEvent, RawVendorEvent, InformationalErrorEvent, BondCouponEvent, DividendReinvestmentEvent, AccumulationEvent, BondPrincipalEvent, DividendOptionEvent, MaturityEvent, FxForwardSettlementEvent, ExpiryEvent, ScripDividendEvent, StockDividendEvent, ReverseStockSplitEvent, CapitalDistributionEvent, SpinOffEvent, MergerEvent, FutureExpiryEvent, SwapCashFlowEvent, SwapPrincipalEvent")
|
34
34
|
additional_properties: Dict[str, Any] = {}
|
35
35
|
__properties = ["instrumentEventType", "instrument", "anchorDate", "eventWindowEnd"]
|
36
36
|
|
37
37
|
@validator('instrument_event_type')
|
38
38
|
def instrument_event_type_validate_enum(cls, value):
|
39
39
|
"""Validates the enum"""
|
40
|
-
if value not in ('TransitionEvent', 'InformationalEvent', 'OpenEvent', 'CloseEvent', 'StockSplitEvent', 'BondDefaultEvent', 'CashDividendEvent', 'AmortisationEvent', 'CashFlowEvent', 'ExerciseEvent', 'ResetEvent', 'TriggerEvent', 'RawVendorEvent', 'InformationalErrorEvent', 'BondCouponEvent', 'DividendReinvestmentEvent', 'AccumulationEvent', 'BondPrincipalEvent', 'DividendOptionEvent', 'MaturityEvent', 'FxForwardSettlementEvent', 'ExpiryEvent', 'ScripDividendEvent', 'StockDividendEvent', 'ReverseStockSplitEvent', 'CapitalDistributionEvent', 'SpinOffEvent', 'MergerEvent', 'FutureExpiryEvent'):
|
41
|
-
raise ValueError("must be one of enum values ('TransitionEvent', 'InformationalEvent', 'OpenEvent', 'CloseEvent', 'StockSplitEvent', 'BondDefaultEvent', 'CashDividendEvent', 'AmortisationEvent', 'CashFlowEvent', 'ExerciseEvent', 'ResetEvent', 'TriggerEvent', 'RawVendorEvent', 'InformationalErrorEvent', 'BondCouponEvent', 'DividendReinvestmentEvent', 'AccumulationEvent', 'BondPrincipalEvent', 'DividendOptionEvent', 'MaturityEvent', 'FxForwardSettlementEvent', 'ExpiryEvent', 'ScripDividendEvent', 'StockDividendEvent', 'ReverseStockSplitEvent', 'CapitalDistributionEvent', 'SpinOffEvent', 'MergerEvent', 'FutureExpiryEvent')")
|
40
|
+
if value not in ('TransitionEvent', 'InformationalEvent', 'OpenEvent', 'CloseEvent', 'StockSplitEvent', 'BondDefaultEvent', 'CashDividendEvent', 'AmortisationEvent', 'CashFlowEvent', 'ExerciseEvent', 'ResetEvent', 'TriggerEvent', 'RawVendorEvent', 'InformationalErrorEvent', 'BondCouponEvent', 'DividendReinvestmentEvent', 'AccumulationEvent', 'BondPrincipalEvent', 'DividendOptionEvent', 'MaturityEvent', 'FxForwardSettlementEvent', 'ExpiryEvent', 'ScripDividendEvent', 'StockDividendEvent', 'ReverseStockSplitEvent', 'CapitalDistributionEvent', 'SpinOffEvent', 'MergerEvent', 'FutureExpiryEvent', 'SwapCashFlowEvent', 'SwapPrincipalEvent'):
|
41
|
+
raise ValueError("must be one of enum values ('TransitionEvent', 'InformationalEvent', 'OpenEvent', 'CloseEvent', 'StockSplitEvent', 'BondDefaultEvent', 'CashDividendEvent', 'AmortisationEvent', 'CashFlowEvent', 'ExerciseEvent', 'ResetEvent', 'TriggerEvent', 'RawVendorEvent', 'InformationalErrorEvent', 'BondCouponEvent', 'DividendReinvestmentEvent', 'AccumulationEvent', 'BondPrincipalEvent', 'DividendOptionEvent', 'MaturityEvent', 'FxForwardSettlementEvent', 'ExpiryEvent', 'ScripDividendEvent', 'StockDividendEvent', 'ReverseStockSplitEvent', 'CapitalDistributionEvent', 'SpinOffEvent', 'MergerEvent', 'FutureExpiryEvent', 'SwapCashFlowEvent', 'SwapPrincipalEvent')")
|
42
42
|
return value
|
43
43
|
|
44
44
|
class Config:
|
lusid/models/expiry_event.py
CHANGED
@@ -27,15 +27,15 @@ class ExpiryEvent(InstrumentEvent):
|
|
27
27
|
Definition of an Expiry Event This is an event that describes the expiry of the instrument. # noqa: E501
|
28
28
|
"""
|
29
29
|
expiry_date: datetime = Field(..., alias="expiryDate", description="Expiry date of the instrument")
|
30
|
-
instrument_event_type: StrictStr = Field(..., alias="instrumentEventType", description="The Type of Event. The available values are: TransitionEvent, InformationalEvent, OpenEvent, CloseEvent, StockSplitEvent, BondDefaultEvent, CashDividendEvent, AmortisationEvent, CashFlowEvent, ExerciseEvent, ResetEvent, TriggerEvent, RawVendorEvent, InformationalErrorEvent, BondCouponEvent, DividendReinvestmentEvent, AccumulationEvent, BondPrincipalEvent, DividendOptionEvent, MaturityEvent, FxForwardSettlementEvent, ExpiryEvent, ScripDividendEvent, StockDividendEvent, ReverseStockSplitEvent, CapitalDistributionEvent, SpinOffEvent, MergerEvent, FutureExpiryEvent")
|
30
|
+
instrument_event_type: StrictStr = Field(..., alias="instrumentEventType", description="The Type of Event. The available values are: TransitionEvent, InformationalEvent, OpenEvent, CloseEvent, StockSplitEvent, BondDefaultEvent, CashDividendEvent, AmortisationEvent, CashFlowEvent, ExerciseEvent, ResetEvent, TriggerEvent, RawVendorEvent, InformationalErrorEvent, BondCouponEvent, DividendReinvestmentEvent, AccumulationEvent, BondPrincipalEvent, DividendOptionEvent, MaturityEvent, FxForwardSettlementEvent, ExpiryEvent, ScripDividendEvent, StockDividendEvent, ReverseStockSplitEvent, CapitalDistributionEvent, SpinOffEvent, MergerEvent, FutureExpiryEvent, SwapCashFlowEvent, SwapPrincipalEvent")
|
31
31
|
additional_properties: Dict[str, Any] = {}
|
32
32
|
__properties = ["instrumentEventType", "expiryDate"]
|
33
33
|
|
34
34
|
@validator('instrument_event_type')
|
35
35
|
def instrument_event_type_validate_enum(cls, value):
|
36
36
|
"""Validates the enum"""
|
37
|
-
if value not in ('TransitionEvent', 'InformationalEvent', 'OpenEvent', 'CloseEvent', 'StockSplitEvent', 'BondDefaultEvent', 'CashDividendEvent', 'AmortisationEvent', 'CashFlowEvent', 'ExerciseEvent', 'ResetEvent', 'TriggerEvent', 'RawVendorEvent', 'InformationalErrorEvent', 'BondCouponEvent', 'DividendReinvestmentEvent', 'AccumulationEvent', 'BondPrincipalEvent', 'DividendOptionEvent', 'MaturityEvent', 'FxForwardSettlementEvent', 'ExpiryEvent', 'ScripDividendEvent', 'StockDividendEvent', 'ReverseStockSplitEvent', 'CapitalDistributionEvent', 'SpinOffEvent', 'MergerEvent', 'FutureExpiryEvent'):
|
38
|
-
raise ValueError("must be one of enum values ('TransitionEvent', 'InformationalEvent', 'OpenEvent', 'CloseEvent', 'StockSplitEvent', 'BondDefaultEvent', 'CashDividendEvent', 'AmortisationEvent', 'CashFlowEvent', 'ExerciseEvent', 'ResetEvent', 'TriggerEvent', 'RawVendorEvent', 'InformationalErrorEvent', 'BondCouponEvent', 'DividendReinvestmentEvent', 'AccumulationEvent', 'BondPrincipalEvent', 'DividendOptionEvent', 'MaturityEvent', 'FxForwardSettlementEvent', 'ExpiryEvent', 'ScripDividendEvent', 'StockDividendEvent', 'ReverseStockSplitEvent', 'CapitalDistributionEvent', 'SpinOffEvent', 'MergerEvent', 'FutureExpiryEvent')")
|
37
|
+
if value not in ('TransitionEvent', 'InformationalEvent', 'OpenEvent', 'CloseEvent', 'StockSplitEvent', 'BondDefaultEvent', 'CashDividendEvent', 'AmortisationEvent', 'CashFlowEvent', 'ExerciseEvent', 'ResetEvent', 'TriggerEvent', 'RawVendorEvent', 'InformationalErrorEvent', 'BondCouponEvent', 'DividendReinvestmentEvent', 'AccumulationEvent', 'BondPrincipalEvent', 'DividendOptionEvent', 'MaturityEvent', 'FxForwardSettlementEvent', 'ExpiryEvent', 'ScripDividendEvent', 'StockDividendEvent', 'ReverseStockSplitEvent', 'CapitalDistributionEvent', 'SpinOffEvent', 'MergerEvent', 'FutureExpiryEvent', 'SwapCashFlowEvent', 'SwapPrincipalEvent'):
|
38
|
+
raise ValueError("must be one of enum values ('TransitionEvent', 'InformationalEvent', 'OpenEvent', 'CloseEvent', 'StockSplitEvent', 'BondDefaultEvent', 'CashDividendEvent', 'AmortisationEvent', 'CashFlowEvent', 'ExerciseEvent', 'ResetEvent', 'TriggerEvent', 'RawVendorEvent', 'InformationalErrorEvent', 'BondCouponEvent', 'DividendReinvestmentEvent', 'AccumulationEvent', 'BondPrincipalEvent', 'DividendOptionEvent', 'MaturityEvent', 'FxForwardSettlementEvent', 'ExpiryEvent', 'ScripDividendEvent', 'StockDividendEvent', 'ReverseStockSplitEvent', 'CapitalDistributionEvent', 'SpinOffEvent', 'MergerEvent', 'FutureExpiryEvent', 'SwapCashFlowEvent', 'SwapPrincipalEvent')")
|
39
39
|
return value
|
40
40
|
|
41
41
|
class Config:
|
lusid/models/fee.py
CHANGED
@@ -42,7 +42,7 @@ class Fee(BaseModel):
|
|
42
42
|
total_annual_accrual_amount: Optional[Union[StrictFloat, StrictInt]] = Field(None, alias="totalAnnualAccrualAmount", description="The total annual accrued amount for the Fee. (TotalAnnualAccrualAmount and CalculationBase cannot both be present)")
|
43
43
|
fee_rate_percentage: Optional[Union[StrictFloat, StrictInt]] = Field(None, alias="feeRatePercentage", description="The fee rate percentage. (Required when CalculationBase is present and not compatible with TotalAnnualAccrualAmount)")
|
44
44
|
payable_frequency: constr(strict=True, min_length=1) = Field(..., alias="payableFrequency", description="The payable frequency for the Fee; 'Annually', 'Quarterly' or 'Monthly'.")
|
45
|
-
business_day_convention: constr(strict=True, min_length=1) = Field(..., alias="businessDayConvention", description="The business day convention to use for Fee calculations on weekends.")
|
45
|
+
business_day_convention: constr(strict=True, min_length=1) = Field(..., alias="businessDayConvention", description="The business day convention to use for Fee calculations on weekends. Supported string values are: [Previous, P, Following, F].")
|
46
46
|
start_date: datetime = Field(..., alias="startDate", description="The start date of the Fee.")
|
47
47
|
end_date: Optional[datetime] = Field(None, alias="endDate", description="The end date of the Fee.")
|
48
48
|
anchor_date: Optional[DayMonth] = Field(None, alias="anchorDate")
|
lusid/models/fee_request.py
CHANGED
@@ -39,7 +39,7 @@ class FeeRequest(BaseModel):
|
|
39
39
|
total_annual_accrual_amount: Optional[Union[StrictFloat, StrictInt]] = Field(None, alias="totalAnnualAccrualAmount", description="The total annual accrued amount for the Fee. (TotalAnnualAccrualAmount and CalculationBase cannot both be present)")
|
40
40
|
fee_rate_percentage: Optional[Union[StrictFloat, StrictInt]] = Field(None, alias="feeRatePercentage", description="The fee rate percentage. (Required when CalculationBase is present and not compatible with TotalAnnualAccrualAmount)")
|
41
41
|
payable_frequency: constr(strict=True, min_length=1) = Field(..., alias="payableFrequency", description="The payable frequency for the Fee; 'Annually', 'Quarterly' or 'Monthly'.")
|
42
|
-
business_day_convention: constr(strict=True, min_length=1) = Field(..., alias="businessDayConvention", description="The business day convention to use for Fee calculations on weekends.")
|
42
|
+
business_day_convention: constr(strict=True, min_length=1) = Field(..., alias="businessDayConvention", description="The business day convention to use for Fee calculations on weekends. Supported string values are: [Previous, P, Following, F].")
|
43
43
|
start_date: datetime = Field(..., alias="startDate", description="The start date of the Fee.")
|
44
44
|
end_date: Optional[datetime] = Field(None, alias="endDate", description="The end date of the Fee.")
|
45
45
|
anchor_date: Optional[DayMonth] = Field(None, alias="anchorDate")
|
lusid/models/flow_conventions.py
CHANGED
@@ -34,7 +34,7 @@ class FlowConventions(BaseModel):
|
|
34
34
|
settle_days: Optional[StrictInt] = Field(None, alias="settleDays", description="DEPRECATED Number of Good Business Days between the trade date and the effective or settlement date of the instrument. This field is now deprecated and not picked up in schedule generation or adjustment to bond accrual start date. Defaulted to 0 if not set.")
|
35
35
|
reset_days: Optional[StrictInt] = Field(None, alias="resetDays", description="The number of Good Business Days between determination and payment of reset. Defaulted to 0 if not set.")
|
36
36
|
leap_days_included: Optional[StrictBool] = Field(None, alias="leapDaysIncluded", description="If this flag is set to true, the 29th of February is included in the date schedule when the business roll convention is applied. If this flag is set to false, the business roll convention ignores February 29 for date schedules, cash flow payments etc. This flag defaults to true if not specified, i.e., leap days are included in a date schedule generation.")
|
37
|
-
accrual_date_adjustment: Optional[constr(strict=True, max_length=50, min_length=0)] = Field(None, alias="accrualDateAdjustment", description="Indicates if the accrual dates are adjusted
|
37
|
+
accrual_date_adjustment: Optional[constr(strict=True, max_length=50, min_length=0)] = Field(None, alias="accrualDateAdjustment", description="Indicates if the accrual dates are adjusted using the business day convention. The default value is 'Adjusted'. Supported string (enumeration) values are: [Adjusted, Unadjusted].")
|
38
38
|
business_day_convention: Optional[StrictStr] = Field(None, alias="businessDayConvention", description="When generating a set of dates, what convention should be used for adjusting dates that coincide with a non-business day. Supported string (enumeration) values are: [NoAdjustment, None, Previous, P, Following, F, ModifiedPrevious, MP, ModifiedFollowing, MF, HalfMonthModifiedFollowing, Nearest].")
|
39
39
|
accrual_day_count_convention: Optional[constr(strict=True, max_length=50, min_length=0)] = Field(None, alias="accrualDayCountConvention", description="Optional, if not set the main DayCountConvention is used for all accrual calculations. This only needs to be set when accrual uses a different day count to the coupon calculation.")
|
40
40
|
scope: Optional[constr(strict=True, max_length=256, min_length=1)] = Field(None, description="The scope used when updating or inserting the convention.")
|
lusid/models/fund_amount.py
CHANGED
@@ -25,7 +25,7 @@ class FundAmount(BaseModel):
|
|
25
25
|
"""
|
26
26
|
FundAmount
|
27
27
|
"""
|
28
|
-
value: Optional[Union[StrictFloat, StrictInt]] = Field(None, description="The value of the amount.")
|
28
|
+
value: Optional[Union[StrictFloat, StrictInt]] = Field(None, description="The value of the amount in the fund currency.")
|
29
29
|
__properties = ["value"]
|
30
30
|
|
31
31
|
class Config:
|
@@ -0,0 +1,74 @@
|
|
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
|
+
|
24
|
+
class FundDetails(BaseModel):
|
25
|
+
"""
|
26
|
+
The details of a Fund. # noqa: E501
|
27
|
+
"""
|
28
|
+
currency: Optional[StrictStr] = Field(None, description="The currency of the fund which is the same as the base currency of all the portfolios of the fund's Abor.")
|
29
|
+
__properties = ["currency"]
|
30
|
+
|
31
|
+
class Config:
|
32
|
+
"""Pydantic configuration"""
|
33
|
+
allow_population_by_field_name = True
|
34
|
+
validate_assignment = True
|
35
|
+
|
36
|
+
def to_str(self) -> str:
|
37
|
+
"""Returns the string representation of the model using alias"""
|
38
|
+
return pprint.pformat(self.dict(by_alias=True))
|
39
|
+
|
40
|
+
def to_json(self) -> str:
|
41
|
+
"""Returns the JSON representation of the model using alias"""
|
42
|
+
return json.dumps(self.to_dict())
|
43
|
+
|
44
|
+
@classmethod
|
45
|
+
def from_json(cls, json_str: str) -> FundDetails:
|
46
|
+
"""Create an instance of FundDetails from a JSON string"""
|
47
|
+
return cls.from_dict(json.loads(json_str))
|
48
|
+
|
49
|
+
def to_dict(self):
|
50
|
+
"""Returns the dictionary representation of the model using alias"""
|
51
|
+
_dict = self.dict(by_alias=True,
|
52
|
+
exclude={
|
53
|
+
},
|
54
|
+
exclude_none=True)
|
55
|
+
# set to None if currency (nullable) is None
|
56
|
+
# and __fields_set__ contains the field
|
57
|
+
if self.currency is None and "currency" in self.__fields_set__:
|
58
|
+
_dict['currency'] = None
|
59
|
+
|
60
|
+
return _dict
|
61
|
+
|
62
|
+
@classmethod
|
63
|
+
def from_dict(cls, obj: dict) -> FundDetails:
|
64
|
+
"""Create an instance of FundDetails from a dict"""
|
65
|
+
if obj is None:
|
66
|
+
return None
|
67
|
+
|
68
|
+
if not isinstance(obj, dict):
|
69
|
+
return FundDetails.parse_obj(obj)
|
70
|
+
|
71
|
+
_obj = FundDetails.parse_obj({
|
72
|
+
"currency": obj.get("currency")
|
73
|
+
})
|
74
|
+
return _obj
|