lusid-sdk 2.1.805__py3-none-any.whl → 2.1.807__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 +14 -0
- lusid/api/__init__.py +2 -0
- lusid/api/investor_records_api.py +218 -3
- lusid/api/transfer_agency_api.py +212 -0
- lusid/configuration.py +1 -1
- lusid/models/__init__.py +12 -0
- lusid/models/bucket.py +137 -0
- lusid/models/calculate_order_dates_request.py +118 -0
- lusid/models/calculate_order_dates_response.py +130 -0
- lusid/models/change_interval.py +8 -1
- lusid/models/change_interval_with_order_management_detail.py +8 -1
- lusid/models/economics.py +119 -0
- lusid/models/market_data_key_rule.py +3 -3
- lusid/models/market_data_specific_rule.py +3 -3
- lusid/models/market_quote.py +3 -3
- lusid/models/output_transaction.py +17 -2
- lusid/models/quote_series_id.py +3 -3
- lusid/models/quote_type.py +1 -0
- lusid/models/resource_list_of_investor_record.py +121 -0
- lusid/models/transaction_query_parameters.py +4 -2
- lusid/models/transfer_agency_dates.py +96 -0
- {lusid_sdk-2.1.805.dist-info → lusid_sdk-2.1.807.dist-info}/METADATA +10 -2
- {lusid_sdk-2.1.805.dist-info → lusid_sdk-2.1.807.dist-info}/RECORD +24 -17
- {lusid_sdk-2.1.805.dist-info → lusid_sdk-2.1.807.dist-info}/WHEEL +0 -0
lusid/models/__init__.py
CHANGED
@@ -120,9 +120,12 @@ from lusid.models.bool_list_compliance_parameter import BoolListComplianceParame
|
|
120
120
|
from lusid.models.branch_step import BranchStep
|
121
121
|
from lusid.models.branch_step_request import BranchStepRequest
|
122
122
|
from lusid.models.break_code_source import BreakCodeSource
|
123
|
+
from lusid.models.bucket import Bucket
|
123
124
|
from lusid.models.bucketed_cash_flow_request import BucketedCashFlowRequest
|
124
125
|
from lusid.models.bucketed_cash_flow_response import BucketedCashFlowResponse
|
125
126
|
from lusid.models.bucketing_schedule import BucketingSchedule
|
127
|
+
from lusid.models.calculate_order_dates_request import CalculateOrderDatesRequest
|
128
|
+
from lusid.models.calculate_order_dates_response import CalculateOrderDatesResponse
|
126
129
|
from lusid.models.calculation_info import CalculationInfo
|
127
130
|
from lusid.models.calendar import Calendar
|
128
131
|
from lusid.models.calendar_date import CalendarDate
|
@@ -350,6 +353,7 @@ from lusid.models.economic_dependency import EconomicDependency
|
|
350
353
|
from lusid.models.economic_dependency_type import EconomicDependencyType
|
351
354
|
from lusid.models.economic_dependency_with_complex_market_data import EconomicDependencyWithComplexMarketData
|
352
355
|
from lusid.models.economic_dependency_with_quote import EconomicDependencyWithQuote
|
356
|
+
from lusid.models.economics import Economics
|
353
357
|
from lusid.models.effective_range import EffectiveRange
|
354
358
|
from lusid.models.election_specification import ElectionSpecification
|
355
359
|
from lusid.models.eligibility_calculation import EligibilityCalculation
|
@@ -920,6 +924,7 @@ from lusid.models.resource_list_of_i_unit_definition_dto import ResourceListOfIU
|
|
920
924
|
from lusid.models.resource_list_of_instrument_cash_flow import ResourceListOfInstrumentCashFlow
|
921
925
|
from lusid.models.resource_list_of_instrument_event_holder import ResourceListOfInstrumentEventHolder
|
922
926
|
from lusid.models.resource_list_of_instrument_id_type_descriptor import ResourceListOfInstrumentIdTypeDescriptor
|
927
|
+
from lusid.models.resource_list_of_investor_record import ResourceListOfInvestorRecord
|
923
928
|
from lusid.models.resource_list_of_legal_entity import ResourceListOfLegalEntity
|
924
929
|
from lusid.models.resource_list_of_list_complex_market_data_with_meta_data_response import ResourceListOfListComplexMarketDataWithMetaDataResponse
|
925
930
|
from lusid.models.resource_list_of_mapping import ResourceListOfMapping
|
@@ -1093,6 +1098,7 @@ from lusid.models.transaction_type_movement import TransactionTypeMovement
|
|
1093
1098
|
from lusid.models.transaction_type_property_mapping import TransactionTypePropertyMapping
|
1094
1099
|
from lusid.models.transaction_type_request import TransactionTypeRequest
|
1095
1100
|
from lusid.models.transactions_reconciliations_response import TransactionsReconciliationsResponse
|
1101
|
+
from lusid.models.transfer_agency_dates import TransferAgencyDates
|
1096
1102
|
from lusid.models.transition_event import TransitionEvent
|
1097
1103
|
from lusid.models.translate_entities_inlined_request import TranslateEntitiesInlinedRequest
|
1098
1104
|
from lusid.models.translate_entities_request import TranslateEntitiesRequest
|
@@ -1342,9 +1348,12 @@ __all__ = [
|
|
1342
1348
|
"BranchStep",
|
1343
1349
|
"BranchStepRequest",
|
1344
1350
|
"BreakCodeSource",
|
1351
|
+
"Bucket",
|
1345
1352
|
"BucketedCashFlowRequest",
|
1346
1353
|
"BucketedCashFlowResponse",
|
1347
1354
|
"BucketingSchedule",
|
1355
|
+
"CalculateOrderDatesRequest",
|
1356
|
+
"CalculateOrderDatesResponse",
|
1348
1357
|
"CalculationInfo",
|
1349
1358
|
"Calendar",
|
1350
1359
|
"CalendarDate",
|
@@ -1572,6 +1581,7 @@ __all__ = [
|
|
1572
1581
|
"EconomicDependencyType",
|
1573
1582
|
"EconomicDependencyWithComplexMarketData",
|
1574
1583
|
"EconomicDependencyWithQuote",
|
1584
|
+
"Economics",
|
1575
1585
|
"EffectiveRange",
|
1576
1586
|
"ElectionSpecification",
|
1577
1587
|
"EligibilityCalculation",
|
@@ -2142,6 +2152,7 @@ __all__ = [
|
|
2142
2152
|
"ResourceListOfInstrumentCashFlow",
|
2143
2153
|
"ResourceListOfInstrumentEventHolder",
|
2144
2154
|
"ResourceListOfInstrumentIdTypeDescriptor",
|
2155
|
+
"ResourceListOfInvestorRecord",
|
2145
2156
|
"ResourceListOfLegalEntity",
|
2146
2157
|
"ResourceListOfListComplexMarketDataWithMetaDataResponse",
|
2147
2158
|
"ResourceListOfMapping",
|
@@ -2315,6 +2326,7 @@ __all__ = [
|
|
2315
2326
|
"TransactionTypePropertyMapping",
|
2316
2327
|
"TransactionTypeRequest",
|
2317
2328
|
"TransactionsReconciliationsResponse",
|
2329
|
+
"TransferAgencyDates",
|
2318
2330
|
"TransitionEvent",
|
2319
2331
|
"TranslateEntitiesInlinedRequest",
|
2320
2332
|
"TranslateEntitiesRequest",
|
lusid/models/bucket.py
ADDED
@@ -0,0 +1,137 @@
|
|
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 StrictStr, Field, BaseModel, Field, StrictFloat, StrictInt, StrictStr
|
23
|
+
from lusid.models.currency_and_amount import CurrencyAndAmount
|
24
|
+
|
25
|
+
class Bucket(BaseModel):
|
26
|
+
"""
|
27
|
+
Bucket
|
28
|
+
"""
|
29
|
+
tax_lot_id: Optional[StrictStr] = Field(None,alias="taxLotId", description="The identifier of the tax lot this bucket is for.")
|
30
|
+
movement_name: Optional[StrictStr] = Field(None,alias="movementName", description="The name of the movement.")
|
31
|
+
holding_type: Optional[StrictStr] = Field(None,alias="holdingType", description="The type of the holding.")
|
32
|
+
economic_bucket: Optional[StrictStr] = Field(None,alias="economicBucket", description="The economic bucket.")
|
33
|
+
economic_bucket_component: Optional[StrictStr] = Field(None,alias="economicBucketComponent", description="The economic bucket component.")
|
34
|
+
economic_bucket_variant: Optional[StrictStr] = Field(None,alias="economicBucketVariant", description="The economic bucket component.")
|
35
|
+
holding_sign: Optional[StrictStr] = Field(None,alias="holdingSign", description="The holding sign.")
|
36
|
+
local: Optional[CurrencyAndAmount] = None
|
37
|
+
base: Optional[CurrencyAndAmount] = None
|
38
|
+
units: Optional[Union[StrictFloat, StrictInt]] = Field(None, description="The units.")
|
39
|
+
__properties = ["taxLotId", "movementName", "holdingType", "economicBucket", "economicBucketComponent", "economicBucketVariant", "holdingSign", "local", "base", "units"]
|
40
|
+
|
41
|
+
class Config:
|
42
|
+
"""Pydantic configuration"""
|
43
|
+
allow_population_by_field_name = True
|
44
|
+
validate_assignment = True
|
45
|
+
|
46
|
+
def __str__(self):
|
47
|
+
"""For `print` and `pprint`"""
|
48
|
+
return pprint.pformat(self.dict(by_alias=False))
|
49
|
+
|
50
|
+
def __repr__(self):
|
51
|
+
"""For `print` and `pprint`"""
|
52
|
+
return self.to_str()
|
53
|
+
|
54
|
+
def to_str(self) -> str:
|
55
|
+
"""Returns the string representation of the model using alias"""
|
56
|
+
return pprint.pformat(self.dict(by_alias=True))
|
57
|
+
|
58
|
+
def to_json(self) -> str:
|
59
|
+
"""Returns the JSON representation of the model using alias"""
|
60
|
+
return json.dumps(self.to_dict())
|
61
|
+
|
62
|
+
@classmethod
|
63
|
+
def from_json(cls, json_str: str) -> Bucket:
|
64
|
+
"""Create an instance of Bucket from a JSON string"""
|
65
|
+
return cls.from_dict(json.loads(json_str))
|
66
|
+
|
67
|
+
def to_dict(self):
|
68
|
+
"""Returns the dictionary representation of the model using alias"""
|
69
|
+
_dict = self.dict(by_alias=True,
|
70
|
+
exclude={
|
71
|
+
},
|
72
|
+
exclude_none=True)
|
73
|
+
# override the default output from pydantic by calling `to_dict()` of local
|
74
|
+
if self.local:
|
75
|
+
_dict['local'] = self.local.to_dict()
|
76
|
+
# override the default output from pydantic by calling `to_dict()` of base
|
77
|
+
if self.base:
|
78
|
+
_dict['base'] = self.base.to_dict()
|
79
|
+
# set to None if tax_lot_id (nullable) is None
|
80
|
+
# and __fields_set__ contains the field
|
81
|
+
if self.tax_lot_id is None and "tax_lot_id" in self.__fields_set__:
|
82
|
+
_dict['taxLotId'] = None
|
83
|
+
|
84
|
+
# set to None if movement_name (nullable) is None
|
85
|
+
# and __fields_set__ contains the field
|
86
|
+
if self.movement_name is None and "movement_name" in self.__fields_set__:
|
87
|
+
_dict['movementName'] = None
|
88
|
+
|
89
|
+
# set to None if holding_type (nullable) is None
|
90
|
+
# and __fields_set__ contains the field
|
91
|
+
if self.holding_type is None and "holding_type" in self.__fields_set__:
|
92
|
+
_dict['holdingType'] = None
|
93
|
+
|
94
|
+
# set to None if economic_bucket (nullable) is None
|
95
|
+
# and __fields_set__ contains the field
|
96
|
+
if self.economic_bucket is None and "economic_bucket" in self.__fields_set__:
|
97
|
+
_dict['economicBucket'] = None
|
98
|
+
|
99
|
+
# set to None if economic_bucket_component (nullable) is None
|
100
|
+
# and __fields_set__ contains the field
|
101
|
+
if self.economic_bucket_component is None and "economic_bucket_component" in self.__fields_set__:
|
102
|
+
_dict['economicBucketComponent'] = None
|
103
|
+
|
104
|
+
# set to None if economic_bucket_variant (nullable) is None
|
105
|
+
# and __fields_set__ contains the field
|
106
|
+
if self.economic_bucket_variant is None and "economic_bucket_variant" in self.__fields_set__:
|
107
|
+
_dict['economicBucketVariant'] = None
|
108
|
+
|
109
|
+
# set to None if holding_sign (nullable) is None
|
110
|
+
# and __fields_set__ contains the field
|
111
|
+
if self.holding_sign is None and "holding_sign" in self.__fields_set__:
|
112
|
+
_dict['holdingSign'] = None
|
113
|
+
|
114
|
+
return _dict
|
115
|
+
|
116
|
+
@classmethod
|
117
|
+
def from_dict(cls, obj: dict) -> Bucket:
|
118
|
+
"""Create an instance of Bucket from a dict"""
|
119
|
+
if obj is None:
|
120
|
+
return None
|
121
|
+
|
122
|
+
if not isinstance(obj, dict):
|
123
|
+
return Bucket.parse_obj(obj)
|
124
|
+
|
125
|
+
_obj = Bucket.parse_obj({
|
126
|
+
"tax_lot_id": obj.get("taxLotId"),
|
127
|
+
"movement_name": obj.get("movementName"),
|
128
|
+
"holding_type": obj.get("holdingType"),
|
129
|
+
"economic_bucket": obj.get("economicBucket"),
|
130
|
+
"economic_bucket_component": obj.get("economicBucketComponent"),
|
131
|
+
"economic_bucket_variant": obj.get("economicBucketVariant"),
|
132
|
+
"holding_sign": obj.get("holdingSign"),
|
133
|
+
"local": CurrencyAndAmount.from_dict(obj.get("local")) if obj.get("local") is not None else None,
|
134
|
+
"base": CurrencyAndAmount.from_dict(obj.get("base")) if obj.get("base") is not None else None,
|
135
|
+
"units": obj.get("units")
|
136
|
+
})
|
137
|
+
return _obj
|
@@ -0,0 +1,118 @@
|
|
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 StrictStr, Field, BaseModel, Field, StrictStr, constr, validator
|
23
|
+
|
24
|
+
class CalculateOrderDatesRequest(BaseModel):
|
25
|
+
"""
|
26
|
+
CalculateOrderDatesRequest
|
27
|
+
"""
|
28
|
+
instrument_identifier_type: StrictStr = Field(...,alias="instrumentIdentifierType")
|
29
|
+
instrument_identifier: StrictStr = Field(...,alias="instrumentIdentifier")
|
30
|
+
instrument_scope: Optional[StrictStr] = Field(None,alias="instrumentScope")
|
31
|
+
received_date: Optional[datetime] = Field(None, alias="receivedDate")
|
32
|
+
price_date: Optional[datetime] = Field(None, alias="priceDate")
|
33
|
+
transaction_category: Optional[StrictStr] = Field(None,alias="transactionCategory")
|
34
|
+
liquidating_share_class_identifier: Optional[StrictStr] = Field(None,alias="liquidatingShareClassIdentifier")
|
35
|
+
liquidating_share_class_identifier_type: Optional[StrictStr] = Field(None,alias="liquidatingShareClassIdentifierType")
|
36
|
+
liquidating_share_class_instrument_scope: Optional[StrictStr] = Field(None,alias="liquidatingShareClassInstrumentScope")
|
37
|
+
__properties = ["instrumentIdentifierType", "instrumentIdentifier", "instrumentScope", "receivedDate", "priceDate", "transactionCategory", "liquidatingShareClassIdentifier", "liquidatingShareClassIdentifierType", "liquidatingShareClassInstrumentScope"]
|
38
|
+
|
39
|
+
class Config:
|
40
|
+
"""Pydantic configuration"""
|
41
|
+
allow_population_by_field_name = True
|
42
|
+
validate_assignment = True
|
43
|
+
|
44
|
+
def __str__(self):
|
45
|
+
"""For `print` and `pprint`"""
|
46
|
+
return pprint.pformat(self.dict(by_alias=False))
|
47
|
+
|
48
|
+
def __repr__(self):
|
49
|
+
"""For `print` and `pprint`"""
|
50
|
+
return self.to_str()
|
51
|
+
|
52
|
+
def to_str(self) -> str:
|
53
|
+
"""Returns the string representation of the model using alias"""
|
54
|
+
return pprint.pformat(self.dict(by_alias=True))
|
55
|
+
|
56
|
+
def to_json(self) -> str:
|
57
|
+
"""Returns the JSON representation of the model using alias"""
|
58
|
+
return json.dumps(self.to_dict())
|
59
|
+
|
60
|
+
@classmethod
|
61
|
+
def from_json(cls, json_str: str) -> CalculateOrderDatesRequest:
|
62
|
+
"""Create an instance of CalculateOrderDatesRequest from a JSON string"""
|
63
|
+
return cls.from_dict(json.loads(json_str))
|
64
|
+
|
65
|
+
def to_dict(self):
|
66
|
+
"""Returns the dictionary representation of the model using alias"""
|
67
|
+
_dict = self.dict(by_alias=True,
|
68
|
+
exclude={
|
69
|
+
},
|
70
|
+
exclude_none=True)
|
71
|
+
# set to None if instrument_scope (nullable) is None
|
72
|
+
# and __fields_set__ contains the field
|
73
|
+
if self.instrument_scope is None and "instrument_scope" in self.__fields_set__:
|
74
|
+
_dict['instrumentScope'] = None
|
75
|
+
|
76
|
+
# set to None if transaction_category (nullable) is None
|
77
|
+
# and __fields_set__ contains the field
|
78
|
+
if self.transaction_category is None and "transaction_category" in self.__fields_set__:
|
79
|
+
_dict['transactionCategory'] = None
|
80
|
+
|
81
|
+
# set to None if liquidating_share_class_identifier (nullable) is None
|
82
|
+
# and __fields_set__ contains the field
|
83
|
+
if self.liquidating_share_class_identifier is None and "liquidating_share_class_identifier" in self.__fields_set__:
|
84
|
+
_dict['liquidatingShareClassIdentifier'] = None
|
85
|
+
|
86
|
+
# set to None if liquidating_share_class_identifier_type (nullable) is None
|
87
|
+
# and __fields_set__ contains the field
|
88
|
+
if self.liquidating_share_class_identifier_type is None and "liquidating_share_class_identifier_type" in self.__fields_set__:
|
89
|
+
_dict['liquidatingShareClassIdentifierType'] = None
|
90
|
+
|
91
|
+
# set to None if liquidating_share_class_instrument_scope (nullable) is None
|
92
|
+
# and __fields_set__ contains the field
|
93
|
+
if self.liquidating_share_class_instrument_scope is None and "liquidating_share_class_instrument_scope" in self.__fields_set__:
|
94
|
+
_dict['liquidatingShareClassInstrumentScope'] = None
|
95
|
+
|
96
|
+
return _dict
|
97
|
+
|
98
|
+
@classmethod
|
99
|
+
def from_dict(cls, obj: dict) -> CalculateOrderDatesRequest:
|
100
|
+
"""Create an instance of CalculateOrderDatesRequest from a dict"""
|
101
|
+
if obj is None:
|
102
|
+
return None
|
103
|
+
|
104
|
+
if not isinstance(obj, dict):
|
105
|
+
return CalculateOrderDatesRequest.parse_obj(obj)
|
106
|
+
|
107
|
+
_obj = CalculateOrderDatesRequest.parse_obj({
|
108
|
+
"instrument_identifier_type": obj.get("instrumentIdentifierType"),
|
109
|
+
"instrument_identifier": obj.get("instrumentIdentifier"),
|
110
|
+
"instrument_scope": obj.get("instrumentScope"),
|
111
|
+
"received_date": obj.get("receivedDate"),
|
112
|
+
"price_date": obj.get("priceDate"),
|
113
|
+
"transaction_category": obj.get("transactionCategory"),
|
114
|
+
"liquidating_share_class_identifier": obj.get("liquidatingShareClassIdentifier"),
|
115
|
+
"liquidating_share_class_identifier_type": obj.get("liquidatingShareClassIdentifierType"),
|
116
|
+
"liquidating_share_class_instrument_scope": obj.get("liquidatingShareClassInstrumentScope")
|
117
|
+
})
|
118
|
+
return _obj
|
@@ -0,0 +1,130 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
|
3
|
+
"""
|
4
|
+
LUSID API
|
5
|
+
|
6
|
+
FINBOURNE Technology # noqa: E501
|
7
|
+
|
8
|
+
Contact: info@finbourne.com
|
9
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
10
|
+
|
11
|
+
Do not edit the class manually.
|
12
|
+
"""
|
13
|
+
|
14
|
+
|
15
|
+
from __future__ import annotations
|
16
|
+
import pprint
|
17
|
+
import re # noqa: F401
|
18
|
+
import json
|
19
|
+
|
20
|
+
|
21
|
+
from typing import Any, Dict, List, Optional
|
22
|
+
from pydantic.v1 import StrictStr, Field, BaseModel, Field, conlist
|
23
|
+
from lusid.models.error_detail import ErrorDetail
|
24
|
+
from lusid.models.link import Link
|
25
|
+
from lusid.models.transfer_agency_dates import TransferAgencyDates
|
26
|
+
|
27
|
+
class CalculateOrderDatesResponse(BaseModel):
|
28
|
+
"""
|
29
|
+
CalculateOrderDatesResponse
|
30
|
+
"""
|
31
|
+
successes: Optional[Dict[str, TransferAgencyDates]] = Field(None, description="A dictionary of successful date calculations, keyed by the request key.")
|
32
|
+
failed: Optional[Dict[str, ErrorDetail]] = Field(None, description="A dictionary of failed date calculations, keyed by the request key, containing the error details of any failures that occurred during the calculation.")
|
33
|
+
links: Optional[conlist(Link)] = None
|
34
|
+
__properties = ["successes", "failed", "links"]
|
35
|
+
|
36
|
+
class Config:
|
37
|
+
"""Pydantic configuration"""
|
38
|
+
allow_population_by_field_name = True
|
39
|
+
validate_assignment = True
|
40
|
+
|
41
|
+
def __str__(self):
|
42
|
+
"""For `print` and `pprint`"""
|
43
|
+
return pprint.pformat(self.dict(by_alias=False))
|
44
|
+
|
45
|
+
def __repr__(self):
|
46
|
+
"""For `print` and `pprint`"""
|
47
|
+
return self.to_str()
|
48
|
+
|
49
|
+
def to_str(self) -> str:
|
50
|
+
"""Returns the string representation of the model using alias"""
|
51
|
+
return pprint.pformat(self.dict(by_alias=True))
|
52
|
+
|
53
|
+
def to_json(self) -> str:
|
54
|
+
"""Returns the JSON representation of the model using alias"""
|
55
|
+
return json.dumps(self.to_dict())
|
56
|
+
|
57
|
+
@classmethod
|
58
|
+
def from_json(cls, json_str: str) -> CalculateOrderDatesResponse:
|
59
|
+
"""Create an instance of CalculateOrderDatesResponse from a JSON string"""
|
60
|
+
return cls.from_dict(json.loads(json_str))
|
61
|
+
|
62
|
+
def to_dict(self):
|
63
|
+
"""Returns the dictionary representation of the model using alias"""
|
64
|
+
_dict = self.dict(by_alias=True,
|
65
|
+
exclude={
|
66
|
+
},
|
67
|
+
exclude_none=True)
|
68
|
+
# override the default output from pydantic by calling `to_dict()` of each value in successes (dict)
|
69
|
+
_field_dict = {}
|
70
|
+
if self.successes:
|
71
|
+
for _key in self.successes:
|
72
|
+
if self.successes[_key]:
|
73
|
+
_field_dict[_key] = self.successes[_key].to_dict()
|
74
|
+
_dict['successes'] = _field_dict
|
75
|
+
# override the default output from pydantic by calling `to_dict()` of each value in failed (dict)
|
76
|
+
_field_dict = {}
|
77
|
+
if self.failed:
|
78
|
+
for _key in self.failed:
|
79
|
+
if self.failed[_key]:
|
80
|
+
_field_dict[_key] = self.failed[_key].to_dict()
|
81
|
+
_dict['failed'] = _field_dict
|
82
|
+
# override the default output from pydantic by calling `to_dict()` of each item in links (list)
|
83
|
+
_items = []
|
84
|
+
if self.links:
|
85
|
+
for _item in self.links:
|
86
|
+
if _item:
|
87
|
+
_items.append(_item.to_dict())
|
88
|
+
_dict['links'] = _items
|
89
|
+
# set to None if successes (nullable) is None
|
90
|
+
# and __fields_set__ contains the field
|
91
|
+
if self.successes is None and "successes" in self.__fields_set__:
|
92
|
+
_dict['successes'] = None
|
93
|
+
|
94
|
+
# set to None if failed (nullable) is None
|
95
|
+
# and __fields_set__ contains the field
|
96
|
+
if self.failed is None and "failed" in self.__fields_set__:
|
97
|
+
_dict['failed'] = None
|
98
|
+
|
99
|
+
# set to None if links (nullable) is None
|
100
|
+
# and __fields_set__ contains the field
|
101
|
+
if self.links is None and "links" in self.__fields_set__:
|
102
|
+
_dict['links'] = None
|
103
|
+
|
104
|
+
return _dict
|
105
|
+
|
106
|
+
@classmethod
|
107
|
+
def from_dict(cls, obj: dict) -> CalculateOrderDatesResponse:
|
108
|
+
"""Create an instance of CalculateOrderDatesResponse from a dict"""
|
109
|
+
if obj is None:
|
110
|
+
return None
|
111
|
+
|
112
|
+
if not isinstance(obj, dict):
|
113
|
+
return CalculateOrderDatesResponse.parse_obj(obj)
|
114
|
+
|
115
|
+
_obj = CalculateOrderDatesResponse.parse_obj({
|
116
|
+
"successes": dict(
|
117
|
+
(_k, TransferAgencyDates.from_dict(_v))
|
118
|
+
for _k, _v in obj.get("successes").items()
|
119
|
+
)
|
120
|
+
if obj.get("successes") is not None
|
121
|
+
else None,
|
122
|
+
"failed": dict(
|
123
|
+
(_k, ErrorDetail.from_dict(_v))
|
124
|
+
for _k, _v in obj.get("failed").items()
|
125
|
+
)
|
126
|
+
if obj.get("failed") is not None
|
127
|
+
else None,
|
128
|
+
"links": [Link.from_dict(_item) for _item in obj.get("links")] if obj.get("links") is not None else None
|
129
|
+
})
|
130
|
+
return _obj
|
lusid/models/change_interval.py
CHANGED
@@ -30,6 +30,7 @@ class ChangeInterval(BaseModel):
|
|
30
30
|
as_at_modified: Optional[datetime] = Field(None, alias="asAtModified", description="The date/time of the change.")
|
31
31
|
user_id_modified: Optional[StrictStr] = Field(None,alias="userIdModified", description="The unique identifier of the user that made the change.")
|
32
32
|
request_id_modified: Optional[StrictStr] = Field(None,alias="requestIdModified", description="The unique identifier of the request that the changes were part of.")
|
33
|
+
reason_modified: Optional[StrictStr] = Field(None,alias="reasonModified", description="The reason for an entity modification.")
|
33
34
|
as_at_version_number: Optional[StrictInt] = Field(None, 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.")
|
34
35
|
staged_modification_id_modified: Optional[StrictStr] = Field(None,alias="stagedModificationIdModified", description="The id of the staged modification that was approved. Will be null if the change didn't come from a staged modification.")
|
35
36
|
action: Optional[StrictStr] = Field(None,alias="action", description="The action performed on the field.")
|
@@ -37,7 +38,7 @@ class ChangeInterval(BaseModel):
|
|
37
38
|
previous_value: Optional[PropertyValue] = Field(None, alias="previousValue")
|
38
39
|
new_value: Optional[PropertyValue] = Field(None, alias="newValue")
|
39
40
|
effective_range: Optional[EffectiveRange] = Field(None, alias="effectiveRange")
|
40
|
-
__properties = ["asAtModified", "userIdModified", "requestIdModified", "asAtVersionNumber", "stagedModificationIdModified", "action", "attributeName", "previousValue", "newValue", "effectiveRange"]
|
41
|
+
__properties = ["asAtModified", "userIdModified", "requestIdModified", "reasonModified", "asAtVersionNumber", "stagedModificationIdModified", "action", "attributeName", "previousValue", "newValue", "effectiveRange"]
|
41
42
|
|
42
43
|
class Config:
|
43
44
|
"""Pydantic configuration"""
|
@@ -90,6 +91,11 @@ class ChangeInterval(BaseModel):
|
|
90
91
|
if self.request_id_modified is None and "request_id_modified" in self.__fields_set__:
|
91
92
|
_dict['requestIdModified'] = None
|
92
93
|
|
94
|
+
# set to None if reason_modified (nullable) is None
|
95
|
+
# and __fields_set__ contains the field
|
96
|
+
if self.reason_modified is None and "reason_modified" in self.__fields_set__:
|
97
|
+
_dict['reasonModified'] = None
|
98
|
+
|
93
99
|
# set to None if staged_modification_id_modified (nullable) is None
|
94
100
|
# and __fields_set__ contains the field
|
95
101
|
if self.staged_modification_id_modified is None and "staged_modification_id_modified" in self.__fields_set__:
|
@@ -120,6 +126,7 @@ class ChangeInterval(BaseModel):
|
|
120
126
|
"as_at_modified": obj.get("asAtModified"),
|
121
127
|
"user_id_modified": obj.get("userIdModified"),
|
122
128
|
"request_id_modified": obj.get("requestIdModified"),
|
129
|
+
"reason_modified": obj.get("reasonModified"),
|
123
130
|
"as_at_version_number": obj.get("asAtVersionNumber"),
|
124
131
|
"staged_modification_id_modified": obj.get("stagedModificationIdModified"),
|
125
132
|
"action": obj.get("action"),
|
@@ -32,6 +32,7 @@ class ChangeIntervalWithOrderManagementDetail(BaseModel):
|
|
32
32
|
as_at_modified: Optional[datetime] = Field(None, alias="asAtModified", description="The date/time of the change.")
|
33
33
|
user_id_modified: Optional[StrictStr] = Field(None,alias="userIdModified", description="The unique identifier of the user that made the change.")
|
34
34
|
request_id_modified: Optional[StrictStr] = Field(None,alias="requestIdModified", description="The unique identifier of the request that the changes were part of.")
|
35
|
+
reason_modified: Optional[StrictStr] = Field(None,alias="reasonModified", description="The reason for an entity modification.")
|
35
36
|
as_at_version_number: Optional[StrictInt] = Field(None, 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.")
|
36
37
|
staged_modification_id_modified: Optional[StrictStr] = Field(None,alias="stagedModificationIdModified", description="The id of the staged modification that was approved. Will be null if the change didn't come from a staged modification.")
|
37
38
|
action: Optional[StrictStr] = Field(None,alias="action", description="The action performed on the field.")
|
@@ -39,7 +40,7 @@ class ChangeIntervalWithOrderManagementDetail(BaseModel):
|
|
39
40
|
previous_value: Optional[PropertyValue] = Field(None, alias="previousValue")
|
40
41
|
new_value: Optional[PropertyValue] = Field(None, alias="newValue")
|
41
42
|
effective_range: Optional[EffectiveRange] = Field(None, alias="effectiveRange")
|
42
|
-
__properties = ["detail", "actionDescription", "asAtModified", "userIdModified", "requestIdModified", "asAtVersionNumber", "stagedModificationIdModified", "action", "attributeName", "previousValue", "newValue", "effectiveRange"]
|
43
|
+
__properties = ["detail", "actionDescription", "asAtModified", "userIdModified", "requestIdModified", "reasonModified", "asAtVersionNumber", "stagedModificationIdModified", "action", "attributeName", "previousValue", "newValue", "effectiveRange"]
|
43
44
|
|
44
45
|
class Config:
|
45
46
|
"""Pydantic configuration"""
|
@@ -102,6 +103,11 @@ class ChangeIntervalWithOrderManagementDetail(BaseModel):
|
|
102
103
|
if self.request_id_modified is None and "request_id_modified" in self.__fields_set__:
|
103
104
|
_dict['requestIdModified'] = None
|
104
105
|
|
106
|
+
# set to None if reason_modified (nullable) is None
|
107
|
+
# and __fields_set__ contains the field
|
108
|
+
if self.reason_modified is None and "reason_modified" in self.__fields_set__:
|
109
|
+
_dict['reasonModified'] = None
|
110
|
+
|
105
111
|
# set to None if staged_modification_id_modified (nullable) is None
|
106
112
|
# and __fields_set__ contains the field
|
107
113
|
if self.staged_modification_id_modified is None and "staged_modification_id_modified" in self.__fields_set__:
|
@@ -134,6 +140,7 @@ class ChangeIntervalWithOrderManagementDetail(BaseModel):
|
|
134
140
|
"as_at_modified": obj.get("asAtModified"),
|
135
141
|
"user_id_modified": obj.get("userIdModified"),
|
136
142
|
"request_id_modified": obj.get("requestIdModified"),
|
143
|
+
"reason_modified": obj.get("reasonModified"),
|
137
144
|
"as_at_version_number": obj.get("asAtVersionNumber"),
|
138
145
|
"staged_modification_id_modified": obj.get("stagedModificationIdModified"),
|
139
146
|
"action": obj.get("action"),
|
@@ -0,0 +1,119 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
|
3
|
+
"""
|
4
|
+
LUSID API
|
5
|
+
|
6
|
+
FINBOURNE Technology # noqa: E501
|
7
|
+
|
8
|
+
Contact: info@finbourne.com
|
9
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
10
|
+
|
11
|
+
Do not edit the class manually.
|
12
|
+
"""
|
13
|
+
|
14
|
+
|
15
|
+
from __future__ import annotations
|
16
|
+
import pprint
|
17
|
+
import re # noqa: F401
|
18
|
+
import json
|
19
|
+
|
20
|
+
|
21
|
+
from typing import Any, Dict, List, Optional
|
22
|
+
from pydantic.v1 import StrictStr, Field, BaseModel, Field, StrictStr, conlist, constr
|
23
|
+
from lusid.models.bucket import Bucket
|
24
|
+
from lusid.models.perpetual_property import PerpetualProperty
|
25
|
+
|
26
|
+
class Economics(BaseModel):
|
27
|
+
"""
|
28
|
+
Economics
|
29
|
+
"""
|
30
|
+
instrument_scope: Optional[StrictStr] = Field(None,alias="instrumentScope", description="The scope in which the instrument lies.")
|
31
|
+
lusid_instrument_id: StrictStr = Field(...,alias="lusidInstrumentId", description="The unique Lusid Instrument Id (LUID) of the instrument that economics are for.")
|
32
|
+
sub_holding_keys: Optional[Dict[str, PerpetualProperty]] = Field(None, alias="subHoldingKeys", description="The sub-holding properties which identify the Economic. Each property will be from the 'Transaction' domain. These are configured on a transaction portfolio.")
|
33
|
+
buckets: Optional[conlist(Bucket)] = Field(None, description="Set of economic data related with each of the side impact of the transaction.")
|
34
|
+
__properties = ["instrumentScope", "lusidInstrumentId", "subHoldingKeys", "buckets"]
|
35
|
+
|
36
|
+
class Config:
|
37
|
+
"""Pydantic configuration"""
|
38
|
+
allow_population_by_field_name = True
|
39
|
+
validate_assignment = True
|
40
|
+
|
41
|
+
def __str__(self):
|
42
|
+
"""For `print` and `pprint`"""
|
43
|
+
return pprint.pformat(self.dict(by_alias=False))
|
44
|
+
|
45
|
+
def __repr__(self):
|
46
|
+
"""For `print` and `pprint`"""
|
47
|
+
return self.to_str()
|
48
|
+
|
49
|
+
def to_str(self) -> str:
|
50
|
+
"""Returns the string representation of the model using alias"""
|
51
|
+
return pprint.pformat(self.dict(by_alias=True))
|
52
|
+
|
53
|
+
def to_json(self) -> str:
|
54
|
+
"""Returns the JSON representation of the model using alias"""
|
55
|
+
return json.dumps(self.to_dict())
|
56
|
+
|
57
|
+
@classmethod
|
58
|
+
def from_json(cls, json_str: str) -> Economics:
|
59
|
+
"""Create an instance of Economics from a JSON string"""
|
60
|
+
return cls.from_dict(json.loads(json_str))
|
61
|
+
|
62
|
+
def to_dict(self):
|
63
|
+
"""Returns the dictionary representation of the model using alias"""
|
64
|
+
_dict = self.dict(by_alias=True,
|
65
|
+
exclude={
|
66
|
+
},
|
67
|
+
exclude_none=True)
|
68
|
+
# override the default output from pydantic by calling `to_dict()` of each value in sub_holding_keys (dict)
|
69
|
+
_field_dict = {}
|
70
|
+
if self.sub_holding_keys:
|
71
|
+
for _key in self.sub_holding_keys:
|
72
|
+
if self.sub_holding_keys[_key]:
|
73
|
+
_field_dict[_key] = self.sub_holding_keys[_key].to_dict()
|
74
|
+
_dict['subHoldingKeys'] = _field_dict
|
75
|
+
# override the default output from pydantic by calling `to_dict()` of each item in buckets (list)
|
76
|
+
_items = []
|
77
|
+
if self.buckets:
|
78
|
+
for _item in self.buckets:
|
79
|
+
if _item:
|
80
|
+
_items.append(_item.to_dict())
|
81
|
+
_dict['buckets'] = _items
|
82
|
+
# set to None if instrument_scope (nullable) is None
|
83
|
+
# and __fields_set__ contains the field
|
84
|
+
if self.instrument_scope is None and "instrument_scope" in self.__fields_set__:
|
85
|
+
_dict['instrumentScope'] = None
|
86
|
+
|
87
|
+
# set to None if sub_holding_keys (nullable) is None
|
88
|
+
# and __fields_set__ contains the field
|
89
|
+
if self.sub_holding_keys is None and "sub_holding_keys" in self.__fields_set__:
|
90
|
+
_dict['subHoldingKeys'] = None
|
91
|
+
|
92
|
+
# set to None if buckets (nullable) is None
|
93
|
+
# and __fields_set__ contains the field
|
94
|
+
if self.buckets is None and "buckets" in self.__fields_set__:
|
95
|
+
_dict['buckets'] = None
|
96
|
+
|
97
|
+
return _dict
|
98
|
+
|
99
|
+
@classmethod
|
100
|
+
def from_dict(cls, obj: dict) -> Economics:
|
101
|
+
"""Create an instance of Economics from a dict"""
|
102
|
+
if obj is None:
|
103
|
+
return None
|
104
|
+
|
105
|
+
if not isinstance(obj, dict):
|
106
|
+
return Economics.parse_obj(obj)
|
107
|
+
|
108
|
+
_obj = Economics.parse_obj({
|
109
|
+
"instrument_scope": obj.get("instrumentScope"),
|
110
|
+
"lusid_instrument_id": obj.get("lusidInstrumentId"),
|
111
|
+
"sub_holding_keys": dict(
|
112
|
+
(_k, PerpetualProperty.from_dict(_v))
|
113
|
+
for _k, _v in obj.get("subHoldingKeys").items()
|
114
|
+
)
|
115
|
+
if obj.get("subHoldingKeys") is not None
|
116
|
+
else None,
|
117
|
+
"buckets": [Bucket.from_dict(_item) for _item in obj.get("buckets")] if obj.get("buckets") is not None else None
|
118
|
+
})
|
119
|
+
return _obj
|