lusid-sdk 2.1.242__py3-none-any.whl → 2.1.320__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 +66 -0
  2. lusid/api/__init__.py +2 -0
  3. lusid/api/compliance_api.py +191 -0
  4. lusid/api/entities_api.py +360 -0
  5. lusid/api/fee_types_api.py +143 -0
  6. lusid/api/fund_configurations_api.py +944 -0
  7. lusid/api/funds_api.py +1 -1
  8. lusid/api/order_management_api.py +479 -1
  9. lusid/api/scopes_api.py +38 -9
  10. lusid/configuration.py +1 -1
  11. lusid/extensions/configuration_loaders.py +9 -1
  12. lusid/models/__init__.py +64 -0
  13. lusid/models/accounting_method.py +3 -0
  14. lusid/models/accumulation_event.py +3 -3
  15. lusid/models/amortisation_event.py +3 -3
  16. lusid/models/bond_coupon_event.py +3 -3
  17. lusid/models/bond_default_event.py +3 -3
  18. lusid/models/bond_principal_event.py +3 -3
  19. lusid/models/cancel_orders_response.py +153 -0
  20. lusid/models/cancel_placements_response.py +153 -0
  21. lusid/models/cancelled_order_result.py +73 -0
  22. lusid/models/cancelled_placement_result.py +83 -0
  23. lusid/models/capital_distribution_event.py +3 -3
  24. lusid/models/cash.py +93 -0
  25. lusid/models/cash_dividend_event.py +3 -3
  26. lusid/models/cash_flow_event.py +3 -3
  27. lusid/models/close_event.py +3 -3
  28. lusid/models/compliance_run_configuration.py +73 -0
  29. lusid/models/component_filter.py +85 -0
  30. lusid/models/component_rule.py +77 -0
  31. lusid/models/contract_for_difference.py +4 -2
  32. lusid/models/create_derived_transaction_portfolio_request.py +3 -3
  33. lusid/models/create_transaction_portfolio_request.py +3 -3
  34. lusid/models/dependency_source_filter.py +9 -2
  35. lusid/models/dividend_option_event.py +3 -3
  36. lusid/models/dividend_reinvestment_event.py +3 -3
  37. lusid/models/exercise_event.py +3 -3
  38. lusid/models/expiry_event.py +3 -3
  39. lusid/models/fee_transaction_template_specification.py +79 -0
  40. lusid/models/fund.py +6 -1
  41. lusid/models/fund_amount.py +69 -0
  42. lusid/models/fund_configuration.py +151 -0
  43. lusid/models/fund_configuration_properties.py +115 -0
  44. lusid/models/fund_configuration_request.py +136 -0
  45. lusid/models/fund_pnl_breakdown.py +110 -0
  46. lusid/models/fund_previous_nav.py +69 -0
  47. lusid/models/fund_request.py +6 -1
  48. lusid/models/fund_valuation_point_data.py +152 -0
  49. lusid/models/future_expiry_event.py +100 -0
  50. lusid/models/futures_contract_details.py +9 -2
  51. lusid/models/fx_forward_settlement_event.py +3 -3
  52. lusid/models/informational_error_event.py +3 -3
  53. lusid/models/informational_event.py +3 -3
  54. lusid/models/instrument_entity.py +146 -0
  55. lusid/models/instrument_event.py +6 -5
  56. lusid/models/instrument_event_type.py +1 -0
  57. lusid/models/lusid_instrument.py +3 -2
  58. lusid/models/market_data_key_rule.py +3 -3
  59. lusid/models/market_data_specific_rule.py +3 -3
  60. lusid/models/market_quote.py +3 -3
  61. lusid/models/maturity_event.py +3 -3
  62. lusid/models/merger_event.py +3 -3
  63. lusid/models/model_selection.py +3 -3
  64. lusid/models/open_event.py +3 -3
  65. lusid/models/paged_resource_list_of_fund_configuration.py +113 -0
  66. lusid/models/placement_update_request.py +116 -0
  67. lusid/models/portfolio.py +3 -3
  68. lusid/models/portfolio_details.py +3 -3
  69. lusid/models/portfolio_without_href.py +3 -3
  70. lusid/models/pre_trade_configuration.py +69 -0
  71. lusid/models/previous_fund_valuation_point_data.py +79 -0
  72. lusid/models/previous_nav.py +73 -0
  73. lusid/models/previous_share_class_breakdown.py +81 -0
  74. lusid/models/pricing_model.py +1 -0
  75. lusid/models/property_definition.py +7 -1
  76. lusid/models/property_definition_entity.py +146 -0
  77. lusid/models/quote_series_id.py +4 -20
  78. lusid/models/quote_type.py +3 -0
  79. lusid/models/raw_vendor_event.py +3 -3
  80. lusid/models/reset_event.py +3 -3
  81. lusid/models/reverse_stock_split_event.py +3 -3
  82. lusid/models/scrip_dividend_event.py +3 -3
  83. lusid/models/share_class_amount.py +73 -0
  84. lusid/models/share_class_breakdown.py +163 -0
  85. lusid/models/share_class_data.py +79 -0
  86. lusid/models/share_class_details.py +108 -0
  87. lusid/models/share_class_pnl_breakdown.py +110 -0
  88. lusid/models/spin_off_event.py +3 -3
  89. lusid/models/staged_modification.py +8 -1
  90. lusid/models/stock_dividend_event.py +3 -3
  91. lusid/models/stock_split_event.py +3 -3
  92. lusid/models/template_field.py +3 -1
  93. lusid/models/transaction_configuration_movement_data.py +2 -2
  94. lusid/models/transaction_configuration_movement_data_request.py +1 -1
  95. lusid/models/transaction_field_map.py +8 -3
  96. lusid/models/transaction_type_movement.py +2 -2
  97. lusid/models/transition_event.py +3 -3
  98. lusid/models/trigger_event.py +3 -3
  99. lusid/models/unitisation_data.py +73 -0
  100. lusid/models/update_placements_response.py +153 -0
  101. lusid/models/valuation_point_data_response.py +30 -9
  102. {lusid_sdk-2.1.242.dist-info → lusid_sdk-2.1.320.dist-info}/METADATA +53 -215
  103. {lusid_sdk-2.1.242.dist-info → lusid_sdk-2.1.320.dist-info}/RECORD +104 -71
  104. {lusid_sdk-2.1.242.dist-info → lusid_sdk-2.1.320.dist-info}/WHEEL +0 -0
