lusid-sdk 2.1.960__py3-none-any.whl → 2.1.962__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.
@@ -442,22 +442,22 @@ class PortfolioGroupsApi:
442
442
 
443
443
 
444
444
  @overload
445
- async def build_transactions_for_portfolio_group(self, scope : Annotated[StrictStr, Field(..., description="The scope of the portfolio group.")], code : Annotated[StrictStr, Field(..., description="The code of the portfolio group. Together with the scope this uniquely identifies the portfolio group.")], 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 filter on the Transaction Type, use \"type eq 'Buy'\" Read more about filtering results from LUSID here https://support.lusid.com/filtering-results-from-lusid.")] = 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
445
+ async def build_transactions_for_portfolio_group(self, scope : Annotated[StrictStr, Field(..., description="The scope of the portfolio group.")], code : Annotated[StrictStr, Field(..., description="The code of the portfolio group. Together with the scope this uniquely identifies the portfolio group.")], 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 filter on the Transaction Type, use \"type eq 'Buy'\" Read more about filtering results from LUSID here https://support.lusid.com/filtering-results-from-lusid.")] = 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, 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) -> VersionedResourceListOfOutputTransaction: # noqa: E501
446
446
  ...
447
447
 
448
448
  @overload
449
- def build_transactions_for_portfolio_group(self, scope : Annotated[StrictStr, Field(..., description="The scope of the portfolio group.")], code : Annotated[StrictStr, Field(..., description="The code of the portfolio group. Together with the scope this uniquely identifies the portfolio group.")], 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 filter on the Transaction Type, use \"type eq 'Buy'\" Read more about filtering results from LUSID here https://support.lusid.com/filtering-results-from-lusid.")] = 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, async_req: Optional[bool]=True, **kwargs) -> VersionedResourceListOfOutputTransaction: # noqa: E501
449
+ def build_transactions_for_portfolio_group(self, scope : Annotated[StrictStr, Field(..., description="The scope of the portfolio group.")], code : Annotated[StrictStr, Field(..., description="The code of the portfolio group. Together with the scope this uniquely identifies the portfolio group.")], 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 filter on the Transaction Type, use \"type eq 'Buy'\" Read more about filtering results from LUSID here https://support.lusid.com/filtering-results-from-lusid.")] = 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, 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) -> VersionedResourceListOfOutputTransaction: # noqa: E501
450
450
  ...
451
451
 
452
452
  @validate_arguments
