lusid-sdk 2.1.322__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 +64 -0
- lusid/api/__init__.py +5 -1
- lusid/api/data_types_api.py +160 -0
- lusid/api/entities_api.py +172 -0
- lusid/api/funds_api.py +221 -8
- lusid/api/group_reconciliations_api.py +378 -0
- lusid/api/order_management_api.py +321 -0
- lusid/api/workspace_api.py +3433 -0
- lusid/configuration.py +16 -7
- lusid/models/__init__.py +60 -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/close_period_diary_entry_request.py +1 -1
- 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 +14 -8
- lusid/models/data_type_entity.py +131 -0
- lusid/models/diary_entry.py +1 -1
- lusid/models/diary_entry_request.py +1 -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_configuration.py +6 -6
- lusid/models/fund_configuration_request.py +6 -6
- 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/instrument_resolution_detail.py +19 -5
- lusid/models/journal_entry_line.py +5 -3
- 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 +121 -0
- lusid/models/paged_resource_list_of_valuation_point_overview.py +113 -0
- lusid/models/paged_resource_list_of_workspace.py +113 -0
- lusid/models/paged_resource_list_of_workspace_item.py +113 -0
- lusid/models/person.py +17 -2
- lusid/models/placement_update_request.py +6 -1
- lusid/models/previous_nav.py +3 -3
- lusid/models/quote_access_metadata_rule_id.py +2 -2
- lusid/models/quote_series_id.py +2 -2
- 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 +20 -6
- lusid/models/share_class_amount.py +7 -9
- lusid/models/share_class_breakdown.py +9 -18
- lusid/models/share_class_dealing_breakdown.py +96 -0
- lusid/models/share_class_details.py +5 -3
- lusid/models/spin_off_event.py +3 -3
- lusid/models/stock_dividend_event.py +3 -3
- lusid/models/stock_split_event.py +21 -7
- 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/update_orders_response.py +153 -0
- lusid/models/valuation_point_data_response.py +22 -2
- lusid/models/valuation_point_overview.py +125 -0
- lusid/models/weighted_instrument.py +9 -2
- lusid/models/workspace.py +92 -0
- lusid/models/workspace_creation_request.py +78 -0
- lusid/models/workspace_item.py +105 -0
- lusid/models/workspace_item_creation_request.py +91 -0
- lusid/models/workspace_item_update_request.py +82 -0
- lusid/models/workspace_update_request.py +69 -0
- {lusid_sdk-2.1.322.dist-info → lusid_sdk-2.1.390.dist-info}/METADATA +58 -1
- {lusid_sdk-2.1.322.dist-info → lusid_sdk-2.1.390.dist-info}/RECORD +106 -74
- {lusid_sdk-2.1.322.dist-info → lusid_sdk-2.1.390.dist-info}/WHEEL +0 -0
lusid/models/instrument_event.py
CHANGED
@@ -26,14 +26,14 @@ class InstrumentEvent(BaseModel):
|
|
26
26
|
"""
|
27
27
|
Base class for representing instrument events in LUSID, such as dividends, stock splits, and option exercises. This base class should not be directly instantiated; each supported InstrumentEventType has a corresponding inherited class. # noqa: E501
|
28
28
|
"""
|
29
|
-
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")
|
29
|
+
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")
|
30
30
|
__properties = ["instrumentEventType"]
|
31
31
|
|
32
32
|
@validator('instrument_event_type')
|
33
33
|
def instrument_event_type_validate_enum(cls, value):
|
34
34
|
"""Validates the enum"""
|
35
|
-
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'):
|
36
|
-
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')")
|
35
|
+
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'):
|
36
|
+
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')")
|
37
37
|
return value
|
38
38
|
|
39
39
|
class Config:
|
@@ -73,6 +73,8 @@ class InstrumentEvent(BaseModel):
|
|
73
73
|
'SpinOffEvent': 'SpinOffEvent',
|
74
74
|
'StockDividendEvent': 'StockDividendEvent',
|
75
75
|
'StockSplitEvent': 'StockSplitEvent',
|
76
|
+
'SwapCashFlowEvent': 'SwapCashFlowEvent',
|
77
|
+
'SwapPrincipalEvent': 'SwapPrincipalEvent',
|
76
78
|
'TransitionEvent': 'TransitionEvent',
|
77
79
|
'TriggerEvent': 'TriggerEvent'
|
78
80
|
}
|
@@ -95,7 +97,7 @@ class InstrumentEvent(BaseModel):
|
|
95
97
|
return json.dumps(self.to_dict())
|
96
98
|
|
97
99
|
@classmethod
|
98
|
-
def from_json(cls, json_str: str) -> Union(AccumulationEvent, AmortisationEvent, BondCouponEvent, BondDefaultEvent, BondPrincipalEvent, CapitalDistributionEvent, CashDividendEvent, CashFlowEvent, CloseEvent, DividendOptionEvent, DividendReinvestmentEvent, ExerciseEvent, ExpiryEvent, FutureExpiryEvent, FxForwardSettlementEvent, InformationalErrorEvent, InformationalEvent, MaturityEvent, MergerEvent, OpenEvent, RawVendorEvent, ResetEvent, ReverseStockSplitEvent, ScripDividendEvent, SpinOffEvent, StockDividendEvent, StockSplitEvent, TransitionEvent, TriggerEvent):
|
100
|
+
def from_json(cls, json_str: str) -> Union(AccumulationEvent, AmortisationEvent, BondCouponEvent, BondDefaultEvent, BondPrincipalEvent, CapitalDistributionEvent, CashDividendEvent, CashFlowEvent, CloseEvent, DividendOptionEvent, DividendReinvestmentEvent, ExerciseEvent, ExpiryEvent, FutureExpiryEvent, FxForwardSettlementEvent, InformationalErrorEvent, InformationalEvent, MaturityEvent, MergerEvent, OpenEvent, RawVendorEvent, ResetEvent, ReverseStockSplitEvent, ScripDividendEvent, SpinOffEvent, StockDividendEvent, StockSplitEvent, SwapCashFlowEvent, SwapPrincipalEvent, TransitionEvent, TriggerEvent):
|
99
101
|
"""Create an instance of InstrumentEvent from a JSON string"""
|
100
102
|
return cls.from_dict(json.loads(json_str))
|
101
103
|
|
@@ -108,7 +110,7 @@ class InstrumentEvent(BaseModel):
|
|
108
110
|
return _dict
|
109
111
|
|
110
112
|
@classmethod
|
111
|
-
def from_dict(cls, obj: dict) -> Union(AccumulationEvent, AmortisationEvent, BondCouponEvent, BondDefaultEvent, BondPrincipalEvent, CapitalDistributionEvent, CashDividendEvent, CashFlowEvent, CloseEvent, DividendOptionEvent, DividendReinvestmentEvent, ExerciseEvent, ExpiryEvent, FutureExpiryEvent, FxForwardSettlementEvent, InformationalErrorEvent, InformationalEvent, MaturityEvent, MergerEvent, OpenEvent, RawVendorEvent, ResetEvent, ReverseStockSplitEvent, ScripDividendEvent, SpinOffEvent, StockDividendEvent, StockSplitEvent, TransitionEvent, TriggerEvent):
|
113
|
+
def from_dict(cls, obj: dict) -> Union(AccumulationEvent, AmortisationEvent, BondCouponEvent, BondDefaultEvent, BondPrincipalEvent, CapitalDistributionEvent, CashDividendEvent, CashFlowEvent, CloseEvent, DividendOptionEvent, DividendReinvestmentEvent, ExerciseEvent, ExpiryEvent, FutureExpiryEvent, FxForwardSettlementEvent, InformationalErrorEvent, InformationalEvent, MaturityEvent, MergerEvent, OpenEvent, RawVendorEvent, ResetEvent, ReverseStockSplitEvent, ScripDividendEvent, SpinOffEvent, StockDividendEvent, StockSplitEvent, SwapCashFlowEvent, SwapPrincipalEvent, TransitionEvent, TriggerEvent):
|
112
114
|
"""Create an instance of InstrumentEvent from a dict"""
|
113
115
|
# look up the object type based on discriminator mapping
|
114
116
|
object_type = cls.get_discriminator_value(obj)
|
@@ -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
|
@@ -58,6 +58,8 @@ class InstrumentEventType(str, Enum):
|
|
58
58
|
SPINOFFEVENT = 'SpinOffEvent'
|
59
59
|
MERGEREVENT = 'MergerEvent'
|
60
60
|
FUTUREEXPIRYEVENT = 'FutureExpiryEvent'
|
61
|
+
SWAPCASHFLOWEVENT = 'SwapCashFlowEvent'
|
62
|
+
SWAPPRINCIPALEVENT = 'SwapPrincipalEvent'
|
61
63
|
|
62
64
|
@classmethod
|
63
65
|
def from_json(cls, json_str: str) -> InstrumentEventType:
|
@@ -17,9 +17,9 @@ import pprint
|
|
17
17
|
import re # noqa: F401
|
18
18
|
import json
|
19
19
|
|
20
|
-
|
21
|
-
from typing import Any, Dict, Optional
|
22
|
-
from pydantic.v1 import BaseModel, Field, StrictStr, constr, validator
|
20
|
+
from datetime import datetime
|
21
|
+
from typing import Any, Dict, Optional, Union
|
22
|
+
from pydantic.v1 import BaseModel, Field, StrictFloat, StrictInt, StrictStr, constr, validator
|
23
23
|
|
24
24
|
class InstrumentResolutionDetail(BaseModel):
|
25
25
|
"""
|
@@ -28,7 +28,9 @@ class InstrumentResolutionDetail(BaseModel):
|
|
28
28
|
instrument_identifiers: Dict[str, StrictStr] = Field(..., alias="instrumentIdentifiers", description="Unique instrument identifiers")
|
29
29
|
lusid_instrument_id: Optional[constr(strict=True, max_length=64, min_length=1)] = Field(None, alias="lusidInstrumentId", description="LUSID's internal unique instrument identifier, resolved from the instrument identifiers")
|
30
30
|
instrument_scope: Optional[constr(strict=True, max_length=64, min_length=1)] = Field(None, alias="instrumentScope", description="The scope in which the instrument lies.")
|
31
|
-
|
31
|
+
launch_price: Optional[Union[StrictFloat, StrictInt]] = Field(None, alias="launchPrice", description="The launch price set when a shareclass is added to the fund. Defaults to 1.")
|
32
|
+
launch_date: Optional[datetime] = Field(None, alias="launchDate", description="The launch date set when a shareclass is added to the fund. Defaults to Fund Inception Date.")
|
33
|
+
__properties = ["instrumentIdentifiers", "lusidInstrumentId", "instrumentScope", "launchPrice", "launchDate"]
|
32
34
|
|
33
35
|
@validator('lusid_instrument_id')
|
34
36
|
def lusid_instrument_id_validate_regular_expression(cls, value):
|
@@ -86,6 +88,16 @@ class InstrumentResolutionDetail(BaseModel):
|
|
86
88
|
if self.instrument_scope is None and "instrument_scope" in self.__fields_set__:
|
87
89
|
_dict['instrumentScope'] = None
|
88
90
|
|
91
|
+
# set to None if launch_price (nullable) is None
|
92
|
+
# and __fields_set__ contains the field
|
93
|
+
if self.launch_price is None and "launch_price" in self.__fields_set__:
|
94
|
+
_dict['launchPrice'] = None
|
95
|
+
|
96
|
+
# set to None if launch_date (nullable) is None
|
97
|
+
# and __fields_set__ contains the field
|
98
|
+
if self.launch_date is None and "launch_date" in self.__fields_set__:
|
99
|
+
_dict['launchDate'] = None
|
100
|
+
|
89
101
|
return _dict
|
90
102
|
|
91
103
|
@classmethod
|
@@ -100,6 +112,8 @@ class InstrumentResolutionDetail(BaseModel):
|
|
100
112
|
_obj = InstrumentResolutionDetail.parse_obj({
|
101
113
|
"instrument_identifiers": obj.get("instrumentIdentifiers"),
|
102
114
|
"lusid_instrument_id": obj.get("lusidInstrumentId"),
|
103
|
-
"instrument_scope": obj.get("instrumentScope")
|
115
|
+
"instrument_scope": obj.get("instrumentScope"),
|
116
|
+
"launch_price": obj.get("launchPrice"),
|
117
|
+
"launch_date": obj.get("launchDate")
|
104
118
|
})
|
105
119
|
return _obj
|
@@ -18,8 +18,8 @@ import re # noqa: F401
|
|
18
18
|
import json
|
19
19
|
|
20
20
|
from datetime import datetime
|
21
|
-
from typing import Any, Dict, List, Optional
|
22
|
-
from pydantic.v1 import BaseModel, Field, StrictStr, conlist, constr
|
21
|
+
from typing import Any, Dict, List, Optional, Union
|
22
|
+
from pydantic.v1 import BaseModel, Field, StrictFloat, StrictInt, StrictStr, conlist, constr
|
23
23
|
from lusid.models.currency_and_amount import CurrencyAndAmount
|
24
24
|
from lusid.models.link import Link
|
25
25
|
from lusid.models.model_property import ModelProperty
|
@@ -40,6 +40,7 @@ class JournalEntryLine(BaseModel):
|
|
40
40
|
general_ledger_account_code: constr(strict=True, min_length=1) = Field(..., alias="generalLedgerAccountCode", description="The code of the account in the general ledger the Journal Entry was posted to.")
|
41
41
|
local: CurrencyAndAmount = Field(...)
|
42
42
|
base: CurrencyAndAmount = Field(...)
|
43
|
+
units: Union[StrictFloat, StrictInt] = Field(..., description="Units held for the Journal Entry Line.")
|
43
44
|
posting_module_code: Optional[StrictStr] = Field(None, alias="postingModuleCode", description="The code of the posting module where the posting rules derived the Journal Entry lines.")
|
44
45
|
posting_rule: constr(strict=True, min_length=1) = Field(..., alias="postingRule", description="The rule generating the Journal Entry Line.")
|
45
46
|
as_at_date: datetime = Field(..., alias="asAtDate", description="The corresponding input date and time of the Transaction generating the Journal Entry Line.")
|
@@ -58,7 +59,7 @@ class JournalEntryLine(BaseModel):
|
|
58
59
|
ledger_column: Optional[StrictStr] = Field(None, alias="ledgerColumn", description="Indicates if the Journal Entry Line is credit or debit.")
|
59
60
|
journal_entry_line_type: Optional[StrictStr] = Field(None, alias="journalEntryLineType", description="Indicates the Journal Entry Line type")
|
60
61
|
links: Optional[conlist(Link)] = None
|
61
|
-
__properties = ["accountingDate", "activityDate", "portfolioId", "instrumentId", "instrumentScope", "subHoldingKeys", "taxLotId", "generalLedgerAccountCode", "local", "base", "postingModuleCode", "postingRule", "asAtDate", "activitiesDescription", "sourceType", "sourceId", "properties", "movementName", "holdingType", "economicBucket", "economicBucketComponent", "levels", "sourceLevels", "movementSign", "holdingSign", "ledgerColumn", "journalEntryLineType", "links"]
|
62
|
+
__properties = ["accountingDate", "activityDate", "portfolioId", "instrumentId", "instrumentScope", "subHoldingKeys", "taxLotId", "generalLedgerAccountCode", "local", "base", "units", "postingModuleCode", "postingRule", "asAtDate", "activitiesDescription", "sourceType", "sourceId", "properties", "movementName", "holdingType", "economicBucket", "economicBucketComponent", "levels", "sourceLevels", "movementSign", "holdingSign", "ledgerColumn", "journalEntryLineType", "links"]
|
62
63
|
|
63
64
|
class Config:
|
64
65
|
"""Pydantic configuration"""
|
@@ -211,6 +212,7 @@ class JournalEntryLine(BaseModel):
|
|
211
212
|
"general_ledger_account_code": obj.get("generalLedgerAccountCode"),
|
212
213
|
"local": CurrencyAndAmount.from_dict(obj.get("local")) if obj.get("local") is not None else None,
|
213
214
|
"base": CurrencyAndAmount.from_dict(obj.get("base")) if obj.get("base") is not None else None,
|
215
|
+
"units": obj.get("units"),
|
214
216
|
"posting_module_code": obj.get("postingModuleCode"),
|
215
217
|
"posting_rule": obj.get("postingRule"),
|
216
218
|
"as_at_date": obj.get("asAtDate"),
|
lusid/models/maturity_event.py
CHANGED
@@ -27,15 +27,15 @@ class MaturityEvent(InstrumentEvent):
|
|
27
27
|
Definition of a Maturity Event This is an event that describes the maturity of the instrument. # noqa: E501
|
28
28
|
"""
|
29
29
|
maturity_date: datetime = Field(..., alias="maturityDate", description="Maturity 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", "maturityDate"]
|
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/merger_event.py
CHANGED
@@ -40,15 +40,15 @@ class MergerEvent(InstrumentEvent):
|
|
40
40
|
payment_date: datetime = Field(..., alias="paymentDate", description="Date on which the merger takes place.")
|
41
41
|
record_date: Optional[datetime] = Field(None, alias="recordDate", description="Optional. Date you have to be the holder of record of the original shares in order to receive the new shares.")
|
42
42
|
security_elections: Optional[conlist(SecurityOfferElection)] = Field(None, alias="securityElections", description="List of possible SecurityOfferElections for this merger event")
|
43
|
-
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")
|
43
|
+
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")
|
44
44
|
additional_properties: Dict[str, Any] = {}
|
45
45
|
__properties = ["instrumentEventType", "announcementDate", "cashAndSecurityOfferElections", "cashElections", "exDate", "fractionalUnitsCashCurrency", "fractionalUnitsCashPrice", "newInstrument", "paymentDate", "recordDate", "securityElections"]
|
46
46
|
|
47
47
|
@validator('instrument_event_type')
|
48
48
|
def instrument_event_type_validate_enum(cls, value):
|
49
49
|
"""Validates the enum"""
|
50
|
-
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'):
|
51
|
-
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')")
|
50
|
+
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'):
|
51
|
+
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')")
|
52
52
|
return value
|
53
53
|
|
54
54
|
class Config:
|
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/open_event.py
CHANGED
@@ -27,15 +27,15 @@ class OpenEvent(InstrumentEvent):
|
|
27
27
|
The opening of an instrument. # noqa: E501
|
28
28
|
"""
|
29
29
|
anchor_date: Optional[datetime] = Field(None, alias="anchorDate", description="The date on the which the instrument was opened.")
|
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", "anchorDate"]
|
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:
|
@@ -27,7 +27,7 @@ class OrderGraphBlockOrderDetail(BaseModel):
|
|
27
27
|
OrderGraphBlockOrderDetail
|
28
28
|
"""
|
29
29
|
id: ResourceId = Field(...)
|
30
|
-
compliance_state: constr(strict=True, min_length=1) = Field(..., alias="complianceState", description="The compliance state of this order. Possible values are 'Pending', 'Failed', 'Manually approved' and '
|
30
|
+
compliance_state: constr(strict=True, min_length=1) = Field(..., alias="complianceState", description="The compliance state of this order. Possible values are 'Pending', 'Failed', 'Manually approved', 'Passed' and 'Warning'.")
|
31
31
|
approval_state: constr(strict=True, min_length=1) = Field(..., alias="approvalState", description="The approval state of this order. Possible values are 'Pending', 'Rejected' and 'Approved'.")
|
32
32
|
portfolio_id: Optional[ResourceId] = Field(None, alias="portfolioId")
|
33
33
|
portfolio_name: Optional[StrictStr] = Field(None, alias="portfolioName", description="The name of the order's referenced Portfolio.")
|
@@ -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
|
+
|
21
|
+
from typing import Any, Dict, Optional, Union
|
22
|
+
from pydantic.v1 import BaseModel, Field, StrictFloat, StrictInt
|
23
|
+
from lusid.models.currency_and_amount import CurrencyAndAmount
|
24
|
+
from lusid.models.perpetual_property import PerpetualProperty
|
25
|
+
from lusid.models.resource_id import ResourceId
|
26
|
+
|
27
|
+
class OrderUpdateRequest(BaseModel):
|
28
|
+
"""
|
29
|
+
A request to create or update a Order. # noqa: E501
|
30
|
+
"""
|
31
|
+
id: ResourceId = Field(...)
|
32
|
+
quantity: Optional[Union[StrictFloat, StrictInt]] = Field(None, description="The quantity of given instrument ordered.")
|
33
|
+
portfolio_id: Optional[ResourceId] = Field(None, alias="portfolioId")
|
34
|
+
properties: Optional[Dict[str, PerpetualProperty]] = Field(None, description="Client-defined properties associated with this order.")
|
35
|
+
price: Optional[CurrencyAndAmount] = None
|
36
|
+
limit_price: Optional[CurrencyAndAmount] = Field(None, alias="limitPrice")
|
37
|
+
stop_price: Optional[CurrencyAndAmount] = Field(None, alias="stopPrice")
|
38
|
+
__properties = ["id", "quantity", "portfolioId", "properties", "price", "limitPrice", "stopPrice"]
|
39
|
+
|
40
|
+
class Config:
|
41
|
+
"""Pydantic configuration"""
|
42
|
+
allow_population_by_field_name = True
|
43
|
+
validate_assignment = True
|
44
|
+
|
45
|
+
def to_str(self) -> str:
|
46
|
+
"""Returns the string representation of the model using alias"""
|
47
|
+
return pprint.pformat(self.dict(by_alias=True))
|
48
|
+
|
49
|
+
def to_json(self) -> str:
|
50
|
+
"""Returns the JSON representation of the model using alias"""
|
51
|
+
return json.dumps(self.to_dict())
|
52
|
+
|
53
|
+
@classmethod
|
54
|
+
def from_json(cls, json_str: str) -> OrderUpdateRequest:
|
55
|
+
"""Create an instance of OrderUpdateRequest from a JSON string"""
|
56
|
+
return cls.from_dict(json.loads(json_str))
|
57
|
+
|
58
|
+
def to_dict(self):
|
59
|
+
"""Returns the dictionary representation of the model using alias"""
|
60
|
+
_dict = self.dict(by_alias=True,
|
61
|
+
exclude={
|
62
|
+
},
|
63
|
+
exclude_none=True)
|
64
|
+
# override the default output from pydantic by calling `to_dict()` of id
|
65
|
+
if self.id:
|
66
|
+
_dict['id'] = self.id.to_dict()
|
67
|
+
# override the default output from pydantic by calling `to_dict()` of portfolio_id
|
68
|
+
if self.portfolio_id:
|
69
|
+
_dict['portfolioId'] = self.portfolio_id.to_dict()
|
70
|
+
# override the default output from pydantic by calling `to_dict()` of each value in properties (dict)
|
71
|
+
_field_dict = {}
|
72
|
+
if self.properties:
|
73
|
+
for _key in self.properties:
|
74
|
+
if self.properties[_key]:
|
75
|
+
_field_dict[_key] = self.properties[_key].to_dict()
|
76
|
+
_dict['properties'] = _field_dict
|
77
|
+
# override the default output from pydantic by calling `to_dict()` of price
|
78
|
+
if self.price:
|
79
|
+
_dict['price'] = self.price.to_dict()
|
80
|
+
# override the default output from pydantic by calling `to_dict()` of limit_price
|
81
|
+
if self.limit_price:
|
82
|
+
_dict['limitPrice'] = self.limit_price.to_dict()
|
83
|
+
# override the default output from pydantic by calling `to_dict()` of stop_price
|
84
|
+
if self.stop_price:
|
85
|
+
_dict['stopPrice'] = self.stop_price.to_dict()
|
86
|
+
# set to None if quantity (nullable) is None
|
87
|
+
# and __fields_set__ contains the field
|
88
|
+
if self.quantity is None and "quantity" in self.__fields_set__:
|
89
|
+
_dict['quantity'] = None
|
90
|
+
|
91
|
+
# set to None if properties (nullable) is None
|
92
|
+
# and __fields_set__ contains the field
|
93
|
+
if self.properties is None and "properties" in self.__fields_set__:
|
94
|
+
_dict['properties'] = None
|
95
|
+
|
96
|
+
return _dict
|
97
|
+
|
98
|
+
@classmethod
|
99
|
+
def from_dict(cls, obj: dict) -> OrderUpdateRequest:
|
100
|
+
"""Create an instance of OrderUpdateRequest from a dict"""
|
101
|
+
if obj is None:
|
102
|
+
return None
|
103
|
+
|
104
|
+
if not isinstance(obj, dict):
|
105
|
+
return OrderUpdateRequest.parse_obj(obj)
|
106
|
+
|
107
|
+
_obj = OrderUpdateRequest.parse_obj({
|
108
|
+
"id": ResourceId.from_dict(obj.get("id")) if obj.get("id") is not None else None,
|
109
|
+
"quantity": obj.get("quantity"),
|
110
|
+
"portfolio_id": ResourceId.from_dict(obj.get("portfolioId")) if obj.get("portfolioId") is not None else None,
|
111
|
+
"properties": dict(
|
112
|
+
(_k, PerpetualProperty.from_dict(_v))
|
113
|
+
for _k, _v in obj.get("properties").items()
|
114
|
+
)
|
115
|
+
if obj.get("properties") is not None
|
116
|
+
else None,
|
117
|
+
"price": CurrencyAndAmount.from_dict(obj.get("price")) if obj.get("price") is not None else None,
|
118
|
+
"limit_price": CurrencyAndAmount.from_dict(obj.get("limitPrice")) if obj.get("limitPrice") is not None else None,
|
119
|
+
"stop_price": CurrencyAndAmount.from_dict(obj.get("stopPrice")) if obj.get("stopPrice") is not None else None
|
120
|
+
})
|
121
|
+
return _obj
|
@@ -0,0 +1,113 @@
|
|
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
|
23
|
+
from lusid.models.link import Link
|
24
|
+
from lusid.models.valuation_point_overview import ValuationPointOverview
|
25
|
+
|
26
|
+
class PagedResourceListOfValuationPointOverview(BaseModel):
|
27
|
+
"""
|
28
|
+
PagedResourceListOfValuationPointOverview
|
29
|
+
"""
|
30
|
+
next_page: Optional[StrictStr] = Field(None, alias="nextPage")
|
31
|
+
previous_page: Optional[StrictStr] = Field(None, alias="previousPage")
|
32
|
+
values: conlist(ValuationPointOverview) = Field(...)
|
33
|
+
href: Optional[StrictStr] = None
|
34
|
+
links: Optional[conlist(Link)] = None
|
35
|
+
__properties = ["nextPage", "previousPage", "values", "href", "links"]
|
36
|
+
|
37
|
+
class Config:
|
38
|
+
"""Pydantic configuration"""
|
39
|
+
allow_population_by_field_name = True
|
40
|
+
validate_assignment = True
|
41
|
+
|
42
|
+
def to_str(self) -> str:
|
43
|
+
"""Returns the string representation of the model using alias"""
|
44
|
+
return pprint.pformat(self.dict(by_alias=True))
|
45
|
+
|
46
|
+
def to_json(self) -> str:
|
47
|
+
"""Returns the JSON representation of the model using alias"""
|
48
|
+
return json.dumps(self.to_dict())
|
49
|
+
|
50
|
+
@classmethod
|
51
|
+
def from_json(cls, json_str: str) -> PagedResourceListOfValuationPointOverview:
|
52
|
+
"""Create an instance of PagedResourceListOfValuationPointOverview from a JSON string"""
|
53
|
+
return cls.from_dict(json.loads(json_str))
|
54
|
+
|
55
|
+
def to_dict(self):
|
56
|
+
"""Returns the dictionary representation of the model using alias"""
|
57
|
+
_dict = self.dict(by_alias=True,
|
58
|
+
exclude={
|
59
|
+
},
|
60
|
+
exclude_none=True)
|
61
|
+
# override the default output from pydantic by calling `to_dict()` of each item in values (list)
|
62
|
+
_items = []
|
63
|
+
if self.values:
|
64
|
+
for _item in self.values:
|
65
|
+
if _item:
|
66
|
+
_items.append(_item.to_dict())
|
67
|
+
_dict['values'] = _items
|
68
|
+
# override the default output from pydantic by calling `to_dict()` of each item in links (list)
|
69
|
+
_items = []
|
70
|
+
if self.links:
|
71
|
+
for _item in self.links:
|
72
|
+
if _item:
|
73
|
+
_items.append(_item.to_dict())
|
74
|
+
_dict['links'] = _items
|
75
|
+
# set to None if next_page (nullable) is None
|
76
|
+
# and __fields_set__ contains the field
|
77
|
+
if self.next_page is None and "next_page" in self.__fields_set__:
|
78
|
+
_dict['nextPage'] = None
|
79
|
+
|
80
|
+
# set to None if previous_page (nullable) is None
|
81
|
+
# and __fields_set__ contains the field
|
82
|
+
if self.previous_page is None and "previous_page" in self.__fields_set__:
|
83
|
+
_dict['previousPage'] = None
|
84
|
+
|
85
|
+
# set to None if href (nullable) is None
|
86
|
+
# and __fields_set__ contains the field
|
87
|
+
if self.href is None and "href" in self.__fields_set__:
|
88
|
+
_dict['href'] = None
|
89
|
+
|
90
|
+
# set to None if links (nullable) is None
|
91
|
+
# and __fields_set__ contains the field
|
92
|
+
if self.links is None and "links" in self.__fields_set__:
|
93
|
+
_dict['links'] = None
|
94
|
+
|
95
|
+
return _dict
|
96
|
+
|
97
|
+
@classmethod
|
98
|
+
def from_dict(cls, obj: dict) -> PagedResourceListOfValuationPointOverview:
|
99
|
+
"""Create an instance of PagedResourceListOfValuationPointOverview from a dict"""
|
100
|
+
if obj is None:
|
101
|
+
return None
|
102
|
+
|
103
|
+
if not isinstance(obj, dict):
|
104
|
+
return PagedResourceListOfValuationPointOverview.parse_obj(obj)
|
105
|
+
|
106
|
+
_obj = PagedResourceListOfValuationPointOverview.parse_obj({
|
107
|
+
"next_page": obj.get("nextPage"),
|
108
|
+
"previous_page": obj.get("previousPage"),
|
109
|
+
"values": [ValuationPointOverview.from_dict(_item) for _item in obj.get("values")] if obj.get("values") is not None else None,
|
110
|
+
"href": obj.get("href"),
|
111
|
+
"links": [Link.from_dict(_item) for _item in obj.get("links")] if obj.get("links") is not None else None
|
112
|
+
})
|
113
|
+
return _obj
|