lusid-sdk 2.1.462__py3-none-any.whl → 2.1.537__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (104) hide show
  1. lusid/__init__.py +62 -0
  2. lusid/api/group_reconciliations_api.py +806 -79
  3. lusid/api/instruments_api.py +187 -0
  4. lusid/api/transaction_portfolios_api.py +202 -2
  5. lusid/configuration.py +1 -1
  6. lusid/models/__init__.py +62 -0
  7. lusid/models/accumulation_event.py +3 -3
  8. lusid/models/amortisation_event.py +3 -3
  9. lusid/models/applicable_instrument_event.py +7 -2
  10. lusid/models/asset_leg.py +1 -1
  11. lusid/models/batch_update_user_review_for_comparison_result_request.py +81 -0
  12. lusid/models/batch_update_user_review_for_comparison_result_response.py +146 -0
  13. lusid/models/bond_coupon_event.py +10 -5
  14. lusid/models/bond_default_event.py +3 -3
  15. lusid/models/bond_principal_event.py +10 -5
  16. lusid/models/bonus_issue_event.py +3 -3
  17. lusid/models/call_on_intermediate_securities_event.py +139 -0
  18. lusid/models/capital_distribution_event.py +3 -3
  19. lusid/models/cash_dividend_event.py +3 -3
  20. lusid/models/cash_flow_event.py +3 -3
  21. lusid/models/cds_credit_event.py +3 -3
  22. lusid/models/cdx_credit_event.py +3 -3
  23. lusid/models/close_event.py +3 -3
  24. lusid/models/comparison_attribute_value_pair.py +71 -0
  25. lusid/models/component_transaction.py +10 -3
  26. lusid/models/create_staging_rule_set_request.py +1 -6
  27. lusid/models/credit_premium_cash_flow_event.py +3 -3
  28. lusid/models/custodian_account_request.py +1 -1
  29. lusid/models/delete_instrument_properties_response.py +7 -1
  30. lusid/models/delete_instrument_response.py +7 -1
  31. lusid/models/delete_instruments_response.py +22 -1
  32. lusid/models/deleted_entity_response.py +7 -1
  33. lusid/models/dividend_option_event.py +3 -3
  34. lusid/models/dividend_reinvestment_event.py +9 -4
  35. lusid/models/equity_option.py +19 -4
  36. lusid/models/exchange_traded_option_contract_details.py +1 -1
  37. lusid/models/exercise_event.py +3 -3
  38. lusid/models/expiry_event.py +3 -3
  39. lusid/models/fee.py +10 -3
  40. lusid/models/fee_request.py +13 -6
  41. lusid/models/future_expiry_event.py +3 -3
  42. lusid/models/fx_forward_settlement_event.py +3 -3
  43. lusid/models/group_reconciliation_aggregate_attribute_values.py +86 -0
  44. lusid/models/group_reconciliation_comparison_result.py +148 -0
  45. lusid/models/group_reconciliation_core_attribute_values.py +86 -0
  46. lusid/models/group_reconciliation_date_pair.py +81 -0
  47. lusid/models/group_reconciliation_dates.py +78 -0
  48. lusid/models/group_reconciliation_instance_id.py +71 -0
  49. lusid/models/group_reconciliation_result_statuses.py +89 -0
  50. lusid/models/group_reconciliation_result_types.py +96 -0
  51. lusid/models/group_reconciliation_review_statuses.py +96 -0
  52. lusid/models/group_reconciliation_run_details.py +76 -0
  53. lusid/models/group_reconciliation_run_request.py +75 -0
  54. lusid/models/group_reconciliation_run_response.py +77 -0
  55. lusid/models/group_reconciliation_summary.py +121 -0
  56. lusid/models/group_reconciliation_user_review.py +112 -0
  57. lusid/models/group_reconciliation_user_review_add.py +88 -0
  58. lusid/models/group_reconciliation_user_review_break_code.py +80 -0
  59. lusid/models/group_reconciliation_user_review_comment.py +80 -0
  60. lusid/models/group_reconciliation_user_review_match_key.py +80 -0
  61. lusid/models/group_reconciliation_user_review_remove.py +88 -0
  62. lusid/models/informational_error_event.py +3 -3
  63. lusid/models/informational_event.py +3 -3
  64. lusid/models/instrument_event.py +10 -5
  65. lusid/models/instrument_event_type.py +5 -0
  66. lusid/models/intermediate_securities_distribution_event.py +140 -0
  67. lusid/models/maturity_event.py +3 -3
  68. lusid/models/mbs_coupon_event.py +10 -5
  69. lusid/models/mbs_interest_deferral_event.py +10 -5
  70. lusid/models/mbs_interest_shortfall_event.py +10 -5
  71. lusid/models/mbs_principal_event.py +10 -5
  72. lusid/models/mbs_principal_write_off_event.py +10 -5
  73. lusid/models/merger_event.py +3 -3
  74. lusid/models/new_instrument.py +1 -1
  75. lusid/models/open_event.py +3 -3
  76. lusid/models/option_exercise_cash_event.py +144 -0
  77. lusid/models/option_exercise_election.py +73 -0
  78. lusid/models/option_exercise_physical_event.py +149 -0
  79. lusid/models/paged_resource_list_of_group_reconciliation_comparison_result.py +113 -0
  80. lusid/models/pricing_options.py +8 -2
  81. lusid/models/protection_payout_cash_flow_event.py +102 -0
  82. lusid/models/raw_vendor_event.py +3 -3
  83. lusid/models/reset_event.py +3 -3
  84. lusid/models/resource_list_of_output_transaction.py +113 -0
  85. lusid/models/return_zero_pv_options.py +69 -0
  86. lusid/models/reverse_stock_split_event.py +3 -3
  87. lusid/models/scrip_dividend_event.py +3 -3
  88. lusid/models/spin_off_event.py +3 -3
  89. lusid/models/stock_dividend_event.py +3 -3
  90. lusid/models/stock_split_event.py +3 -3
  91. lusid/models/swap_cash_flow_event.py +3 -3
  92. lusid/models/swap_principal_event.py +3 -3
  93. lusid/models/target_tax_lot.py +23 -2
  94. lusid/models/target_tax_lot_request.py +23 -2
  95. lusid/models/tender_event.py +3 -3
  96. lusid/models/total_return_swap.py +1 -1
  97. lusid/models/transaction_price.py +3 -3
  98. lusid/models/transaction_price_type.py +2 -0
  99. lusid/models/transition_event.py +3 -3
  100. lusid/models/trigger_event.py +3 -3
  101. lusid/models/update_staging_rule_set_request.py +1 -6
  102. {lusid_sdk-2.1.462.dist-info → lusid_sdk-2.1.537.dist-info}/METADATA +40 -3
  103. {lusid_sdk-2.1.462.dist-info → lusid_sdk-2.1.537.dist-info}/RECORD +104 -73
  104. {lusid_sdk-2.1.462.dist-info → lusid_sdk-2.1.537.dist-info}/WHEEL +0 -0