lusid/api/funds_api.py CHANGED
@@ -2750,7 +2750,7 @@ class FundsApi:
2750
2750
  }
2751
2751
 
2752
2752
  return self.api_client.call_api(
2753
- '/api/funds/{scope}/{code}/valuationpoints/$upsert', 'POST',
2753
+ '/api/funds/{scope}/{code}/valuationpoints', 'POST',
2754
2754
  _path_params,
2755
2755
  _query_params,
2756
2756
  _header_params,
@@ -22,18 +22,22 @@ from typing import overload, Optional, Union, Awaitable
22
22
  from typing_extensions import Annotated
23
23
  from pydantic.v1 import Field, StrictBool, conlist, constr, validator
24
24
 
25
- from typing import Optional
25
+ from typing import Dict, Optional
26
26
 
27
27
  from lusid.models.allocation_service_run_response import AllocationServiceRunResponse
28
28
  from lusid.models.block_and_orders_create_request import BlockAndOrdersCreateRequest
29
29
  from lusid.models.book_transactions_request import BookTransactionsRequest
30
30
  from lusid.models.book_transactions_response import BookTransactionsResponse
31
+ from lusid.models.cancel_orders_response import CancelOrdersResponse
32
+ from lusid.models.cancel_placements_response import CancelPlacementsResponse
31
33
  from lusid.models.move_orders_to_different_blocks_request import MoveOrdersToDifferentBlocksRequest
32
34
  from lusid.models.place_blocks_request import PlaceBlocksRequest
35
+ from lusid.models.placement_update_request import PlacementUpdateRequest
33
36
  from lusid.models.resource_id import ResourceId
34
37
  from lusid.models.resource_list_of_block_and_orders import ResourceListOfBlockAndOrders
35
38
  from lusid.models.resource_list_of_moved_order_to_different_block_response import ResourceListOfMovedOrderToDifferentBlockResponse
36
39
  from lusid.models.resource_list_of_placement import ResourceListOfPlacement
40
+ from lusid.models.update_placements_response import UpdatePlacementsResponse
37
41
 
38
42
  from lusid.api_client import ApiClient
39
43
  from lusid.api_response import ApiResponse
@@ -221,6 +225,322 @@ class OrderManagementApi:
221
225
  collection_formats=_collection_formats,
222
226
  _request_auth=_params.get('_request_auth'))
223
227
 
