lusid-sdk 2.1.131__py3-none-any.whl → 2.1.142__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.
Potentially problematic release.
This version of lusid-sdk might be problematic. Click here for more details.
- lusid/__init__.py +21 -0
- lusid/api/aggregation_api.py +2 -2
- lusid/api/allocations_api.py +2 -2
- lusid/api/calendars_api.py +6 -6
- lusid/api/complex_market_data_api.py +2 -2
- lusid/api/custom_entities_api.py +6 -6
- lusid/api/entities_api.py +2 -2
- lusid/api/executions_api.py +4 -4
- lusid/api/funds_api.py +1148 -198
- lusid/api/instrument_events_api.py +2 -2
- lusid/api/instruments_api.py +4 -4
- lusid/api/legal_entities_api.py +20 -20
- lusid/api/orders_api.py +4 -4
- lusid/api/portfolio_groups_api.py +4 -4
- lusid/api/portfolios_api.py +16 -16
- lusid/api/property_definitions_api.py +2 -2
- lusid/api/quotes_api.py +2 -2
- lusid/api/relationships_api.py +2 -2
- lusid/api/structured_result_data_api.py +6 -6
- lusid/api/transaction_portfolios_api.py +6 -6
- lusid/configuration.py +1 -1
- lusid/extensions/__init__.py +2 -0
- lusid/extensions/configuration_loaders.py +68 -5
- lusid/extensions/file_access_token.py +42 -0
- lusid/models/__init__.py +18 -0
- lusid/models/access_metadata_operation.py +3 -3
- lusid/models/applicable_instrument_event.py +3 -1
- lusid/models/branch_step_request.py +91 -0
- lusid/models/check_step_request.py +91 -0
- lusid/models/compliance_step_request.py +41 -19
- lusid/models/compliance_step_type_request.py +0 -1
- lusid/models/deleted_entity_response.py +15 -1
- lusid/models/fee.py +217 -0
- lusid/models/fee_request.py +163 -0
- lusid/models/filter_step_request.py +91 -0
- lusid/models/group_by_step_request.py +91 -0
- lusid/models/group_filter_step_request.py +91 -0
- lusid/models/instrument_event_configuration.py +1 -1
- lusid/models/intermediate_compliance_step_request.py +91 -0
- lusid/models/operation_type.py +1 -0
- lusid/models/paged_resource_list_of_fee.py +113 -0
- lusid/models/staged_modifications_requested_change_interval.py +11 -14
- {lusid_sdk-2.1.131.dist-info → lusid_sdk-2.1.142.dist-info}/METADATA +63 -49
- {lusid_sdk-2.1.131.dist-info → lusid_sdk-2.1.142.dist-info}/RECORD +45 -35
- {lusid_sdk-2.1.131.dist-info → lusid_sdk-2.1.142.dist-info}/WHEEL +0 -0
lusid/api/quotes_api.py
CHANGED
|
@@ -440,7 +440,7 @@ class QuotesApi:
|
|
|
440
440
|
|
|
441
441
|
@validate_arguments
|
|
442
442
|
def get_quotes(self, scope : Annotated[constr(strict=True, max_length=64, min_length=1), Field(..., description="The scope of the quotes to retrieve.")], effective_at : Annotated[Optional[StrictStr], Field(description="The effective datetime or cut label at which to retrieve the quotes. Defaults to the current LUSID system datetime if not specified.")] = None, as_at : Annotated[Optional[datetime], Field(description="The asAt datetime at which to retrieve the quotes. Defaults to return the latest version of each quote if not specified.")] = None, max_age : Annotated[Optional[StrictStr], Field(description="The duration of the look back window in an ISO8601 time interval format e.g. P1Y2M3DT4H30M (1 year, 2 months, 3 days, 4 hours and 30 minutes). This is subtracted from the provided effectiveAt datetime or cut label to generate a effective datetime window inside which a quote must exist to be retrieved.")] = None, request_body : Annotated[Optional[Dict[str, QuoteSeriesId]], Field(description="The time invariant quote series ids of the quotes to retrieve. These need to be keyed by a unique correlation id allowing the retrieved quote to be identified in the response.")] = None, async_req: Optional[bool]=None, **kwargs) -> Union[GetQuotesResponse, Awaitable[GetQuotesResponse]]: # noqa: E501
|
|
443
|
-
"""
|
|
443
|
+
"""GetQuotes: Get quotes # noqa: E501
|
|
444
444
|
|
|
445
445
|
Get one or more quotes from a single scope. Each quote can be identified by its time invariant quote series id. For each quote series id LUSID will return the most recent quote with respect to the provided (or default) effective datetime. An optional maximum age range window can be specified which defines how far back to look back for a quote from the specified effective datetime. LUSID will return the most recent quote within this window. In the request each quote series id must be keyed by a unique correlation id. This id is ephemeral and is not stored by LUSID. It serves only as a way to easily identify each quote in the response. The response will return three collections. One, the successfully retrieved quotes. Two, those that had a valid quote series id but could not be found. Three, those that failed because LUSID could not construct a valid quote series id from the request. For the quotes that failed or could not be found a reason will be provided explaining why the quote could not be retrieved. It is important to always check the failed and not found sets for any unsuccessful results. The maximum number of quotes that this method can get per request is 2,000. # noqa: E501
|
|
446
446
|
This method makes a synchronous HTTP request by default. To make an
|
|
@@ -480,7 +480,7 @@ class QuotesApi:
|
|
|
480
480
|
|
|
481
481
|
@validate_arguments
|
|
482
482
|
def get_quotes_with_http_info(self, scope : Annotated[constr(strict=True, max_length=64, min_length=1), Field(..., description="The scope of the quotes to retrieve.")], effective_at : Annotated[Optional[StrictStr], Field(description="The effective datetime or cut label at which to retrieve the quotes. Defaults to the current LUSID system datetime if not specified.")] = None, as_at : Annotated[Optional[datetime], Field(description="The asAt datetime at which to retrieve the quotes. Defaults to return the latest version of each quote if not specified.")] = None, max_age : Annotated[Optional[StrictStr], Field(description="The duration of the look back window in an ISO8601 time interval format e.g. P1Y2M3DT4H30M (1 year, 2 months, 3 days, 4 hours and 30 minutes). This is subtracted from the provided effectiveAt datetime or cut label to generate a effective datetime window inside which a quote must exist to be retrieved.")] = None, request_body : Annotated[Optional[Dict[str, QuoteSeriesId]], Field(description="The time invariant quote series ids of the quotes to retrieve. These need to be keyed by a unique correlation id allowing the retrieved quote to be identified in the response.")] = None, **kwargs) -> ApiResponse: # noqa: E501
|
|
483
|
-
"""
|
|
483
|
+
"""GetQuotes: Get quotes # noqa: E501
|
|
484
484
|
|
|
485
485
|
Get one or more quotes from a single scope. Each quote can be identified by its time invariant quote series id. For each quote series id LUSID will return the most recent quote with respect to the provided (or default) effective datetime. An optional maximum age range window can be specified which defines how far back to look back for a quote from the specified effective datetime. LUSID will return the most recent quote within this window. In the request each quote series id must be keyed by a unique correlation id. This id is ephemeral and is not stored by LUSID. It serves only as a way to easily identify each quote in the response. The response will return three collections. One, the successfully retrieved quotes. Two, those that had a valid quote series id but could not be found. Three, those that failed because LUSID could not construct a valid quote series id from the request. For the quotes that failed or could not be found a reason will be provided explaining why the quote could not be retrieved. It is important to always check the failed and not found sets for any unsuccessful results. The maximum number of quotes that this method can get per request is 2,000. # noqa: E501
|
|
486
486
|
This method makes a synchronous HTTP request by default. To make an
|
lusid/api/relationships_api.py
CHANGED
|
@@ -57,7 +57,7 @@ class RelationshipsApi:
|
|
|
57
57
|
|
|
58
58
|
@validate_arguments
|
|
59
59
|
def create_relationship(self, scope : Annotated[constr(strict=True, max_length=64, min_length=1), Field(..., description="The scope of the relationship")], code : Annotated[constr(strict=True, max_length=64, min_length=1), Field(..., description="The code of the relationship")], create_relationship_request : Annotated[CreateRelationshipRequest, Field(..., description="The details of the relationship to create.")], async_req: Optional[bool]=None, **kwargs) -> Union[CompleteRelationship, Awaitable[CompleteRelationship]]: # noqa: E501
|
|
60
|
-
"""
|
|
60
|
+
"""CreateRelationship: Create Relationship # noqa: E501
|
|
61
61
|
|
|
62
62
|
Create a relationship between two entity objects by their identifiers # noqa: E501
|
|
63
63
|
This method makes a synchronous HTTP request by default. To make an
|
|
@@ -93,7 +93,7 @@ class RelationshipsApi:
|
|
|
93
93
|
|
|
94
94
|
@validate_arguments
|
|
95
95
|
def create_relationship_with_http_info(self, scope : Annotated[constr(strict=True, max_length=64, min_length=1), Field(..., description="The scope of the relationship")], code : Annotated[constr(strict=True, max_length=64, min_length=1), Field(..., description="The code of the relationship")], create_relationship_request : Annotated[CreateRelationshipRequest, Field(..., description="The details of the relationship to create.")], **kwargs) -> ApiResponse: # noqa: E501
|
|
96
|
-
"""
|
|
96
|
+
"""CreateRelationship: Create Relationship # noqa: E501
|
|
97
97
|
|
|
98
98
|
Create a relationship between two entity objects by their identifiers # noqa: E501
|
|
99
99
|
This method makes a synchronous HTTP request by default. To make an
|
|
@@ -69,7 +69,7 @@ class StructuredResultDataApi:
|
|
|
69
69
|
|
|
70
70
|
@validate_arguments
|
|
71
71
|
def create_data_map(self, scope : Annotated[constr(strict=True, max_length=64, min_length=1), Field(..., description="The scope in which to create or update data maps.")], request_body : Annotated[Dict[str, CreateDataMapRequest], Field(..., description="Individual data map creation requests.")], async_req: Optional[bool]=None, **kwargs) -> Union[UpsertStructuredDataResponse, Awaitable[UpsertStructuredDataResponse]]: # noqa: E501
|
|
72
|
-
"""
|
|
72
|
+
"""CreateDataMap: Create data map # noqa: E501
|
|
73
73
|
|
|
74
74
|
Create or update one or more structured result store address definition data maps in a particular scope. Note these are immutable and cannot be changed once created. In the request, each data map must be keyed by a unique correlation ID. This ID is ephemeral and not stored by LUSID. It serves only to easily identify each data map object in the response. The response returns both the collection of successfully created or updated data maps, as well as those that failed. For each failure, a reason is provided. It is important to check the failed set for any unsuccessful results. # noqa: E501
|
|
75
75
|
This method makes a synchronous HTTP request by default. To make an
|
|
@@ -103,7 +103,7 @@ class StructuredResultDataApi:
|
|
|
103
103
|
|
|
104
104
|
@validate_arguments
|
|
105
105
|
def create_data_map_with_http_info(self, scope : Annotated[constr(strict=True, max_length=64, min_length=1), Field(..., description="The scope in which to create or update data maps.")], request_body : Annotated[Dict[str, CreateDataMapRequest], Field(..., description="Individual data map creation requests.")], **kwargs) -> ApiResponse: # noqa: E501
|
|
106
|
-
"""
|
|
106
|
+
"""CreateDataMap: Create data map # noqa: E501
|
|
107
107
|
|
|
108
108
|
Create or update one or more structured result store address definition data maps in a particular scope. Note these are immutable and cannot be changed once created. In the request, each data map must be keyed by a unique correlation ID. This ID is ephemeral and not stored by LUSID. It serves only to easily identify each data map object in the response. The response returns both the collection of successfully created or updated data maps, as well as those that failed. For each failure, a reason is provided. It is important to check the failed set for any unsuccessful results. # noqa: E501
|
|
109
109
|
This method makes a synchronous HTTP request by default. To make an
|
|
@@ -761,7 +761,7 @@ class StructuredResultDataApi:
|
|
|
761
761
|
|
|
762
762
|
@validate_arguments
|
|
763
763
|
def get_structured_result_data(self, scope : Annotated[constr(strict=True, max_length=64, min_length=1), Field(..., description="The scope from which to retrieve data items.")], request_body : Annotated[Dict[str, StructuredResultDataId], Field(..., description="The time invariant set of structured data identifiers to retrieve, keyed by a unique, ephemeral correlation ID.")], as_at : Annotated[Optional[datetime], Field(description="The asAt datetime at which to retrieve the structured result data. Defaults to returning the latest version if not specified.")] = None, max_age : Annotated[Optional[StrictStr], Field(description="The duration of the look-back window in ISO8601 time interval format, for example 'P1Y2M3DT4H30M' (1 year, 2 months, 3 days, 4 hours and 30 minutes). This is subtracted from the provided effectiveAt datetime to generate a effective datetime window inside which a data item must exist to be retrieved.")] = None, async_req: Optional[bool]=None, **kwargs) -> Union[GetStructuredResultDataResponse, Awaitable[GetStructuredResultDataResponse]]: # noqa: E501
|
|
764
|
-
"""
|
|
764
|
+
"""GetStructuredResultData: Get structured result data # noqa: E501
|
|
765
765
|
|
|
766
766
|
Retrieve one or more structured result data items from a particular scope. Each item can be identified by its time invariant structured result data identifier. For each ID, LUSID returns the most recently matched item with respect to the provided (or default) effective datetime. An optional maximum age range window can be specified to control how far back to look from the specified effective datetime. LUSID returns the most recent item within this window. In the request, each data item must be keyed by a unique correlation ID. This ID is ephemeral and not stored by LUSID. It serves only to easily identify each data item in the response. The response returns three collections. The first contains successfully retrieved data items. The second contains those with a valid identifier but that could not be found. The third contains those that failed because LUSID could not construct a valid identifier from the request. For the IDs that failed to resolve or could not be found, a reason is provided. It is important to check the failed sets for any unsuccessful results. # noqa: E501
|
|
767
767
|
This method makes a synchronous HTTP request by default. To make an
|
|
@@ -799,7 +799,7 @@ class StructuredResultDataApi:
|
|
|
799
799
|
|
|
800
800
|
@validate_arguments
|
|
801
801
|
def get_structured_result_data_with_http_info(self, scope : Annotated[constr(strict=True, max_length=64, min_length=1), Field(..., description="The scope from which to retrieve data items.")], request_body : Annotated[Dict[str, StructuredResultDataId], Field(..., description="The time invariant set of structured data identifiers to retrieve, keyed by a unique, ephemeral correlation ID.")], as_at : Annotated[Optional[datetime], Field(description="The asAt datetime at which to retrieve the structured result data. Defaults to returning the latest version if not specified.")] = None, max_age : Annotated[Optional[StrictStr], Field(description="The duration of the look-back window in ISO8601 time interval format, for example 'P1Y2M3DT4H30M' (1 year, 2 months, 3 days, 4 hours and 30 minutes). This is subtracted from the provided effectiveAt datetime to generate a effective datetime window inside which a data item must exist to be retrieved.")] = None, **kwargs) -> ApiResponse: # noqa: E501
|
|
802
|
-
"""
|
|
802
|
+
"""GetStructuredResultData: Get structured result data # noqa: E501
|
|
803
803
|
|
|
804
804
|
Retrieve one or more structured result data items from a particular scope. Each item can be identified by its time invariant structured result data identifier. For each ID, LUSID returns the most recently matched item with respect to the provided (or default) effective datetime. An optional maximum age range window can be specified to control how far back to look from the specified effective datetime. LUSID returns the most recent item within this window. In the request, each data item must be keyed by a unique correlation ID. This ID is ephemeral and not stored by LUSID. It serves only to easily identify each data item in the response. The response returns three collections. The first contains successfully retrieved data items. The second contains those with a valid identifier but that could not be found. The third contains those that failed because LUSID could not construct a valid identifier from the request. For the IDs that failed to resolve or could not be found, a reason is provided. It is important to check the failed sets for any unsuccessful results. # noqa: E501
|
|
805
805
|
This method makes a synchronous HTTP request by default. To make an
|
|
@@ -1507,7 +1507,7 @@ class StructuredResultDataApi:
|
|
|
1507
1507
|
|
|
1508
1508
|
@validate_arguments
|
|
1509
1509
|
def upsert_structured_result_data(self, scope : Annotated[constr(strict=True, max_length=64, min_length=1), Field(..., description="The scope in which to create or update data items.")], request_body : Annotated[Dict[str, UpsertStructuredResultDataRequest], Field(..., description="The set of data items to create or update, keyed by a unique, ephemeral correlation ID.")], async_req: Optional[bool]=None, **kwargs) -> Union[UpsertStructuredDataResponse, Awaitable[UpsertStructuredDataResponse]]: # noqa: E501
|
|
1510
|
-
"""
|
|
1510
|
+
"""UpsertStructuredResultData: Upsert structured result data # noqa: E501
|
|
1511
1511
|
|
|
1512
1512
|
Create or update one or more structured result data items in a particular scope. An item is updated if it already exists and created if it does not. In the request, each data item must be keyed by a unique correlation ID. This ID is ephemeral and not stored by LUSID. It serves only to easily identify each data item in the response. The response returns both the collection of successfully created or updated data items, as well as those that failed. For each failure, a reason is provided. It is important to check the failed set for any unsuccessful results. # noqa: E501
|
|
1513
1513
|
This method makes a synchronous HTTP request by default. To make an
|
|
@@ -1541,7 +1541,7 @@ class StructuredResultDataApi:
|
|
|
1541
1541
|
|
|
1542
1542
|
@validate_arguments
|
|
1543
1543
|
def upsert_structured_result_data_with_http_info(self, scope : Annotated[constr(strict=True, max_length=64, min_length=1), Field(..., description="The scope in which to create or update data items.")], request_body : Annotated[Dict[str, UpsertStructuredResultDataRequest], Field(..., description="The set of data items to create or update, keyed by a unique, ephemeral correlation ID.")], **kwargs) -> ApiResponse: # noqa: E501
|
|
1544
|
-
"""
|
|
1544
|
+
"""UpsertStructuredResultData: Upsert structured result data # noqa: E501
|
|
1545
1545
|
|
|
1546
1546
|
Create or update one or more structured result data items in a particular scope. An item is updated if it already exists and created if it does not. In the request, each data item must be keyed by a unique correlation ID. This ID is ephemeral and not stored by LUSID. It serves only to easily identify each data item in the response. The response returns both the collection of successfully created or updated data items, as well as those that failed. For each failure, a reason is provided. It is important to check the failed set for any unsuccessful results. # noqa: E501
|
|
1547
1547
|
This method makes a synchronous HTTP request by default. To make an
|
|
@@ -3948,7 +3948,7 @@ class TransactionPortfoliosApi:
|
|
|
3948
3948
|
|
|
3949
3949
|
@validate_arguments
|
|
3950
3950
|
def get_portfolio_cash_flows(self, scope : Annotated[constr(strict=True, max_length=64, min_length=1), Field(..., description="The scope of the transaction portfolio.")], code : Annotated[constr(strict=True, max_length=64, min_length=1), Field(..., description="The code of the transaction portfolio. Together with the scope this uniquely identifies the portfolio.")], effective_at : Annotated[Optional[StrictStr], Field(description="The valuation (pricing) effective datetime or cut label (inclusive) at which to evaluate the cashflows. This determines whether cashflows are evaluated in a historic or forward looking context and will, for certain models, affect where data is looked up. For example, on a swap if the effectiveAt is in the middle of the window, cashflows before it will be historic and resets assumed to exist where if the effectiveAt is before the start of the range they are forward looking and will be expectations assuming the model supports that. There is evidently a presumption here about availability of data and that the effectiveAt is realistically on or before the real-world today.")] = None, window_start : Annotated[Optional[StrictStr], Field(description="The lower bound effective datetime or cut label (inclusive) from which to retrieve the cashflows. There is no lower bound if this is not specified. i.e. it is the minimum date.")] = None, window_end : Annotated[Optional[StrictStr], Field(description="The upper bound effective datetime or cut label (inclusive) from which to retrieve the cashflows. The upper bound defaults to 'max date' if it is not specified")] = None, as_at : Annotated[Optional[datetime], Field(description="The asAt datetime at which to retrieve the data. Defaults to returning the latest version of each transaction if not specified.")] = None, filter : Annotated[Optional[constr(strict=True, max_length=16384, min_length=0)], Field(description="Expression to filter the result set. For example, to return only transactions with a transaction type of 'Buy', specify \"type eq 'Buy'\". For more information about filtering LUSID results, see https://support.lusid.com/knowledgebase/article/KA-01914.")] = None, recipe_id_scope : Annotated[Optional[StrictStr], Field(description="The scope of the given recipeId")] = None, recipe_id_code : Annotated[Optional[StrictStr], Field(description="The code of the given recipeID")] = None, exclude_unsettled_trades : Annotated[Optional[StrictBool], Field(description="If absent or set to false, cashflows will returned based on trade date - more specifically, cashflows from any unsettled trades will be included in the results. If set to true, unsettled trades will be excluded from the result set.")] = None, async_req: Optional[bool]=None, **kwargs) -> Union[ResourceListOfInstrumentCashFlow, Awaitable[ResourceListOfInstrumentCashFlow]]: # noqa: E501
|
|
3951
|
-
"""
|
|
3951
|
+
"""GetPortfolioCashFlows: Get portfolio cash flows # noqa: E501
|
|
3952
3952
|
|
|
3953
3953
|
Get the set of cash flows that occur in a window for the transaction portfolio's instruments. Note that grouping can affect the quantity of information returned; where a holding is an amalgamation of one or more (e.g. cash) instruments, a unique transaction identifier will not be available. The same may go for diagnostic information (e.g. multiple sources of an aggregate cash amount on a date that is not split out. Grouping at the transaction and instrument level is recommended for those seeking to attribute individual flows. # noqa: E501
|
|
3954
3954
|
This method makes a synchronous HTTP request by default. To make an
|
|
@@ -3998,7 +3998,7 @@ class TransactionPortfoliosApi:
|
|
|
3998
3998
|
|
|
3999
3999
|
@validate_arguments
|
|
4000
4000
|
def get_portfolio_cash_flows_with_http_info(self, scope : Annotated[constr(strict=True, max_length=64, min_length=1), Field(..., description="The scope of the transaction portfolio.")], code : Annotated[constr(strict=True, max_length=64, min_length=1), Field(..., description="The code of the transaction portfolio. Together with the scope this uniquely identifies the portfolio.")], effective_at : Annotated[Optional[StrictStr], Field(description="The valuation (pricing) effective datetime or cut label (inclusive) at which to evaluate the cashflows. This determines whether cashflows are evaluated in a historic or forward looking context and will, for certain models, affect where data is looked up. For example, on a swap if the effectiveAt is in the middle of the window, cashflows before it will be historic and resets assumed to exist where if the effectiveAt is before the start of the range they are forward looking and will be expectations assuming the model supports that. There is evidently a presumption here about availability of data and that the effectiveAt is realistically on or before the real-world today.")] = None, window_start : Annotated[Optional[StrictStr], Field(description="The lower bound effective datetime or cut label (inclusive) from which to retrieve the cashflows. There is no lower bound if this is not specified. i.e. it is the minimum date.")] = None, window_end : Annotated[Optional[StrictStr], Field(description="The upper bound effective datetime or cut label (inclusive) from which to retrieve the cashflows. The upper bound defaults to 'max date' if it is not specified")] = None, as_at : Annotated[Optional[datetime], Field(description="The asAt datetime at which to retrieve the data. Defaults to returning the latest version of each transaction if not specified.")] = None, filter : Annotated[Optional[constr(strict=True, max_length=16384, min_length=0)], Field(description="Expression to filter the result set. For example, to return only transactions with a transaction type of 'Buy', specify \"type eq 'Buy'\". For more information about filtering LUSID results, see https://support.lusid.com/knowledgebase/article/KA-01914.")] = None, recipe_id_scope : Annotated[Optional[StrictStr], Field(description="The scope of the given recipeId")] = None, recipe_id_code : Annotated[Optional[StrictStr], Field(description="The code of the given recipeID")] = None, exclude_unsettled_trades : Annotated[Optional[StrictBool], Field(description="If absent or set to false, cashflows will returned based on trade date - more specifically, cashflows from any unsettled trades will be included in the results. If set to true, unsettled trades will be excluded from the result set.")] = None, **kwargs) -> ApiResponse: # noqa: E501
|
|
4001
|
-
"""
|
|
4001
|
+
"""GetPortfolioCashFlows: Get portfolio cash flows # noqa: E501
|
|
4002
4002
|
|
|
4003
4003
|
Get the set of cash flows that occur in a window for the transaction portfolio's instruments. Note that grouping can affect the quantity of information returned; where a holding is an amalgamation of one or more (e.g. cash) instruments, a unique transaction identifier will not be available. The same may go for diagnostic information (e.g. multiple sources of an aggregate cash amount on a date that is not split out. Grouping at the transaction and instrument level is recommended for those seeking to attribute individual flows. # noqa: E501
|
|
4004
4004
|
This method makes a synchronous HTTP request by default. To make an
|
|
@@ -5024,7 +5024,7 @@ class TransactionPortfoliosApi:
|
|
|
5024
5024
|
|
|
5025
5025
|
@validate_arguments
|
|
5026
5026
|
def get_upsertable_portfolio_cash_flows(self, scope : Annotated[constr(strict=True, max_length=64, min_length=1), Field(..., description="The scope of the transaction portfolio.")], code : Annotated[constr(strict=True, max_length=64, min_length=1), Field(..., description="The code of the transaction portfolio. Together with the scope this uniquely identifies the portfolio.")], effective_at : Annotated[Optional[StrictStr], Field(description="The valuation (pricing) effective datetime or cut label (inclusive) at which to evaluate the cashflows. This determines whether cashflows are evaluated in a historic or forward looking context and will, for certain models, affect where data is looked up. For example, on a swap if the effectiveAt is in the middle of the window, cashflows before it will be historic and resets assumed to exist where if the effectiveAt is before the start of the range they are forward looking and will be expectations assuming the model supports that. There is evidently a presumption here about availability of data and that the effectiveAt is realistically on or before the real-world today.")] = None, window_start : Annotated[Optional[StrictStr], Field(description="The lower bound effective datetime or cut label (inclusive) from which to retrieve the cashflows. There is no lower bound if this is not specified. i.e. uses minimum date-time")] = None, window_end : Annotated[Optional[StrictStr], Field(description="The upper bound effective datetime or cut label (inclusive) from which to retrieve the cashflows. The upper bound defaults to 'max date' if it is not specified")] = None, as_at : Annotated[Optional[datetime], Field(description="The asAt datetime at which to retrieve the portfolio. Defaults to return the latest version of each transaction if not specified.")] = None, filter : Annotated[Optional[constr(strict=True, max_length=16384, min_length=0)], Field(description="Expression to filter the result set. For example, to return only transactions with a transaction type of 'Buy', specify \"type eq 'Buy'\". For more information about filtering LUSID results, see https://support.lusid.com/knowledgebase/article/KA-01914.")] = None, recipe_id_scope : Annotated[Optional[StrictStr], Field(description="The scope of the given recipeId")] = None, recipe_id_code : Annotated[Optional[StrictStr], Field(description="The code of the given recipeID")] = None, exclude_unsettled_trades : Annotated[Optional[StrictBool], Field(description="If absent or set to true, unsettled trades will be excluded from the result set. If set to false, cashflows will returned based on trade date - more specifically, cashflows from any unsettled trades will be included in the results.")] = None, async_req: Optional[bool]=None, **kwargs) -> Union[ResourceListOfTransaction, Awaitable[ResourceListOfTransaction]]: # noqa: E501
|
|
5027
|
-
"""
|
|
5027
|
+
"""GetUpsertablePortfolioCashFlows: Get upsertable portfolio cash flows. # noqa: E501
|
|
5028
5028
|
|
|
5029
5029
|
Get the set of cash flows that occur in a window for the given portfolio instruments as a set of upsertable transactions (DTOs). Note that grouping can affect the quantity of information returned; where a holding is an amalgamation of one or more (e.g. cash) instruments, a unique transaction identifier will not be available. The same may go for diagnostic information (e.g. multiple sources of an aggregate cash amount on a date that is not split out. Grouping at the transaction and instrument level is recommended for those seeking to attribute individual flows. In essence this is identical to the 'GetCashFlows' endpoint but returns the cash flows as a set of transactions suitable for directly putting back into LUSID. There are a couple of important points: (1) Internally it can not be fully known where the user wishes to insert these transactions, e.g. portfolio and movement type. These are therefore defaulted to a sensible option; the user will likely need to change these. (2) Similarly, knowledge of any properties the user might wish to add to a transaction are unknown and consequently left empty. (3) The transaction id that is added is simply a concatenation of the original transaction id, instrument id and payment date and direction. The user can happily override this. # noqa: E501
|
|
5030
5030
|
This method makes a synchronous HTTP request by default. To make an
|
|
@@ -5074,7 +5074,7 @@ class TransactionPortfoliosApi:
|
|
|
5074
5074
|
|
|
5075
5075
|
@validate_arguments
|
|
5076
5076
|
def get_upsertable_portfolio_cash_flows_with_http_info(self, scope : Annotated[constr(strict=True, max_length=64, min_length=1), Field(..., description="The scope of the transaction portfolio.")], code : Annotated[constr(strict=True, max_length=64, min_length=1), Field(..., description="The code of the transaction portfolio. Together with the scope this uniquely identifies the portfolio.")], effective_at : Annotated[Optional[StrictStr], Field(description="The valuation (pricing) effective datetime or cut label (inclusive) at which to evaluate the cashflows. This determines whether cashflows are evaluated in a historic or forward looking context and will, for certain models, affect where data is looked up. For example, on a swap if the effectiveAt is in the middle of the window, cashflows before it will be historic and resets assumed to exist where if the effectiveAt is before the start of the range they are forward looking and will be expectations assuming the model supports that. There is evidently a presumption here about availability of data and that the effectiveAt is realistically on or before the real-world today.")] = None, window_start : Annotated[Optional[StrictStr], Field(description="The lower bound effective datetime or cut label (inclusive) from which to retrieve the cashflows. There is no lower bound if this is not specified. i.e. uses minimum date-time")] = None, window_end : Annotated[Optional[StrictStr], Field(description="The upper bound effective datetime or cut label (inclusive) from which to retrieve the cashflows. The upper bound defaults to 'max date' if it is not specified")] = None, as_at : Annotated[Optional[datetime], Field(description="The asAt datetime at which to retrieve the portfolio. Defaults to return the latest version of each transaction if not specified.")] = None, filter : Annotated[Optional[constr(strict=True, max_length=16384, min_length=0)], Field(description="Expression to filter the result set. For example, to return only transactions with a transaction type of 'Buy', specify \"type eq 'Buy'\". For more information about filtering LUSID results, see https://support.lusid.com/knowledgebase/article/KA-01914.")] = None, recipe_id_scope : Annotated[Optional[StrictStr], Field(description="The scope of the given recipeId")] = None, recipe_id_code : Annotated[Optional[StrictStr], Field(description="The code of the given recipeID")] = None, exclude_unsettled_trades : Annotated[Optional[StrictBool], Field(description="If absent or set to true, unsettled trades will be excluded from the result set. If set to false, cashflows will returned based on trade date - more specifically, cashflows from any unsettled trades will be included in the results.")] = None, **kwargs) -> ApiResponse: # noqa: E501
|
|
5077
|
-
"""
|
|
5077
|
+
"""GetUpsertablePortfolioCashFlows: Get upsertable portfolio cash flows. # noqa: E501
|
|
5078
5078
|
|
|
5079
5079
|
Get the set of cash flows that occur in a window for the given portfolio instruments as a set of upsertable transactions (DTOs). Note that grouping can affect the quantity of information returned; where a holding is an amalgamation of one or more (e.g. cash) instruments, a unique transaction identifier will not be available. The same may go for diagnostic information (e.g. multiple sources of an aggregate cash amount on a date that is not split out. Grouping at the transaction and instrument level is recommended for those seeking to attribute individual flows. In essence this is identical to the 'GetCashFlows' endpoint but returns the cash flows as a set of transactions suitable for directly putting back into LUSID. There are a couple of important points: (1) Internally it can not be fully known where the user wishes to insert these transactions, e.g. portfolio and movement type. These are therefore defaulted to a sensible option; the user will likely need to change these. (2) Similarly, knowledge of any properties the user might wish to add to a transaction are unknown and consequently left empty. (3) The transaction id that is added is simply a concatenation of the original transaction id, instrument id and payment date and direction. The user can happily override this. # noqa: E501
|
|
5080
5080
|
This method makes a synchronous HTTP request by default. To make an
|
|
@@ -5647,7 +5647,7 @@ class TransactionPortfoliosApi:
|
|
|
5647
5647
|
|
|
5648
5648
|
@validate_arguments
|
|
5649
5649
|
def patch_portfolio_details(self, scope : Annotated[constr(strict=True, max_length=64, min_length=1), Field(..., description="The scope of the transaction portfolio.")], code : Annotated[constr(strict=True, max_length=64, min_length=1), Field(..., description="The code of the transaction portfolio. Together with the scope this uniquely identifies the transaction portfolio.")], operation : Annotated[conlist(Operation), Field(..., description="The patch document.")], effective_at : Annotated[Optional[StrictStr], Field(description="The effective datetime or cut label at which the updated or inserted details should become valid. Defaults to the current LUSID system datetime if not specified. Note that this will affect all bitemporal entities in the request, but will not be used for any perpetual entities.")] = None, async_req: Optional[bool]=None, **kwargs) -> Union[PortfolioDetails, Awaitable[PortfolioDetails]]: # noqa: E501
|
|
5650
|
-
"""
|
|
5650
|
+
"""PatchPortfolioDetails: Patch portfolio details # noqa: E501
|
|
5651
5651
|
|
|
5652
5652
|
Create or update certain details for a particular transaction portfolio. The behaviour is defined by the JSON Patch specification. Note that not all elements of a transaction portfolio definition are modifiable once it has been created due to the potential implications for data already stored. Currently supported properties are: SubHoldingKeys, BaseCurrency, AmortisationMethod # noqa: E501
|
|
5653
5653
|
This method makes a synchronous HTTP request by default. To make an
|
|
@@ -5685,7 +5685,7 @@ class TransactionPortfoliosApi:
|
|
|
5685
5685
|
|
|
5686
5686
|
@validate_arguments
|
|
5687
5687
|
def patch_portfolio_details_with_http_info(self, scope : Annotated[constr(strict=True, max_length=64, min_length=1), Field(..., description="The scope of the transaction portfolio.")], code : Annotated[constr(strict=True, max_length=64, min_length=1), Field(..., description="The code of the transaction portfolio. Together with the scope this uniquely identifies the transaction portfolio.")], operation : Annotated[conlist(Operation), Field(..., description="The patch document.")], effective_at : Annotated[Optional[StrictStr], Field(description="The effective datetime or cut label at which the updated or inserted details should become valid. Defaults to the current LUSID system datetime if not specified. Note that this will affect all bitemporal entities in the request, but will not be used for any perpetual entities.")] = None, **kwargs) -> ApiResponse: # noqa: E501
|
|
5688
|
-
"""
|
|
5688
|
+
"""PatchPortfolioDetails: Patch portfolio details # noqa: E501
|
|
5689
5689
|
|
|
5690
5690
|
Create or update certain details for a particular transaction portfolio. The behaviour is defined by the JSON Patch specification. Note that not all elements of a transaction portfolio definition are modifiable once it has been created due to the potential implications for data already stored. Currently supported properties are: SubHoldingKeys, BaseCurrency, AmortisationMethod # noqa: E501
|
|
5691
5691
|
This method makes a synchronous HTTP request by default. To make an
|
lusid/configuration.py
CHANGED
|
@@ -373,7 +373,7 @@ class Configuration:
|
|
|
373
373
|
return "Python SDK Debug Report:\n"\
|
|
374
374
|
"OS: {env}\n"\
|
|
375
375
|
"Python Version: {pyversion}\n"\
|
|
376
|
-
"Version of the API: 0.11.
|
|
376
|
+
"Version of the API: 0.11.6576\n"\
|
|
377
377
|
"SDK Package Version: {package_version}".\
|
|
378
378
|
format(env=sys.platform, pyversion=sys.version, package_version=package_version)
|
|
379
379
|
|
lusid/extensions/__init__.py
CHANGED
|
@@ -3,6 +3,7 @@ from lusid.extensions.configuration_loaders import (
|
|
|
3
3
|
ConfigurationLoader,
|
|
4
4
|
SecretsFileConfigurationLoader,
|
|
5
5
|
EnvironmentVariablesConfigurationLoader,
|
|
6
|
+
FileTokenConfigurationLoader,
|
|
6
7
|
ArgsConfigurationLoader,
|
|
7
8
|
)
|
|
8
9
|
from lusid.extensions.api_client import SyncApiClient
|
|
@@ -13,6 +14,7 @@ __all__ = [
|
|
|
13
14
|
"ConfigurationLoader",
|
|
14
15
|
"SecretsFileConfigurationLoader",
|
|
15
16
|
"EnvironmentVariablesConfigurationLoader",
|
|
17
|
+
"FileTokenConfigurationLoader"
|
|
16
18
|
"ArgsConfigurationLoader",
|
|
17
19
|
"SyncApiClient"
|
|
18
20
|
]
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import json
|
|
2
2
|
import os
|
|
3
|
-
from typing import Dict, TextIO, Protocol, Union, Iterable
|
|
3
|
+
from typing import Dict, TextIO, Protocol, Union, Iterable, Optional
|
|
4
4
|
import logging
|
|
5
5
|
from lusid.extensions.proxy_config import ProxyConfig
|
|
6
6
|
from lusid.extensions.api_configuration import ApiConfiguration
|
|
7
|
+
from lusid.extensions.file_access_token import FileAccessToken
|
|
7
8
|
|
|
8
9
|
logger = logging.getLogger(__name__)
|
|
9
10
|
|
|
@@ -141,10 +142,34 @@ class EnvironmentVariablesConfigurationLoader:
|
|
|
141
142
|
class ArgsConfigurationLoader:
|
|
142
143
|
"""ConfigurationLoader which loads in config from kwargs in constructor
|
|
143
144
|
"""
|
|
144
|
-
def __init__(self,
|
|
145
|
+
def __init__(self,
|
|
146
|
+
token_url:Optional[str]=None,
|
|
147
|
+
api_url:Optional[str]=None,
|
|
148
|
+
username:Optional[str]=None,
|
|
149
|
+
password:Optional[str]=None,
|
|
150
|
+
client_id:Optional[str]=None,
|
|
151
|
+
client_secret:Optional[str]=None,
|
|
152
|
+
app_name:Optional[str]=None,
|
|
153
|
+
certificate_filename:Optional[str]=None,
|
|
154
|
+
proxy_address:Optional[str]=None,
|
|
155
|
+
proxy_username:Optional[str]=None,
|
|
156
|
+
proxy_password:Optional[str]=None,
|
|
157
|
+
access_token:Optional[str]=None
|
|
158
|
+
):
|
|
145
159
|
"""kwargs passed to this constructor used to build ApiConfiguration
|
|
146
160
|
"""
|
|
147
|
-
self.
|
|
161
|
+
self.__token_url = token_url
|
|
162
|
+
self.__api_url = api_url
|
|
163
|
+
self.__username = username
|
|
164
|
+
self.__password = password
|
|
165
|
+
self.__client_id = client_id
|
|
166
|
+
self.__client_secret = client_secret
|
|
167
|
+
self.__app_name = app_name
|
|
168
|
+
self.__certificate_filename = certificate_filename
|
|
169
|
+
self.__proxy_address = proxy_address
|
|
170
|
+
self.__proxy_username = proxy_username
|
|
171
|
+
self.__proxy_password = proxy_password
|
|
172
|
+
self.__access_token = access_token
|
|
148
173
|
|
|
149
174
|
def load_config(self) -> Dict[str, str]:
|
|
150
175
|
"""load configuration from kwargs passed to constructor
|
|
@@ -155,13 +180,51 @@ class ArgsConfigurationLoader:
|
|
|
155
180
|
dictionary that can be loaded into an ApiConfiguration object
|
|
156
181
|
"""
|
|
157
182
|
logger.debug("loading config from arguments passed to ArgsConfigurationLoader")
|
|
158
|
-
|
|
159
|
-
|
|
183
|
+
return {
|
|
184
|
+
"token_url" : self.__token_url,
|
|
185
|
+
"api_url" : self.__api_url,
|
|
186
|
+
"username" : self.__username,
|
|
187
|
+
"password" : self.__password,
|
|
188
|
+
"client_id" : self.__client_id,
|
|
189
|
+
"client_secret" : self.__client_secret,
|
|
190
|
+
"app_name" : self.__app_name,
|
|
191
|
+
"certificate_filename" : self.__certificate_filename,
|
|
192
|
+
"proxy_address" : self.__proxy_address,
|
|
193
|
+
"proxy_username" : self.__proxy_username,
|
|
194
|
+
"proxy_password" : self.__proxy_password,
|
|
195
|
+
"access_token" : self.__access_token
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
|
|
199
|
+
class FileTokenConfigurationLoader:
|
|
200
|
+
"""ConfigurationLoader which loads in access token from file
|
|
201
|
+
if FBN_ACCESS_TOKEN_FILE is set,
|
|
202
|
+
or if an access_token_location is passed to the initialiser
|
|
203
|
+
"""
|
|
204
|
+
|
|
205
|
+
def __init__(
|
|
206
|
+
self, access_token_location: str = os.getenv("FBN_ACCESS_TOKEN_FILE", "")
|
|
207
|
+
):
|
|
208
|
+
self.access_token = None
|
|
209
|
+
# if neither are provided we won't want to override config from other loaders
|
|
210
|
+
if access_token_location is not None and access_token_location != "":
|
|
211
|
+
self.access_token = FileAccessToken(access_token_location)
|
|
212
|
+
|
|
213
|
+
def load_config(self) -> Dict[str, FileAccessToken | None]:
|
|
214
|
+
"""load access token from file
|
|
215
|
+
|
|
216
|
+
Returns
|
|
217
|
+
-------
|
|
218
|
+
Dict[str, str]
|
|
219
|
+
dictionary that can be loaded into an ApiConfiguration object
|
|
220
|
+
"""
|
|
221
|
+
return {"access_token": self.access_token}
|
|
160
222
|
|
|
161
223
|
|
|
162
224
|
default_config_loaders = (
|
|
163
225
|
EnvironmentVariablesConfigurationLoader(),
|
|
164
226
|
SecretsFileConfigurationLoader(api_secrets_file="secrets.json"),
|
|
227
|
+
FileTokenConfigurationLoader()
|
|
165
228
|
)
|
|
166
229
|
|
|
167
230
|
def get_api_configuration(config_loaders: Iterable[ConfigurationLoader]) -> ApiConfiguration:
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import collections
|
|
2
|
+
import datetime
|
|
3
|
+
import logging
|
|
4
|
+
|
|
5
|
+
logger = logging.getLogger(__name__)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
class FileAccessToken(collections.UserString):
|
|
9
|
+
"""Loads access token from file when requested
|
|
10
|
+
Acts as a string so can be concatenated to auth headers
|
|
11
|
+
"""
|
|
12
|
+
|
|
13
|
+
def __init__(self, access_token_location: str, expiry_time:int = 120):
|
|
14
|
+
if access_token_location is None or access_token_location == "":
|
|
15
|
+
raise ValueError("access_token_location must be a non-empty string")
|
|
16
|
+
self.__access_token_location = access_token_location
|
|
17
|
+
self.__expiry_time = expiry_time
|
|
18
|
+
self.__token_data = {
|
|
19
|
+
"expires": datetime.datetime.now(),
|
|
20
|
+
"current_access_token": "",
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
@property
|
|
24
|
+
def data(self) -> str:
|
|
25
|
+
"""load access token from file
|
|
26
|
+
|
|
27
|
+
Returns
|
|
28
|
+
-------
|
|
29
|
+
str
|
|
30
|
+
Access token
|
|
31
|
+
"""
|
|
32
|
+
if self.__token_data["expires"] <= datetime.datetime.now():
|
|
33
|
+
try:
|
|
34
|
+
with open(self.__access_token_location, "r") as access_token_file:
|
|
35
|
+
self.__token_data["current_access_token"] = access_token_file.read()
|
|
36
|
+
self.__token_data["expires"] = (
|
|
37
|
+
datetime.datetime.now() + datetime.timedelta(seconds=self.__expiry_time)
|
|
38
|
+
)
|
|
39
|
+
except OSError:
|
|
40
|
+
logger.error("Could not open access token file")
|
|
41
|
+
raise
|
|
42
|
+
return self.__token_data["current_access_token"]
|
lusid/models/__init__.py
CHANGED
|
@@ -96,6 +96,7 @@ from lusid.models.book_transactions_response import BookTransactionsResponse
|
|
|
96
96
|
from lusid.models.bool_compliance_parameter import BoolComplianceParameter
|
|
97
97
|
from lusid.models.bool_list_compliance_parameter import BoolListComplianceParameter
|
|
98
98
|
from lusid.models.branch_step import BranchStep
|
|
99
|
+
from lusid.models.branch_step_request import BranchStepRequest
|
|
99
100
|
from lusid.models.bucketed_cash_flow_request import BucketedCashFlowRequest
|
|
100
101
|
from lusid.models.bucketed_cash_flow_response import BucketedCashFlowResponse
|
|
101
102
|
from lusid.models.bucketing_schedule import BucketingSchedule
|
|
@@ -125,6 +126,7 @@ from lusid.models.chart_of_accounts import ChartOfAccounts
|
|
|
125
126
|
from lusid.models.chart_of_accounts_properties import ChartOfAccountsProperties
|
|
126
127
|
from lusid.models.chart_of_accounts_request import ChartOfAccountsRequest
|
|
127
128
|
from lusid.models.check_step import CheckStep
|
|
129
|
+
from lusid.models.check_step_request import CheckStepRequest
|
|
128
130
|
from lusid.models.cleardown_module_details import CleardownModuleDetails
|
|
129
131
|
from lusid.models.cleardown_module_request import CleardownModuleRequest
|
|
130
132
|
from lusid.models.cleardown_module_response import CleardownModuleResponse
|
|
@@ -304,7 +306,9 @@ from lusid.models.exercise_event import ExerciseEvent
|
|
|
304
306
|
from lusid.models.exotic_instrument import ExoticInstrument
|
|
305
307
|
from lusid.models.expanded_group import ExpandedGroup
|
|
306
308
|
from lusid.models.expiry_event import ExpiryEvent
|
|
309
|
+
from lusid.models.fee import Fee
|
|
307
310
|
from lusid.models.fee_accrual import FeeAccrual
|
|
311
|
+
from lusid.models.fee_request import FeeRequest
|
|
308
312
|
from lusid.models.fee_rule import FeeRule
|
|
309
313
|
from lusid.models.fee_rule_upsert_request import FeeRuleUpsertRequest
|
|
310
314
|
from lusid.models.fee_rule_upsert_response import FeeRuleUpsertResponse
|
|
@@ -316,6 +320,7 @@ from lusid.models.field_value import FieldValue
|
|
|
316
320
|
from lusid.models.file_response import FileResponse
|
|
317
321
|
from lusid.models.filter_predicate_compliance_parameter import FilterPredicateComplianceParameter
|
|
318
322
|
from lusid.models.filter_step import FilterStep
|
|
323
|
+
from lusid.models.filter_step_request import FilterStepRequest
|
|
319
324
|
from lusid.models.fixed_leg import FixedLeg
|
|
320
325
|
from lusid.models.fixed_leg_all_of_overrides import FixedLegAllOfOverrides
|
|
321
326
|
from lusid.models.fixed_schedule import FixedSchedule
|
|
@@ -371,8 +376,10 @@ from lusid.models.get_structured_result_data_response import GetStructuredResult
|
|
|
371
376
|
from lusid.models.get_virtual_document_response import GetVirtualDocumentResponse
|
|
372
377
|
from lusid.models.group_by_selector_compliance_parameter import GroupBySelectorComplianceParameter
|
|
373
378
|
from lusid.models.group_by_step import GroupByStep
|
|
379
|
+
from lusid.models.group_by_step_request import GroupByStepRequest
|
|
374
380
|
from lusid.models.group_filter_predicate_compliance_parameter import GroupFilterPredicateComplianceParameter
|
|
375
381
|
from lusid.models.group_filter_step import GroupFilterStep
|
|
382
|
+
from lusid.models.group_filter_step_request import GroupFilterStepRequest
|
|
376
383
|
from lusid.models.group_of_market_data_key_rules import GroupOfMarketDataKeyRules
|
|
377
384
|
from lusid.models.grouped_result_of_address_key import GroupedResultOfAddressKey
|
|
378
385
|
from lusid.models.holding_adjustment import HoldingAdjustment
|
|
@@ -428,6 +435,7 @@ from lusid.models.instrument_type import InstrumentType
|
|
|
428
435
|
from lusid.models.interest_rate_swap import InterestRateSwap
|
|
429
436
|
from lusid.models.interest_rate_swaption import InterestRateSwaption
|
|
430
437
|
from lusid.models.intermediate_compliance_step import IntermediateComplianceStep
|
|
438
|
+
from lusid.models.intermediate_compliance_step_request import IntermediateComplianceStepRequest
|
|
431
439
|
from lusid.models.ir_vol_cube_data import IrVolCubeData
|
|
432
440
|
from lusid.models.ir_vol_dependency import IrVolDependency
|
|
433
441
|
from lusid.models.is_business_day_response import IsBusinessDayResponse
|
|
@@ -547,6 +555,7 @@ from lusid.models.paged_resource_list_of_data_type_summary import PagedResourceL
|
|
|
547
555
|
from lusid.models.paged_resource_list_of_dialect_id import PagedResourceListOfDialectId
|
|
548
556
|
from lusid.models.paged_resource_list_of_diary_entry import PagedResourceListOfDiaryEntry
|
|
549
557
|
from lusid.models.paged_resource_list_of_execution import PagedResourceListOfExecution
|
|
558
|
+
from lusid.models.paged_resource_list_of_fee import PagedResourceListOfFee
|
|
550
559
|
from lusid.models.paged_resource_list_of_fee_type import PagedResourceListOfFeeType
|
|
551
560
|
from lusid.models.paged_resource_list_of_fund import PagedResourceListOfFund
|
|
552
561
|
from lusid.models.paged_resource_list_of_general_ledger_profile_response import PagedResourceListOfGeneralLedgerProfileResponse
|
|
@@ -1073,6 +1082,7 @@ __all__ = [
|
|
|
1073
1082
|
"BoolComplianceParameter",
|
|
1074
1083
|
"BoolListComplianceParameter",
|
|
1075
1084
|
"BranchStep",
|
|
1085
|
+
"BranchStepRequest",
|
|
1076
1086
|
"BucketedCashFlowRequest",
|
|
1077
1087
|
"BucketedCashFlowResponse",
|
|
1078
1088
|
"BucketingSchedule",
|
|
@@ -1102,6 +1112,7 @@ __all__ = [
|
|
|
1102
1112
|
"ChartOfAccountsProperties",
|
|
1103
1113
|
"ChartOfAccountsRequest",
|
|
1104
1114
|
"CheckStep",
|
|
1115
|
+
"CheckStepRequest",
|
|
1105
1116
|
"CleardownModuleDetails",
|
|
1106
1117
|
"CleardownModuleRequest",
|
|
1107
1118
|
"CleardownModuleResponse",
|
|
@@ -1281,7 +1292,9 @@ __all__ = [
|
|
|
1281
1292
|
"ExoticInstrument",
|
|
1282
1293
|
"ExpandedGroup",
|
|
1283
1294
|
"ExpiryEvent",
|
|
1295
|
+
"Fee",
|
|
1284
1296
|
"FeeAccrual",
|
|
1297
|
+
"FeeRequest",
|
|
1285
1298
|
"FeeRule",
|
|
1286
1299
|
"FeeRuleUpsertRequest",
|
|
1287
1300
|
"FeeRuleUpsertResponse",
|
|
@@ -1293,6 +1306,7 @@ __all__ = [
|
|
|
1293
1306
|
"FileResponse",
|
|
1294
1307
|
"FilterPredicateComplianceParameter",
|
|
1295
1308
|
"FilterStep",
|
|
1309
|
+
"FilterStepRequest",
|
|
1296
1310
|
"FixedLeg",
|
|
1297
1311
|
"FixedLegAllOfOverrides",
|
|
1298
1312
|
"FixedSchedule",
|
|
@@ -1348,8 +1362,10 @@ __all__ = [
|
|
|
1348
1362
|
"GetVirtualDocumentResponse",
|
|
1349
1363
|
"GroupBySelectorComplianceParameter",
|
|
1350
1364
|
"GroupByStep",
|
|
1365
|
+
"GroupByStepRequest",
|
|
1351
1366
|
"GroupFilterPredicateComplianceParameter",
|
|
1352
1367
|
"GroupFilterStep",
|
|
1368
|
+
"GroupFilterStepRequest",
|
|
1353
1369
|
"GroupOfMarketDataKeyRules",
|
|
1354
1370
|
"GroupedResultOfAddressKey",
|
|
1355
1371
|
"HoldingAdjustment",
|
|
@@ -1405,6 +1421,7 @@ __all__ = [
|
|
|
1405
1421
|
"InterestRateSwap",
|
|
1406
1422
|
"InterestRateSwaption",
|
|
1407
1423
|
"IntermediateComplianceStep",
|
|
1424
|
+
"IntermediateComplianceStepRequest",
|
|
1408
1425
|
"IrVolCubeData",
|
|
1409
1426
|
"IrVolDependency",
|
|
1410
1427
|
"IsBusinessDayResponse",
|
|
@@ -1524,6 +1541,7 @@ __all__ = [
|
|
|
1524
1541
|
"PagedResourceListOfDialectId",
|
|
1525
1542
|
"PagedResourceListOfDiaryEntry",
|
|
1526
1543
|
"PagedResourceListOfExecution",
|
|
1544
|
+
"PagedResourceListOfFee",
|
|
1527
1545
|
"PagedResourceListOfFeeType",
|
|
1528
1546
|
"PagedResourceListOfFund",
|
|
1529
1547
|
"PagedResourceListOfGeneralLedgerProfileResponse",
|
|
@@ -28,7 +28,7 @@ class AccessMetadataOperation(BaseModel):
|
|
|
28
28
|
"""
|
|
29
29
|
value: conlist(AccessMetadataValue, min_items=1) = Field(...)
|
|
30
30
|
path: constr(strict=True, max_length=1025, min_length=1) = Field(...)
|
|
31
|
-
op: StrictStr = Field(..., description="The available values are: add")
|
|
31
|
+
op: StrictStr = Field(..., description="The available values are: add, remove")
|
|
32
32
|
var_from: Optional[StrictStr] = Field(None, alias="from")
|
|
33
33
|
__properties = ["value", "path", "op", "from"]
|
|
34
34
|
|
|
@@ -42,8 +42,8 @@ class AccessMetadataOperation(BaseModel):
|
|
|
42
42
|
@validator('op')
|
|
43
43
|
def op_validate_enum(cls, value):
|
|
44
44
|
"""Validates the enum"""
|
|
45
|
-
if value not in ('add'):
|
|
46
|
-
raise ValueError("must be one of enum values ('add')")
|
|
45
|
+
if value not in ('add', 'remove'):
|
|
46
|
+
raise ValueError("must be one of enum values ('add', 'remove')")
|
|
47
47
|
return value
|
|
48
48
|
|
|
49
49
|
class Config:
|
|
@@ -37,8 +37,9 @@ class ApplicableInstrumentEvent(BaseModel):
|
|
|
37
37
|
instrument_event_id: constr(strict=True, min_length=1) = Field(..., alias="instrumentEventId")
|
|
38
38
|
generated_event: InstrumentEventHolder = Field(..., alias="generatedEvent")
|
|
39
39
|
loaded_event: InstrumentEventHolder = Field(..., alias="loadedEvent")
|
|
40
|
+
applied_instrument_event_instruction_id: constr(strict=True, min_length=1) = Field(..., alias="appliedInstrumentEventInstructionId")
|
|
40
41
|
transactions: conlist(Transaction) = Field(...)
|
|
41
|
-
__properties = ["portfolioId", "holdingId", "lusidInstrumentId", "instrumentScope", "instrumentType", "instrumentEventType", "instrumentEventId", "generatedEvent", "loadedEvent", "transactions"]
|
|
42
|
+
__properties = ["portfolioId", "holdingId", "lusidInstrumentId", "instrumentScope", "instrumentType", "instrumentEventType", "instrumentEventId", "generatedEvent", "loadedEvent", "appliedInstrumentEventInstructionId", "transactions"]
|
|
42
43
|
|
|
43
44
|
class Config:
|
|
44
45
|
"""Pydantic configuration"""
|
|
@@ -101,6 +102,7 @@ class ApplicableInstrumentEvent(BaseModel):
|
|
|
101
102
|
"instrument_event_id": obj.get("instrumentEventId"),
|
|
102
103
|
"generated_event": InstrumentEventHolder.from_dict(obj.get("generatedEvent")) if obj.get("generatedEvent") is not None else None,
|
|
103
104
|
"loaded_event": InstrumentEventHolder.from_dict(obj.get("loadedEvent")) if obj.get("loadedEvent") is not None else None,
|
|
105
|
+
"applied_instrument_event_instruction_id": obj.get("appliedInstrumentEventInstructionId"),
|
|
104
106
|
"transactions": [Transaction.from_dict(_item) for _item in obj.get("transactions")] if obj.get("transactions") is not None else None
|
|
105
107
|
})
|
|
106
108
|
return _obj
|
|
@@ -0,0 +1,91 @@
|
|
|
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
|
|
22
|
+
from pydantic.v1 import Field, StrictStr, constr, validator
|
|
23
|
+
from lusid.models.compliance_step_request import ComplianceStepRequest
|
|
24
|
+
|
|
25
|
+
class BranchStepRequest(ComplianceStepRequest):
|
|
26
|
+
"""
|
|
27
|
+
BranchStepRequest
|
|
28
|
+
"""
|
|
29
|
+
label: constr(strict=True, max_length=64, min_length=1) = Field(..., description="The label of the compliance step")
|
|
30
|
+
compliance_step_type_request: StrictStr = Field(..., alias="complianceStepTypeRequest", description=". The available values are: FilterStepRequest, GroupByStepRequest, GroupFilterStepRequest, BranchStepRequest, CheckStepRequest")
|
|
31
|
+
additional_properties: Dict[str, Any] = {}
|
|
32
|
+
__properties = ["complianceStepTypeRequest", "label"]
|
|
33
|
+
|
|
34
|
+
@validator('compliance_step_type_request')
|
|
35
|
+
def compliance_step_type_request_validate_enum(cls, value):
|
|
36
|
+
"""Validates the enum"""
|
|
37
|
+
if value not in ('FilterStepRequest', 'GroupByStepRequest', 'GroupFilterStepRequest', 'BranchStepRequest', 'CheckStepRequest'):
|
|
38
|
+
raise ValueError("must be one of enum values ('FilterStepRequest', 'GroupByStepRequest', 'GroupFilterStepRequest', 'BranchStepRequest', 'CheckStepRequest')")
|
|
39
|
+
return value
|
|
40
|
+
|
|
41
|
+
class Config:
|
|
42
|
+
"""Pydantic configuration"""
|
|
43
|
+
allow_population_by_field_name = True
|
|
44
|
+
validate_assignment = True
|
|
45
|
+
|
|
46
|
+
def to_str(self) -> str:
|
|
47
|
+
"""Returns the string representation of the model using alias"""
|
|
48
|
+
return pprint.pformat(self.dict(by_alias=True))
|
|
49
|
+
|
|
50
|
+
def to_json(self) -> str:
|
|
51
|
+
"""Returns the JSON representation of the model using alias"""
|
|
52
|
+
return json.dumps(self.to_dict())
|
|
53
|
+
|
|
54
|
+
@classmethod
|
|
55
|
+
def from_json(cls, json_str: str) -> BranchStepRequest:
|
|
56
|
+
"""Create an instance of BranchStepRequest from a JSON string"""
|
|
57
|
+
return cls.from_dict(json.loads(json_str))
|
|
58
|
+
|
|
59
|
+
def to_dict(self):
|
|
60
|
+
"""Returns the dictionary representation of the model using alias"""
|
|
61
|
+
_dict = self.dict(by_alias=True,
|
|
62
|
+
exclude={
|
|
63
|
+
"additional_properties"
|
|
64
|
+
},
|
|
65
|
+
exclude_none=True)
|
|
66
|
+
# puts key-value pairs in additional_properties in the top level
|
|
67
|
+
if self.additional_properties is not None:
|
|
68
|
+
for _key, _value in self.additional_properties.items():
|
|
69
|
+
_dict[_key] = _value
|
|
70
|
+
|
|
71
|
+
return _dict
|
|
72
|
+
|
|
73
|
+
@classmethod
|
|
74
|
+
def from_dict(cls, obj: dict) -> BranchStepRequest:
|
|
75
|
+
"""Create an instance of BranchStepRequest from a dict"""
|
|
76
|
+
if obj is None:
|
|
77
|
+
return None
|
|
78
|
+
|
|
79
|
+
if not isinstance(obj, dict):
|
|
80
|
+
return BranchStepRequest.parse_obj(obj)
|
|
81
|
+
|
|
82
|
+
_obj = BranchStepRequest.parse_obj({
|
|
83
|
+
"compliance_step_type_request": obj.get("complianceStepTypeRequest"),
|
|
84
|
+
"label": obj.get("label")
|
|
85
|
+
})
|
|
86
|
+
# store additional fields in additional_properties
|
|
87
|
+
for _key in obj.keys():
|
|
88
|
+
if _key not in cls.__properties:
|
|
89
|
+
_obj.additional_properties[_key] = obj.get(_key)
|
|
90
|
+
|
|
91
|
+
return _obj
|