453
- def build_transactions_for_portfolio_group(self, scope : Annotated[StrictStr, Field(..., description="The scope of the portfolio group.")], code : Annotated[StrictStr, Field(..., description="The code of the portfolio group. Together with the scope this uniquely identifies the portfolio group.")], 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 filter on the Transaction Type, use \"type eq 'Buy'\" Read more about filtering results from LUSID here https://support.lusid.com/filtering-results-from-lusid.")] = 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, async_req: Optional[bool]=None, **kwargs) -> Union[VersionedResourceListOfOutputTransaction, Awaitable[VersionedResourceListOfOutputTransaction]]: # noqa: E501
453
+ def build_transactions_for_portfolio_group(self, scope : Annotated[StrictStr, Field(..., description="The scope of the portfolio group.")], code : Annotated[StrictStr, Field(..., description="The code of the portfolio group. Together with the scope this uniquely identifies the portfolio group.")], 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 filter on the Transaction Type, use \"type eq 'Buy'\" Read more about filtering results from LUSID here https://support.lusid.com/filtering-results-from-lusid.")] = 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, 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[VersionedResourceListOfOutputTransaction, Awaitable[VersionedResourceListOfOutputTransaction]]: # noqa: E501
454
454
  """BuildTransactionsForPortfolioGroup: Build transactions for transaction portfolios in a portfolio group # noqa: E501
455
455
 
456
456
  Build transactions for transaction portfolios in a portfolio group over a given interval of effective time. When the specified portfolio in a portfolio group is a derived transaction portfolio, the returned set of transactions is the union set of all transactions of the parent (and any grandparents etc.) and the specified derived transaction portfolio itself. # noqa: E501
457
457
  This method makes a synchronous HTTP request by default. To make an
458
458
  asynchronous HTTP request, please pass async_req=True
459
459
 
460
- >>> thread = api.build_transactions_for_portfolio_group(scope, code, transaction_query_parameters, as_at, filter, property_keys, limit, page, async_req=True)
460
+ >>> thread = api.build_transactions_for_portfolio_group(scope, code, transaction_query_parameters, as_at, filter, property_keys, limit, page, data_model_scope, data_model_code, async_req=True)
461
461
  >>> result = thread.get()
462
462
 
463
463
  :param scope: The scope of the portfolio group. (required)
@@ -476,6 +476,10 @@ class PortfolioGroupsApi:
476
476
  :type limit: int
477
477
  :param page: The pagination token to use to continue listing transactions from a previous call to BuildTransactions.
478
478
  :type page: str
479
+ :param data_model_scope: The optional scope of a Custom Data Model to use
480
+ :type data_model_scope: str
481
+ :param data_model_code: The optional code of a Custom Data Model to use
482
+ :type data_model_code: str
479
483
  :param async_req: Whether to execute the request asynchronously.
480
484
  :type async_req: bool, optional
481
485
  :param _request_timeout: Timeout setting. Do not use - use the opts parameter instead
@@ -492,17 +496,17 @@ class PortfolioGroupsApi:
492
496
  raise ValueError(message)
493
497
  if async_req is not None:
494
498
  kwargs['async_req'] = async_req
495
- return self.build_transactions_for_portfolio_group_with_http_info(scope, code, transaction_query_parameters, as_at, filter, property_keys, limit, page, **kwargs) # noqa: E501
499
+ return self.build_transactions_for_portfolio_group_with_http_info(scope, code, transaction_query_parameters, as_at, filter, property_keys, limit, page, data_model_scope, data_model_code, **kwargs) # noqa: E501
496
500
 
497
501
  @validate_arguments
498
- def build_transactions_for_portfolio_group_with_http_info(self, scope : Annotated[StrictStr, Field(..., description="The scope of the portfolio group.")], code : Annotated[StrictStr, Field(..., description="The code of the portfolio group. Together with the scope this uniquely identifies the portfolio group.")], 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 filter on the Transaction Type, use \"type eq 'Buy'\" Read more about filtering results from LUSID here https://support.lusid.com/filtering-results-from-lusid.")] = 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) -> ApiResponse: # noqa: E501
502
+ def build_transactions_for_portfolio_group_with_http_info(self, scope : Annotated[StrictStr, Field(..., description="The scope of the portfolio group.")], code : Annotated[StrictStr, Field(..., description="The code of the portfolio group. Together with the scope this uniquely identifies the portfolio group.")], 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 filter on the Transaction Type, use \"type eq 'Buy'\" Read more about filtering results from LUSID here https://support.lusid.com/filtering-results-from-lusid.")] = 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, 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
499
503
  """BuildTransactionsForPortfolioGroup: Build transactions for transaction portfolios in a portfolio group # noqa: E501
500
504
 
501
505
  Build transactions for transaction portfolios in a portfolio group over a given interval of effective time. When the specified portfolio in a portfolio group is a derived transaction portfolio, the returned set of transactions is the union set of all transactions of the parent (and any grandparents etc.) and the specified derived transaction portfolio itself. # noqa: E501
502
506
  This method makes a synchronous HTTP request by default. To make an
503
507
  asynchronous HTTP request, please pass async_req=True
504
508
 
505
- >>> thread = api.build_transactions_for_portfolio_group_with_http_info(scope, code, transaction_query_parameters, as_at, filter, property_keys, limit, page, async_req=True)
509
+ >>> thread = api.build_transactions_for_portfolio_group_with_http_info(scope, code, transaction_query_parameters, as_at, filter, property_keys, limit, page, data_model_scope, data_model_code, async_req=True)
506
510
  >>> result = thread.get()
507
511
 
508
512
  :param scope: The scope of the portfolio group. (required)
@@ -521,6 +525,10 @@ class PortfolioGroupsApi:
521
525
  :type limit: int
522
526
  :param page: The pagination token to use to continue listing transactions from a previous call to BuildTransactions.
523
527
  :type page: str
528
+ :param data_model_scope: The optional scope of a Custom Data Model to use
529
+ :type data_model_scope: str
530
+ :param data_model_code: The optional code of a Custom Data Model to use
531
+ :type data_model_code: str
524
532
  :param async_req: Whether to execute the request asynchronously.
525
533
  :type async_req: bool, optional
526
534
  :param _preload_content: if False, the ApiResponse.data will