228
+ @overload
229
+ async def cancel_orders(self, request_body : Annotated[Dict[str, ResourceId], Field(..., description="The request containing the ids of the orders to be cancelled.")], **kwargs) -> CancelOrdersResponse: # noqa: E501
230
+ ...
231
+
232
+ @overload
233
+ def cancel_orders(self, request_body : Annotated[Dict[str, ResourceId], Field(..., description="The request containing the ids of the orders to be cancelled.")], async_req: Optional[bool]=True, **kwargs) -> CancelOrdersResponse: # noqa: E501
234
+ ...
235
+
236
+ @validate_arguments
237
+ def cancel_orders(self, request_body : Annotated[Dict[str, ResourceId], Field(..., description="The request containing the ids of the orders to be cancelled.")], async_req: Optional[bool]=None, **kwargs) -> Union[CancelOrdersResponse, Awaitable[CancelOrdersResponse]]: # noqa: E501
238
+ """[EARLY ACCESS] CancelOrders: Cancel existing orders # noqa: E501
239
+
240
+ The response returns both the collection of successfully canceled orders, as well as those that failed. For each failure, a reason is provided. It is important to check the failed set for unsuccessful results. # noqa: E501
241
+ This method makes a synchronous HTTP request by default. To make an
242
+ asynchronous HTTP request, please pass async_req=True
243
+
244
+ >>> thread = api.cancel_orders(request_body, async_req=True)
245
+ >>> result = thread.get()
246
+
247
+ :param request_body: The request containing the ids of the orders to be cancelled. (required)
248
+ :type request_body: Dict[str, ResourceId]
249
+ :param async_req: Whether to execute the request asynchronously.
250
+ :type async_req: bool, optional
251
+ :param _request_timeout: timeout setting for this request.
252
+ If one number provided, it will be total request
253
+ timeout. It can also be a pair (tuple) of
254
+ (connection, read) timeouts.
255
+ :return: Returns the result object.
256
+ If the method is called asynchronously,
257
+ returns the request thread.
258
+ :rtype: CancelOrdersResponse
259
+ """
260
+ kwargs['_return_http_data_only'] = True
261
+ if '_preload_content' in kwargs:
262
+ message = "Error! Please call the cancel_orders_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501
263
+ raise ValueError(message)
264
+ if async_req is not None:
265
+ kwargs['async_req'] = async_req
266
+ return self.cancel_orders_with_http_info(request_body, **kwargs) # noqa: E501
267
+
268
+ @validate_arguments
269
+ def cancel_orders_with_http_info(self, request_body : Annotated[Dict[str, ResourceId], Field(..., description="The request containing the ids of the orders to be cancelled.")], **kwargs) -> ApiResponse: # noqa: E501
270
+ """[EARLY ACCESS] CancelOrders: Cancel existing orders # noqa: E501
271
+
272
+ The response returns both the collection of successfully canceled orders, as well as those that failed. For each failure, a reason is provided. It is important to check the failed set for unsuccessful results. # noqa: E501
273
+ This method makes a synchronous HTTP request by default. To make an
274
+ asynchronous HTTP request, please pass async_req=True
275
+
276
+ >>> thread = api.cancel_orders_with_http_info(request_body, async_req=True)
277
+ >>> result = thread.get()
278
+
279
+ :param request_body: The request containing the ids of the orders to be cancelled. (required)
280
+ :type request_body: Dict[str, ResourceId]
281
+ :param async_req: Whether to execute the request asynchronously.
282
+ :type async_req: bool, optional
283
+ :param _preload_content: if False, the ApiResponse.data will
284
+ be set to none and raw_data will store the
285
+ HTTP response body without reading/decoding.
286
+ Default is True.
287
+ :type _preload_content: bool, optional
288
+ :param _return_http_data_only: response data instead of ApiResponse
289
+ object with status code, headers, etc
290
+ :type _return_http_data_only: bool, optional
291
+ :param _request_timeout: timeout setting for this request. If one
292
+ number provided, it will be total request
293
+ timeout. It can also be a pair (tuple) of
294
+ (connection, read) timeouts.
295
+ :param _request_auth: set to override the auth_settings for an a single
296
+ request; this effectively ignores the authentication
297
+ in the spec for a single request.
298
+ :type _request_auth: dict, optional
299
+ :type _content_type: string, optional: force content-type for the request
300
+ :return: Returns the result object.
301
+ If the method is called asynchronously,
302
+ returns the request thread.
303
+ :rtype: tuple(CancelOrdersResponse, status_code(int), headers(HTTPHeaderDict))
304
+ """
305
+
306
+ _params = locals()
307
+
308
+ _all_params = [
309
+ 'request_body'
310
+ ]
311
+ _all_params.extend(
312
+ [
313
+ 'async_req',
314
+ '_return_http_data_only',
315
+ '_preload_content',
316
+ '_request_timeout',
317
+ '_request_auth',
318
+ '_content_type',
319
+ '_headers'
320
+ ]
321
+ )
322
+
323
+ # validate the arguments
324
+ for _key, _val in _params['kwargs'].items():
325
+ if _key not in _all_params:
326
+ raise ApiTypeError(
327
+ "Got an unexpected keyword argument '%s'"
328
+ " to method cancel_orders" % _key
329
+ )
330
+ _params[_key] = _val
331
+ del _params['kwargs']
332
+
333
+ _collection_formats = {}
334
+
335
+ # process the path parameters
336
+ _path_params = {}
337
+
338
+ # process the query parameters
339
+ _query_params = []
340
+ # process the header parameters
341
+ _header_params = dict(_params.get('_headers', {}))
342
+ # process the form parameters
343
+ _form_params = []
344
+ _files = {}
345
+ # process the body parameter
346
+ _body_params = None
347
+ if _params['request_body'] is not None:
348
+ _body_params = _params['request_body']
349
+
350
+ # set the HTTP header `Accept`
351
+ _header_params['Accept'] = self.api_client.select_header_accept(
352
+ ['text/plain', 'application/json', 'text/json']) # noqa: E501
353
+
354
+ # set the HTTP header `Content-Type`
355
+ _content_types_list = _params.get('_content_type',
356
+ self.api_client.select_header_content_type(
357
+ ['application/json-patch+json', 'application/json', 'text/json', 'application/*+json']))
358
+ if _content_types_list:
359
+ _header_params['Content-Type'] = _content_types_list
360
+
361
+ # authentication setting
362
+ _auth_settings = ['oauth2'] # noqa: E501
363
+
364
+ _response_types_map = {
365
+ '200': "CancelOrdersResponse",
366
+ '400': "LusidValidationProblemDetails",
367
+ }
368
+
369
+ return self.api_client.call_api(
370
+ '/api/ordermanagement/cancelorders', 'POST',
371
+ _path_params,
372
+ _query_params,
373
+ _header_params,
374
+ body=_body_params,
375
+ post_params=_form_params,
376
+ files=_files,
377
+ response_types_map=_response_types_map,
378
+ auth_settings=_auth_settings,
379
+ async_req=_params.get('async_req'),
380
+ _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501
381
+ _preload_content=_params.get('_preload_content', True),
382
+ _request_timeout=_params.get('_request_timeout'),
383
+ collection_formats=_collection_formats,
384
+ _request_auth=_params.get('_request_auth'))
385
+
386
+ @overload
387
+ async def cancel_placements(self, request_body : Annotated[Dict[str, ResourceId], Field(..., description="The request containing the ids of the placements to be cancelled.")], **kwargs) -> CancelPlacementsResponse: # noqa: E501
388
+ ...
389
+
390
+ @overload
391
+ def cancel_placements(self, request_body : Annotated[Dict[str, ResourceId], Field(..., description="The request containing the ids of the placements to be cancelled.")], async_req: Optional[bool]=True, **kwargs) -> CancelPlacementsResponse: # noqa: E501
392
+ ...
393
+
394
+ @validate_arguments
395
+ def cancel_placements(self, request_body : Annotated[Dict[str, ResourceId], Field(..., description="The request containing the ids of the placements to be cancelled.")], async_req: Optional[bool]=None, **kwargs) -> Union[CancelPlacementsResponse, Awaitable[CancelPlacementsResponse]]: # noqa: E501
396
+ """[EARLY ACCESS] CancelPlacements: Cancel existing placements # noqa: E501
397
+
398
+ The response returns both the collection of successfully canceled placements, as well as those that failed. For each failure, a reason is provided. It is important to check the failed set for unsuccessful results. # noqa: E501
399
+ This method makes a synchronous HTTP request by default. To make an
400
+ asynchronous HTTP request, please pass async_req=True
401
+
402
+ >>> thread = api.cancel_placements(request_body, async_req=True)
403
+ >>> result = thread.get()
404
+
405
+ :param request_body: The request containing the ids of the placements to be cancelled. (required)
406
+ :type request_body: Dict[str, ResourceId]
407
+ :param async_req: Whether to execute the request asynchronously.
408
+ :type async_req: bool, optional
409
+ :param _request_timeout: timeout setting for this request.
410
+ If one number provided, it will be total request
411
+ timeout. It can also be a pair (tuple) of
412
+ (connection, read) timeouts.
413
+ :return: Returns the result object.
414
+ If the method is called asynchronously,
415
+ returns the request thread.
416
+ :rtype: CancelPlacementsResponse
417
+ """
418
+ kwargs['_return_http_data_only'] = True
419
+ if '_preload_content' in kwargs:
420
+ message = "Error! Please call the cancel_placements_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501
421
+ raise ValueError(message)
422
+ if async_req is not None:
423
+ kwargs['async_req'] = async_req
424
+ return self.cancel_placements_with_http_info(request_body, **kwargs) # noqa: E501
425
+
426
+ @validate_arguments
427
+ def cancel_placements_with_http_info(self, request_body : Annotated[Dict[str, ResourceId], Field(..., description="The request containing the ids of the placements to be cancelled.")], **kwargs) -> ApiResponse: # noqa: E501
428
+ """[EARLY ACCESS] CancelPlacements: Cancel existing placements # noqa: E501
429
+
430
+ The response returns both the collection of successfully canceled placements, as well as those that failed. For each failure, a reason is provided. It is important to check the failed set for unsuccessful results. # noqa: E501
431
+ This method makes a synchronous HTTP request by default. To make an
432
+ asynchronous HTTP request, please pass async_req=True
433
+
434
+ >>> thread = api.cancel_placements_with_http_info(request_body, async_req=True)
435
+ >>> result = thread.get()
436
+
437
+ :param request_body: The request containing the ids of the placements to be cancelled. (required)
438
+ :type request_body: Dict[str, ResourceId]
439
+ :param async_req: Whether to execute the request asynchronously.
440
+ :type async_req: bool, optional
441
+ :param _preload_content: if False, the ApiResponse.data will
442
+ be set to none and raw_data will store the
443
+ HTTP response body without reading/decoding.
444
+ Default is True.
445
+ :type _preload_content: bool, optional
446
+ :param _return_http_data_only: response data instead of ApiResponse
447
+ object with status code, headers, etc
448
+ :type _return_http_data_only: bool, optional
449
+ :param _request_timeout: timeout setting for this request. If one
450
+ number provided, it will be total request
451
+ timeout. It can also be a pair (tuple) of
452
+ (connection, read) timeouts.
453
+ :param _request_auth: set to override the auth_settings for an a single
454
+ request; this effectively ignores the authentication
455
+ in the spec for a single request.
456
+ :type _request_auth: dict, optional
457
+ :type _content_type: string, optional: force content-type for the request
458
+ :return: Returns the result object.
459
+ If the method is called asynchronously,
460
+ returns the request thread.
461
+ :rtype: tuple(CancelPlacementsResponse, status_code(int), headers(HTTPHeaderDict))
462
+ """
463
+
464
+ _params = locals()
465
+
466
+ _all_params = [
467
+ 'request_body'
468
+ ]
469
+ _all_params.extend(
470
+ [
471
+ 'async_req',
472
+ '_return_http_data_only',
473
+ '_preload_content',
474
+ '_request_timeout',
475
+ '_request_auth',
476
+ '_content_type',
477
+ '_headers'
478
+ ]
479
+ )
480
+
481
+ # validate the arguments
482
+ for _key, _val in _params['kwargs'].items():
483
+ if _key not in _all_params:
484
+ raise ApiTypeError(
485
+ "Got an unexpected keyword argument '%s'"
486
+ " to method cancel_placements" % _key
487
+ )
488
+ _params[_key] = _val
489
+ del _params['kwargs']
490
+
491
+ _collection_formats = {}
492
+
493
+ # process the path parameters
494
+ _path_params = {}
495
+
496
+ # process the query parameters
497
+ _query_params = []
498
+ # process the header parameters
499
+ _header_params = dict(_params.get('_headers', {}))
500
+ # process the form parameters
501
+ _form_params = []
502
+ _files = {}
503
+ # process the body parameter
504
+ _body_params = None
505
+ if _params['request_body'] is not None:
506
+ _body_params = _params['request_body']
507
+
508
+ # set the HTTP header `Accept`
509
+ _header_params['Accept'] = self.api_client.select_header_accept(
510
+ ['text/plain', 'application/json', 'text/json']) # noqa: E501
511
+
512
+ # set the HTTP header `Content-Type`
513
+ _content_types_list = _params.get('_content_type',
514
+ self.api_client.select_header_content_type(
515
+ ['application/json-patch+json', 'application/json', 'text/json', 'application/*+json']))
516
+ if _content_types_list:
517
+ _header_params['Content-Type'] = _content_types_list
518
+
519
+ # authentication setting
520
+ _auth_settings = ['oauth2'] # noqa: E501
521
+
522
+ _response_types_map = {
523
+ '200': "CancelPlacementsResponse",
524
+ '400': "LusidValidationProblemDetails",
525
+ }
526
+
527
+ return self.api_client.call_api(
528
+ '/api/ordermanagement/$cancelplacements', 'POST',
529
+ _path_params,
530
+ _query_params,
531
+ _header_params,
532
+ body=_body_params,
533
+ post_params=_form_params,
534
+ files=_files,
535
+ response_types_map=_response_types_map,
536
+ auth_settings=_auth_settings,
537
+ async_req=_params.get('async_req'),
538
+ _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501
539
+ _preload_content=_params.get('_preload_content', True),
540
+ _request_timeout=_params.get('_request_timeout'),
541
+ collection_formats=_collection_formats,
542
+ _request_auth=_params.get('_request_auth'))
543
+
224
544
  @overload