@@ -26,6 +26,7 @@ from pydantic.v1 import Field, StrictStr, conint, conlist, constr, validator
26
26
 
27
27
  from typing import Dict, List, Optional
28
28
 
29
+ from lusid.models.add_business_days_to_date_response import AddBusinessDaysToDateResponse
29
30
  from lusid.models.batch_upsert_instrument_properties_response import BatchUpsertInstrumentPropertiesResponse
30
31
  from lusid.models.delete_instrument_properties_response import DeleteInstrumentPropertiesResponse
31
32
  from lusid.models.delete_instrument_response import DeleteInstrumentResponse
@@ -251,6 +252,192 @@ class InstrumentsApi:
251
252
  collection_formats=_collection_formats,
252
253
  _request_auth=_params.get('_request_auth'))
253
254
 
255
+ @overload
256
+ async def calculate_settlement_date(self, identifier_type : Annotated[constr(strict=True, max_length=64, min_length=1), Field(..., description="An identifier type attached to the Instrument.")], identifier : Annotated[constr(strict=True, max_length=64, min_length=1), Field(..., description="The identifier value.")], transaction_date : Annotated[Optional[StrictStr], Field(description="The transaction date to calculate the settlement date from. This can be a UTC datetime offset or a cut label.")] = None, scope : Annotated[Optional[constr(strict=True, max_length=64, min_length=1)], Field(description="The scope in which the instrument lies. When not supplied the scope is 'default'.")] = None, as_at : Annotated[Optional[datetime], Field(description="The asAt datetime at which to retrieve the related instrument and calendars for calculation. Defaults to returning the latest version if not specified.")] = None, **kwargs) -> AddBusinessDaysToDateResponse: # noqa: E501
257
+ ...
258
+
259
+ @overload
260
+ def calculate_settlement_date(self, identifier_type : Annotated[constr(strict=True, max_length=64, min_length=1), Field(..., description="An identifier type attached to the Instrument.")], identifier : Annotated[constr(strict=True, max_length=64, min_length=1), Field(..., description="The identifier value.")], transaction_date : Annotated[Optional[StrictStr], Field(description="The transaction date to calculate the settlement date from. This can be a UTC datetime offset or a cut label.")] = None, scope : Annotated[Optional[constr(strict=True, max_length=64, min_length=1)], Field(description="The scope in which the instrument lies. When not supplied the scope is 'default'.")] = None, as_at : Annotated[Optional[datetime], Field(description="The asAt datetime at which to retrieve the related instrument and calendars for calculation. Defaults to returning the latest version if not specified.")] = None, async_req: Optional[bool]=True, **kwargs) -> AddBusinessDaysToDateResponse: # noqa: E501
261
+ ...
262
+
263
+ @validate_arguments
264
+ def calculate_settlement_date(self, identifier_type : Annotated[constr(strict=True, max_length=64, min_length=1), Field(..., description="An identifier type attached to the Instrument.")], identifier : Annotated[constr(strict=True, max_length=64, min_length=1), Field(..., description="The identifier value.")], transaction_date : Annotated[Optional[StrictStr], Field(description="The transaction date to calculate the settlement date from. This can be a UTC datetime offset or a cut label.")] = None, scope : Annotated[Optional[constr(strict=True, max_length=64, min_length=1)], Field(description="The scope in which the instrument lies. When not supplied the scope is 'default'.")] = None, as_at : Annotated[Optional[datetime], Field(description="The asAt datetime at which to retrieve the related instrument and calendars for calculation. Defaults to returning the latest version if not specified.")] = None, async_req: Optional[bool]=None, **kwargs) -> Union[AddBusinessDaysToDateResponse, Awaitable[AddBusinessDaysToDateResponse]]: # noqa: E501
265
+ """[EARLY ACCESS] CalculateSettlementDate: Get the settlement date for an instrument. # noqa: E501
266
+
267
+ Get the settlement date for a given trade date and instrument. The calculated settlement date will be in UTC. If a cut label transaction date is provided, the settlement date will be calculated relative to the absolute UTC datetime. # noqa: E501
268
+ This method makes a synchronous HTTP request by default. To make an
269
+ asynchronous HTTP request, please pass async_req=True
270
+
271
+ >>> thread = api.calculate_settlement_date(identifier_type, identifier, transaction_date, scope, as_at, async_req=True)
272
+ >>> result = thread.get()
273
+
274
+ :param identifier_type: An identifier type attached to the Instrument. (required)
275
+ :type identifier_type: str
276
+ :param identifier: The identifier value. (required)
277
+ :type identifier: str
278
+ :param transaction_date: The transaction date to calculate the settlement date from. This can be a UTC datetime offset or a cut label.
279
+ :type transaction_date: str
280
+ :param scope: The scope in which the instrument lies. When not supplied the scope is 'default'.
281
+ :type scope: str
282
+ :param as_at: The asAt datetime at which to retrieve the related instrument and calendars for calculation. Defaults to returning the latest version if not specified.
283
+ :type as_at: datetime
284
+ :param async_req: Whether to execute the request asynchronously.
285
+ :type async_req: bool, optional
286
+ :param _request_timeout: Timeout setting. Do not use - use the opts parameter instead
287
+ :param opts: Configuration options for this request
288
+ :type opts: ConfigurationOptions, optional
289
+ :return: Returns the result object.
290
+ If the method is called asynchronously,
291
+ returns the request thread.
292
+ :rtype: AddBusinessDaysToDateResponse
293
+ """
294
+ kwargs['_return_http_data_only'] = True
295
+ if '_preload_content' in kwargs:
296
+ message = "Error! Please call the calculate_settlement_date_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501
297
+ raise ValueError(message)
298
+ if async_req is not None:
299
+ kwargs['async_req'] = async_req
300
+ return self.calculate_settlement_date_with_http_info(identifier_type, identifier, transaction_date, scope, as_at, **kwargs) # noqa: E501
301
+
302
+ @validate_arguments
303
+ def calculate_settlement_date_with_http_info(self, identifier_type : Annotated[constr(strict=True, max_length=64, min_length=1), Field(..., description="An identifier type attached to the Instrument.")], identifier : Annotated[constr(strict=True, max_length=64, min_length=1), Field(..., description="The identifier value.")], transaction_date : Annotated[Optional[StrictStr], Field(description="The transaction date to calculate the settlement date from. This can be a UTC datetime offset or a cut label.")] = None, scope : Annotated[Optional[constr(strict=True, max_length=64, min_length=1)], Field(description="The scope in which the instrument lies. When not supplied the scope is 'default'.")] = None, as_at : Annotated[Optional[datetime], Field(description="The asAt datetime at which to retrieve the related instrument and calendars for calculation. Defaults to returning the latest version if not specified.")] = None, **kwargs) -> ApiResponse: # noqa: E501
304
+ """[EARLY ACCESS] CalculateSettlementDate: Get the settlement date for an instrument. # noqa: E501
305
+
306
+ Get the settlement date for a given trade date and instrument. The calculated settlement date will be in UTC. If a cut label transaction date is provided, the settlement date will be calculated relative to the absolute UTC datetime. # noqa: E501
307
+ This method makes a synchronous HTTP request by default. To make an
308
+ asynchronous HTTP request, please pass async_req=True
309
+
310
+ >>> thread = api.calculate_settlement_date_with_http_info(identifier_type, identifier, transaction_date, scope, as_at, async_req=True)
311
+ >>> result = thread.get()
312
+
313
+ :param identifier_type: An identifier type attached to the Instrument. (required)
314
+ :type identifier_type: str
315
+ :param identifier: The identifier value. (required)
316
+ :type identifier: str
317
+ :param transaction_date: The transaction date to calculate the settlement date from. This can be a UTC datetime offset or a cut label.
318
+ :type transaction_date: str
319
+ :param scope: The scope in which the instrument lies. When not supplied the scope is 'default'.
320
+ :type scope: str
321
+ :param as_at: The asAt datetime at which to retrieve the related instrument and calendars for calculation. Defaults to returning the latest version if not specified.
322
+ :type as_at: datetime
323
+ :param async_req: Whether to execute the request asynchronously.
324
+ :type async_req: bool, optional
325
+ :param _preload_content: if False, the ApiResponse.data will
326
+ be set to none and raw_data will store the
327
+ HTTP response body without reading/decoding.
328
+ Default is True.
329
+ :type _preload_content: bool, optional
330
+ :param _return_http_data_only: response data instead of ApiResponse
331
+ object with status code, headers, etc
332
+ :type _return_http_data_only: bool, optional
333
+ :param _request_timeout: Timeout setting. Do not use - use the opts parameter instead
334
+ :param opts: Configuration options for this request
335
+ :type opts: ConfigurationOptions, optional
336
+ :param _request_auth: set to override the auth_settings for an a single
337
+ request; this effectively ignores the authentication
338
+ in the spec for a single request.
339
+ :type _request_auth: dict, optional
340
+ :type _content_type: string, optional: force content-type for the request
341
+ :return: Returns the result object.
342
+ If the method is called asynchronously,
343
+ returns the request thread.
344
+ :rtype: tuple(AddBusinessDaysToDateResponse, status_code(int), headers(HTTPHeaderDict))
345
+ """
346
+
347
+ _params = locals()
348
+
349
+ _all_params = [
350
+ 'identifier_type',
351
+ 'identifier',
352
+ 'transaction_date',
353
+ 'scope',
354
+ 'as_at'
355
+ ]
356
+ _all_params.extend(
357
+ [
358
+ 'async_req',
359
+ '_return_http_data_only',
360
+ '_preload_content',
361
+ '_request_timeout',
362
+ '_request_auth',
363
+ '_content_type',
364
+ '_headers',
365
+ 'opts'
366
+ ]
367
+ )
368
+
369
+ # validate the arguments
370
+ for _key, _val in _params['kwargs'].items():
371
+ if _key not in _all_params:
372
+ raise ApiTypeError(
373
+ "Got an unexpected keyword argument '%s'"
374
+ " to method calculate_settlement_date" % _key
375
+ )
376
+ _params[_key] = _val
377
+ del _params['kwargs']
378
+
379
+ _collection_formats = {}
380
+
381
+ # process the path parameters
382
+ _path_params = {}
383
+ if _params['identifier_type']:
384
+ _path_params['identifierType'] = _params['identifier_type']
385
+
386
+ if _params['identifier']:
387
+ _path_params['identifier'] = _params['identifier']
388
+
389
+
390
+ # process the query parameters
391
+ _query_params = []
392
+ if _params.get('transaction_date') is not None: # noqa: E501
393
+ _query_params.append(('transactionDate', _params['transaction_date']))
394
+
395
+ if _params.get('scope') is not None: # noqa: E501
396
+ _query_params.append(('scope', _params['scope']))
397
+
398
+ if _params.get('as_at') is not None: # noqa: E501
399
+ if isinstance(_params['as_at'], datetime):
400
+ _query_params.append(('asAt', _params['as_at'].strftime(self.api_client.configuration.datetime_format)))
401
+ else:
402
+ _query_params.append(('asAt', _params['as_at']))
403
+
404
+ # process the header parameters
405
+ _header_params = dict(_params.get('_headers', {}))
406
+ # process the form parameters
407
+ _form_params = []
408
+ _files = {}
409
+ # process the body parameter
410
+ _body_params = None
411
+ # set the HTTP header `Accept`
412
+ _header_params['Accept'] = self.api_client.select_header_accept(
413
+ ['text/plain', 'application/json', 'text/json']) # noqa: E501
414
+
415
+ # authentication setting
416
+ _auth_settings = ['oauth2'] # noqa: E501
417
+
418
+ _response_types_map = {
419
+ '200': "AddBusinessDaysToDateResponse",
420
+ '400': "LusidValidationProblemDetails",
421
+ }
422
+
423
+ return self.api_client.call_api(
424
+ '/api/instruments/{identifierType}/{identifier}/settlementdate', 'GET',
425
+ _path_params,
426
+ _query_params,
427
+ _header_params,
428
+ body=_body_params,
429
+ post_params=_form_params,
430
+ files=_files,
431
+ response_types_map=_response_types_map,
432
+ auth_settings=_auth_settings,
433
+ async_req=_params.get('async_req'),
434
+ _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501
435
+ _preload_content=_params.get('_preload_content', True),
436
+ _request_timeout=_params.get('_request_timeout'),
437
+ opts=_params.get('opts'),
438
+ collection_formats=_collection_formats,
439
+ _request_auth=_params.get('_request_auth'))
440
+
254
441
  @overload
