lusid-sdk 2.1.386__py3-none-any.whl → 2.1.401__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 (61) hide show
  1. lusid/__init__.py +22 -0
  2. lusid/api/order_management_api.py +161 -0
  3. lusid/api/portfolios_api.py +179 -0
  4. lusid/configuration.py +1 -1
  5. lusid/models/__init__.py +22 -0
  6. lusid/models/accumulation_event.py +3 -3
  7. lusid/models/amortisation_event.py +3 -3
  8. lusid/models/batch_upsert_portfolio_access_metadata_request.py +82 -0
  9. lusid/models/batch_upsert_portfolio_access_metadata_response.py +82 -0
  10. lusid/models/bond_coupon_event.py +3 -3
  11. lusid/models/bond_default_event.py +3 -3
  12. lusid/models/bond_principal_event.py +3 -3
  13. lusid/models/capital_distribution_event.py +3 -3
  14. lusid/models/cash_dividend_event.py +3 -3
  15. lusid/models/cash_flow_event.py +3 -3
  16. lusid/models/cds_credit_event.py +105 -0
  17. lusid/models/cdx_credit_event.py +114 -0
  18. lusid/models/close_event.py +3 -3
  19. lusid/models/credit_premium_cash_flow_event.py +102 -0
  20. lusid/models/dividend_option_event.py +3 -3
  21. lusid/models/dividend_reinvestment_event.py +3 -3
  22. lusid/models/entity_change_item.py +121 -0
  23. lusid/models/exercise_event.py +3 -3
  24. lusid/models/expiry_event.py +3 -3
  25. lusid/models/fund_amount.py +1 -1
  26. lusid/models/future_expiry_event.py +3 -3
  27. lusid/models/futures_contract_details.py +6 -1
  28. lusid/models/fx_forward_settlement_event.py +13 -5
  29. lusid/models/holding_pricing_info.py +110 -0
  30. lusid/models/informational_error_event.py +3 -3
  31. lusid/models/informational_event.py +3 -3
  32. lusid/models/instrument_event.py +8 -5
  33. lusid/models/instrument_event_type.py +3 -0
  34. lusid/models/maturity_event.py +3 -3
  35. lusid/models/merger_event.py +3 -3
  36. lusid/models/metadata_key_value.py +86 -0
  37. lusid/models/metadata_key_value_response.py +86 -0
  38. lusid/models/open_event.py +3 -3
  39. lusid/models/order_graph_block_order_detail.py +1 -1
  40. lusid/models/previous_nav.py +3 -3
  41. lusid/models/pricing_context.py +8 -2
  42. lusid/models/raw_vendor_event.py +3 -3
  43. lusid/models/reset_event.py +3 -3
  44. lusid/models/resource_list_of_entity_change_item.py +113 -0
  45. lusid/models/reverse_stock_split_event.py +3 -3
  46. lusid/models/scrip_dividend_event.py +3 -3
  47. lusid/models/share_class_amount.py +7 -9
  48. lusid/models/share_class_breakdown.py +4 -5
  49. lusid/models/specific_holding_pricing_info.py +75 -0
  50. lusid/models/spin_off_event.py +3 -3
  51. lusid/models/staged_modification.py +8 -1
  52. lusid/models/stock_dividend_event.py +3 -3
  53. lusid/models/stock_split_event.py +3 -3
  54. lusid/models/swap_cash_flow_event.py +3 -3
  55. lusid/models/swap_principal_event.py +3 -3
  56. lusid/models/transition_event.py +3 -3
  57. lusid/models/trigger_event.py +3 -3
  58. lusid/models/weighted_instrument.py +9 -2
  59. {lusid_sdk-2.1.386.dist-info → lusid_sdk-2.1.401.dist-info}/METADATA +14 -1
  60. {lusid_sdk-2.1.386.dist-info → lusid_sdk-2.1.401.dist-info}/RECORD +61 -50
  61. {lusid_sdk-2.1.386.dist-info → lusid_sdk-2.1.401.dist-info}/WHEEL +0 -0
lusid/__init__.py CHANGED
@@ -159,6 +159,8 @@ from lusid.models.basket import Basket
159
159
  from lusid.models.basket_identifier import BasketIdentifier
160
160
  from lusid.models.batch_adjust_holdings_response import BatchAdjustHoldingsResponse
161
161
  from lusid.models.batch_upsert_instrument_properties_response import BatchUpsertInstrumentPropertiesResponse
162
+ from lusid.models.batch_upsert_portfolio_access_metadata_request import BatchUpsertPortfolioAccessMetadataRequest
163
+ from lusid.models.batch_upsert_portfolio_access_metadata_response import BatchUpsertPortfolioAccessMetadataResponse
162
164
  from lusid.models.batch_upsert_portfolio_transactions_response import BatchUpsertPortfolioTransactionsResponse
163
165
  from lusid.models.batch_upsert_property_definition_properties_response import BatchUpsertPropertyDefinitionPropertiesResponse
164
166
  from lusid.models.block import Block
@@ -206,9 +208,11 @@ from lusid.models.cash_flow_value_set import CashFlowValueSet
206
208
  from lusid.models.cash_ladder_record import CashLadderRecord
207
209
  from lusid.models.cash_offer_election import CashOfferElection
208
210
  from lusid.models.cash_perpetual import CashPerpetual
211
+ from lusid.models.cds_credit_event import CdsCreditEvent
209
212
  from lusid.models.cds_flow_conventions import CdsFlowConventions
210
213
  from lusid.models.cds_index import CdsIndex
211
214
  from lusid.models.cds_protection_detail_specification import CdsProtectionDetailSpecification
215
+ from lusid.models.cdx_credit_event import CdxCreditEvent
212
216
  from lusid.models.change import Change