225
545
  async def create_orders(self, block_and_orders_create_request : Annotated[BlockAndOrdersCreateRequest, Field(..., description="The collection of block and orders requests.")], **kwargs) -> ResourceListOfBlockAndOrders: # noqa: E501
226
546
  ...
@@ -860,3 +1180,161 @@ class OrderManagementApi:
860
1180
  _request_timeout=_params.get('_request_timeout'),
861
1181
  collection_formats=_collection_formats,
862
1182
  _request_auth=_params.get('_request_auth'))
1183
+
1184
+ @overload
1185
+ async def update_placements(self, request_body : Annotated[Dict[str, PlacementUpdateRequest], Field(..., description="The request containing the placements to be updated.")], **kwargs) -> UpdatePlacementsResponse: # noqa: E501
1186
+ ...
1187
+
1188
+ @overload
1189
+ def update_placements(self, request_body : Annotated[Dict[str, PlacementUpdateRequest], Field(..., description="The request containing the placements to be updated.")], async_req: Optional[bool]=True, **kwargs) -> UpdatePlacementsResponse: # noqa: E501
1190
+ ...
1191
+
1192
+ @validate_arguments
1193
+ def update_placements(self, request_body : Annotated[Dict[str, PlacementUpdateRequest], Field(..., description="The request containing the placements to be updated.")], async_req: Optional[bool]=None, **kwargs) -> Union[UpdatePlacementsResponse, Awaitable[UpdatePlacementsResponse]]: # noqa: E501
1194
+ """[EARLY ACCESS] UpdatePlacements: Update existing placements # noqa: E501
1195
+
1196
+ The response returns both the collection of successfully updated placements, as well as those that failed. For each failure, a reason is provided. It is important to check the failed set for unsuccessful results. # noqa: E501
1197
+ This method makes a synchronous HTTP request by default. To make an
1198
+ asynchronous HTTP request, please pass async_req=True
1199
+
1200
+ >>> thread = api.update_placements(request_body, async_req=True)
1201
+ >>> result = thread.get()
1202
+
1203
+ :param request_body: The request containing the placements to be updated. (required)
1204
+ :type request_body: Dict[str, PlacementUpdateRequest]
1205
+ :param async_req: Whether to execute the request asynchronously.
1206
+ :type async_req: bool, optional
1207
+ :param _request_timeout: timeout setting for this request.
1208
+ If one number provided, it will be total request
1209
+ timeout. It can also be a pair (tuple) of
1210
+ (connection, read) timeouts.
1211
+ :return: Returns the result object.
1212
+ If the method is called asynchronously,
1213
+ returns the request thread.
1214
+ :rtype: UpdatePlacementsResponse
1215
+ """
1216
+ kwargs['_return_http_data_only'] = True
1217
+ if '_preload_content' in kwargs:
1218
+ message = "Error! Please call the update_placements_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501
1219
+ raise ValueError(message)
1220
+ if async_req is not None:
1221
+ kwargs['async_req'] = async_req
1222
+ return self.update_placements_with_http_info(request_body, **kwargs) # noqa: E501
1223
+
1224
+ @validate_arguments
1225
+ def update_placements_with_http_info(self, request_body : Annotated[Dict[str, PlacementUpdateRequest], Field(..., description="The request containing the placements to be updated.")], **kwargs) -> ApiResponse: # noqa: E501
1226
+ """[EARLY ACCESS] UpdatePlacements: Update existing placements # noqa: E501
1227
+
1228
+ The response returns both the collection of successfully updated placements, as well as those that failed. For each failure, a reason is provided. It is important to check the failed set for unsuccessful results. # noqa: E501
1229
+ This method makes a synchronous HTTP request by default. To make an
1230
+ asynchronous HTTP request, please pass async_req=True
1231
+
1232
+ >>> thread = api.update_placements_with_http_info(request_body, async_req=True)
1233
+ >>> result = thread.get()
1234
+
1235
+ :param request_body: The request containing the placements to be updated. (required)
1236
+ :type request_body: Dict[str, PlacementUpdateRequest]
1237
+ :param async_req: Whether to execute the request asynchronously.
1238
+ :type async_req: bool, optional
1239
+ :param _preload_content: if False, the ApiResponse.data will
1240
+ be set to none and raw_data will store the
1241
+ HTTP response body without reading/decoding.
1242
+ Default is True.
1243
+ :type _preload_content: bool, optional
1244
+ :param _return_http_data_only: response data instead of ApiResponse
1245
+ object with status code, headers, etc
1246
+ :type _return_http_data_only: bool, optional
1247
+ :param _request_timeout: timeout setting for this request. If one
1248
+ number provided, it will be total request
1249
+ timeout. It can also be a pair (tuple) of
1250
+ (connection, read) timeouts.
1251
+ :param _request_auth: set to override the auth_settings for an a single
1252
+ request; this effectively ignores the authentication
1253
+ in the spec for a single request.
1254
+ :type _request_auth: dict, optional
1255
+ :type _content_type: string, optional: force content-type for the request
1256
+ :return: Returns the result object.
1257
+ If the method is called asynchronously,
1258
+ returns the request thread.
1259
+ :rtype: tuple(UpdatePlacementsResponse, status_code(int), headers(HTTPHeaderDict))
1260
+ """
1261
+
1262
+ _params = locals()
1263
+
1264
+ _all_params = [
1265
+ 'request_body'
1266
+ ]
1267
+ _all_params.extend(
1268
+ [
1269
+ 'async_req',
1270
+ '_return_http_data_only',
1271
+ '_preload_content',
1272
+ '_request_timeout',
1273
+ '_request_auth',
1274
+ '_content_type',
1275
+ '_headers'
1276
+ ]
1277
+ )
1278
+
1279
+ # validate the arguments
1280
+ for _key, _val in _params['kwargs'].items():
1281
+ if _key not in _all_params:
1282
+ raise ApiTypeError(
1283
+ "Got an unexpected keyword argument '%s'"
1284
+ " to method update_placements" % _key
1285
+ )
1286
+ _params[_key] = _val
1287
+ del _params['kwargs']
1288
+
1289
+ _collection_formats = {}
1290
+
1291
+ # process the path parameters
1292
+ _path_params = {}
1293
+
1294
+ # process the query parameters
1295
+ _query_params = []
1296
+ # process the header parameters
1297
+ _header_params = dict(_params.get('_headers', {}))
1298
+ # process the form parameters
1299
+ _form_params = []
1300
+ _files = {}
1301
+ # process the body parameter
1302
+ _body_params = None
1303
+ if _params['request_body'] is not None:
1304
+ _body_params = _params['request_body']
1305
+
1306
+ # set the HTTP header `Accept`
1307
+ _header_params['Accept'] = self.api_client.select_header_accept(
1308
+ ['text/plain', 'application/json', 'text/json']) # noqa: E501
1309
+
1310
+ # set the HTTP header `Content-Type`
1311
+ _content_types_list = _params.get('_content_type',
1312
+ self.api_client.select_header_content_type(
1313
+ ['application/json-patch+json', 'application/json', 'text/json', 'application/*+json']))
1314
+ if _content_types_list:
1315
+ _header_params['Content-Type'] = _content_types_list
1316
+
1317
+ # authentication setting
1318
+ _auth_settings = ['oauth2'] # noqa: E501
1319
+
1320
+ _response_types_map = {
1321
+ '200': "UpdatePlacementsResponse",
1322
+ '400': "LusidValidationProblemDetails",
1323
+ }
1324
+
1325
+ return self.api_client.call_api(
1326
+ '/api/ordermanagement/$updateplacements', 'POST',
1327
+ _path_params,
1328
+ _query_params,
1329
+ _header_params,
1330
+ body=_body_params,
1331
+ post_params=_form_params,
1332
+ files=_files,
1333
+ response_types_map=_response_types_map,
1334
+ auth_settings=_auth_settings,
1335
+ async_req=_params.get('async_req'),
1336
+ _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501
1337
+ _preload_content=_params.get('_preload_content', True),
1338
+ _request_timeout=_params.get('_request_timeout'),
1339
+ collection_formats=_collection_formats,
1340
+ _request_auth=_params.get('_request_auth'))
lusid/api/scopes_api.py CHANGED
@@ -20,7 +20,9 @@ from pydantic.v1 import validate_arguments, ValidationError
20
20
  from typing import overload, Optional, Union, Awaitable