@@ -555,7 +563,9 @@ class PortfolioGroupsApi:
555
563
  'filter',
556
564
  'property_keys',
557
565
  'limit',
558
- 'page'
566
+ 'page',
567
+ 'data_model_scope',
568
+ 'data_model_code'
559
569
  ]
560
570
  _all_params.extend(
561
571
  [
@@ -612,6 +622,12 @@ class PortfolioGroupsApi:
612
622
  if _params.get('page') is not None: # noqa: E501
613
623
  _query_params.append(('page', _params['page']))
614
624
 
625
+ if _params.get('data_model_scope') is not None: # noqa: E501
626
+ _query_params.append(('dataModelScope', _params['data_model_scope']))
627
+
628
+ if _params.get('data_model_code') is not None: # noqa: E501
629
+ _query_params.append(('dataModelCode', _params['data_model_code']))
630
+
615
631
  # process the header parameters
616
632
  _header_params = dict(_params.get('_headers', {}))
617
633
  # process the form parameters
@@ -31,6 +31,7 @@ from lusid.models.adjust_holding_for_date_request import AdjustHoldingForDateReq
31
31
  from lusid.models.adjust_holding_request import AdjustHoldingRequest
32
32
  from lusid.models.batch_adjust_holdings_response import BatchAdjustHoldingsResponse
33
33
  from lusid.models.batch_upsert_portfolio_transactions_response import BatchUpsertPortfolioTransactionsResponse
34
+ from lusid.models.batch_upsert_transaction_settlement_instruction_response import BatchUpsertTransactionSettlementInstructionResponse
34
35
  from lusid.models.bucketed_cash_flow_request import BucketedCashFlowRequest
35
36
  from lusid.models.bucketed_cash_flow_response import BucketedCashFlowResponse
36
37
  from lusid.models.cancel_single_holding_adjustment_request import CancelSingleHoldingAdjustmentRequest
@@ -870,6 +871,181 @@ class TransactionPortfoliosApi:
870
871
  _request_auth=_params.get('_request_auth'))
871
872
 
872
873
 
874
+ @overload
875
+ async def batch_upsert_settlement_instructions(self, scope : Annotated[StrictStr, Field(..., description="The scope of the portfolio.")], code : Annotated[StrictStr, Field(..., description="The code of the portfolio.")], request_body : Annotated[Dict[str, SettlementInstructionRequest], Field(..., description="The definition of the settlement instruction.")], **kwargs) -> BatchUpsertTransactionSettlementInstructionResponse: # noqa: E501
876
+ ...
877
+
878
+ @overload
879
+ def batch_upsert_settlement_instructions(self, scope : Annotated[StrictStr, Field(..., description="The scope of the portfolio.")], code : Annotated[StrictStr, Field(..., description="The code of the portfolio.")], request_body : Annotated[Dict[str, SettlementInstructionRequest], Field(..., description="The definition of the settlement instruction.")], async_req: Optional[bool]=True, **kwargs) -> BatchUpsertTransactionSettlementInstructionResponse: # noqa: E501
880
+ ...
881
+
882
+ @validate_arguments
883
+ def batch_upsert_settlement_instructions(self, scope : Annotated[StrictStr, Field(..., description="The scope of the portfolio.")], code : Annotated[StrictStr, Field(..., description="The code of the portfolio.")], request_body : Annotated[Dict[str, SettlementInstructionRequest], Field(..., description="The definition of the settlement instruction.")], async_req: Optional[bool]=None, **kwargs) -> Union[BatchUpsertTransactionSettlementInstructionResponse, Awaitable[BatchUpsertTransactionSettlementInstructionResponse]]: # noqa: E501
884
+ """[EARLY ACCESS] BatchUpsertSettlementInstructions: Batch Upsert Settlement Instructions. # noqa: E501
885
+
886
+ Create or update instructions to settle specific transactions. # noqa: E501
887
+ This method makes a synchronous HTTP request by default. To make an
888
+ asynchronous HTTP request, please pass async_req=True
889
+
890
+ >>> thread = api.batch_upsert_settlement_instructions(scope, code, request_body, async_req=True)
891
+ >>> result = thread.get()
892
+
893
+ :param scope: The scope of the portfolio. (required)
894
+ :type scope: str
895
+ :param code: The code of the portfolio. (required)
896
+ :type code: str
897
+ :param request_body: The definition of the settlement instruction. (required)
898
+ :type request_body: Dict[str, SettlementInstructionRequest]
899
+ :param async_req: Whether to execute the request asynchronously.
900
+ :type async_req: bool, optional
901
+ :param _request_timeout: Timeout setting. Do not use - use the opts parameter instead
902
+ :param opts: Configuration options for this request
903
+ :type opts: ConfigurationOptions, optional
904
+ :return: Returns the result object.
905
+ If the method is called asynchronously,
906
+ returns the request thread.
907
+ :rtype: BatchUpsertTransactionSettlementInstructionResponse
908
+ """
909
+ kwargs['_return_http_data_only'] = True
910
+ if '_preload_content' in kwargs:
911
+ message = "Error! Please call the batch_upsert_settlement_instructions_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501
912
+ raise ValueError(message)
913
+ if async_req is not None:
914
+ kwargs['async_req'] = async_req
915
+ return self.batch_upsert_settlement_instructions_with_http_info(scope, code, request_body, **kwargs) # noqa: E501
916
+
917
+ @validate_arguments
918
+ def batch_upsert_settlement_instructions_with_http_info(self, scope : Annotated[StrictStr, Field(..., description="The scope of the portfolio.")], code : Annotated[StrictStr, Field(..., description="The code of the portfolio.")], request_body : Annotated[Dict[str, SettlementInstructionRequest], Field(..., description="The definition of the settlement instruction.")], **kwargs) -> ApiResponse: # noqa: E501
919
+ """[EARLY ACCESS] BatchUpsertSettlementInstructions: Batch Upsert Settlement Instructions. # noqa: E501
920
+
921
+ Create or update instructions to settle specific transactions. # noqa: E501
922
+ This method makes a synchronous HTTP request by default. To make an
923
+ asynchronous HTTP request, please pass async_req=True
924
+
925
+ >>> thread = api.batch_upsert_settlement_instructions_with_http_info(scope, code, request_body, async_req=True)
926
+ >>> result = thread.get()
927
+
928
+ :param scope: The scope of the portfolio. (required)
929
+ :type scope: str
930
+ :param code: The code of the portfolio. (required)
931
+ :type code: str
932
+ :param request_body: The definition of the settlement instruction. (required)
933
+ :type request_body: Dict[str, SettlementInstructionRequest]
934
+ :param async_req: Whether to execute the request asynchronously.
935
+ :type async_req: bool, optional
936
+ :param _preload_content: if False, the ApiResponse.data will
937
+ be set to none and raw_data will store the
938
+ HTTP response body without reading/decoding.
939
+ Default is True.
940
+ :type _preload_content: bool, optional
941
+ :param _return_http_data_only: response data instead of ApiResponse
942
+ object with status code, headers, etc
943
+ :type _return_http_data_only: bool, optional
944
+ :param _request_timeout: Timeout setting. Do not use - use the opts parameter instead
945
+ :param opts: Configuration options for this request
946
+ :type opts: ConfigurationOptions, optional
947
+ :param _request_auth: set to override the auth_settings for an a single
948
+ request; this effectively ignores the authentication
949
+ in the spec for a single request.
950
+ :type _request_auth: dict, optional
951
+ :type _content_type: string, optional: force content-type for the request
952
+ :return: Returns the result object.
953
+ If the method is called asynchronously,
954
+ returns the request thread.
955
+ :rtype: tuple(BatchUpsertTransactionSettlementInstructionResponse, status_code(int), headers(HTTPHeaderDict))
956
+ """
957
+
958
+ _params = locals()
959
+
960
+ _all_params = [
961
+ 'scope',
962
+ 'code',
963
+ 'request_body'
964
+ ]
965
+ _all_params.extend(
966
+ [
967
+ 'async_req',
968
+ '_return_http_data_only',
969
+ '_preload_content',
970
+ '_request_timeout',
971
+ '_request_auth',
972
+ '_content_type',
973
+ '_headers',
974
+ 'opts'
975
+ ]
976
+ )
977
+
978
+ # validate the arguments
979
+ for _key, _val in _params['kwargs'].items():
980
+ if _key not in _all_params:
981
+ raise ApiTypeError(
982
+ "Got an unexpected keyword argument '%s'"
983
+ " to method batch_upsert_settlement_instructions" % _key
984
+ )
985
+ _params[_key] = _val
986
+ del _params['kwargs']
987
+
988
+ _collection_formats = {}
989
+
990
+ # process the path parameters
991
+ _path_params = {}
992
+ if _params['scope']:
993
+ _path_params['scope'] = _params['scope']
994
+
995
+ if _params['code']:
996
+ _path_params['code'] = _params['code']
997
+
998
+
999
+ # process the query parameters
1000
+ _query_params = []
1001
+ # process the header parameters
1002
+ _header_params = dict(_params.get('_headers', {}))
1003
+ # process the form parameters
1004
+ _form_params = []
1005
+ _files = {}
1006
+ # process the body parameter
1007
+ _body_params = None
1008
+ if _params['request_body'] is not None:
1009
+ _body_params = _params['request_body']
1010
+
1011
+ # set the HTTP header `Accept`
1012
+ _header_params['Accept'] = self.api_client.select_header_accept(
1013
+ ['text/plain', 'application/json', 'text/json']) # noqa: E501
1014
+
1015
+ # set the HTTP header `Content-Type`
1016
+ _content_types_list = _params.get('_content_type',
1017
+ self.api_client.select_header_content_type(
1018
+ ['application/json-patch+json', 'application/json', 'text/json', 'application/*+json']))
1019
+ if _content_types_list:
1020
+ _header_params['Content-Type'] = _content_types_list
1021
+
1022
+ # authentication setting
1023
+ _auth_settings = ['oauth2'] # noqa: E501
1024
+
1025
+ _response_types_map = {
1026
+ '201': "BatchUpsertTransactionSettlementInstructionResponse",
1027
+ '400': "LusidValidationProblemDetails",
1028
+ }
1029
+
1030
+ return self.api_client.call_api(
1031
+ '/api/transactionportfolios/{scope}/{code}/settlementinstructions/$batchUpsert', 'POST',
1032
+ _path_params,
1033
+ _query_params,
1034
+ _header_params,
1035
+ body=_body_params,
1036
+ post_params=_form_params,
1037
+ files=_files,
1038
+ response_types_map=_response_types_map,
1039
+ auth_settings=_auth_settings,
1040
+ async_req=_params.get('async_req'),
1041
+ _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501
1042
+ _preload_content=_params.get('_preload_content', True),
1043
+ _request_timeout=_params.get('_request_timeout'),
1044
+ opts=_params.get('opts'),
1045
+ collection_formats=_collection_formats,
1046
+ _request_auth=_params.get('_request_auth'))
1047
+
1048
+
873
1049
  @overload
874
1050
  async def batch_upsert_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.")], success_mode : Annotated[StrictStr, Field(..., description="Whether the batch request should fail Atomically or in a Partial fashion - Allowed Values: Atomic, Partial.")], request_body : Annotated[Dict[str, TransactionRequest], Field(..., description="The payload describing the transactions to be created or updated.")], preserve_properties : Annotated[Optional[StrictBool], Field(description="If set to false, the entire property set will be overwritten by the provided properties. If not specified or set to true, only the properties provided will be updated.")] = None, **kwargs) -> BatchUpsertPortfolioTransactionsResponse: # noqa: E501
875
1051
  ...
@@ -1062,22 +1238,22 @@ class TransactionPortfoliosApi:
1062
1238
 
1063
1239
 
1064
1240
  @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
1241
+ 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.")], **kwargs) -> VersionedResourceListWithPostBodiesOfSettlementInstructionWithTransactionToSettlementInstructionQuery: # noqa: E501
1066
1242
  ...
1067
1243
 
1068
1244
  @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
1245
+ 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.")], async_req: Optional[bool]=True, **kwargs) -> VersionedResourceListWithPostBodiesOfSettlementInstructionWithTransactionToSettlementInstructionQuery: # noqa: E501
1070
1246
  ...
1071
1247
 
1072
1248
  @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
1249
+ 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.")], async_req: Optional[bool]=None, **kwargs) -> Union[VersionedResourceListWithPostBodiesOfSettlementInstructionWithTransactionToSettlementInstructionQuery, Awaitable[VersionedResourceListWithPostBodiesOfSettlementInstructionWithTransactionToSettlementInstructionQuery]]: # noqa: E501
1074
1250
  """[EARLY ACCESS] BuildSettlementInstructions: Build Settlement Instructions # noqa: E501
1075
1251
 
1076
1252
  Builds and returns all settlement instructions that have been loaded against this portfolio. # noqa: E501
1077
1253
  This method makes a synchronous HTTP request by default. To make an
1078
1254
  asynchronous HTTP request, please pass async_req=True
1079
1255
 
1080
- >>> thread = api.build_settlement_instructions(scope, code, settlement_instruction_query, as_at, async_req=True)
1256
+ >>> thread = api.build_settlement_instructions(scope, code, settlement_instruction_query, async_req=True)
1081
1257
  >>> result = thread.get()
1082
1258
 
1083
1259
  :param scope: The scope of the transaction portfolio. (required)
@@ -1086,8 +1262,6 @@ class TransactionPortfoliosApi:
1086
1262
  :type code: str
1087
1263
  :param settlement_instruction_query: The queryParameters which control how the settlement instructions are built and returned. (required)
1088
1264
  :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
1265
  :param async_req: Whether to execute the request asynchronously.
1092
1266
  :type async_req: bool, optional
1093
1267
  :param _request_timeout: Timeout setting. Do not use - use the opts parameter instead
@@ -1104,17 +1278,17 @@ class TransactionPortfoliosApi:
1104
1278
  raise ValueError(message)
1105
1279
  if async_req is not None:
1106
1280
  kwargs['async_req'] = async_req
1107
- return self.build_settlement_instructions_with_http_info(scope, code, settlement_instruction_query, as_at, **kwargs) # noqa: E501
1281
+ return self.build_settlement_instructions_with_http_info(scope, code, settlement_instruction_query, **kwargs) # noqa: E501
1108
1282
 
1109
1283
  @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
1284
+ 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.")], **kwargs) -> ApiResponse: # noqa: E501
1111
1285
  """[EARLY ACCESS] BuildSettlementInstructions: Build Settlement Instructions # noqa: E501
1112
1286
 
1113
1287
  Builds and returns all settlement instructions that have been loaded against this portfolio. # noqa: E501
1114
1288
  This method makes a synchronous HTTP request by default. To make an
1115
1289
  asynchronous HTTP request, please pass async_req=True
1116
1290
 
1117
- >>> thread = api.build_settlement_instructions_with_http_info(scope, code, settlement_instruction_query, as_at, async_req=True)
1291
+ >>> thread = api.build_settlement_instructions_with_http_info(scope, code, settlement_instruction_query, async_req=True)
1118
1292
  >>> result = thread.get()
1119
1293
 
1120
1294
  :param scope: The scope of the transaction portfolio. (required)
@@ -1123,8 +1297,6 @@ class TransactionPortfoliosApi:
1123
1297
  :type code: str
1124
1298
  :param settlement_instruction_query: The queryParameters which control how the settlement instructions are built and returned. (required)
1125
1299
  :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
1300
  :param async_req: Whether to execute the request asynchronously.
1129
1301
  :type async_req: bool, optional
1130
1302
  :param _preload_content: if False, the ApiResponse.data will
@@ -1154,8 +1326,7 @@ class TransactionPortfoliosApi:
1154
1326
  _all_params = [
1155
1327
  'scope',
1156
1328
  'code',
1157
- 'settlement_instruction_query',
1158
- 'as_at'
1329
+ 'settlement_instruction_query'
1159
1330
  ]
1160
1331
  _all_params.extend(
1161
1332
  [
@@ -1193,12 +1364,6 @@ class TransactionPortfoliosApi:
1193
1364
 
1194
1365
  # process the query parameters
1195
1366
  _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
1367
  # process the header parameters
1203
1368
  _header_params = dict(_params.get('_headers', {}))
1204
1369
  # 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.8307\n"\
448
+ "Version of the API: 0.11.8321\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
@@ -101,6 +101,7 @@ from lusid.models.batch_upsert_portfolio_access_metadata_response import BatchUp
101
101
  from lusid.models.batch_upsert_portfolio_access_metadata_response_item import BatchUpsertPortfolioAccessMetadataResponseItem
102
102
  from lusid.models.batch_upsert_portfolio_transactions_response import BatchUpsertPortfolioTransactionsResponse
103
103
  from lusid.models.batch_upsert_property_definition_properties_response import BatchUpsertPropertyDefinitionPropertiesResponse
104
+ from lusid.models.batch_upsert_transaction_settlement_instruction_response import BatchUpsertTransactionSettlementInstructionResponse
104
105
  from lusid.models.block import Block
105
106
  from lusid.models.block_and_order_id_request import BlockAndOrderIdRequest
106
107
  from lusid.models.block_and_orders import BlockAndOrders
@@ -1397,6 +1398,7 @@ __all__ = [
1397
1398
  "BatchUpsertPortfolioAccessMetadataResponseItem",
1398
1399
  "BatchUpsertPortfolioTransactionsResponse",
1399
1400
  "BatchUpsertPropertyDefinitionPropertiesResponse",
1401
+ "BatchUpsertTransactionSettlementInstructionResponse",
1400
1402
  "Block",
1401
1403
  "BlockAndOrderIdRequest",
1402
1404
  "BlockAndOrders",
@@ -0,0 +1,137 @@
1
+ # coding: utf-8
2
+
3
+ """
4
+ LUSID API
5
+
6
+ FINBOURNE Technology # noqa: E501
7
+
8
+ Contact: info@finbourne.com
9
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
10
+
11
+ Do not edit the class manually.
12
+ """
13
+
14
+
15
+ from __future__ import annotations
16
+ import pprint
17
+ import re # noqa: F401
18
+ import json
19
+
20
+
21
+ from typing import Any, Dict, List, Optional
22
+ from pydantic.v1 import StrictStr, Field, BaseModel, Field, StrictStr, conlist
23
+ from lusid.models.error_detail import ErrorDetail
24
+ from lusid.models.link import Link
25
+ from lusid.models.transaction_settlement_instruction import TransactionSettlementInstruction
26
+
27
+ class BatchUpsertTransactionSettlementInstructionResponse(BaseModel):
28
+ """
29
+ BatchUpsertTransactionSettlementInstructionResponse
30
+ """
31
+ href: Optional[StrictStr] = Field(None,alias="href", description="The specific Uniform Resource Identifier (URI) for this resource at the requested effective and asAt datetime.")
32
+ values: Optional[Dict[str, TransactionSettlementInstruction]] = Field(None, description="The settlement instructions which have been successfully upserted.")
33
+ failed: Optional[Dict[str, ErrorDetail]] = Field(None, description="The request ids of the settlement instructions which could not be upserted, along with a reason for their failure.")
34
+ links: Optional[conlist(Link)] = None
35
+ __properties = ["href", "values", "failed", "links"]
36
+
37
+ class Config:
38
+ """Pydantic configuration"""
39
+ allow_population_by_field_name = True
40
+ validate_assignment = True
41
+
42
+ def __str__(self):
43
+ """For `print` and `pprint`"""
44
+ return pprint.pformat(self.dict(by_alias=False))
45
+
46
+ def __repr__(self):
47
+ """For `print` and `pprint`"""
48
+ return self.to_str()
49
+
50
+ def to_str(self) -> str:
51
+ """Returns the string representation of the model using alias"""
52
+ return pprint.pformat(self.dict(by_alias=True))
53
+
54
+ def to_json(self) -> str:
55
+ """Returns the JSON representation of the model using alias"""
56
+ return json.dumps(self.to_dict())
57
+
58
+ @classmethod
59
+ def from_json(cls, json_str: str) -> BatchUpsertTransactionSettlementInstructionResponse:
60
+ """Create an instance of BatchUpsertTransactionSettlementInstructionResponse from a JSON string"""
61
+ return cls.from_dict(json.loads(json_str))
62
+
63
+ def to_dict(self):
64
+ """Returns the dictionary representation of the model using alias"""
65
+ _dict = self.dict(by_alias=True,
66
+ exclude={
67
+ },
68
+ exclude_none=True)
69
+ # override the default output from pydantic by calling `to_dict()` of each value in values (dict)
70
+ _field_dict = {}
71
+ if self.values:
72
+ for _key in self.values:
73
+ if self.values[_key]:
74
+ _field_dict[_key] = self.values[_key].to_dict()
75
+ _dict['values'] = _field_dict
76
+ # override the default output from pydantic by calling `to_dict()` of each value in failed (dict)
77
+ _field_dict = {}
78
+ if self.failed:
79
+ for _key in self.failed:
80
+ if self.failed[_key]:
81
+ _field_dict[_key] = self.failed[_key].to_dict()
82
+ _dict['failed'] = _field_dict
83
+ # override the default output from pydantic by calling `to_dict()` of each item in links (list)
84
+ _items = []
85
+ if self.links:
86
+ for _item in self.links:
87
+ if _item:
88
+ _items.append(_item.to_dict())
89
+ _dict['links'] = _items
90
+ # set to None if href (nullable) is None
91
+ # and __fields_set__ contains the field
92
+ if self.href is None and "href" in self.__fields_set__:
93
+ _dict['href'] = None
94
+
95
+ # set to None if values (nullable) is None
96
+ # and __fields_set__ contains the field
97
+ if self.values is None and "values" in self.__fields_set__:
98
+ _dict['values'] = None
99
+
100
+ # set to None if failed (nullable) is None
101
+ # and __fields_set__ contains the field
102
+ if self.failed is None and "failed" in self.__fields_set__:
103
+ _dict['failed'] = None
104
+
105
+ # set to None if links (nullable) is None
106
+ # and __fields_set__ contains the field
107
+ if self.links is None and "links" in self.__fields_set__:
108
+ _dict['links'] = None
109
+
110
+ return _dict
111
+
112
+ @classmethod
113
+ def from_dict(cls, obj: dict) -> BatchUpsertTransactionSettlementInstructionResponse:
114
+ """Create an instance of BatchUpsertTransactionSettlementInstructionResponse from a dict"""
115
+ if obj is None:
116
+ return None
117
+
118
+ if not isinstance(obj, dict):
119
+ return BatchUpsertTransactionSettlementInstructionResponse.parse_obj(obj)
120
+
121
+ _obj = BatchUpsertTransactionSettlementInstructionResponse.parse_obj({
122
+ "href": obj.get("href"),
123
+ "values": dict(
124
+ (_k, TransactionSettlementInstruction.from_dict(_v))
125
+ for _k, _v in obj.get("values").items()
126
+ )
127
+ if obj.get("values") is not None
128
+ else None,
129
+ "failed": dict(
130
+ (_k, ErrorDetail.from_dict(_v))
131
+ for _k, _v in obj.get("failed").items()
132
+ )
133
+ if obj.get("failed") is not None
134
+ else None,
135
+ "links": [Link.from_dict(_item) for _item in obj.get("links")] if obj.get("links") is not None else None
136
+ })
137
+ return _obj
@@ -19,14 +19,16 @@ import json
19
19
 
20
20
 
21
21
  from typing import Any, Dict, Optional
22
- from pydantic.v1 import StrictStr, Field, BaseModel, Field, StrictStr
22
+ from pydantic.v1 import StrictStr, Field, BaseModel, Field, StrictBool, StrictStr
23
23
 
24
24
  class SettlementConfigurationCategory(BaseModel):
25
25
  """
26
26
  SettlementConfigurationCategory
27
27
  """
28
28
  method: Optional[StrictStr] = Field(None,alias="method", description="The method of settlement for the movements of the relevant type(s). Allowed values: 'Automatic' and 'Instructed'. A value of 'Instructed' means that such movements can only be settled with a SettlementInstruction. A value of 'Automatic' means that such movements will settle automatically but a SettlementInstruction will still override automatic settlement.")
29
- __properties = ["method"]
29
+ calculate_instruction_to_portfolio_rate: Optional[StrictBool] = Field(None, alias="calculateInstructionToPortfolioRate", description="An optional flag that allows for the calculation of the instruction to portfolio rate for instructions with settlement category CashSettlement or DeferredCashReceipt, if it is not provided on the settlement instruction. Defaults to false if not specified.")
30
+ calculate_in_lieu_settlement_amount: Optional[StrictBool] = Field(None, alias="calculateInLieuSettlementAmount", description="An optional flag that allows for the calculation of the in lieu amount for instructions with settlement category CashSettlement or DeferredCashReceipt, if it is not provided on the settlement instruction. Defaults to false if not specified.")
31
+ __properties = ["method", "calculateInstructionToPortfolioRate", "calculateInLieuSettlementAmount"]
30
32
 
31
33
  class Config:
32
34
  """Pydantic configuration"""
@@ -77,6 +79,8 @@ class SettlementConfigurationCategory(BaseModel):
77
79
  return SettlementConfigurationCategory.parse_obj(obj)
78
80
 
79
81
  _obj = SettlementConfigurationCategory.parse_obj({
80
- "method": obj.get("method")
82
+ "method": obj.get("method"),
83
+ "calculate_instruction_to_portfolio_rate": obj.get("calculateInstructionToPortfolioRate"),
84
+ "calculate_in_lieu_settlement_amount": obj.get("calculateInLieuSettlementAmount")
81
85
  })
82
86
  return _obj