213
217
  from lusid.models.change_history import ChangeHistory
214
218
  from lusid.models.change_history_action import ChangeHistoryAction
@@ -312,6 +316,7 @@ from lusid.models.create_trade_tickets_response import CreateTradeTicketsRespons
312
316
  from lusid.models.create_transaction_portfolio_request import CreateTransactionPortfolioRequest
313
317
  from lusid.models.create_unit_definition import CreateUnitDefinition
314
318
  from lusid.models.credit_default_swap import CreditDefaultSwap
319
+ from lusid.models.credit_premium_cash_flow_event import CreditPremiumCashFlowEvent
315
320
  from lusid.models.credit_rating import CreditRating
316
321
  from lusid.models.credit_spread_curve_data import CreditSpreadCurveData
317
322
  from lusid.models.credit_support_annex import CreditSupportAnnex
@@ -380,6 +385,7 @@ from lusid.models.economic_dependency_with_quote import EconomicDependencyWithQu
380
385
  from lusid.models.election_specification import ElectionSpecification
381
386
  from lusid.models.eligibility_calculation import EligibilityCalculation
382
387
  from lusid.models.empty_model_options import EmptyModelOptions
388
+ from lusid.models.entity_change_item import EntityChangeItem
383
389
  from lusid.models.entity_identifier import EntityIdentifier
384
390
  from lusid.models.equity import Equity
385
391
  from lusid.models.equity_all_of_identifiers import EquityAllOfIdentifiers
@@ -502,6 +508,7 @@ from lusid.models.holding_adjustment import HoldingAdjustment
502
508
  from lusid.models.holding_adjustment_with_date import HoldingAdjustmentWithDate
503
509
  from lusid.models.holding_context import HoldingContext
504
510
  from lusid.models.holding_contributor import HoldingContributor
511
+ from lusid.models.holding_pricing_info import HoldingPricingInfo
505
512
  from lusid.models.holdings_adjustment import HoldingsAdjustment
506
513
  from lusid.models.holdings_adjustment_header import HoldingsAdjustmentHeader
507
514
  from lusid.models.i_unit_definition_dto import IUnitDefinitionDto
@@ -593,6 +600,8 @@ from lusid.models.market_quote import MarketQuote
593
600
  from lusid.models.match_criterion import MatchCriterion
594
601
  from lusid.models.maturity_event import MaturityEvent
595
602
  from lusid.models.merger_event import MergerEvent
603
+ from lusid.models.metadata_key_value import MetadataKeyValue
604
+ from lusid.models.metadata_key_value_response import MetadataKeyValueResponse
596
605
  from lusid.models.metric_value import MetricValue
597
606
  from lusid.models.model_options import ModelOptions
598
607
  from lusid.models.model_options_type import ModelOptionsType
@@ -861,6 +870,7 @@ from lusid.models.resource_list_of_compliance_run_info import ResourceListOfComp
861
870
  from lusid.models.resource_list_of_constituents_adjustment_header import ResourceListOfConstituentsAdjustmentHeader
862
871
  from lusid.models.resource_list_of_corporate_action import ResourceListOfCorporateAction
863
872
  from lusid.models.resource_list_of_data_type import ResourceListOfDataType
873
+ from lusid.models.resource_list_of_entity_change_item import ResourceListOfEntityChangeItem
864
874
  from lusid.models.resource_list_of_execution import ResourceListOfExecution
865
875
  from lusid.models.resource_list_of_fee_rule import ResourceListOfFeeRule
866
876
  from lusid.models.resource_list_of_get_cds_flow_conventions_response import ResourceListOfGetCdsFlowConventionsResponse
@@ -959,6 +969,7 @@ from lusid.models.sides_definition_request import SidesDefinitionRequest
959
969
  from lusid.models.simple_cash_flow_loan import SimpleCashFlowLoan
960
970
  from lusid.models.simple_instrument import SimpleInstrument
961
971
  from lusid.models.sort_order import SortOrder
972
+ from lusid.models.specific_holding_pricing_info import SpecificHoldingPricingInfo
962
973
  from lusid.models.spin_off_event import SpinOffEvent
963
974
  from lusid.models.staged_modification import StagedModification
964
975
  from lusid.models.staged_modification_decision import StagedModificationDecision