21
21
 
22
22
  from typing_extensions import Annotated
23
- from pydantic.v1 import Field, constr, validator
23
+ from datetime import datetime
24
+
25
+ from pydantic.v1 import Field, conint, constr, validator
24
26
 
25
27
  from typing import Optional
26
28
 
@@ -47,26 +49,32 @@ class ScopesApi:
47
49
  self.api_client = api_client
48
50
 
49
51
  @overload
50
- async def list_entity_scopes(self, entity_type : Annotated[constr(strict=True, max_length=100, min_length=0), Field(..., description="The entity type to list scopes for.")], **kwargs) -> ResourceListOfScopeDefinition: # noqa: E501
52
+ async def list_entity_scopes(self, entity_type : Annotated[constr(strict=True, max_length=100, min_length=0), Field(..., description="The entity type to list scopes for.")], as_at : Annotated[Optional[datetime], Field(description="The asAt datetime at which to retrieve scopes. Defaults to latest datetime if not specified.")] = None, page : Annotated[Optional[constr(strict=True, max_length=500, min_length=1)], Field(description="The pagination token to use to continue listing scopes from a previous call to list scopes. This value is returned from the previous call. If a pagination token is provided, the limit and asAt fields must not have changed since the original request.")] = None, limit : Annotated[Optional[conint(strict=True, le=5000, ge=1)], Field(description="When paginating, limit the number of returned results to this number. Defaults to 100 if not specified.")] = None, **kwargs) -> ResourceListOfScopeDefinition: # noqa: E501
51
53
  ...