255
442
  async def delete_instrument(self, identifier_type : Annotated[StrictStr, Field(..., description="The unique identifier type to search, for example 'Figi'.")], identifier : Annotated[StrictStr, Field(..., description="An <i>identifierType</i> value to use to identify the instrument, for example 'BBG000BLNNV0'.")], scope : Annotated[Optional[constr(strict=True, max_length=64, min_length=1)], Field(description="The scope in which the instrument lies. When not supplied the scope is 'default'.")] = None, **kwargs) -> DeleteInstrumentResponse: # noqa: E501
256
443
  ...
@@ -55,6 +55,7 @@ from lusid.models.resource_id import ResourceId
55
55
  from lusid.models.resource_list_of_change_history import ResourceListOfChangeHistory
56
56
  from lusid.models.resource_list_of_holdings_adjustment_header import ResourceListOfHoldingsAdjustmentHeader
57
57
  from lusid.models.resource_list_of_instrument_cash_flow import ResourceListOfInstrumentCashFlow
58
+ from lusid.models.resource_list_of_output_transaction import ResourceListOfOutputTransaction
58
59
  from lusid.models.resource_list_of_portfolio_cash_flow import ResourceListOfPortfolioCashFlow
59
60
  from lusid.models.resource_list_of_portfolio_cash_ladder import ResourceListOfPortfolioCashLadder