@@ -1298,6 +1309,8 @@ __all__ = [
1298
1309
  "BasketIdentifier",
1299
1310
  "BatchAdjustHoldingsResponse",
1300
1311
  "BatchUpsertInstrumentPropertiesResponse",
1312
+ "BatchUpsertPortfolioAccessMetadataRequest",
1313
+ "BatchUpsertPortfolioAccessMetadataResponse",
1301
1314
  "BatchUpsertPortfolioTransactionsResponse",
1302
1315
  "BatchUpsertPropertyDefinitionPropertiesResponse",
1303
1316
  "Block",
@@ -1345,9 +1358,11 @@ __all__ = [
1345
1358
  "CashLadderRecord",
1346
1359
  "CashOfferElection",
1347
1360
  "CashPerpetual",
1361
+ "CdsCreditEvent",
1348
1362
  "CdsFlowConventions",
1349
1363
  "CdsIndex",
1350
1364
  "CdsProtectionDetailSpecification",
1365
+ "CdxCreditEvent",
1351
1366
  "Change",
1352
1367
  "ChangeHistory",
1353
1368
  "ChangeHistoryAction",
@@ -1451,6 +1466,7 @@ __all__ = [
1451
1466
  "CreateTransactionPortfolioRequest",
1452
1467
  "CreateUnitDefinition",
1453
1468
  "CreditDefaultSwap",
1469
+ "CreditPremiumCashFlowEvent",
1454
1470
  "CreditRating",
1455
1471
  "CreditSpreadCurveData",
1456
1472
  "CreditSupportAnnex",
@@ -1519,6 +1535,7 @@ __all__ = [
1519
1535
  "ElectionSpecification",
1520
1536
  "EligibilityCalculation",
1521
1537
  "EmptyModelOptions",
1538
+ "EntityChangeItem",
1522
1539
  "EntityIdentifier",
1523
1540
  "Equity",
1524
1541
  "EquityAllOfIdentifiers",
@@ -1641,6 +1658,7 @@ __all__ = [
1641
1658
  "HoldingAdjustmentWithDate",
1642
1659
  "HoldingContext",
1643
1660
  "HoldingContributor",
1661
+ "HoldingPricingInfo",
1644
1662
  "HoldingsAdjustment",
1645
1663
  "HoldingsAdjustmentHeader",
1646
1664
  "IUnitDefinitionDto",
@@ -1732,6 +1750,8 @@ __all__ = [
1732
1750
  "MatchCriterion",
1733
1751
  "MaturityEvent",
1734
1752
  "MergerEvent",
1753
+ "MetadataKeyValue",
1754
+ "MetadataKeyValueResponse",
1735
1755
  "MetricValue",
1736
1756
  "ModelOptions",
1737
1757
  "ModelOptionsType",
@@ -2000,6 +2020,7 @@ __all__ = [
2000
2020
  "ResourceListOfConstituentsAdjustmentHeader",
2001
2021
  "ResourceListOfCorporateAction",
2002
2022
  "ResourceListOfDataType",
2023
+ "ResourceListOfEntityChangeItem",
2003
2024
  "ResourceListOfExecution",
2004
2025
  "ResourceListOfFeeRule",
2005
2026
  "ResourceListOfGetCdsFlowConventionsResponse",
@@ -2098,6 +2119,7 @@ __all__ = [
2098
2119
  "SimpleCashFlowLoan",
2099
2120
  "SimpleInstrument",
2100
2121
  "SortOrder",
2122
+ "SpecificHoldingPricingInfo",
2101
2123
  "SpinOffEvent",
2102
2124
  "StagedModification",
2103
2125
  "StagedModificationDecision",
@@ -36,6 +36,7 @@ from lusid.models.place_blocks_request import PlaceBlocksRequest
36
36
  from lusid.models.placement_update_request import PlacementUpdateRequest
37
37
  from lusid.models.resource_id import ResourceId
38
38
  from lusid.models.resource_list_of_block_and_orders import ResourceListOfBlockAndOrders
39
+ from lusid.models.resource_list_of_entity_change_item import ResourceListOfEntityChangeItem
39
40
  from lusid.models.resource_list_of_moved_order_to_different_block_response import ResourceListOfMovedOrderToDifferentBlockResponse
40
41
  from lusid.models.resource_list_of_placement import ResourceListOfPlacement
41
42
  from lusid.models.update_orders_response import UpdateOrdersResponse
@@ -701,6 +702,166 @@ class OrderManagementApi:
701
702
  collection_formats=_collection_formats,
702
703
  _request_auth=_params.get('_request_auth'))
703
704
 
705
+ @overload
706
+ async def get_order_history(self, scope : Annotated[constr(strict=True, max_length=64, min_length=1), Field(..., description="The scope of the order.")], code : Annotated[constr(strict=True, max_length=64, min_length=1), Field(..., description="The code of the order.")], **kwargs) -> ResourceListOfEntityChangeItem: # noqa: E501
707
+ ...
708
+
709
+ @overload
710
+ def get_order_history(self, scope : Annotated[constr(strict=True, max_length=64, min_length=1), Field(..., description="The scope of the order.")], code : Annotated[constr(strict=True, max_length=64, min_length=1), Field(..., description="The code of the order.")], async_req: Optional[bool]=True, **kwargs) -> ResourceListOfEntityChangeItem: # noqa: E501
711
+ ...
712
+
713
+ @validate_arguments
714
+ def get_order_history(self, scope : Annotated[constr(strict=True, max_length=64, min_length=1), Field(..., description="The scope of the order.")], code : Annotated[constr(strict=True, max_length=64, min_length=1), Field(..., description="The code of the order.")], async_req: Optional[bool]=None, **kwargs) -> Union[ResourceListOfEntityChangeItem, Awaitable[ResourceListOfEntityChangeItem]]: # noqa: E501
715
+ """[EXPERIMENTAL] GetOrderHistory: Get the history of an order and related entity changes # noqa: E501
716
+
717
+ Get the changes that have happened to an order and related entities. # noqa: E501
718
+ This method makes a synchronous HTTP request by default. To make an
719
+ asynchronous HTTP request, please pass async_req=True
720
+
721
+ >>> thread = api.get_order_history(scope, code, async_req=True)
722
+ >>> result = thread.get()
723
+
724
+ :param scope: The scope of the order. (required)
725
+ :type scope: str
726
+ :param code: The code of the order. (required)
727
+ :type code: str
728
+ :param async_req: Whether to execute the request asynchronously.
729
+ :type async_req: bool, optional
730
+ :param _request_timeout: timeout setting for this request.
731
+ If one number provided, it will be total request
732
+ timeout. It can also be a pair (tuple) of
733
+ (connection, read) timeouts.
734
+ :return: Returns the result object.
735
+ If the method is called asynchronously,
736
+ returns the request thread.
737
+ :rtype: ResourceListOfEntityChangeItem
738
+ """
739
+ kwargs['_return_http_data_only'] = True
740
+ if '_preload_content' in kwargs:
741
+ message = "Error! Please call the get_order_history_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501
742
+ raise ValueError(message)
743
+ if async_req is not None:
744
+ kwargs['async_req'] = async_req
745
+ return self.get_order_history_with_http_info(scope, code, **kwargs) # noqa: E501
746
+
747
+ @validate_arguments
748
+ def get_order_history_with_http_info(self, scope : Annotated[constr(strict=True, max_length=64, min_length=1), Field(..., description="The scope of the order.")], code : Annotated[constr(strict=True, max_length=64, min_length=1), Field(..., description="The code of the order.")], **kwargs) -> ApiResponse: # noqa: E501
749
+ """[EXPERIMENTAL] GetOrderHistory: Get the history of an order and related entity changes # noqa: E501
750
+
751
+ Get the changes that have happened to an order and related entities. # noqa: E501
752
+ This method makes a synchronous HTTP request by default. To make an
753
+ asynchronous HTTP request, please pass async_req=True
754
+
755
+ >>> thread = api.get_order_history_with_http_info(scope, code, async_req=True)
756
+ >>> result = thread.get()
757
+
758
+ :param scope: The scope of the order. (required)
759
+ :type scope: str
760
+ :param code: The code of the order. (required)
761
+ :type code: str
762
+ :param async_req: Whether to execute the request asynchronously.
763
+ :type async_req: bool, optional
764
+ :param _preload_content: if False, the ApiResponse.data will
765
+ be set to none and raw_data will store the
766
+ HTTP response body without reading/decoding.
767
+ Default is True.
768
+ :type _preload_content: bool, optional
769
+ :param _return_http_data_only: response data instead of ApiResponse
770
+ object with status code, headers, etc
771
+ :type _return_http_data_only: bool, optional
772
+ :param _request_timeout: timeout setting for this request. If one
773
+ number provided, it will be total request
774
+ timeout. It can also be a pair (tuple) of
775
+ (connection, read) timeouts.
776
+ :param _request_auth: set to override the auth_settings for an a single
777
+ request; this effectively ignores the authentication
778
+ in the spec for a single request.
779
+ :type _request_auth: dict, optional
780
+ :type _content_type: string, optional: force content-type for the request
781
+ :return: Returns the result object.
782
+ If the method is called asynchronously,
783
+ returns the request thread.
784
+ :rtype: tuple(ResourceListOfEntityChangeItem, status_code(int), headers(HTTPHeaderDict))
785
+ """
786
+
787
+ _params = locals()
788
+
789
+ _all_params = [
790
+ 'scope',
791
+ 'code'
792
+ ]
793
+ _all_params.extend(
794
+ [
795
+ 'async_req',
796
+ '_return_http_data_only',
797
+ '_preload_content',
798
+ '_request_timeout',
799
+ '_request_auth',
800
+ '_content_type',
801
+ '_headers'
802
+ ]
803
+ )
804
+
805
+ # validate the arguments
806
+ for _key, _val in _params['kwargs'].items():
807
+ if _key not in _all_params:
808
+ raise ApiTypeError(
809
+ "Got an unexpected keyword argument '%s'"
810
+ " to method get_order_history" % _key
811
+ )
812
+ _params[_key] = _val
813
+ del _params['kwargs']
814
+
815
+ _collection_formats = {}
816
+
817
+ # process the path parameters
818
+ _path_params = {}
819
+ if _params['scope']:
820
+ _path_params['scope'] = _params['scope']
821
+
822
+ if _params['code']:
823
+ _path_params['code'] = _params['code']
824
+
825
+
826
+ # process the query parameters
827
+ _query_params = []
828
+ # process the header parameters
829
+ _header_params = dict(_params.get('_headers', {}))
830
+ # process the form parameters
831
+ _form_params = []
832
+ _files = {}
833
+ # process the body parameter
834
+ _body_params = None
835
+ # set the HTTP header `Accept`
836
+ _header_params['Accept'] = self.api_client.select_header_accept(
837
+ ['text/plain', 'application/json', 'text/json']) # noqa: E501
838
+
839
+ # authentication setting
840
+ _auth_settings = ['oauth2'] # noqa: E501
841
+
842
+ _response_types_map = {
843
+ '200': "ResourceListOfEntityChangeItem",
844
+ '400': "LusidValidationProblemDetails",
845
+ '404': "str",
846
+ }
847
+
848
+ return self.api_client.call_api(
849
+ '/api/ordermanagement/order/{scope}/{code}/$history', 'GET',
850
+ _path_params,
851
+ _query_params,
852
+ _header_params,
853
+ body=_body_params,
854
+ post_params=_form_params,
855
+ files=_files,
856
+ response_types_map=_response_types_map,
857
+ auth_settings=_auth_settings,
858
+ async_req=_params.get('async_req'),
859
+ _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501
860
+ _preload_content=_params.get('_preload_content', True),
861
+ _request_timeout=_params.get('_request_timeout'),
862
+ collection_formats=_collection_formats,
863
+ _request_auth=_params.get('_request_auth'))
864
+
704
865
  @overload
705
866
  async def move_orders(self, move_orders_to_different_blocks_request : Annotated[MoveOrdersToDifferentBlocksRequest, Field(..., description="The collection of order and destination block ids.")], **kwargs) -> ResourceListOfMovedOrderToDifferentBlockResponse: # noqa: E501
706
867
  ...
@@ -31,6 +31,8 @@ from lusid.models.access_metadata_value import AccessMetadataValue
31
31
  from lusid.models.aggregated_returns_dispersion_request import AggregatedReturnsDispersionRequest
32
32
  from lusid.models.aggregated_returns_request import AggregatedReturnsRequest
33
33
  from lusid.models.aggregated_returns_response import AggregatedReturnsResponse
34
+ from lusid.models.batch_upsert_portfolio_access_metadata_request import BatchUpsertPortfolioAccessMetadataRequest
35
+ from lusid.models.batch_upsert_portfolio_access_metadata_response import BatchUpsertPortfolioAccessMetadataResponse
34
36
  from lusid.models.composite_breakdown_request import CompositeBreakdownRequest
35
37
  from lusid.models.composite_breakdown_response import CompositeBreakdownResponse
36
38
  from lusid.models.composite_dispersion_response import CompositeDispersionResponse
@@ -77,6 +79,183 @@ class PortfoliosApi:
77
79
  api_client = ApiClient.get_default()
78
80
  self.api_client = api_client
79
81
 
82
+ @overload
83
+ async def batch_upsert_portfolio_access_metadata(self, batch_upsert_portfolio_access_metadata_request : Annotated[BatchUpsertPortfolioAccessMetadataRequest, Field(..., description="The Portfolio Access Metadata Rule to update or insert")], effective_at : Annotated[Optional[StrictStr], Field(description="The date this rule will effective from")] = None, effective_until : Annotated[Optional[datetime], Field(description="The effective date until which the Access Metadata is valid. If not supplied this will be valid indefinitely, or until the next 'effectiveAt' date of the Access Metadata")] = None, **kwargs) -> BatchUpsertPortfolioAccessMetadataResponse: # noqa: E501
84
+ ...
85
+
86
+ @overload
87
+ def batch_upsert_portfolio_access_metadata(self, batch_upsert_portfolio_access_metadata_request : Annotated[BatchUpsertPortfolioAccessMetadataRequest, Field(..., description="The Portfolio Access Metadata Rule to update or insert")], effective_at : Annotated[Optional[StrictStr], Field(description="The date this rule will effective from")] = None, effective_until : Annotated[Optional[datetime], Field(description="The effective date until which the Access Metadata is valid. If not supplied this will be valid indefinitely, or until the next 'effectiveAt' date of the Access Metadata")] = None, async_req: Optional[bool]=True, **kwargs) -> BatchUpsertPortfolioAccessMetadataResponse: # noqa: E501
88
+ ...
89
+
90
+ @validate_arguments
91
+ def batch_upsert_portfolio_access_metadata(self, batch_upsert_portfolio_access_metadata_request : Annotated[BatchUpsertPortfolioAccessMetadataRequest, Field(..., description="The Portfolio Access Metadata Rule to update or insert")], effective_at : Annotated[Optional[StrictStr], Field(description="The date this rule will effective from")] = None, effective_until : Annotated[Optional[datetime], Field(description="The effective date until which the Access Metadata is valid. If not supplied this will be valid indefinitely, or until the next 'effectiveAt' date of the Access Metadata")] = None, async_req: Optional[bool]=None, **kwargs) -> Union[BatchUpsertPortfolioAccessMetadataResponse, Awaitable[BatchUpsertPortfolioAccessMetadataResponse]]: # noqa: E501
92
+ """[EXPERIMENTAL] BatchUpsertPortfolioAccessMetadata: Upsert multiple portfolio access metadata with different keys to multiple portfolios # noqa: E501
93
+
94
+ Update or insert multiple Portfolios Access Metadata Rule in multiple scopes. Items will be updated if it already exists and inserted if it does not. No other items will be affected The response will return the successfully updated or inserted Portfolio Access Metadata Rules or failure message if unsuccessful It is important to always check to verify success (or failure). Multiple rules for a metadataKey can exist with different effective at dates, when resources are accessed the rule that is active for the current time will be fetched # noqa: E501
95
+ This method makes a synchronous HTTP request by default. To make an
96
+ asynchronous HTTP request, please pass async_req=True
97
+
98
+ >>> thread = api.batch_upsert_portfolio_access_metadata(batch_upsert_portfolio_access_metadata_request, effective_at, effective_until, async_req=True)
99
+ >>> result = thread.get()
100
+
101
+ :param batch_upsert_portfolio_access_metadata_request: The Portfolio Access Metadata Rule to update or insert (required)
102
+ :type batch_upsert_portfolio_access_metadata_request: BatchUpsertPortfolioAccessMetadataRequest
103
+ :param effective_at: The date this rule will effective from
104
+ :type effective_at: str
105
+ :param effective_until: The effective date until which the Access Metadata is valid. If not supplied this will be valid indefinitely, or until the next 'effectiveAt' date of the Access Metadata
106
+ :type effective_until: datetime
107
+ :param async_req: Whether to execute the request asynchronously.
108
+ :type async_req: bool, optional
109
+ :param _request_timeout: timeout setting for this request.
110
+ If one number provided, it will be total request
111
+ timeout. It can also be a pair (tuple) of
112
+ (connection, read) timeouts.
113
+ :return: Returns the result object.
114
+ If the method is called asynchronously,
115
+ returns the request thread.
116
+ :rtype: BatchUpsertPortfolioAccessMetadataResponse
117
+ """
118
+ kwargs['_return_http_data_only'] = True
119
+ if '_preload_content' in kwargs:
120
+ message = "Error! Please call the batch_upsert_portfolio_access_metadata_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501
121
+ raise ValueError(message)
122
+ if async_req is not None:
123
+ kwargs['async_req'] = async_req
124
+ return self.batch_upsert_portfolio_access_metadata_with_http_info(batch_upsert_portfolio_access_metadata_request, effective_at, effective_until, **kwargs) # noqa: E501
125
+
126
+ @validate_arguments
127
+ def batch_upsert_portfolio_access_metadata_with_http_info(self, batch_upsert_portfolio_access_metadata_request : Annotated[BatchUpsertPortfolioAccessMetadataRequest, Field(..., description="The Portfolio Access Metadata Rule to update or insert")], effective_at : Annotated[Optional[StrictStr], Field(description="The date this rule will effective from")] = None, effective_until : Annotated[Optional[datetime], Field(description="The effective date until which the Access Metadata is valid. If not supplied this will be valid indefinitely, or until the next 'effectiveAt' date of the Access Metadata")] = None, **kwargs) -> ApiResponse: # noqa: E501
128
+ """[EXPERIMENTAL] BatchUpsertPortfolioAccessMetadata: Upsert multiple portfolio access metadata with different keys to multiple portfolios # noqa: E501
129
+
130
+ Update or insert multiple Portfolios Access Metadata Rule in multiple scopes. Items will be updated if it already exists and inserted if it does not. No other items will be affected The response will return the successfully updated or inserted Portfolio Access Metadata Rules or failure message if unsuccessful It is important to always check to verify success (or failure). Multiple rules for a metadataKey can exist with different effective at dates, when resources are accessed the rule that is active for the current time will be fetched # noqa: E501
131
+ This method makes a synchronous HTTP request by default. To make an
132
+ asynchronous HTTP request, please pass async_req=True
133
+
134
+ >>> thread = api.batch_upsert_portfolio_access_metadata_with_http_info(batch_upsert_portfolio_access_metadata_request, effective_at, effective_until, async_req=True)
135
+ >>> result = thread.get()
136
+
137
+ :param batch_upsert_portfolio_access_metadata_request: The Portfolio Access Metadata Rule to update or insert (required)
138
+ :type batch_upsert_portfolio_access_metadata_request: BatchUpsertPortfolioAccessMetadataRequest
139
+ :param effective_at: The date this rule will effective from
140
+ :type effective_at: str
141
+ :param effective_until: The effective date until which the Access Metadata is valid. If not supplied this will be valid indefinitely, or until the next 'effectiveAt' date of the Access Metadata
142
+ :type effective_until: datetime
143
+ :param async_req: Whether to execute the request asynchronously.
144
+ :type async_req: bool, optional
145
+ :param _preload_content: if False, the ApiResponse.data will
146
+ be set to none and raw_data will store the
147
+ HTTP response body without reading/decoding.
148
+ Default is True.
149
+ :type _preload_content: bool, optional
150
+ :param _return_http_data_only: response data instead of ApiResponse
151
+ object with status code, headers, etc
152
+ :type _return_http_data_only: bool, optional
153
+ :param _request_timeout: timeout setting for this request. If one
154
+ number provided, it will be total request
155
+ timeout. It can also be a pair (tuple) of
156
+ (connection, read) timeouts.
157
+ :param _request_auth: set to override the auth_settings for an a single
158
+ request; this effectively ignores the authentication
159
+ in the spec for a single request.
160
+ :type _request_auth: dict, optional
161
+ :type _content_type: string, optional: force content-type for the request
162
+ :return: Returns the result object.
163
+ If the method is called asynchronously,
164
+ returns the request thread.
165
+ :rtype: tuple(BatchUpsertPortfolioAccessMetadataResponse, status_code(int), headers(HTTPHeaderDict))
166
+ """
167
+
168
+ _params = locals()
169
+
170
+ _all_params = [
171
+ 'batch_upsert_portfolio_access_metadata_request',
172
+ 'effective_at',
173
+ 'effective_until'
174
+ ]
175
+ _all_params.extend(
176
+ [
177
+ 'async_req',
178
+ '_return_http_data_only',
179
+ '_preload_content',
180
+ '_request_timeout',
181
+ '_request_auth',
182
+ '_content_type',
183
+ '_headers'
184
+ ]
185
+ )
186
+
187
+ # validate the arguments
188
+ for _key, _val in _params['kwargs'].items():
189
+ if _key not in _all_params:
190
+ raise ApiTypeError(
191
+ "Got an unexpected keyword argument '%s'"
192
+ " to method batch_upsert_portfolio_access_metadata" % _key
193
+ )
194
+ _params[_key] = _val
195
+ del _params['kwargs']
196
+
197
+ _collection_formats = {}
198
+
199
+ # process the path parameters
200
+ _path_params = {}
201
+
202
+ # process the query parameters
203
+ _query_params = []
204
+ if _params.get('effective_at') is not None: # noqa: E501
205
+ _query_params.append(('effectiveAt', _params['effective_at']))
206
+
207
+ if _params.get('effective_until') is not None: # noqa: E501
208
+ if isinstance(_params['effective_until'], datetime):
209
+ _query_params.append(('effectiveUntil', _params['effective_until'].strftime(self.api_client.configuration.datetime_format)))
210
+ else:
211
+ _query_params.append(('effectiveUntil', _params['effective_until']))
212
+
213
+ # process the header parameters
214
+ _header_params = dict(_params.get('_headers', {}))
215
+ # process the form parameters
216
+ _form_params = []
217
+ _files = {}
218
+ # process the body parameter
219
+ _body_params = None
220
+ if _params['batch_upsert_portfolio_access_metadata_request'] is not None:
221
+ _body_params = _params['batch_upsert_portfolio_access_metadata_request']
222
+
223
+ # set the HTTP header `Accept`
224
+ _header_params['Accept'] = self.api_client.select_header_accept(
225
+ ['text/plain', 'application/json', 'text/json']) # noqa: E501
226
+
227
+ # set the HTTP header `Content-Type`
228
+ _content_types_list = _params.get('_content_type',
229
+ self.api_client.select_header_content_type(
230
+ ['application/json-patch+json', 'application/json', 'text/json', 'application/*+json']))
231
+ if _content_types_list:
232
+ _header_params['Content-Type'] = _content_types_list
233
+
234
+ # authentication setting
235
+ _auth_settings = ['oauth2'] # noqa: E501
236
+
237
+ _response_types_map = {
238
+ '200': "BatchUpsertPortfolioAccessMetadataResponse",
239
+ '400': "LusidValidationProblemDetails",
240
+ }
241
+
242
+ return self.api_client.call_api(
243
+ '/api/portfolios/metadata', 'PUT',
244
+ _path_params,
245
+ _query_params,
246
+ _header_params,
247
+ body=_body_params,
248
+ post_params=_form_params,
249
+ files=_files,
250
+ response_types_map=_response_types_map,
251
+ auth_settings=_auth_settings,
252
+ async_req=_params.get('async_req'),
253
+ _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501
254
+ _preload_content=_params.get('_preload_content', True),
255
+ _request_timeout=_params.get('_request_timeout'),
256
+ collection_formats=_collection_formats,
257
+ _request_auth=_params.get('_request_auth'))
258
+
80
259
  @overload
81
260
  async def delete_instrument_event_instruction(self, scope : Annotated[constr(strict=True, max_length=64, min_length=1), Field(..., description="The scope of the portfolio.")], code : Annotated[constr(strict=True, max_length=64, min_length=1), Field(..., description="The code of the portfolio. Together with the scope this uniquely identifies the portfolio.")], instrument_event_instruction_id : Annotated[StrictStr, Field(..., description="The id of the instruction to be deleted.")], portfolio_effective_at : Annotated[Optional[constr(strict=True, max_length=6000, min_length=0)], Field(description="The effective date at which the portfolio will be resolved. Defaults to current time if not specified.")] = None, **kwargs) -> DeletedEntityResponse: # noqa: E501
82
261
  ...
lusid/configuration.py CHANGED
@@ -382,7 +382,7 @@ class Configuration:
382
382
  return "Python SDK Debug Report:\n"\
383
383
  "OS: {env}\n"\
384
384
  "Python Version: {pyversion}\n"\
385
- "Version of the API: 0.11.6816\n"\
385
+ "Version of the API: 0.11.6831\n"\
386
386
  "SDK Package Version: {package_version}".\
387
387
  format(env=sys.platform, pyversion=sys.version, package_version=package_version)
388
388
 
lusid/models/__init__.py CHANGED
@@ -78,6 +78,8 @@ from lusid.models.basket import Basket
78
78
  from lusid.models.basket_identifier import BasketIdentifier
79
79
  from lusid.models.batch_adjust_holdings_response import BatchAdjustHoldingsResponse
80
80
  from lusid.models.batch_upsert_instrument_properties_response import BatchUpsertInstrumentPropertiesResponse
81
+ from lusid.models.batch_upsert_portfolio_access_metadata_request import BatchUpsertPortfolioAccessMetadataRequest
82
+ from lusid.models.batch_upsert_portfolio_access_metadata_response import BatchUpsertPortfolioAccessMetadataResponse
81
83
  from lusid.models.batch_upsert_portfolio_transactions_response import BatchUpsertPortfolioTransactionsResponse
82
84
  from lusid.models.batch_upsert_property_definition_properties_response import BatchUpsertPropertyDefinitionPropertiesResponse
83
85
  from lusid.models.block import Block
@@ -125,9 +127,11 @@ from lusid.models.cash_flow_value_set import CashFlowValueSet
125
127
  from lusid.models.cash_ladder_record import CashLadderRecord
126
128
  from lusid.models.cash_offer_election import CashOfferElection
127
129
  from lusid.models.cash_perpetual import CashPerpetual
130
+ from lusid.models.cds_credit_event import CdsCreditEvent
128
131
  from lusid.models.cds_flow_conventions import CdsFlowConventions
129
132
  from lusid.models.cds_index import CdsIndex
130
133
  from lusid.models.cds_protection_detail_specification import CdsProtectionDetailSpecification
134
+ from lusid.models.cdx_credit_event import CdxCreditEvent
131
135
  from lusid.models.change import Change
132
136
  from lusid.models.change_history import ChangeHistory
133
137
  from lusid.models.change_history_action import ChangeHistoryAction
@@ -231,6 +235,7 @@ from lusid.models.create_trade_tickets_response import CreateTradeTicketsRespons
231
235
  from lusid.models.create_transaction_portfolio_request import CreateTransactionPortfolioRequest
232
236
  from lusid.models.create_unit_definition import CreateUnitDefinition
233
237
  from lusid.models.credit_default_swap import CreditDefaultSwap
238
+ from lusid.models.credit_premium_cash_flow_event import CreditPremiumCashFlowEvent
234
239
  from lusid.models.credit_rating import CreditRating
235
240
  from lusid.models.credit_spread_curve_data import CreditSpreadCurveData
236
241
  from lusid.models.credit_support_annex import CreditSupportAnnex
@@ -299,6 +304,7 @@ from lusid.models.economic_dependency_with_quote import EconomicDependencyWithQu
299
304
  from lusid.models.election_specification import ElectionSpecification
300
305
  from lusid.models.eligibility_calculation import EligibilityCalculation
301
306
  from lusid.models.empty_model_options import EmptyModelOptions
307
+ from lusid.models.entity_change_item import EntityChangeItem
302
308
  from lusid.models.entity_identifier import EntityIdentifier
303
309
  from lusid.models.equity import Equity
304
310
  from lusid.models.equity_all_of_identifiers import EquityAllOfIdentifiers
@@ -421,6 +427,7 @@ from lusid.models.holding_adjustment import HoldingAdjustment
421
427
  from lusid.models.holding_adjustment_with_date import HoldingAdjustmentWithDate
422
428
  from lusid.models.holding_context import HoldingContext
423
429
  from lusid.models.holding_contributor import HoldingContributor
430
+ from lusid.models.holding_pricing_info import HoldingPricingInfo
424
431
  from lusid.models.holdings_adjustment import HoldingsAdjustment
425
432
  from lusid.models.holdings_adjustment_header import HoldingsAdjustmentHeader
426
433
  from lusid.models.i_unit_definition_dto import IUnitDefinitionDto
@@ -512,6 +519,8 @@ from lusid.models.market_quote import MarketQuote
512
519
  from lusid.models.match_criterion import MatchCriterion
513
520
  from lusid.models.maturity_event import MaturityEvent
514
521
  from lusid.models.merger_event import MergerEvent
522
+ from lusid.models.metadata_key_value import MetadataKeyValue
523
+ from lusid.models.metadata_key_value_response import MetadataKeyValueResponse
515
524
  from lusid.models.metric_value import MetricValue
516
525
  from lusid.models.model_options import ModelOptions
517
526
  from lusid.models.model_options_type import ModelOptionsType
@@ -780,6 +789,7 @@ from lusid.models.resource_list_of_compliance_run_info import ResourceListOfComp
780
789
  from lusid.models.resource_list_of_constituents_adjustment_header import ResourceListOfConstituentsAdjustmentHeader
781
790
  from lusid.models.resource_list_of_corporate_action import ResourceListOfCorporateAction
782
791
  from lusid.models.resource_list_of_data_type import ResourceListOfDataType
792
+ from lusid.models.resource_list_of_entity_change_item import ResourceListOfEntityChangeItem
783
793
  from lusid.models.resource_list_of_execution import ResourceListOfExecution
784
794
  from lusid.models.resource_list_of_fee_rule import ResourceListOfFeeRule
785
795
  from lusid.models.resource_list_of_get_cds_flow_conventions_response import ResourceListOfGetCdsFlowConventionsResponse
@@ -878,6 +888,7 @@ from lusid.models.sides_definition_request import SidesDefinitionRequest
878
888
  from lusid.models.simple_cash_flow_loan import SimpleCashFlowLoan
879
889
  from lusid.models.simple_instrument import SimpleInstrument
880
890
  from lusid.models.sort_order import SortOrder
891
+ from lusid.models.specific_holding_pricing_info import SpecificHoldingPricingInfo
881
892
  from lusid.models.spin_off_event import SpinOffEvent
882
893
  from lusid.models.staged_modification import StagedModification
883
894
  from lusid.models.staged_modification_decision import StagedModificationDecision
@@ -1137,6 +1148,8 @@ __all__ = [
1137
1148
  "BasketIdentifier",
1138
1149
  "BatchAdjustHoldingsResponse",
1139
1150
  "BatchUpsertInstrumentPropertiesResponse",
1151
+ "BatchUpsertPortfolioAccessMetadataRequest",
1152
+ "BatchUpsertPortfolioAccessMetadataResponse",
1140
1153
  "BatchUpsertPortfolioTransactionsResponse",
1141
1154
  "BatchUpsertPropertyDefinitionPropertiesResponse",
1142
1155
  "Block",
@@ -1184,9 +1197,11 @@ __all__ = [
1184
1197
  "CashLadderRecord",
1185
1198
  "CashOfferElection",
1186
1199
  "CashPerpetual",
1200
+ "CdsCreditEvent",
1187
1201
  "CdsFlowConventions",
1188
1202
  "CdsIndex",
1189
1203
  "CdsProtectionDetailSpecification",
1204
+ "CdxCreditEvent",
1190
1205
  "Change",
1191
1206
  "ChangeHistory",
1192
1207
  "ChangeHistoryAction",
@@ -1290,6 +1305,7 @@ __all__ = [
1290
1305
  "CreateTransactionPortfolioRequest",
1291
1306
  "CreateUnitDefinition",
1292
1307
  "CreditDefaultSwap",
1308
+ "CreditPremiumCashFlowEvent",
1293
1309
  "CreditRating",
1294
1310
  "CreditSpreadCurveData",
1295
1311
  "CreditSupportAnnex",
@@ -1358,6 +1374,7 @@ __all__ = [
1358
1374
  "ElectionSpecification",
1359
1375
  "EligibilityCalculation",
1360
1376
  "EmptyModelOptions",
1377
+ "EntityChangeItem",
1361
1378
  "EntityIdentifier",
1362
1379
  "Equity",
1363
1380
  "EquityAllOfIdentifiers",
@@ -1480,6 +1497,7 @@ __all__ = [
1480
1497
  "HoldingAdjustmentWithDate",
1481
1498
  "HoldingContext",
1482
1499
  "HoldingContributor",
1500
+ "HoldingPricingInfo",
1483
1501
  "HoldingsAdjustment",
1484
1502
  "HoldingsAdjustmentHeader",
1485
1503
  "IUnitDefinitionDto",
@@ -1571,6 +1589,8 @@ __all__ = [
1571
1589
  "MatchCriterion",
1572
1590
  "MaturityEvent",
1573
1591
  "MergerEvent",
1592
+ "MetadataKeyValue",
1593
+ "MetadataKeyValueResponse",
1574
1594
  "MetricValue",
1575
1595
  "ModelOptions",
1576
1596
  "ModelOptionsType",
@@ -1839,6 +1859,7 @@ __all__ = [
1839
1859
  "ResourceListOfConstituentsAdjustmentHeader",
1840
1860
  "ResourceListOfCorporateAction",
1841
1861
  "ResourceListOfDataType",
1862
+ "ResourceListOfEntityChangeItem",
1842
1863
  "ResourceListOfExecution",
1843
1864
  "ResourceListOfFeeRule",
1844
1865
  "ResourceListOfGetCdsFlowConventionsResponse",
@@ -1937,6 +1958,7 @@ __all__ = [
1937
1958
  "SimpleCashFlowLoan",
1938
1959
  "SimpleInstrument",
1939
1960
  "SortOrder",
1961
+ "SpecificHoldingPricingInfo",
1940
1962
  "SpinOffEvent",
1941
1963
  "StagedModification",
1942
1964
  "StagedModificationDecision",