52
54
 
53
55
  @overload
54
- def list_entity_scopes(self, entity_type : Annotated[constr(strict=True, max_length=100, min_length=0), Field(..., description="The entity type to list scopes for.")], async_req: Optional[bool]=True, **kwargs) -> ResourceListOfScopeDefinition: # noqa: E501
56
+ def list_entity_scopes(self, entity_type : Annotated[constr(strict=True, max_length=100, min_length=0), Field(..., description="The entity type to list scopes for.")], as_at : Annotated[Optional[datetime], Field(description="The asAt datetime at which to retrieve scopes. Defaults to latest datetime if not specified.")] = None, page : Annotated[Optional[constr(strict=True, max_length=500, min_length=1)], Field(description="The pagination token to use to continue listing scopes from a previous call to list scopes. This value is returned from the previous call. If a pagination token is provided, the limit and asAt fields must not have changed since the original request.")] = None, limit : Annotated[Optional[conint(strict=True, le=5000, ge=1)], Field(description="When paginating, limit the number of returned results to this number. Defaults to 100 if not specified.")] = None, async_req: Optional[bool]=True, **kwargs) -> ResourceListOfScopeDefinition: # noqa: E501
55
57
  ...
56
58
 
57
59
  @validate_arguments
58
- def list_entity_scopes(self, entity_type : Annotated[constr(strict=True, max_length=100, min_length=0), Field(..., description="The entity type to list scopes for.")], async_req: Optional[bool]=None, **kwargs) -> Union[ResourceListOfScopeDefinition, Awaitable[ResourceListOfScopeDefinition]]: # noqa: E501
60
+ def list_entity_scopes(self, entity_type : Annotated[constr(strict=True, max_length=100, min_length=0), Field(..., description="The entity type to list scopes for.")], as_at : Annotated[Optional[datetime], Field(description="The asAt datetime at which to retrieve scopes. Defaults to latest datetime if not specified.")] = None, page : Annotated[Optional[constr(strict=True, max_length=500, min_length=1)], Field(description="The pagination token to use to continue listing scopes from a previous call to list scopes. This value is returned from the previous call. If a pagination token is provided, the limit and asAt fields must not have changed since the original request.")] = None, limit : Annotated[Optional[conint(strict=True, le=5000, ge=1)], Field(description="When paginating, limit the number of returned results to this number. Defaults to 100 if not specified.")] = None, async_req: Optional[bool]=None, **kwargs) -> Union[ResourceListOfScopeDefinition, Awaitable[ResourceListOfScopeDefinition]]: # noqa: E501
59
61
  """ListEntityScopes: List Entity Scopes # noqa: E501
60
62
 
61
63
  List all the scopes for a given entity type that contain data. # noqa: E501
62
64
  This method makes a synchronous HTTP request by default. To make an
63
65
  asynchronous HTTP request, please pass async_req=True
64
66
 
65
- >>> thread = api.list_entity_scopes(entity_type, async_req=True)
67
+ >>> thread = api.list_entity_scopes(entity_type, as_at, page, limit, async_req=True)
66
68
  >>> result = thread.get()
67
69
 
68
70
  :param entity_type: The entity type to list scopes for. (required)
69
71
  :type entity_type: str
72
+ :param as_at: The asAt datetime at which to retrieve scopes. Defaults to latest datetime if not specified.
73
+ :type as_at: datetime
74
+ :param page: The pagination token to use to continue listing scopes from a previous call to list scopes. This value is returned from the previous call. If a pagination token is provided, the limit and asAt fields must not have changed since the original request.
75
+ :type page: str
76
+ :param limit: When paginating, limit the number of returned results to this number. Defaults to 100 if not specified.
77
+ :type limit: int
70
78
  :param async_req: Whether to execute the request asynchronously.
71
79
  :type async_req: bool, optional
72
80
  :param _request_timeout: timeout setting for this request.
@@ -84,21 +92,27 @@ class ScopesApi:
84
92
  raise ValueError(message)
85
93
  if async_req is not None:
86
94
  kwargs['async_req'] = async_req
87
- return self.list_entity_scopes_with_http_info(entity_type, **kwargs) # noqa: E501
95
+ return self.list_entity_scopes_with_http_info(entity_type, as_at, page, limit, **kwargs) # noqa: E501
88
96
 
89
97
  @validate_arguments
90
- def list_entity_scopes_with_http_info(self, entity_type : Annotated[constr(strict=True, max_length=100, min_length=0), Field(..., description="The entity type to list scopes for.")], **kwargs) -> ApiResponse: # noqa: E501
98
+ def list_entity_scopes_with_http_info(self, entity_type : Annotated[constr(strict=True, max_length=100, min_length=0), Field(..., description="The entity type to list scopes for.")], as_at : Annotated[Optional[datetime], Field(description="The asAt datetime at which to retrieve scopes. Defaults to latest datetime if not specified.")] = None, page : Annotated[Optional[constr(strict=True, max_length=500, min_length=1)], Field(description="The pagination token to use to continue listing scopes from a previous call to list scopes. This value is returned from the previous call. If a pagination token is provided, the limit and asAt fields must not have changed since the original request.")] = None, limit : Annotated[Optional[conint(strict=True, le=5000, ge=1)], Field(description="When paginating, limit the number of returned results to this number. Defaults to 100 if not specified.")] = None, **kwargs) -> ApiResponse: # noqa: E501
91
99
  """ListEntityScopes: List Entity Scopes # noqa: E501