60
61
  from lusid.models.resource_list_of_transaction import ResourceListOfTransaction
@@ -6062,6 +6063,205 @@ class TransactionPortfoliosApi:
6062
6063
  collection_formats=_collection_formats,
6063
6064
  _request_auth=_params.get('_request_auth'))
6064
6065
 
6066
+ @overload
6067
+ async def preview_transaction(self, scope : Annotated[constr(strict=True, max_length=64, min_length=1), Field(..., description="The scope of the transaction portfolio.")], code : Annotated[constr(strict=True, max_length=64, min_length=1), 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
6068
+ ...
6069
+
6070
+ @overload
6071
+ def preview_transaction(self, scope : Annotated[constr(strict=True, max_length=64, min_length=1), Field(..., description="The scope of the transaction portfolio.")], code : Annotated[constr(strict=True, max_length=64, min_length=1), 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
6072
+ ...
6073
+
6074
+ @validate_arguments
6075
+ def preview_transaction(self, scope : Annotated[constr(strict=True, max_length=64, min_length=1), Field(..., description="The scope of the transaction portfolio.")], code : Annotated[constr(strict=True, max_length=64, min_length=1), 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
6076
+ """[EARLY ACCESS] PreviewTransaction: Preview a transaction # noqa: E501
6077
+
6078
+ 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
6079
+ This method makes a synchronous HTTP request by default. To make an
6080
+ asynchronous HTTP request, please pass async_req=True
6081
+
6082
+ >>> thread = api.preview_transaction(scope, code, transaction_request, property_keys, show_cancelled_transactions, preserve_properties, async_req=True)
6083
+ >>> result = thread.get()
6084
+
6085
+ :param scope: The scope of the transaction portfolio. (required)
6086
+ :type scope: str
6087
+ :param code: The code of the transaction portfolio. Together with the scope this uniquely identifies the transaction portfolio. (required)
6088
+ :type code: str
6089
+ :param transaction_request: The transaction to be previewed. (required)
6090
+ :type transaction_request: TransactionRequest
6091
+ :param property_keys: 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\".
6092
+ :type property_keys: List[str]
6093
+ :param show_cancelled_transactions: Option to specify whether to include previous versions of an amended transaction in the response. Defaults to False if not specified.
6094
+ :type show_cancelled_transactions: bool
6095
+ :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.
6096
+ :type preserve_properties: bool
6097
+ :param async_req: Whether to execute the request asynchronously.
6098
+ :type async_req: bool, optional
6099
+ :param _request_timeout: Timeout setting. Do not use - use the opts parameter instead
6100
+ :param opts: Configuration options for this request
6101
+ :type opts: ConfigurationOptions, optional
6102
+ :return: Returns the result object.
6103
+ If the method is called asynchronously,
6104
+ returns the request thread.
6105
+ :rtype: ResourceListOfOutputTransaction
6106
+ """
6107
+ kwargs['_return_http_data_only'] = True
6108
+ if '_preload_content' in kwargs:
6109
+ message = "Error! Please call the preview_transaction_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501
6110
+ raise ValueError(message)
6111
+ if async_req is not None:
6112
+ kwargs['async_req'] = async_req
6113
+ return self.preview_transaction_with_http_info(scope, code, transaction_request, property_keys, show_cancelled_transactions, preserve_properties, **kwargs) # noqa: E501
6114
+
6115
+ @validate_arguments
6116
+ def preview_transaction_with_http_info(self, scope : Annotated[constr(strict=True, max_length=64, min_length=1), Field(..., description="The scope of the transaction portfolio.")], code : Annotated[constr(strict=True, max_length=64, min_length=1), 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
6117
+ """[EARLY ACCESS] PreviewTransaction: Preview a transaction # noqa: E501
6118
+
6119
+ 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
6120
+ This method makes a synchronous HTTP request by default. To make an
6121
+ asynchronous HTTP request, please pass async_req=True
6122
+
6123
+ >>> thread = api.preview_transaction_with_http_info(scope, code, transaction_request, property_keys, show_cancelled_transactions, preserve_properties, async_req=True)
6124
+ >>> result = thread.get()
6125
+
6126
+ :param scope: The scope of the transaction portfolio. (required)
6127
+ :type scope: str
6128
+ :param code: The code of the transaction portfolio. Together with the scope this uniquely identifies the transaction portfolio. (required)
6129
+ :type code: str
6130
+ :param transaction_request: The transaction to be previewed. (required)
6131
+ :type transaction_request: TransactionRequest
6132
+ :param property_keys: 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\".
6133
+ :type property_keys: List[str]
6134
+ :param show_cancelled_transactions: Option to specify whether to include previous versions of an amended transaction in the response. Defaults to False if not specified.
6135
+ :type show_cancelled_transactions: bool
6136
+ :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.
6137
+ :type preserve_properties: bool
6138
+ :param async_req: Whether to execute the request asynchronously.
6139
+ :type async_req: bool, optional
6140
+ :param _preload_content: if False, the ApiResponse.data will
6141
+ be set to none and raw_data will store the
6142
+ HTTP response body without reading/decoding.
6143
+ Default is True.
6144
+ :type _preload_content: bool, optional
6145
+ :param _return_http_data_only: response data instead of ApiResponse
6146
+ object with status code, headers, etc
6147
+ :type _return_http_data_only: bool, optional
6148
+ :param _request_timeout: Timeout setting. Do not use - use the opts parameter instead
6149
+ :param opts: Configuration options for this request
6150
+ :type opts: ConfigurationOptions, optional
6151
+ :param _request_auth: set to override the auth_settings for an a single
6152
+ request; this effectively ignores the authentication
6153
+ in the spec for a single request.
6154
+ :type _request_auth: dict, optional
6155
+ :type _content_type: string, optional: force content-type for the request
6156
+ :return: Returns the result object.
6157
+ If the method is called asynchronously,
6158
+ returns the request thread.
6159
+ :rtype: tuple(ResourceListOfOutputTransaction, status_code(int), headers(HTTPHeaderDict))
6160
+ """
6161
+
6162
+ _params = locals()
6163
+
6164
+ _all_params = [
6165
+ 'scope',
6166
+ 'code',
6167
+ 'transaction_request',
6168
+ 'property_keys',
6169
+ 'show_cancelled_transactions',
6170
+ 'preserve_properties'
6171
+ ]
6172
+ _all_params.extend(
6173
+ [
6174
+ 'async_req',
6175
+ '_return_http_data_only',
6176
+ '_preload_content',
6177
+ '_request_timeout',
6178
+ '_request_auth',
6179
+ '_content_type',
6180
+ '_headers',
6181
+ 'opts'
6182
+ ]
6183
+ )
6184
+
6185
+ # validate the arguments
6186
+ for _key, _val in _params['kwargs'].items():
6187
+ if _key not in _all_params:
6188
+ raise ApiTypeError(
6189
+ "Got an unexpected keyword argument '%s'"
6190
+ " to method preview_transaction" % _key
6191
+ )
6192
+ _params[_key] = _val
6193
+ del _params['kwargs']
6194
+
6195
+ _collection_formats = {}
6196
+
6197
+ # process the path parameters
6198
+ _path_params = {}
6199
+ if _params['scope']:
6200
+ _path_params['scope'] = _params['scope']
6201
+
6202
+ if _params['code']:
6203
+ _path_params['code'] = _params['code']
6204
+
6205
+
6206
+ # process the query parameters
6207
+ _query_params = []
6208
+ if _params.get('property_keys') is not None: # noqa: E501
6209
+ _query_params.append(('propertyKeys', _params['property_keys']))
6210
+ _collection_formats['propertyKeys'] = 'multi'
6211
+
6212
+ if _params.get('show_cancelled_transactions') is not None: # noqa: E501
6213
+ _query_params.append(('showCancelledTransactions', _params['show_cancelled_transactions']))
6214
+
6215
+ if _params.get('preserve_properties') is not None: # noqa: E501
6216
+ _query_params.append(('preserveProperties', _params['preserve_properties']))
6217
+
6218
+ # process the header parameters
6219
+ _header_params = dict(_params.get('_headers', {}))
6220
+ # process the form parameters
6221
+ _form_params = []
6222
+ _files = {}
6223
+ # process the body parameter
6224
+ _body_params = None
6225
+ if _params['transaction_request'] is not None:
6226
+ _body_params = _params['transaction_request']
6227
+
6228
+ # set the HTTP header `Accept`
6229
+ _header_params['Accept'] = self.api_client.select_header_accept(
6230
+ ['text/plain', 'application/json', 'text/json']) # noqa: E501
6231
+
6232
+ # set the HTTP header `Content-Type`
6233
+ _content_types_list = _params.get('_content_type',
6234
+ self.api_client.select_header_content_type(
6235
+ ['application/json-patch+json', 'application/json', 'text/json', 'application/*+json']))
6236
+ if _content_types_list:
6237
+ _header_params['Content-Type'] = _content_types_list
6238
+
6239
+ # authentication setting
6240
+ _auth_settings = ['oauth2'] # noqa: E501
6241
+
6242
+ _response_types_map = {
6243
+ '200': "ResourceListOfOutputTransaction",
6244
+ '400': "LusidValidationProblemDetails",
6245
+ }
6246
+
6247
+ return self.api_client.call_api(
6248
+ '/api/transactionportfolios/{scope}/{code}/previewTransaction', 'POST',
6249
+ _path_params,
6250
+ _query_params,
6251
+ _header_params,
6252
+ body=_body_params,
6253
+ post_params=_form_params,
6254
+ files=_files,
6255
+ response_types_map=_response_types_map,
6256
+ auth_settings=_auth_settings,
6257
+ async_req=_params.get('async_req'),
6258
+ _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501
6259
+ _preload_content=_params.get('_preload_content', True),
6260
+ _request_timeout=_params.get('_request_timeout'),
6261
+ opts=_params.get('opts'),
6262
+ collection_formats=_collection_formats,
6263
+ _request_auth=_params.get('_request_auth'))
6264
+
6065
6265
  @overload
6066
6266
  async def resolve_instrument(self, scope : Annotated[constr(strict=True, max_length=64, min_length=1), Field(..., description="The scope of the transaction portfolio.")], code : Annotated[constr(strict=True, max_length=64, min_length=1), Field(..., description="The code of the transaction portfolio. Together with the scope this uniquely identifies the transaction portfolio.")], instrument_identifier_type : Annotated[StrictStr, Field(..., description="The instrument identifier type.")], instrument_identifier_value : Annotated[StrictStr, Field(..., description="The value for the given instrument identifier.")], from_effective_at : Annotated[Optional[StrictStr], Field(description="The lower bound effective datetime or cut label (inclusive) from which to retrieve the data. There is no lower bound if this is not specified.")] = None, re_resolve : Annotated[Optional[StrictBool], Field(description="When set to true, instrument resolution will be attempted for all transactions and holdings for the given identifier and date range. When set to false (default behaviour), instrument resolution will only be attempted for those transactions and holdings that were previously unresolved.")] = None, request_body : Annotated[Optional[Dict[str, StrictStr]], Field(description="The dictionary with the instrument identifiers to be updated on the transaction and holdings.")] = None, **kwargs) -> UpsertPortfolioTransactionsResponse: # noqa: E501
6067
6267
  ...
@@ -6072,7 +6272,7 @@ class TransactionPortfoliosApi:
6072
6272
 
6073
6273
  @validate_arguments
6074
6274
  def resolve_instrument(self, scope : Annotated[constr(strict=True, max_length=64, min_length=1), Field(..., description="The scope of the transaction portfolio.")], code : Annotated[constr(strict=True, max_length=64, min_length=1), Field(..., description="The code of the transaction portfolio. Together with the scope this uniquely identifies the transaction portfolio.")], instrument_identifier_type : Annotated[StrictStr, Field(..., description="The instrument identifier type.")], instrument_identifier_value : Annotated[StrictStr, Field(..., description="The value for the given instrument identifier.")], from_effective_at : Annotated[Optional[StrictStr], Field(description="The lower bound effective datetime or cut label (inclusive) from which to retrieve the data. There is no lower bound if this is not specified.")] = None, re_resolve : Annotated[Optional[StrictBool], Field(description="When set to true, instrument resolution will be attempted for all transactions and holdings for the given identifier and date range. When set to false (default behaviour), instrument resolution will only be attempted for those transactions and holdings that were previously unresolved.")] = None, request_body : Annotated[Optional[Dict[str, StrictStr]], Field(description="The dictionary with the instrument identifiers to be updated on the transaction and holdings.")] = None, async_req: Optional[bool]=None, **kwargs) -> Union[UpsertPortfolioTransactionsResponse, Awaitable[UpsertPortfolioTransactionsResponse]]: # noqa: E501
6075
- """[EARLY ACCESS] ResolveInstrument: Resolve instrument # noqa: E501
6275
+ """ResolveInstrument: Resolve instrument # noqa: E501
6076
6276
 
6077
6277
  Try to resolve the instrument for transaction and holdings for a given instrument identifier and a specified period of time. Also update the instrument identifiers with the given instrument identifiers collection. # noqa: E501
6078
6278
  This method makes a synchronous HTTP request by default. To make an
@@ -6115,7 +6315,7 @@ class TransactionPortfoliosApi:
6115
6315
 
6116
6316
  @validate_arguments
6117
6317
  def resolve_instrument_with_http_info(self, scope : Annotated[constr(strict=True, max_length=64, min_length=1), Field(..., description="The scope of the transaction portfolio.")], code : Annotated[constr(strict=True, max_length=64, min_length=1), Field(..., description="The code of the transaction portfolio. Together with the scope this uniquely identifies the transaction portfolio.")], instrument_identifier_type : Annotated[StrictStr, Field(..., description="The instrument identifier type.")], instrument_identifier_value : Annotated[StrictStr, Field(..., description="The value for the given instrument identifier.")], from_effective_at : Annotated[Optional[StrictStr], Field(description="The lower bound effective datetime or cut label (inclusive) from which to retrieve the data. There is no lower bound if this is not specified.")] = None, re_resolve : Annotated[Optional[StrictBool], Field(description="When set to true, instrument resolution will be attempted for all transactions and holdings for the given identifier and date range. When set to false (default behaviour), instrument resolution will only be attempted for those transactions and holdings that were previously unresolved.")] = None, request_body : Annotated[Optional[Dict[str, StrictStr]], Field(description="The dictionary with the instrument identifiers to be updated on the transaction and holdings.")] = None, **kwargs) -> ApiResponse: # noqa: E501
6118
- """[EARLY ACCESS] ResolveInstrument: Resolve instrument # noqa: E501
6318
+ """ResolveInstrument: Resolve instrument # noqa: E501
6119
6319
 
6120
6320
  Try to resolve the instrument for transaction and holdings for a given instrument identifier and a specified period of time. Also update the instrument identifiers with the given instrument identifiers collection. # noqa: E501
6121
6321
  This method makes a synchronous HTTP request by default. To make an
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.6891\n"\
448
+ "Version of the API: 0.11.6966\n"\
449
449
  "SDK Package Version: {package_version}".\
450
450
  format(env=sys.platform, pyversion=sys.version, package_version=package_version)
451
451