lusid-sdk 2.1.948__py3-none-any.whl → 2.1.950__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 +8 -0
- lusid/api/investment_accounts_api.py +177 -0
- lusid/api/transaction_configuration_api.py +128 -32
- lusid/api/transaction_portfolios_api.py +212 -8
- lusid/configuration.py +1 -1
- lusid/models/__init__.py +8 -0
- lusid/models/closed_period.py +8 -1
- lusid/models/create_closed_period_request.py +9 -2
- lusid/models/interest_rate_swaption.py +20 -4
- lusid/models/output_transaction.py +8 -2
- lusid/models/portfolio_settlement_configuration.py +8 -2
- lusid/models/settlement_instruction_query.py +124 -0
- lusid/models/settlement_instruction_with_transaction.py +87 -0
- lusid/models/transaction_matching_alternative_id.py +77 -0
- lusid/models/versioned_resource_list_with_post_bodies_of_settlement_instruction_with_transaction_to_settlement_instruction_query.py +129 -0
- {lusid_sdk-2.1.948.dist-info → lusid_sdk-2.1.950.dist-info}/METADATA +7 -1
- {lusid_sdk-2.1.948.dist-info → lusid_sdk-2.1.950.dist-info}/RECORD +18 -14
- {lusid_sdk-2.1.948.dist-info → lusid_sdk-2.1.950.dist-info}/WHEEL +0 -0
|
@@ -61,6 +61,7 @@ from lusid.models.resource_list_of_portfolio_cash_flow import ResourceListOfPort
|
|
|
61
61
|
from lusid.models.resource_list_of_portfolio_cash_ladder import ResourceListOfPortfolioCashLadder
|
|
62
62
|
from lusid.models.resource_list_of_transaction import ResourceListOfTransaction
|
|
63
63
|
from lusid.models.resource_list_of_transaction_settlement_instruction import ResourceListOfTransactionSettlementInstruction
|
|
64
|
+
from lusid.models.settlement_instruction_query import SettlementInstructionQuery
|
|
64
65
|
from lusid.models.settlement_instruction_request import SettlementInstructionRequest
|
|
65
66
|
from lusid.models.transaction_query_parameters import TransactionQueryParameters
|
|
66
67
|
from lusid.models.transaction_request import TransactionRequest
|
|
@@ -73,6 +74,7 @@ from lusid.models.versioned_resource_list_of_holding_contributor import Versione
|
|
|
73
74
|
from lusid.models.versioned_resource_list_of_output_transaction import VersionedResourceListOfOutputTransaction
|
|
74
75
|
from lusid.models.versioned_resource_list_of_portfolio_holding import VersionedResourceListOfPortfolioHolding
|
|
75
76
|
from lusid.models.versioned_resource_list_of_transaction import VersionedResourceListOfTransaction
|
|
77
|
+
from lusid.models.versioned_resource_list_with_post_bodies_of_settlement_instruction_with_transaction_to_settlement_instruction_query import VersionedResourceListWithPostBodiesOfSettlementInstructionWithTransactionToSettlementInstructionQuery
|
|
76
78
|
from lusid.models.versioned_resource_list_with_warnings_of_portfolio_holding import VersionedResourceListWithWarningsOfPortfolioHolding
|
|
77
79
|
|
|
78
80
|
from lusid.api_client import ApiClient
|
|
@@ -1059,6 +1061,192 @@ class TransactionPortfoliosApi:
|
|
|
1059
1061
|
_request_auth=_params.get('_request_auth'))
|
|
1060
1062
|
|
|
1061
1063
|
|
|
1064
|
+
@overload
|
|
1065
|
+
async def build_settlement_instructions(self, scope : Annotated[StrictStr, Field(..., description="The scope of the transaction portfolio.")], code : Annotated[StrictStr, Field(..., description="The code of the transaction portfolio. Together with the scope this uniquely identifies the transaction portfolio.")], settlement_instruction_query : Annotated[SettlementInstructionQuery, Field(..., description="The queryParameters which control how the settlement instructions are built and returned.")], as_at : Annotated[Optional[datetime], Field(description="The asAt datetime at which to build the settlement instructions. Defaults to return the latest version of each transaction if not specified.")] = None, **kwargs) -> VersionedResourceListWithPostBodiesOfSettlementInstructionWithTransactionToSettlementInstructionQuery: # noqa: E501
|
|
1066
|
+
...
|
|
1067
|
+
|
|
1068
|
+
@overload
|
|
1069
|
+
def build_settlement_instructions(self, scope : Annotated[StrictStr, Field(..., description="The scope of the transaction portfolio.")], code : Annotated[StrictStr, Field(..., description="The code of the transaction portfolio. Together with the scope this uniquely identifies the transaction portfolio.")], settlement_instruction_query : Annotated[SettlementInstructionQuery, Field(..., description="The queryParameters which control how the settlement instructions are built and returned.")], as_at : Annotated[Optional[datetime], Field(description="The asAt datetime at which to build the settlement instructions. Defaults to return the latest version of each transaction if not specified.")] = None, async_req: Optional[bool]=True, **kwargs) -> VersionedResourceListWithPostBodiesOfSettlementInstructionWithTransactionToSettlementInstructionQuery: # noqa: E501
|
|
1070
|
+
...
|
|
1071
|
+
|
|
1072
|
+
@validate_arguments
|
|
1073
|
+
def build_settlement_instructions(self, scope : Annotated[StrictStr, Field(..., description="The scope of the transaction portfolio.")], code : Annotated[StrictStr, Field(..., description="The code of the transaction portfolio. Together with the scope this uniquely identifies the transaction portfolio.")], settlement_instruction_query : Annotated[SettlementInstructionQuery, Field(..., description="The queryParameters which control how the settlement instructions are built and returned.")], as_at : Annotated[Optional[datetime], Field(description="The asAt datetime at which to build the settlement instructions. Defaults to return the latest version of each transaction if not specified.")] = None, async_req: Optional[bool]=None, **kwargs) -> Union[VersionedResourceListWithPostBodiesOfSettlementInstructionWithTransactionToSettlementInstructionQuery, Awaitable[VersionedResourceListWithPostBodiesOfSettlementInstructionWithTransactionToSettlementInstructionQuery]]: # noqa: E501
|
|
1074
|
+
"""[EARLY ACCESS] BuildSettlementInstructions: Build Settlement Instructions # noqa: E501
|
|
1075
|
+
|
|
1076
|
+
Builds and returns all settlement instructions that have been loaded against this portfolio. # noqa: E501
|
|
1077
|
+
This method makes a synchronous HTTP request by default. To make an
|
|
1078
|
+
asynchronous HTTP request, please pass async_req=True
|
|
1079
|
+
|
|
1080
|
+
>>> thread = api.build_settlement_instructions(scope, code, settlement_instruction_query, as_at, async_req=True)
|
|
1081
|
+
>>> result = thread.get()
|
|
1082
|
+
|
|
1083
|
+
:param scope: The scope of the transaction portfolio. (required)
|
|
1084
|
+
:type scope: str
|
|
1085
|
+
:param code: The code of the transaction portfolio. Together with the scope this uniquely identifies the transaction portfolio. (required)
|
|
1086
|
+
:type code: str
|
|
1087
|
+
:param settlement_instruction_query: The queryParameters which control how the settlement instructions are built and returned. (required)
|
|
1088
|
+
:type settlement_instruction_query: SettlementInstructionQuery
|
|
1089
|
+
:param as_at: The asAt datetime at which to build the settlement instructions. Defaults to return the latest version of each transaction if not specified.
|
|
1090
|
+
:type as_at: datetime
|
|
1091
|
+
:param async_req: Whether to execute the request asynchronously.
|
|
1092
|
+
:type async_req: bool, optional
|
|
1093
|
+
:param _request_timeout: Timeout setting. Do not use - use the opts parameter instead
|
|
1094
|
+
:param opts: Configuration options for this request
|
|
1095
|
+
:type opts: ConfigurationOptions, optional
|
|
1096
|
+
:return: Returns the result object.
|
|
1097
|
+
If the method is called asynchronously,
|
|
1098
|
+
returns the request thread.
|
|
1099
|
+
:rtype: VersionedResourceListWithPostBodiesOfSettlementInstructionWithTransactionToSettlementInstructionQuery
|
|
1100
|
+
"""
|
|
1101
|
+
kwargs['_return_http_data_only'] = True
|
|
1102
|
+
if '_preload_content' in kwargs:
|
|
1103
|
+
message = "Error! Please call the build_settlement_instructions_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501
|
|
1104
|
+
raise ValueError(message)
|
|
1105
|
+
if async_req is not None:
|
|
1106
|
+
kwargs['async_req'] = async_req
|
|
1107
|
+
return self.build_settlement_instructions_with_http_info(scope, code, settlement_instruction_query, as_at, **kwargs) # noqa: E501
|
|
1108
|
+
|
|
1109
|
+
@validate_arguments
|
|
1110
|
+
def build_settlement_instructions_with_http_info(self, scope : Annotated[StrictStr, Field(..., description="The scope of the transaction portfolio.")], code : Annotated[StrictStr, Field(..., description="The code of the transaction portfolio. Together with the scope this uniquely identifies the transaction portfolio.")], settlement_instruction_query : Annotated[SettlementInstructionQuery, Field(..., description="The queryParameters which control how the settlement instructions are built and returned.")], as_at : Annotated[Optional[datetime], Field(description="The asAt datetime at which to build the settlement instructions. Defaults to return the latest version of each transaction if not specified.")] = None, **kwargs) -> ApiResponse: # noqa: E501
|
|
1111
|
+
"""[EARLY ACCESS] BuildSettlementInstructions: Build Settlement Instructions # noqa: E501
|
|
1112
|
+
|
|
1113
|
+
Builds and returns all settlement instructions that have been loaded against this portfolio. # noqa: E501
|
|
1114
|
+
This method makes a synchronous HTTP request by default. To make an
|
|
1115
|
+
asynchronous HTTP request, please pass async_req=True
|
|
1116
|
+
|
|
1117
|
+
>>> thread = api.build_settlement_instructions_with_http_info(scope, code, settlement_instruction_query, as_at, async_req=True)
|
|
1118
|
+
>>> result = thread.get()
|
|
1119
|
+
|
|
1120
|
+
:param scope: The scope of the transaction portfolio. (required)
|
|
1121
|
+
:type scope: str
|
|
1122
|
+
:param code: The code of the transaction portfolio. Together with the scope this uniquely identifies the transaction portfolio. (required)
|
|
1123
|
+
:type code: str
|
|
1124
|
+
:param settlement_instruction_query: The queryParameters which control how the settlement instructions are built and returned. (required)
|
|
1125
|
+
:type settlement_instruction_query: SettlementInstructionQuery
|
|
1126
|
+
:param as_at: The asAt datetime at which to build the settlement instructions. Defaults to return the latest version of each transaction if not specified.
|
|
1127
|
+
:type as_at: datetime
|
|
1128
|
+
:param async_req: Whether to execute the request asynchronously.
|
|
1129
|
+
:type async_req: bool, optional
|
|
1130
|
+
:param _preload_content: if False, the ApiResponse.data will
|
|
1131
|
+
be set to none and raw_data will store the
|
|
1132
|
+
HTTP response body without reading/decoding.
|
|
1133
|
+
Default is True.
|
|
1134
|
+
:type _preload_content: bool, optional
|
|
1135
|
+
:param _return_http_data_only: response data instead of ApiResponse
|
|
1136
|
+
object with status code, headers, etc
|
|
1137
|
+
:type _return_http_data_only: bool, optional
|
|
1138
|
+
:param _request_timeout: Timeout setting. Do not use - use the opts parameter instead
|
|
1139
|
+
:param opts: Configuration options for this request
|
|
1140
|
+
:type opts: ConfigurationOptions, optional
|
|
1141
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1142
|
+
request; this effectively ignores the authentication
|
|
1143
|
+
in the spec for a single request.
|
|
1144
|
+
:type _request_auth: dict, optional
|
|
1145
|
+
:type _content_type: string, optional: force content-type for the request
|
|
1146
|
+
:return: Returns the result object.
|
|
1147
|
+
If the method is called asynchronously,
|
|
1148
|
+
returns the request thread.
|
|
1149
|
+
:rtype: tuple(VersionedResourceListWithPostBodiesOfSettlementInstructionWithTransactionToSettlementInstructionQuery, status_code(int), headers(HTTPHeaderDict))
|
|
1150
|
+
"""
|
|
1151
|
+
|
|
1152
|
+
_params = locals()
|
|
1153
|
+
|
|
1154
|
+
_all_params = [
|
|
1155
|
+
'scope',
|
|
1156
|
+
'code',
|
|
1157
|
+
'settlement_instruction_query',
|
|
1158
|
+
'as_at'
|
|
1159
|
+
]
|
|
1160
|
+
_all_params.extend(
|
|
1161
|
+
[
|
|
1162
|
+
'async_req',
|
|
1163
|
+
'_return_http_data_only',
|
|
1164
|
+
'_preload_content',
|
|
1165
|
+
'_request_timeout',
|
|
1166
|
+
'_request_auth',
|
|
1167
|
+
'_content_type',
|
|
1168
|
+
'_headers',
|
|
1169
|
+
'opts'
|
|
1170
|
+
]
|
|
1171
|
+
)
|
|
1172
|
+
|
|
1173
|
+
# validate the arguments
|
|
1174
|
+
for _key, _val in _params['kwargs'].items():
|
|
1175
|
+
if _key not in _all_params:
|
|
1176
|
+
raise ApiTypeError(
|
|
1177
|
+
"Got an unexpected keyword argument '%s'"
|
|
1178
|
+
" to method build_settlement_instructions" % _key
|
|
1179
|
+
)
|
|
1180
|
+
_params[_key] = _val
|
|
1181
|
+
del _params['kwargs']
|
|
1182
|
+
|
|
1183
|
+
_collection_formats = {}
|
|
1184
|
+
|
|
1185
|
+
# process the path parameters
|
|
1186
|
+
_path_params = {}
|
|
1187
|
+
if _params['scope']:
|
|
1188
|
+
_path_params['scope'] = _params['scope']
|
|
1189
|
+
|
|
1190
|
+
if _params['code']:
|
|
1191
|
+
_path_params['code'] = _params['code']
|
|
1192
|
+
|
|
1193
|
+
|
|
1194
|
+
# process the query parameters
|
|
1195
|
+
_query_params = []
|
|
1196
|
+
if _params.get('as_at') is not None: # noqa: E501
|
|
1197
|
+
if isinstance(_params['as_at'], datetime):
|
|
1198
|
+
_query_params.append(('asAt', _params['as_at'].strftime(self.api_client.configuration.datetime_format)))
|
|
1199
|
+
else:
|
|
1200
|
+
_query_params.append(('asAt', _params['as_at']))
|
|
1201
|
+
|
|
1202
|
+
# process the header parameters
|
|
1203
|
+
_header_params = dict(_params.get('_headers', {}))
|
|
1204
|
+
# process the form parameters
|
|
1205
|
+
_form_params = []
|
|
1206
|
+
_files = {}
|
|
1207
|
+
# process the body parameter
|
|
1208
|
+
_body_params = None
|
|
1209
|
+
if _params['settlement_instruction_query'] is not None:
|
|
1210
|
+
_body_params = _params['settlement_instruction_query']
|
|
1211
|
+
|
|
1212
|
+
# set the HTTP header `Accept`
|
|
1213
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
1214
|
+
['text/plain', 'application/json', 'text/json']) # noqa: E501
|
|
1215
|
+
|
|
1216
|
+
# set the HTTP header `Content-Type`
|
|
1217
|
+
_content_types_list = _params.get('_content_type',
|
|
1218
|
+
self.api_client.select_header_content_type(
|
|
1219
|
+
['application/json-patch+json', 'application/json', 'text/json', 'application/*+json']))
|
|
1220
|
+
if _content_types_list:
|
|
1221
|
+
_header_params['Content-Type'] = _content_types_list
|
|
1222
|
+
|
|
1223
|
+
# authentication setting
|
|
1224
|
+
_auth_settings = ['oauth2'] # noqa: E501
|
|
1225
|
+
|
|
1226
|
+
_response_types_map = {
|
|
1227
|
+
'200': "VersionedResourceListWithPostBodiesOfSettlementInstructionWithTransactionToSettlementInstructionQuery",
|
|
1228
|
+
'400': "LusidValidationProblemDetails",
|
|
1229
|
+
}
|
|
1230
|
+
|
|
1231
|
+
return self.api_client.call_api(
|
|
1232
|
+
'/api/transactionportfolios/{scope}/{code}/settlementinstructions/$build', 'POST',
|
|
1233
|
+
_path_params,
|
|
1234
|
+
_query_params,
|
|
1235
|
+
_header_params,
|
|
1236
|
+
body=_body_params,
|
|
1237
|
+
post_params=_form_params,
|
|
1238
|
+
files=_files,
|
|
1239
|
+
response_types_map=_response_types_map,
|
|
1240
|
+
auth_settings=_auth_settings,
|
|
1241
|
+
async_req=_params.get('async_req'),
|
|
1242
|
+
_return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501
|
|
1243
|
+
_preload_content=_params.get('_preload_content', True),
|
|
1244
|
+
_request_timeout=_params.get('_request_timeout'),
|
|
1245
|
+
opts=_params.get('opts'),
|
|
1246
|
+
collection_formats=_collection_formats,
|
|
1247
|
+
_request_auth=_params.get('_request_auth'))
|
|
1248
|
+
|
|
1249
|
+
|
|
1062
1250
|
@overload
|
|
1063
1251
|
async def build_transactions(self, scope : Annotated[StrictStr, Field(..., description="The scope of the transaction portfolio.")], code : Annotated[StrictStr, Field(..., description="The code of the transaction portfolio. Together with the scope this uniquely identifies the transaction portfolio.")], transaction_query_parameters : Annotated[TransactionQueryParameters, Field(..., description="The query queryParameters which control how the output transactions are built.")], as_at : Annotated[Optional[datetime], Field(description="The asAt datetime at which to build the transactions. Defaults to return the latest version of each transaction if not specified.")] = None, filter : Annotated[Optional[StrictStr], Field( description="Expression to filter the result set. For example, to return only transactions with a transaction type of 'Buy', specify \"type eq 'Buy'\". For more information about filtering LUSID results, see https://support.lusid.com/knowledgebase/article/KA-01914.")] = None, property_keys : Annotated[Optional[conlist(StrictStr)], Field(description="A list of property keys from the \"Instrument\" or \"Transaction\" domain to decorate onto the transactions. These take the format {domain}/{scope}/{code} e.g. \"Instrument/system/Name\" or \"Transaction/strategy/quantsignal\".")] = None, limit : Annotated[Optional[StrictInt], Field(description="When paginating, limit the number of returned results to this many. Defaults to 100 if not specified.")] = None, page : Annotated[Optional[StrictStr], Field( description="The pagination token to use to continue listing transactions from a previous call to BuildTransactions.")] = None, **kwargs) -> VersionedResourceListOfOutputTransaction: # noqa: E501
|
|
1064
1252
|
...
|
|
@@ -7126,22 +7314,22 @@ class TransactionPortfoliosApi:
|
|
|
7126
7314
|
|
|
7127
7315
|
|
|
7128
7316
|
@overload
|
|
7129
|
-
async def preview_transaction(self, scope : Annotated[StrictStr, Field(..., description="The scope of the transaction portfolio.")], code : Annotated[StrictStr, Field(..., description="The code of the transaction portfolio. Together with the scope this uniquely identifies the transaction portfolio.")], transaction_request : Annotated[TransactionRequest, Field(..., description="The transaction to be previewed.")], property_keys : Annotated[Optional[conlist(StrictStr)], Field(description="A list of property keys from the \"Instrument\" or \"Transaction\" domain to decorate onto the transactions. These take the format {domain}/{scope}/{code} e.g. \"Instrument/system/Name\" or \"Transaction/strategy/quantsignal\".")] = None, show_cancelled_transactions : Annotated[Optional[StrictBool], Field(description="Option to specify whether to include previous versions of an amended transaction in the response. Defaults to False if not specified.")] = None, preserve_properties : Annotated[Optional[StrictBool], Field(description="If the preview transaction is an amendment to an existing transaction, then setting this to true will carry forward any unmodified properties from the earlier version.")] = None, **kwargs) -> ResourceListOfOutputTransaction: # noqa: E501
|
|
7317
|
+
async def preview_transaction(self, scope : Annotated[StrictStr, Field(..., description="The scope of the transaction portfolio.")], code : Annotated[StrictStr, Field(..., description="The code of the transaction portfolio. Together with the scope this uniquely identifies the transaction portfolio.")], transaction_request : Annotated[TransactionRequest, Field(..., description="The transaction to be previewed.")], property_keys : Annotated[Optional[conlist(StrictStr)], Field(description="A list of property keys from the \"Instrument\" or \"Transaction\" domain to decorate onto the transactions. These take the format {domain}/{scope}/{code} e.g. \"Instrument/system/Name\" or \"Transaction/strategy/quantsignal\".")] = None, show_cancelled_transactions : Annotated[Optional[StrictBool], Field(description="Option to specify whether to include previous versions of an amended transaction in the response. Defaults to False if not specified.")] = None, preserve_properties : Annotated[Optional[StrictBool], Field(description="If the preview transaction is an amendment to an existing transaction, then setting this to true will carry forward any unmodified properties from the earlier version.")] = None, data_model_scope : Annotated[Optional[StrictStr], Field( description="The optional scope of a Custom Data Model to use")] = None, data_model_code : Annotated[Optional[StrictStr], Field( description="The optional code of a Custom Data Model to use")] = None, **kwargs) -> ResourceListOfOutputTransaction: # noqa: E501
|
|
7130
7318
|
...
|
|
7131
7319
|
|
|
7132
7320
|
@overload
|
|
7133
|
-
def preview_transaction(self, scope : Annotated[StrictStr, Field(..., description="The scope of the transaction portfolio.")], code : Annotated[StrictStr, Field(..., description="The code of the transaction portfolio. Together with the scope this uniquely identifies the transaction portfolio.")], transaction_request : Annotated[TransactionRequest, Field(..., description="The transaction to be previewed.")], property_keys : Annotated[Optional[conlist(StrictStr)], Field(description="A list of property keys from the \"Instrument\" or \"Transaction\" domain to decorate onto the transactions. These take the format {domain}/{scope}/{code} e.g. \"Instrument/system/Name\" or \"Transaction/strategy/quantsignal\".")] = None, show_cancelled_transactions : Annotated[Optional[StrictBool], Field(description="Option to specify whether to include previous versions of an amended transaction in the response. Defaults to False if not specified.")] = None, preserve_properties : Annotated[Optional[StrictBool], Field(description="If the preview transaction is an amendment to an existing transaction, then setting this to true will carry forward any unmodified properties from the earlier version.")] = None, async_req: Optional[bool]=True, **kwargs) -> ResourceListOfOutputTransaction: # noqa: E501
|
|
7321
|
+
def preview_transaction(self, scope : Annotated[StrictStr, Field(..., description="The scope of the transaction portfolio.")], code : Annotated[StrictStr, Field(..., description="The code of the transaction portfolio. Together with the scope this uniquely identifies the transaction portfolio.")], transaction_request : Annotated[TransactionRequest, Field(..., description="The transaction to be previewed.")], property_keys : Annotated[Optional[conlist(StrictStr)], Field(description="A list of property keys from the \"Instrument\" or \"Transaction\" domain to decorate onto the transactions. These take the format {domain}/{scope}/{code} e.g. \"Instrument/system/Name\" or \"Transaction/strategy/quantsignal\".")] = None, show_cancelled_transactions : Annotated[Optional[StrictBool], Field(description="Option to specify whether to include previous versions of an amended transaction in the response. Defaults to False if not specified.")] = None, preserve_properties : Annotated[Optional[StrictBool], Field(description="If the preview transaction is an amendment to an existing transaction, then setting this to true will carry forward any unmodified properties from the earlier version.")] = None, data_model_scope : Annotated[Optional[StrictStr], Field( description="The optional scope of a Custom Data Model to use")] = None, data_model_code : Annotated[Optional[StrictStr], Field( description="The optional code of a Custom Data Model to use")] = None, async_req: Optional[bool]=True, **kwargs) -> ResourceListOfOutputTransaction: # noqa: E501
|
|
7134
7322
|
...
|
|
7135
7323
|
|
|
7136
7324
|
@validate_arguments
|
|
7137
|
-
def preview_transaction(self, scope : Annotated[StrictStr, Field(..., description="The scope of the transaction portfolio.")], code : Annotated[StrictStr, Field(..., description="The code of the transaction portfolio. Together with the scope this uniquely identifies the transaction portfolio.")], transaction_request : Annotated[TransactionRequest, Field(..., description="The transaction to be previewed.")], property_keys : Annotated[Optional[conlist(StrictStr)], Field(description="A list of property keys from the \"Instrument\" or \"Transaction\" domain to decorate onto the transactions. These take the format {domain}/{scope}/{code} e.g. \"Instrument/system/Name\" or \"Transaction/strategy/quantsignal\".")] = None, show_cancelled_transactions : Annotated[Optional[StrictBool], Field(description="Option to specify whether to include previous versions of an amended transaction in the response. Defaults to False if not specified.")] = None, preserve_properties : Annotated[Optional[StrictBool], Field(description="If the preview transaction is an amendment to an existing transaction, then setting this to true will carry forward any unmodified properties from the earlier version.")] = None, async_req: Optional[bool]=None, **kwargs) -> Union[ResourceListOfOutputTransaction, Awaitable[ResourceListOfOutputTransaction]]: # noqa: E501
|
|
7325
|
+
def preview_transaction(self, scope : Annotated[StrictStr, Field(..., description="The scope of the transaction portfolio.")], code : Annotated[StrictStr, Field(..., description="The code of the transaction portfolio. Together with the scope this uniquely identifies the transaction portfolio.")], transaction_request : Annotated[TransactionRequest, Field(..., description="The transaction to be previewed.")], property_keys : Annotated[Optional[conlist(StrictStr)], Field(description="A list of property keys from the \"Instrument\" or \"Transaction\" domain to decorate onto the transactions. These take the format {domain}/{scope}/{code} e.g. \"Instrument/system/Name\" or \"Transaction/strategy/quantsignal\".")] = None, show_cancelled_transactions : Annotated[Optional[StrictBool], Field(description="Option to specify whether to include previous versions of an amended transaction in the response. Defaults to False if not specified.")] = None, preserve_properties : Annotated[Optional[StrictBool], Field(description="If the preview transaction is an amendment to an existing transaction, then setting this to true will carry forward any unmodified properties from the earlier version.")] = None, data_model_scope : Annotated[Optional[StrictStr], Field( description="The optional scope of a Custom Data Model to use")] = None, data_model_code : Annotated[Optional[StrictStr], Field( description="The optional code of a Custom Data Model to use")] = None, async_req: Optional[bool]=None, **kwargs) -> Union[ResourceListOfOutputTransaction, Awaitable[ResourceListOfOutputTransaction]]: # noqa: E501
|
|
7138
7326
|
"""PreviewTransaction: Preview a transaction # noqa: E501
|
|
7139
7327
|
|
|
7140
7328
|
Returns the output-transaction(s) - e.g. as returned by BuildTransactions that would come out of LUSID if the provided TransactionRequest was booked. # noqa: E501
|
|
7141
7329
|
This method makes a synchronous HTTP request by default. To make an
|
|
7142
7330
|
asynchronous HTTP request, please pass async_req=True
|
|
7143
7331
|
|
|
7144
|
-
>>> thread = api.preview_transaction(scope, code, transaction_request, property_keys, show_cancelled_transactions, preserve_properties, async_req=True)
|
|
7332
|
+
>>> thread = api.preview_transaction(scope, code, transaction_request, property_keys, show_cancelled_transactions, preserve_properties, data_model_scope, data_model_code, async_req=True)
|
|
7145
7333
|
>>> result = thread.get()
|
|
7146
7334
|
|
|
7147
7335
|
:param scope: The scope of the transaction portfolio. (required)
|
|
@@ -7156,6 +7344,10 @@ class TransactionPortfoliosApi:
|
|
|
7156
7344
|
:type show_cancelled_transactions: bool
|
|
7157
7345
|
:param preserve_properties: If the preview transaction is an amendment to an existing transaction, then setting this to true will carry forward any unmodified properties from the earlier version.
|
|
7158
7346
|
:type preserve_properties: bool
|
|
7347
|
+
:param data_model_scope: The optional scope of a Custom Data Model to use
|
|
7348
|
+
:type data_model_scope: str
|
|
7349
|
+
:param data_model_code: The optional code of a Custom Data Model to use
|
|
7350
|
+
:type data_model_code: str
|
|
7159
7351
|
:param async_req: Whether to execute the request asynchronously.
|
|
7160
7352
|
:type async_req: bool, optional
|
|
7161
7353
|
:param _request_timeout: Timeout setting. Do not use - use the opts parameter instead
|
|
@@ -7172,17 +7364,17 @@ class TransactionPortfoliosApi:
|
|
|
7172
7364
|
raise ValueError(message)
|
|
7173
7365
|
if async_req is not None:
|
|
7174
7366
|
kwargs['async_req'] = async_req
|
|
7175
|
-
return self.preview_transaction_with_http_info(scope, code, transaction_request, property_keys, show_cancelled_transactions, preserve_properties, **kwargs) # noqa: E501
|
|
7367
|
+
return self.preview_transaction_with_http_info(scope, code, transaction_request, property_keys, show_cancelled_transactions, preserve_properties, data_model_scope, data_model_code, **kwargs) # noqa: E501
|
|
7176
7368
|
|
|
7177
7369
|
@validate_arguments
|
|
7178
|
-
def preview_transaction_with_http_info(self, scope : Annotated[StrictStr, Field(..., description="The scope of the transaction portfolio.")], code : Annotated[StrictStr, Field(..., description="The code of the transaction portfolio. Together with the scope this uniquely identifies the transaction portfolio.")], transaction_request : Annotated[TransactionRequest, Field(..., description="The transaction to be previewed.")], property_keys : Annotated[Optional[conlist(StrictStr)], Field(description="A list of property keys from the \"Instrument\" or \"Transaction\" domain to decorate onto the transactions. These take the format {domain}/{scope}/{code} e.g. \"Instrument/system/Name\" or \"Transaction/strategy/quantsignal\".")] = None, show_cancelled_transactions : Annotated[Optional[StrictBool], Field(description="Option to specify whether to include previous versions of an amended transaction in the response. Defaults to False if not specified.")] = None, preserve_properties : Annotated[Optional[StrictBool], Field(description="If the preview transaction is an amendment to an existing transaction, then setting this to true will carry forward any unmodified properties from the earlier version.")] = None, **kwargs) -> ApiResponse: # noqa: E501
|
|
7370
|
+
def preview_transaction_with_http_info(self, scope : Annotated[StrictStr, Field(..., description="The scope of the transaction portfolio.")], code : Annotated[StrictStr, Field(..., description="The code of the transaction portfolio. Together with the scope this uniquely identifies the transaction portfolio.")], transaction_request : Annotated[TransactionRequest, Field(..., description="The transaction to be previewed.")], property_keys : Annotated[Optional[conlist(StrictStr)], Field(description="A list of property keys from the \"Instrument\" or \"Transaction\" domain to decorate onto the transactions. These take the format {domain}/{scope}/{code} e.g. \"Instrument/system/Name\" or \"Transaction/strategy/quantsignal\".")] = None, show_cancelled_transactions : Annotated[Optional[StrictBool], Field(description="Option to specify whether to include previous versions of an amended transaction in the response. Defaults to False if not specified.")] = None, preserve_properties : Annotated[Optional[StrictBool], Field(description="If the preview transaction is an amendment to an existing transaction, then setting this to true will carry forward any unmodified properties from the earlier version.")] = None, data_model_scope : Annotated[Optional[StrictStr], Field( description="The optional scope of a Custom Data Model to use")] = None, data_model_code : Annotated[Optional[StrictStr], Field( description="The optional code of a Custom Data Model to use")] = None, **kwargs) -> ApiResponse: # noqa: E501
|
|
7179
7371
|
"""PreviewTransaction: Preview a transaction # noqa: E501
|
|
7180
7372
|
|
|
7181
7373
|
Returns the output-transaction(s) - e.g. as returned by BuildTransactions that would come out of LUSID if the provided TransactionRequest was booked. # noqa: E501
|
|
7182
7374
|
This method makes a synchronous HTTP request by default. To make an
|
|
7183
7375
|
asynchronous HTTP request, please pass async_req=True
|
|
7184
7376
|
|
|
7185
|
-
>>> thread = api.preview_transaction_with_http_info(scope, code, transaction_request, property_keys, show_cancelled_transactions, preserve_properties, async_req=True)
|
|
7377
|
+
>>> thread = api.preview_transaction_with_http_info(scope, code, transaction_request, property_keys, show_cancelled_transactions, preserve_properties, data_model_scope, data_model_code, async_req=True)
|
|
7186
7378
|
>>> result = thread.get()
|
|
7187
7379
|
|
|
7188
7380
|
:param scope: The scope of the transaction portfolio. (required)
|
|
@@ -7197,6 +7389,10 @@ class TransactionPortfoliosApi:
|
|
|
7197
7389
|
:type show_cancelled_transactions: bool
|
|
7198
7390
|
:param preserve_properties: If the preview transaction is an amendment to an existing transaction, then setting this to true will carry forward any unmodified properties from the earlier version.
|
|
7199
7391
|
:type preserve_properties: bool
|
|
7392
|
+
:param data_model_scope: The optional scope of a Custom Data Model to use
|
|
7393
|
+
:type data_model_scope: str
|
|
7394
|
+
:param data_model_code: The optional code of a Custom Data Model to use
|
|
7395
|
+
:type data_model_code: str
|
|
7200
7396
|
:param async_req: Whether to execute the request asynchronously.
|
|
7201
7397
|
:type async_req: bool, optional
|
|
7202
7398
|
:param _preload_content: if False, the ApiResponse.data will
|
|
@@ -7229,7 +7425,9 @@ class TransactionPortfoliosApi:
|
|
|
7229
7425
|
'transaction_request',
|
|
7230
7426
|
'property_keys',
|
|
7231
7427
|
'show_cancelled_transactions',
|
|
7232
|
-
'preserve_properties'
|
|
7428
|
+
'preserve_properties',
|
|
7429
|
+
'data_model_scope',
|
|
7430
|
+
'data_model_code'
|
|
7233
7431
|
]
|
|
7234
7432
|
_all_params.extend(
|
|
7235
7433
|
[
|
|
@@ -7277,6 +7475,12 @@ class TransactionPortfoliosApi:
|
|
|
7277
7475
|
if _params.get('preserve_properties') is not None: # noqa: E501
|
|
7278
7476
|
_query_params.append(('preserveProperties', _params['preserve_properties']))
|
|
7279
7477
|
|
|
7478
|
+
if _params.get('data_model_scope') is not None: # noqa: E501
|
|
7479
|
+
_query_params.append(('dataModelScope', _params['data_model_scope']))
|
|
7480
|
+
|
|
7481
|
+
if _params.get('data_model_code') is not None: # noqa: E501
|
|
7482
|
+
_query_params.append(('dataModelCode', _params['data_model_code']))
|
|
7483
|
+
|
|
7280
7484
|
# process the header parameters
|
|
7281
7485
|
_header_params = dict(_params.get('_headers', {}))
|
|
7282
7486
|
# process the form parameters
|
lusid/configuration.py
CHANGED
|
@@ -445,7 +445,7 @@ class Configuration:
|
|
|
445
445
|
return "Python SDK Debug Report:\n"\
|
|
446
446
|
"OS: {env}\n"\
|
|
447
447
|
"Python Version: {pyversion}\n"\
|
|
448
|
-
"Version of the API: 0.11.
|
|
448
|
+
"Version of the API: 0.11.8290\n"\
|
|
449
449
|
"SDK Package Version: {package_version}".\
|
|
450
450
|
format(env=sys.platform, pyversion=sys.version, package_version=package_version)
|
|
451
451
|
|
lusid/models/__init__.py
CHANGED
|
@@ -1054,7 +1054,9 @@ from lusid.models.set_transaction_configuration_alias import SetTransactionConfi
|
|
|
1054
1054
|
from lusid.models.set_transaction_configuration_source_request import SetTransactionConfigurationSourceRequest
|
|
1055
1055
|
from lusid.models.settlement_configuration_category import SettlementConfigurationCategory
|
|
1056
1056
|
from lusid.models.settlement_cycle import SettlementCycle
|
|
1057
|
+
from lusid.models.settlement_instruction_query import SettlementInstructionQuery
|
|
1057
1058
|
from lusid.models.settlement_instruction_request import SettlementInstructionRequest
|
|
1059
|
+
from lusid.models.settlement_instruction_with_transaction import SettlementInstructionWithTransaction
|
|
1058
1060
|
from lusid.models.settlement_schedule import SettlementSchedule
|
|
1059
1061
|
from lusid.models.share_class_amount import ShareClassAmount
|
|
1060
1062
|
from lusid.models.share_class_breakdown import ShareClassBreakdown
|
|
@@ -1128,6 +1130,7 @@ from lusid.models.transaction_currency_and_amount import TransactionCurrencyAndA
|
|
|
1128
1130
|
from lusid.models.transaction_date_windows import TransactionDateWindows
|
|
1129
1131
|
from lusid.models.transaction_diagnostics import TransactionDiagnostics
|
|
1130
1132
|
from lusid.models.transaction_field_map import TransactionFieldMap
|
|
1133
|
+
from lusid.models.transaction_matching_alternative_id import TransactionMatchingAlternativeId
|
|
1131
1134
|
from lusid.models.transaction_price import TransactionPrice
|
|
1132
1135
|
from lusid.models.transaction_price_and_type import TransactionPriceAndType
|
|
1133
1136
|
from lusid.models.transaction_price_type import TransactionPriceType
|
|
@@ -1285,6 +1288,7 @@ from lusid.models.versioned_resource_list_of_output_transaction import Versioned
|
|
|
1285
1288
|
from lusid.models.versioned_resource_list_of_portfolio_holding import VersionedResourceListOfPortfolioHolding
|
|
1286
1289
|
from lusid.models.versioned_resource_list_of_transaction import VersionedResourceListOfTransaction
|
|
1287
1290
|
from lusid.models.versioned_resource_list_of_trial_balance import VersionedResourceListOfTrialBalance
|
|
1291
|
+
from lusid.models.versioned_resource_list_with_post_bodies_of_settlement_instruction_with_transaction_to_settlement_instruction_query import VersionedResourceListWithPostBodiesOfSettlementInstructionWithTransactionToSettlementInstructionQuery
|
|
1288
1292
|
from lusid.models.versioned_resource_list_with_warnings_of_portfolio_holding import VersionedResourceListWithWarningsOfPortfolioHolding
|
|
1289
1293
|
from lusid.models.virtual_document import VirtualDocument
|
|
1290
1294
|
from lusid.models.virtual_document_row import VirtualDocumentRow
|
|
@@ -2346,7 +2350,9 @@ __all__ = [
|
|
|
2346
2350
|
"SetTransactionConfigurationSourceRequest",
|
|
2347
2351
|
"SettlementConfigurationCategory",
|
|
2348
2352
|
"SettlementCycle",
|
|
2353
|
+
"SettlementInstructionQuery",
|
|
2349
2354
|
"SettlementInstructionRequest",
|
|
2355
|
+
"SettlementInstructionWithTransaction",
|
|
2350
2356
|
"SettlementSchedule",
|
|
2351
2357
|
"ShareClassAmount",
|
|
2352
2358
|
"ShareClassBreakdown",
|
|
@@ -2420,6 +2426,7 @@ __all__ = [
|
|
|
2420
2426
|
"TransactionDateWindows",
|
|
2421
2427
|
"TransactionDiagnostics",
|
|
2422
2428
|
"TransactionFieldMap",
|
|
2429
|
+
"TransactionMatchingAlternativeId",
|
|
2423
2430
|
"TransactionPrice",
|
|
2424
2431
|
"TransactionPriceAndType",
|
|
2425
2432
|
"TransactionPriceType",
|
|
@@ -2577,6 +2584,7 @@ __all__ = [
|
|
|
2577
2584
|
"VersionedResourceListOfPortfolioHolding",
|
|
2578
2585
|
"VersionedResourceListOfTransaction",
|
|
2579
2586
|
"VersionedResourceListOfTrialBalance",
|
|
2587
|
+
"VersionedResourceListWithPostBodiesOfSettlementInstructionWithTransactionToSettlementInstructionQuery",
|
|
2580
2588
|
"VersionedResourceListWithWarningsOfPortfolioHolding",
|
|
2581
2589
|
"VirtualDocument",
|
|
2582
2590
|
"VirtualDocumentRow",
|
lusid/models/closed_period.py
CHANGED
|
@@ -38,9 +38,10 @@ class ClosedPeriod(BaseModel):
|
|
|
38
38
|
properties: Optional[Dict[str, ModelProperty]] = Field(None, description="The Closed Periods properties. These will be from the 'ClosedPeriod' domain.")
|
|
39
39
|
version: Optional[Version] = None
|
|
40
40
|
post_close_activities: Optional[conlist(PostCloseActivity)] = Field(None, alias="postCloseActivities", description="All the post close activities for the closed period.")
|
|
41
|
+
holdings_as_at_closed_override: Optional[datetime] = Field(None, alias="holdingsAsAtClosedOverride", description="The optional AsAtClosed Override to use for building holdings in the Closed Period.If not specified, the AsAtClosed on the Closed Period will be used.")
|
|
41
42
|
href: Optional[StrictStr] = Field(None,alias="href", description="The specific Uniform Resource Identifier (URI) for this resource at the requested asAt datetime.")
|
|
42
43
|
links: Optional[conlist(Link)] = None
|
|
43
|
-
__properties = ["closedPeriodId", "displayName", "description", "effectiveStart", "effectiveEnd", "asAtClosed", "properties", "version", "postCloseActivities", "href", "links"]
|
|
44
|
+
__properties = ["closedPeriodId", "displayName", "description", "effectiveStart", "effectiveEnd", "asAtClosed", "properties", "version", "postCloseActivities", "holdingsAsAtClosedOverride", "href", "links"]
|
|
44
45
|
|
|
45
46
|
class Config:
|
|
46
47
|
"""Pydantic configuration"""
|
|
@@ -123,6 +124,11 @@ class ClosedPeriod(BaseModel):
|
|
|
123
124
|
if self.post_close_activities is None and "post_close_activities" in self.__fields_set__:
|
|
124
125
|
_dict['postCloseActivities'] = None
|
|
125
126
|
|
|
127
|
+
# set to None if holdings_as_at_closed_override (nullable) is None
|
|
128
|
+
# and __fields_set__ contains the field
|
|
129
|
+
if self.holdings_as_at_closed_override is None and "holdings_as_at_closed_override" in self.__fields_set__:
|
|
130
|
+
_dict['holdingsAsAtClosedOverride'] = None
|
|
131
|
+
|
|
126
132
|
# set to None if href (nullable) is None
|
|
127
133
|
# and __fields_set__ contains the field
|
|
128
134
|
if self.href is None and "href" in self.__fields_set__:
|
|
@@ -159,6 +165,7 @@ class ClosedPeriod(BaseModel):
|
|
|
159
165
|
else None,
|
|
160
166
|
"version": Version.from_dict(obj.get("version")) if obj.get("version") is not None else None,
|
|
161
167
|
"post_close_activities": [PostCloseActivity.from_dict(_item) for _item in obj.get("postCloseActivities")] if obj.get("postCloseActivities") is not None else None,
|
|
168
|
+
"holdings_as_at_closed_override": obj.get("holdingsAsAtClosedOverride"),
|
|
162
169
|
"href": obj.get("href"),
|
|
163
170
|
"links": [Link.from_dict(_item) for _item in obj.get("links")] if obj.get("links") is not None else None
|
|
164
171
|
})
|
|
@@ -32,7 +32,8 @@ class CreateClosedPeriodRequest(BaseModel):
|
|
|
32
32
|
as_at_closed: Optional[datetime] = Field(None, alias="asAtClosed", description="The asAt closed datetime for the Closed Period")
|
|
33
33
|
display_name: Optional[StrictStr] = Field(None,alias="displayName", description="The name of the Closed Period.")
|
|
34
34
|
description: Optional[StrictStr] = Field(None,alias="description", description="A description for the Closed Period.")
|
|
35
|
-
|
|
35
|
+
holdings_as_at_closed_override: Optional[datetime] = Field(None, alias="holdingsAsAtClosedOverride", description="The optional AsAtClosed Override to use for building holdings in the Closed Period.If not specified, the AsAtClosed on the Closed Period will be used.")
|
|
36
|
+
__properties = ["closedPeriodId", "effectiveEnd", "properties", "asAtClosed", "displayName", "description", "holdingsAsAtClosedOverride"]
|
|
36
37
|
|
|
37
38
|
class Config:
|
|
38
39
|
"""Pydantic configuration"""
|
|
@@ -93,6 +94,11 @@ class CreateClosedPeriodRequest(BaseModel):
|
|
|
93
94
|
if self.description is None and "description" in self.__fields_set__:
|
|
94
95
|
_dict['description'] = None
|
|
95
96
|
|
|
97
|
+
# set to None if holdings_as_at_closed_override (nullable) is None
|
|
98
|
+
# and __fields_set__ contains the field
|
|
99
|
+
if self.holdings_as_at_closed_override is None and "holdings_as_at_closed_override" in self.__fields_set__:
|
|
100
|
+
_dict['holdingsAsAtClosedOverride'] = None
|
|
101
|
+
|
|
96
102
|
return _dict
|
|
97
103
|
|
|
98
104
|
@classmethod
|
|
@@ -115,6 +121,7 @@ class CreateClosedPeriodRequest(BaseModel):
|
|
|
115
121
|
else None,
|
|
116
122
|
"as_at_closed": obj.get("asAtClosed"),
|
|
117
123
|
"display_name": obj.get("displayName"),
|
|
118
|
-
"description": obj.get("description")
|
|
124
|
+
"description": obj.get("description"),
|
|
125
|
+
"holdings_as_at_closed_override": obj.get("holdingsAsAtClosedOverride")
|
|
119
126
|
})
|
|
120
127
|
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, Optional
|
|
22
|
-
from pydantic.v1 import StrictStr, Field, Field, StrictStr, constr, validator
|
|
21
|
+
from typing import Any, Dict, List, Optional
|
|
22
|
+
from pydantic.v1 import StrictStr, Field, Field, StrictInt, StrictStr, conlist, constr, validator
|
|
23
23
|
from lusid.models.interest_rate_swap import InterestRateSwap
|
|
24
24
|
from lusid.models.lusid_instrument import LusidInstrument
|
|
25
25
|
from lusid.models.premium import Premium
|
|
@@ -36,9 +36,12 @@ class InterestRateSwaption(LusidInstrument):
|
|
|
36
36
|
swap: Optional[InterestRateSwap] = None
|
|
37
37
|
time_zone_conventions: Optional[TimeZoneConventions] = Field(None, alias="timeZoneConventions")
|
|
38
38
|
underlying: Optional[LusidInstrument] = None
|
|
39
|
+
delivery_days: Optional[StrictInt] = Field(None, alias="deliveryDays", description="Number of business days between exercise date and settlement of the option payoff or underlying. Defaults to 0.")
|
|
40
|
+
business_day_convention: Optional[StrictStr] = Field(None,alias="businessDayConvention", description="Business day convention for option exercise date to settlement date calculation. Supported string (enumeration) values are: [NoAdjustment, Previous, P, Following, F, ModifiedPrevious, MP, ModifiedFollowing, MF, HalfMonthModifiedFollowing, Nearest]. Defaults to \"F\".")
|
|
41
|
+
settlement_calendars: Optional[conlist(StrictStr)] = Field(None, alias="settlementCalendars", description="Holiday calendars for option exercise date to settlement date calculation.")
|
|
39
42
|
instrument_type: StrictStr = Field(...,alias="instrumentType", description="The available values are: QuotedSecurity, InterestRateSwap, FxForward, Future, ExoticInstrument, FxOption, CreditDefaultSwap, InterestRateSwaption, Bond, EquityOption, FixedLeg, FloatingLeg, BespokeCashFlowsLeg, Unknown, TermDeposit, ContractForDifference, EquitySwap, CashPerpetual, CapFloor, CashSettled, CdsIndex, Basket, FundingLeg, FxSwap, ForwardRateAgreement, SimpleInstrument, Repo, Equity, ExchangeTradedOption, ReferenceInstrument, ComplexBond, InflationLinkedBond, InflationSwap, SimpleCashFlowLoan, TotalReturnSwap, InflationLeg, FundShareClass, FlexibleLoan, UnsettledCash, Cash, MasteredInstrument, LoanFacility, FlexibleDeposit, FlexibleRepo")
|
|
40
43
|
additional_properties: Dict[str, Any] = {}
|
|
41
|
-
__properties = ["instrumentType", "startDate", "payOrReceiveFixed", "premium", "deliveryMethod", "swap", "timeZoneConventions", "underlying"]
|
|
44
|
+
__properties = ["instrumentType", "startDate", "payOrReceiveFixed", "premium", "deliveryMethod", "swap", "timeZoneConventions", "underlying", "deliveryDays", "businessDayConvention", "settlementCalendars"]
|
|
42
45
|
|
|
43
46
|
@validator('instrument_type')
|
|
44
47
|
def instrument_type_validate_enum(cls, value):
|
|
@@ -149,6 +152,16 @@ class InterestRateSwaption(LusidInstrument):
|
|
|
149
152
|
for _key, _value in self.additional_properties.items():
|
|
150
153
|
_dict[_key] = _value
|
|
151
154
|
|
|
155
|
+
# set to None if business_day_convention (nullable) is None
|
|
156
|
+
# and __fields_set__ contains the field
|
|
157
|
+
if self.business_day_convention is None and "business_day_convention" in self.__fields_set__:
|
|
158
|
+
_dict['businessDayConvention'] = None
|
|
159
|
+
|
|
160
|
+
# set to None if settlement_calendars (nullable) is None
|
|
161
|
+
# and __fields_set__ contains the field
|
|
162
|
+
if self.settlement_calendars is None and "settlement_calendars" in self.__fields_set__:
|
|
163
|
+
_dict['settlementCalendars'] = None
|
|
164
|
+
|
|
152
165
|
return _dict
|
|
153
166
|
|
|
154
167
|
@classmethod
|
|
@@ -168,7 +181,10 @@ class InterestRateSwaption(LusidInstrument):
|
|
|
168
181
|
"delivery_method": obj.get("deliveryMethod"),
|
|
169
182
|
"swap": InterestRateSwap.from_dict(obj.get("swap")) if obj.get("swap") is not None else None,
|
|
170
183
|
"time_zone_conventions": TimeZoneConventions.from_dict(obj.get("timeZoneConventions")) if obj.get("timeZoneConventions") is not None else None,
|
|
171
|
-
"underlying": LusidInstrument.from_dict(obj.get("underlying")) if obj.get("underlying") is not None else None
|
|
184
|
+
"underlying": LusidInstrument.from_dict(obj.get("underlying")) if obj.get("underlying") is not None else None,
|
|
185
|
+
"delivery_days": obj.get("deliveryDays"),
|
|
186
|
+
"business_day_convention": obj.get("businessDayConvention"),
|
|
187
|
+
"settlement_calendars": obj.get("settlementCalendars")
|
|
172
188
|
})
|
|
173
189
|
# store additional fields in additional_properties
|
|
174
190
|
for _key in obj.keys():
|
|
@@ -22,6 +22,7 @@ from typing import Any, Dict, List, Optional, Union
|
|
|
22
22
|
from pydantic.v1 import StrictStr, Field, BaseModel, Field, StrictFloat, StrictInt, StrictStr, conlist, constr, validator
|
|
23
23
|
from lusid.models.currency_and_amount import CurrencyAndAmount
|
|
24
24
|
from lusid.models.custodian_account import CustodianAccount
|
|
25
|
+
from lusid.models.data_model_membership import DataModelMembership
|
|
25
26
|
from lusid.models.economics import Economics
|
|
26
27
|
from lusid.models.otc_confirmation import OtcConfirmation
|
|
27
28
|
from lusid.models.perpetual_property import PerpetualProperty
|
|
@@ -68,7 +69,8 @@ class OutputTransaction(BaseModel):
|
|
|
68
69
|
allocation_id: Optional[ResourceId] = Field(None, alias="allocationId")
|
|
69
70
|
accounting_date: Optional[datetime] = Field(None, alias="accountingDate", description="The accounting date of the transaction.")
|
|
70
71
|
economics: Optional[conlist(Economics)] = Field(None, description="Set of economic data related with the transaction impacts.")
|
|
71
|
-
|
|
72
|
+
data_model_membership: Optional[DataModelMembership] = Field(None, alias="dataModelMembership")
|
|
73
|
+
__properties = ["transactionId", "type", "description", "instrumentIdentifiers", "instrumentScope", "instrumentUid", "transactionDate", "settlementDate", "units", "transactionAmount", "transactionPrice", "totalConsideration", "exchangeRate", "transactionToPortfolioRate", "transactionCurrency", "properties", "counterpartyId", "source", "transactionStatus", "entryDateTime", "cancelDateTime", "realisedGainLoss", "holdingIds", "sourceType", "sourceInstrumentEventId", "custodianAccount", "transactionGroupId", "resolvedTransactionTypeDetails", "grossTransactionAmount", "otcConfirmation", "orderId", "allocationId", "accountingDate", "economics", "dataModelMembership"]
|
|
72
74
|
|
|
73
75
|
@validator('transaction_status')
|
|
74
76
|
def transaction_status_validate_enum(cls, value):
|
|
@@ -206,6 +208,9 @@ class OutputTransaction(BaseModel):
|
|
|
206
208
|
if _item:
|
|
207
209
|
_items.append(_item.to_dict())
|
|
208
210
|
_dict['economics'] = _items
|
|
211
|
+
# override the default output from pydantic by calling `to_dict()` of data_model_membership
|
|
212
|
+
if self.data_model_membership:
|
|
213
|
+
_dict['dataModelMembership'] = self.data_model_membership.to_dict()
|
|
209
214
|
# set to None if description (nullable) is None
|
|
210
215
|
# and __fields_set__ contains the field
|
|
211
216
|
if self.description is None and "description" in self.__fields_set__:
|
|
@@ -336,6 +341,7 @@ class OutputTransaction(BaseModel):
|
|
|
336
341
|
"order_id": ResourceId.from_dict(obj.get("orderId")) if obj.get("orderId") is not None else None,
|
|
337
342
|
"allocation_id": ResourceId.from_dict(obj.get("allocationId")) if obj.get("allocationId") is not None else None,
|
|
338
343
|
"accounting_date": obj.get("accountingDate"),
|
|
339
|
-
"economics": [Economics.from_dict(_item) for _item in obj.get("economics")] if obj.get("economics") is not None else None
|
|
344
|
+
"economics": [Economics.from_dict(_item) for _item in obj.get("economics")] if obj.get("economics") is not None else None,
|
|
345
|
+
"data_model_membership": DataModelMembership.from_dict(obj.get("dataModelMembership")) if obj.get("dataModelMembership") is not None else None
|
|
340
346
|
})
|
|
341
347
|
return _obj
|
|
@@ -21,6 +21,7 @@ import json
|
|
|
21
21
|
from typing import Any, Dict, Optional
|
|
22
22
|
from pydantic.v1 import StrictStr, Field, BaseModel, Field
|
|
23
23
|
from lusid.models.settlement_configuration_category import SettlementConfigurationCategory
|
|
24
|
+
from lusid.models.transaction_matching_alternative_id import TransactionMatchingAlternativeId
|
|
24
25
|
|
|
25
26
|
class PortfolioSettlementConfiguration(BaseModel):
|
|
26
27
|
"""
|
|
@@ -29,7 +30,8 @@ class PortfolioSettlementConfiguration(BaseModel):
|
|
|
29
30
|
stock_settlement: Optional[SettlementConfigurationCategory] = Field(None, alias="stockSettlement")
|
|
30
31
|
cash_settlement: Optional[SettlementConfigurationCategory] = Field(None, alias="cashSettlement")
|
|
31
32
|
deferred_cash_receipt: Optional[SettlementConfigurationCategory] = Field(None, alias="deferredCashReceipt")
|
|
32
|
-
|
|
33
|
+
transaction_matching_alternative_id: Optional[TransactionMatchingAlternativeId] = Field(None, alias="transactionMatchingAlternativeId")
|
|
34
|
+
__properties = ["stockSettlement", "cashSettlement", "deferredCashReceipt", "transactionMatchingAlternativeId"]
|
|
33
35
|
|
|
34
36
|
class Config:
|
|
35
37
|
"""Pydantic configuration"""
|
|
@@ -72,6 +74,9 @@ class PortfolioSettlementConfiguration(BaseModel):
|
|
|
72
74
|
# override the default output from pydantic by calling `to_dict()` of deferred_cash_receipt
|
|
73
75
|
if self.deferred_cash_receipt:
|
|
74
76
|
_dict['deferredCashReceipt'] = self.deferred_cash_receipt.to_dict()
|
|
77
|
+
# override the default output from pydantic by calling `to_dict()` of transaction_matching_alternative_id
|
|
78
|
+
if self.transaction_matching_alternative_id:
|
|
79
|
+
_dict['transactionMatchingAlternativeId'] = self.transaction_matching_alternative_id.to_dict()
|
|
75
80
|
return _dict
|
|
76
81
|
|
|
77
82
|
@classmethod
|
|
@@ -86,6 +91,7 @@ class PortfolioSettlementConfiguration(BaseModel):
|
|
|
86
91
|
_obj = PortfolioSettlementConfiguration.parse_obj({
|
|
87
92
|
"stock_settlement": SettlementConfigurationCategory.from_dict(obj.get("stockSettlement")) if obj.get("stockSettlement") is not None else None,
|
|
88
93
|
"cash_settlement": SettlementConfigurationCategory.from_dict(obj.get("cashSettlement")) if obj.get("cashSettlement") is not None else None,
|
|
89
|
-
"deferred_cash_receipt": SettlementConfigurationCategory.from_dict(obj.get("deferredCashReceipt")) if obj.get("deferredCashReceipt") is not None else None
|
|
94
|
+
"deferred_cash_receipt": SettlementConfigurationCategory.from_dict(obj.get("deferredCashReceipt")) if obj.get("deferredCashReceipt") is not None else None,
|
|
95
|
+
"transaction_matching_alternative_id": TransactionMatchingAlternativeId.from_dict(obj.get("transactionMatchingAlternativeId")) if obj.get("transactionMatchingAlternativeId") is not None else None
|
|
90
96
|
})
|
|
91
97
|
return _obj
|