92
100
 
93
101
  List all the scopes for a given entity type that contain data. # noqa: E501
94
102
  This method makes a synchronous HTTP request by default. To make an
95
103
  asynchronous HTTP request, please pass async_req=True
96
104
 
97
- >>> thread = api.list_entity_scopes_with_http_info(entity_type, async_req=True)
105
+ >>> thread = api.list_entity_scopes_with_http_info(entity_type, as_at, page, limit, async_req=True)
98
106
  >>> result = thread.get()
99
107
 
100
108
  :param entity_type: The entity type to list scopes for. (required)
101
109
  :type entity_type: str
110
+ :param as_at: The asAt datetime at which to retrieve scopes. Defaults to latest datetime if not specified.
111
+ :type as_at: datetime
112
+ :param page: The pagination token to use to continue listing scopes from a previous call to list scopes. This value is returned from the previous call. If a pagination token is provided, the limit and asAt fields must not have changed since the original request.
113
+ :type page: str
114
+ :param limit: When paginating, limit the number of returned results to this number. Defaults to 100 if not specified.
115
+ :type limit: int
102
116
  :param async_req: Whether to execute the request asynchronously.
103
117
  :type async_req: bool, optional
104
118
  :param _preload_content: if False, the ApiResponse.data will
@@ -127,7 +141,10 @@ class ScopesApi:
127
141
  _params = locals()
128
142
 
129
143
  _all_params = [
130
- 'entity_type'
144
+ 'entity_type',
145
+ 'as_at',
146
+ 'page',
147
+ 'limit'
131
148
  ]
132
149
  _all_params.extend(
133
150
  [
@@ -161,6 +178,18 @@ class ScopesApi:
161
178
 
162
179
  # process the query parameters
163
180
  _query_params = []
181
+ if _params.get('as_at') is not None: # noqa: E501
182
+ if isinstance(_params['as_at'], datetime):
183
+ _query_params.append(('asAt', _params['as_at'].strftime(self.api_client.configuration.datetime_format)))
184
+ else:
185
+ _query_params.append(('asAt', _params['as_at']))
186
+
187
+ if _params.get('page') is not None: # noqa: E501
188
+ _query_params.append(('page', _params['page']))
189
+
190
+ if _params.get('limit') is not None: # noqa: E501
191
+ _query_params.append(('limit', _params['limit']))
192
+
164
193
  # process the header parameters
165
194
  _header_params = dict(_params.get('_headers', {}))
166
195
  # process the form parameters
lusid/configuration.py CHANGED
@@ -373,7 +373,7 @@ class Configuration:
373
373
  return "Python SDK Debug Report:\n"\
374
374
  "OS: {env}\n"\
375
375
  "Python Version: {pyversion}\n"\
376
- "Version of the API: 0.11.6675\n"\
376
+ "Version of the API: 0.11.6751\n"\
377
377
  "SDK Package Version: {package_version}".\
378
378
  format(env=sys.platform, pyversion=sys.version, package_version=package_version)
379
379