lusid-sdk 2.1.452__py3-none-any.whl → 2.1.458__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.
- lusid/__init__.py +10 -0
- lusid/api/funds_api.py +174 -0
- lusid/api/order_management_api.py +160 -0
- lusid/api/transaction_portfolios_api.py +242 -0
- lusid/configuration.py +1 -1
- lusid/models/__init__.py +10 -0
- lusid/models/basket.py +3 -3
- lusid/models/bond.py +3 -3
- lusid/models/cancel_order_and_move_remaining_result.py +84 -0
- lusid/models/cancel_orders_and_move_remaining_request.py +83 -0
- lusid/models/cancel_orders_and_move_remaining_response.py +153 -0
- lusid/models/cap_floor.py +3 -3
- lusid/models/cash.py +3 -3
- lusid/models/cash_perpetual.py +3 -3
- lusid/models/cds_index.py +3 -3
- lusid/models/complex_bond.py +3 -3
- lusid/models/contract_for_difference.py +3 -3
- lusid/models/credit_default_swap.py +3 -3
- lusid/models/equity.py +3 -3
- lusid/models/equity_option.py +3 -3
- lusid/models/equity_swap.py +3 -3
- lusid/models/exchange_traded_option.py +3 -3
- lusid/models/exotic_instrument.py +3 -3
- lusid/models/fixed_leg.py +3 -3
- lusid/models/flexible_loan.py +3 -3
- lusid/models/floating_leg.py +3 -3
- lusid/models/forward_rate_agreement.py +3 -3
- lusid/models/fund_share_class.py +3 -3
- lusid/models/funding_leg.py +3 -3
- lusid/models/future.py +3 -3
- lusid/models/fx_forward.py +3 -3
- lusid/models/fx_option.py +3 -3
- lusid/models/fx_swap.py +3 -3
- lusid/models/holding_contributor.py +11 -4
- lusid/models/holding_ids_request.py +69 -0
- lusid/models/inflation_leg.py +3 -3
- lusid/models/inflation_linked_bond.py +3 -3
- lusid/models/inflation_swap.py +3 -3
- lusid/models/instrument_leg.py +3 -3
- lusid/models/instrument_type.py +1 -0
- lusid/models/interest_rate_swap.py +3 -3
- lusid/models/interest_rate_swaption.py +3 -3
- lusid/models/loan_facility.py +97 -0
- lusid/models/lusid_instrument.py +6 -5
- lusid/models/mastered_instrument.py +3 -3
- lusid/models/reference_instrument.py +3 -3
- lusid/models/repo.py +3 -3
- lusid/models/reverse_stock_split_event.py +18 -4
- lusid/models/simple_cash_flow_loan.py +3 -3
- lusid/models/simple_instrument.py +3 -3
- lusid/models/term_deposit.py +3 -3
- lusid/models/total_return_swap.py +3 -3
- {lusid_sdk-2.1.452.dist-info → lusid_sdk-2.1.458.dist-info}/METADATA +9 -1
- {lusid_sdk-2.1.452.dist-info → lusid_sdk-2.1.458.dist-info}/RECORD +55 -50
- {lusid_sdk-2.1.452.dist-info → lusid_sdk-2.1.458.dist-info}/WHEEL +0 -0
@@ -42,6 +42,7 @@ from lusid.models.custodian_account_request import CustodianAccountRequest
|
|
42
42
|
from lusid.models.custodian_accounts_upsert_response import CustodianAccountsUpsertResponse
|
43
43
|
from lusid.models.delete_custodian_accounts_response import DeleteCustodianAccountsResponse
|
44
44
|
from lusid.models.deleted_entity_response import DeletedEntityResponse
|
45
|
+
from lusid.models.holding_ids_request import HoldingIdsRequest
|
45
46
|
from lusid.models.holdings_adjustment import HoldingsAdjustment
|
46
47
|
from lusid.models.lusid_trade_ticket import LusidTradeTicket
|
47
48
|
from lusid.models.model_property import ModelProperty
|
@@ -3939,6 +3940,247 @@ class TransactionPortfoliosApi:
|
|
3939
3940
|
collection_formats=_collection_formats,
|
3940
3941
|
_request_auth=_params.get('_request_auth'))
|
3941
3942
|
|
3943
|
+
@overload
|
3944
|
+
async def get_multiple_holding_contributors(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.")], holding_ids_request : Annotated[HoldingIdsRequest, Field(..., description="The array of unique holding identifiers")], effective_date : Annotated[Optional[constr(strict=True, max_length=6000, min_length=0)], Field(description="Effective date")] = None, from_transaction_date : Annotated[Optional[constr(strict=True, max_length=6000, min_length=0)], Field(description="The from trade date, defaults to first time this holding is opened, lower bound for transactions")] = None, to_transaction_date : Annotated[Optional[constr(strict=True, max_length=6000, min_length=0)], Field(description="The to trade date upper bound date, defaults to effectiveDate. upper bound for transactions")] = None, include_historic : Annotated[Optional[StrictBool], Field(description="If true, transactions from previously closed holdings are returned. If false, only transactions from last time position is opened.")] = None, tax_lot_id : Annotated[Optional[constr(strict=True, max_length=6000, min_length=0)], Field(description="Constrains the Holding Contributors to those which contributed to the specified tax lot.")] = None, limit : Annotated[Optional[StrictInt], Field(description="When paginating, limit the number of returned results to this many. Defaults to 100 if not specified.")] = None, as_at : Annotated[Optional[datetime], Field(description="The asAt datetime at which to build the transactions. Defaults to return the latest version of each transaction if not specified.")] = None, page : Annotated[Optional[constr(strict=True, max_length=500, min_length=1)], Field(description="The pagination token to use to continue listing transactions from a previous call to GetHoldingContributors.")] = None, **kwargs) -> VersionedResourceListOfHoldingContributor: # noqa: E501
|
3945
|
+
...
|
3946
|
+
|
3947
|
+
@overload
|
3948
|
+
def get_multiple_holding_contributors(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.")], holding_ids_request : Annotated[HoldingIdsRequest, Field(..., description="The array of unique holding identifiers")], effective_date : Annotated[Optional[constr(strict=True, max_length=6000, min_length=0)], Field(description="Effective date")] = None, from_transaction_date : Annotated[Optional[constr(strict=True, max_length=6000, min_length=0)], Field(description="The from trade date, defaults to first time this holding is opened, lower bound for transactions")] = None, to_transaction_date : Annotated[Optional[constr(strict=True, max_length=6000, min_length=0)], Field(description="The to trade date upper bound date, defaults to effectiveDate. upper bound for transactions")] = None, include_historic : Annotated[Optional[StrictBool], Field(description="If true, transactions from previously closed holdings are returned. If false, only transactions from last time position is opened.")] = None, tax_lot_id : Annotated[Optional[constr(strict=True, max_length=6000, min_length=0)], Field(description="Constrains the Holding Contributors to those which contributed to the specified tax lot.")] = None, limit : Annotated[Optional[StrictInt], Field(description="When paginating, limit the number of returned results to this many. Defaults to 100 if not specified.")] = None, as_at : Annotated[Optional[datetime], Field(description="The asAt datetime at which to build the transactions. Defaults to return the latest version of each transaction if not specified.")] = None, page : Annotated[Optional[constr(strict=True, max_length=500, min_length=1)], Field(description="The pagination token to use to continue listing transactions from a previous call to GetHoldingContributors.")] = None, async_req: Optional[bool]=True, **kwargs) -> VersionedResourceListOfHoldingContributor: # noqa: E501
|
3949
|
+
...
|
3950
|
+
|
3951
|
+
@validate_arguments
|
3952
|
+
def get_multiple_holding_contributors(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.")], holding_ids_request : Annotated[HoldingIdsRequest, Field(..., description="The array of unique holding identifiers")], effective_date : Annotated[Optional[constr(strict=True, max_length=6000, min_length=0)], Field(description="Effective date")] = None, from_transaction_date : Annotated[Optional[constr(strict=True, max_length=6000, min_length=0)], Field(description="The from trade date, defaults to first time this holding is opened, lower bound for transactions")] = None, to_transaction_date : Annotated[Optional[constr(strict=True, max_length=6000, min_length=0)], Field(description="The to trade date upper bound date, defaults to effectiveDate. upper bound for transactions")] = None, include_historic : Annotated[Optional[StrictBool], Field(description="If true, transactions from previously closed holdings are returned. If false, only transactions from last time position is opened.")] = None, tax_lot_id : Annotated[Optional[constr(strict=True, max_length=6000, min_length=0)], Field(description="Constrains the Holding Contributors to those which contributed to the specified tax lot.")] = None, limit : Annotated[Optional[StrictInt], Field(description="When paginating, limit the number of returned results to this many. Defaults to 100 if not specified.")] = None, as_at : Annotated[Optional[datetime], Field(description="The asAt datetime at which to build the transactions. Defaults to return the latest version of each transaction if not specified.")] = None, page : Annotated[Optional[constr(strict=True, max_length=500, min_length=1)], Field(description="The pagination token to use to continue listing transactions from a previous call to GetHoldingContributors.")] = None, async_req: Optional[bool]=None, **kwargs) -> Union[VersionedResourceListOfHoldingContributor, Awaitable[VersionedResourceListOfHoldingContributor]]: # noqa: E501
|
3953
|
+
"""[EARLY ACCESS] GetMultipleHoldingContributors: Get Multiple Holding Contributors # noqa: E501
|
3954
|
+
|
3955
|
+
Lists all transactions that affect multiple specified holdings of a portfolio over a given effective interval. This includes transactions automatically generated by LUSID such as holding adjustments. # noqa: E501
|
3956
|
+
This method makes a synchronous HTTP request by default. To make an
|
3957
|
+
asynchronous HTTP request, please pass async_req=True
|
3958
|
+
|
3959
|
+
>>> thread = api.get_multiple_holding_contributors(scope, code, holding_ids_request, effective_date, from_transaction_date, to_transaction_date, include_historic, tax_lot_id, limit, as_at, page, async_req=True)
|
3960
|
+
>>> result = thread.get()
|
3961
|
+
|
3962
|
+
:param scope: The scope of the transaction portfolio. (required)
|
3963
|
+
:type scope: str
|
3964
|
+
:param code: The code of the transaction portfolio. Together with the scope this uniquely identifies the transaction portfolio. (required)
|
3965
|
+
:type code: str
|
3966
|
+
:param holding_ids_request: The array of unique holding identifiers (required)
|
3967
|
+
:type holding_ids_request: HoldingIdsRequest
|
3968
|
+
:param effective_date: Effective date
|
3969
|
+
:type effective_date: str
|
3970
|
+
:param from_transaction_date: The from trade date, defaults to first time this holding is opened, lower bound for transactions
|
3971
|
+
:type from_transaction_date: str
|
3972
|
+
:param to_transaction_date: The to trade date upper bound date, defaults to effectiveDate. upper bound for transactions
|
3973
|
+
:type to_transaction_date: str
|
3974
|
+
:param include_historic: If true, transactions from previously closed holdings are returned. If false, only transactions from last time position is opened.
|
3975
|
+
:type include_historic: bool
|
3976
|
+
:param tax_lot_id: Constrains the Holding Contributors to those which contributed to the specified tax lot.
|
3977
|
+
:type tax_lot_id: str
|
3978
|
+
:param limit: When paginating, limit the number of returned results to this many. Defaults to 100 if not specified.
|
3979
|
+
:type limit: int
|
3980
|
+
:param as_at: The asAt datetime at which to build the transactions. Defaults to return the latest version of each transaction if not specified.
|
3981
|
+
:type as_at: datetime
|
3982
|
+
:param page: The pagination token to use to continue listing transactions from a previous call to GetHoldingContributors.
|
3983
|
+
:type page: str
|
3984
|
+
:param async_req: Whether to execute the request asynchronously.
|
3985
|
+
:type async_req: bool, optional
|
3986
|
+
:param _request_timeout: Timeout setting. Do not use - use the opts parameter instead
|
3987
|
+
:param opts: Configuration options for this request
|
3988
|
+
:type opts: ConfigurationOptions, optional
|
3989
|
+
:return: Returns the result object.
|
3990
|
+
If the method is called asynchronously,
|
3991
|
+
returns the request thread.
|
3992
|
+
:rtype: VersionedResourceListOfHoldingContributor
|
3993
|
+
"""
|
3994
|
+
kwargs['_return_http_data_only'] = True
|
3995
|
+
if '_preload_content' in kwargs:
|
3996
|
+
message = "Error! Please call the get_multiple_holding_contributors_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501
|
3997
|
+
raise ValueError(message)
|
3998
|
+
if async_req is not None:
|
3999
|
+
kwargs['async_req'] = async_req
|
4000
|
+
return self.get_multiple_holding_contributors_with_http_info(scope, code, holding_ids_request, effective_date, from_transaction_date, to_transaction_date, include_historic, tax_lot_id, limit, as_at, page, **kwargs) # noqa: E501
|
4001
|
+
|
4002
|
+
@validate_arguments
|
4003
|
+
def get_multiple_holding_contributors_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.")], holding_ids_request : Annotated[HoldingIdsRequest, Field(..., description="The array of unique holding identifiers")], effective_date : Annotated[Optional[constr(strict=True, max_length=6000, min_length=0)], Field(description="Effective date")] = None, from_transaction_date : Annotated[Optional[constr(strict=True, max_length=6000, min_length=0)], Field(description="The from trade date, defaults to first time this holding is opened, lower bound for transactions")] = None, to_transaction_date : Annotated[Optional[constr(strict=True, max_length=6000, min_length=0)], Field(description="The to trade date upper bound date, defaults to effectiveDate. upper bound for transactions")] = None, include_historic : Annotated[Optional[StrictBool], Field(description="If true, transactions from previously closed holdings are returned. If false, only transactions from last time position is opened.")] = None, tax_lot_id : Annotated[Optional[constr(strict=True, max_length=6000, min_length=0)], Field(description="Constrains the Holding Contributors to those which contributed to the specified tax lot.")] = None, limit : Annotated[Optional[StrictInt], Field(description="When paginating, limit the number of returned results to this many. Defaults to 100 if not specified.")] = None, as_at : Annotated[Optional[datetime], Field(description="The asAt datetime at which to build the transactions. Defaults to return the latest version of each transaction if not specified.")] = None, page : Annotated[Optional[constr(strict=True, max_length=500, min_length=1)], Field(description="The pagination token to use to continue listing transactions from a previous call to GetHoldingContributors.")] = None, **kwargs) -> ApiResponse: # noqa: E501
|
4004
|
+
"""[EARLY ACCESS] GetMultipleHoldingContributors: Get Multiple Holding Contributors # noqa: E501
|
4005
|
+
|
4006
|
+
Lists all transactions that affect multiple specified holdings of a portfolio over a given effective interval. This includes transactions automatically generated by LUSID such as holding adjustments. # noqa: E501
|
4007
|
+
This method makes a synchronous HTTP request by default. To make an
|
4008
|
+
asynchronous HTTP request, please pass async_req=True
|
4009
|
+
|
4010
|
+
>>> thread = api.get_multiple_holding_contributors_with_http_info(scope, code, holding_ids_request, effective_date, from_transaction_date, to_transaction_date, include_historic, tax_lot_id, limit, as_at, page, async_req=True)
|
4011
|
+
>>> result = thread.get()
|
4012
|
+
|
4013
|
+
:param scope: The scope of the transaction portfolio. (required)
|
4014
|
+
:type scope: str
|
4015
|
+
:param code: The code of the transaction portfolio. Together with the scope this uniquely identifies the transaction portfolio. (required)
|
4016
|
+
:type code: str
|
4017
|
+
:param holding_ids_request: The array of unique holding identifiers (required)
|
4018
|
+
:type holding_ids_request: HoldingIdsRequest
|
4019
|
+
:param effective_date: Effective date
|
4020
|
+
:type effective_date: str
|
4021
|
+
:param from_transaction_date: The from trade date, defaults to first time this holding is opened, lower bound for transactions
|
4022
|
+
:type from_transaction_date: str
|
4023
|
+
:param to_transaction_date: The to trade date upper bound date, defaults to effectiveDate. upper bound for transactions
|
4024
|
+
:type to_transaction_date: str
|
4025
|
+
:param include_historic: If true, transactions from previously closed holdings are returned. If false, only transactions from last time position is opened.
|
4026
|
+
:type include_historic: bool
|
4027
|
+
:param tax_lot_id: Constrains the Holding Contributors to those which contributed to the specified tax lot.
|
4028
|
+
:type tax_lot_id: str
|
4029
|
+
:param limit: When paginating, limit the number of returned results to this many. Defaults to 100 if not specified.
|
4030
|
+
:type limit: int
|
4031
|
+
:param as_at: The asAt datetime at which to build the transactions. Defaults to return the latest version of each transaction if not specified.
|
4032
|
+
:type as_at: datetime
|
4033
|
+
:param page: The pagination token to use to continue listing transactions from a previous call to GetHoldingContributors.
|
4034
|
+
:type page: str
|
4035
|
+
:param async_req: Whether to execute the request asynchronously.
|
4036
|
+
:type async_req: bool, optional
|
4037
|
+
:param _preload_content: if False, the ApiResponse.data will
|
4038
|
+
be set to none and raw_data will store the
|
4039
|
+
HTTP response body without reading/decoding.
|
4040
|
+
Default is True.
|
4041
|
+
:type _preload_content: bool, optional
|
4042
|
+
:param _return_http_data_only: response data instead of ApiResponse
|
4043
|
+
object with status code, headers, etc
|
4044
|
+
:type _return_http_data_only: bool, optional
|
4045
|
+
:param _request_timeout: Timeout setting. Do not use - use the opts parameter instead
|
4046
|
+
:param opts: Configuration options for this request
|
4047
|
+
:type opts: ConfigurationOptions, optional
|
4048
|
+
:param _request_auth: set to override the auth_settings for an a single
|
4049
|
+
request; this effectively ignores the authentication
|
4050
|
+
in the spec for a single request.
|
4051
|
+
:type _request_auth: dict, optional
|
4052
|
+
:type _content_type: string, optional: force content-type for the request
|
4053
|
+
:return: Returns the result object.
|
4054
|
+
If the method is called asynchronously,
|
4055
|
+
returns the request thread.
|
4056
|
+
:rtype: tuple(VersionedResourceListOfHoldingContributor, status_code(int), headers(HTTPHeaderDict))
|
4057
|
+
"""
|
4058
|
+
|
4059
|
+
_params = locals()
|
4060
|
+
|
4061
|
+
_all_params = [
|
4062
|
+
'scope',
|
4063
|
+
'code',
|
4064
|
+
'holding_ids_request',
|
4065
|
+
'effective_date',
|
4066
|
+
'from_transaction_date',
|
4067
|
+
'to_transaction_date',
|
4068
|
+
'include_historic',
|
4069
|
+
'tax_lot_id',
|
4070
|
+
'limit',
|
4071
|
+
'as_at',
|
4072
|
+
'page'
|
4073
|
+
]
|
4074
|
+
_all_params.extend(
|
4075
|
+
[
|
4076
|
+
'async_req',
|
4077
|
+
'_return_http_data_only',
|
4078
|
+
'_preload_content',
|
4079
|
+
'_request_timeout',
|
4080
|
+
'_request_auth',
|
4081
|
+
'_content_type',
|
4082
|
+
'_headers',
|
4083
|
+
'opts'
|
4084
|
+
]
|
4085
|
+
)
|
4086
|
+
|
4087
|
+
# validate the arguments
|
4088
|
+
for _key, _val in _params['kwargs'].items():
|
4089
|
+
if _key not in _all_params:
|
4090
|
+
raise ApiTypeError(
|
4091
|
+
"Got an unexpected keyword argument '%s'"
|
4092
|
+
" to method get_multiple_holding_contributors" % _key
|
4093
|
+
)
|
4094
|
+
_params[_key] = _val
|
4095
|
+
del _params['kwargs']
|
4096
|
+
|
4097
|
+
_collection_formats = {}
|
4098
|
+
|
4099
|
+
# process the path parameters
|
4100
|
+
_path_params = {}
|
4101
|
+
if _params['scope']:
|
4102
|
+
_path_params['scope'] = _params['scope']
|
4103
|
+
|
4104
|
+
if _params['code']:
|
4105
|
+
_path_params['code'] = _params['code']
|
4106
|
+
|
4107
|
+
|
4108
|
+
# process the query parameters
|
4109
|
+
_query_params = []
|
4110
|
+
if _params.get('effective_date') is not None: # noqa: E501
|
4111
|
+
_query_params.append(('effectiveDate', _params['effective_date']))
|
4112
|
+
|
4113
|
+
if _params.get('from_transaction_date') is not None: # noqa: E501
|
4114
|
+
_query_params.append(('fromTransactionDate', _params['from_transaction_date']))
|
4115
|
+
|
4116
|
+
if _params.get('to_transaction_date') is not None: # noqa: E501
|
4117
|
+
_query_params.append(('toTransactionDate', _params['to_transaction_date']))
|
4118
|
+
|
4119
|
+
if _params.get('include_historic') is not None: # noqa: E501
|
4120
|
+
_query_params.append(('includeHistoric', _params['include_historic']))
|
4121
|
+
|
4122
|
+
if _params.get('tax_lot_id') is not None: # noqa: E501
|
4123
|
+
_query_params.append(('taxLotId', _params['tax_lot_id']))
|
4124
|
+
|
4125
|
+
if _params.get('limit') is not None: # noqa: E501
|
4126
|
+
_query_params.append(('limit', _params['limit']))
|
4127
|
+
|
4128
|
+
if _params.get('as_at') is not None: # noqa: E501
|
4129
|
+
if isinstance(_params['as_at'], datetime):
|
4130
|
+
_query_params.append(('asAt', _params['as_at'].strftime(self.api_client.configuration.datetime_format)))
|
4131
|
+
else:
|
4132
|
+
_query_params.append(('asAt', _params['as_at']))
|
4133
|
+
|
4134
|
+
if _params.get('page') is not None: # noqa: E501
|
4135
|
+
_query_params.append(('page', _params['page']))
|
4136
|
+
|
4137
|
+
# process the header parameters
|
4138
|
+
_header_params = dict(_params.get('_headers', {}))
|
4139
|
+
# process the form parameters
|
4140
|
+
_form_params = []
|
4141
|
+
_files = {}
|
4142
|
+
# process the body parameter
|
4143
|
+
_body_params = None
|
4144
|
+
if _params['holding_ids_request'] is not None:
|
4145
|
+
_body_params = _params['holding_ids_request']
|
4146
|
+
|
4147
|
+
# set the HTTP header `Accept`
|
4148
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
4149
|
+
['text/plain', 'application/json', 'text/json']) # noqa: E501
|
4150
|
+
|
4151
|
+
# set the HTTP header `Content-Type`
|
4152
|
+
_content_types_list = _params.get('_content_type',
|
4153
|
+
self.api_client.select_header_content_type(
|
4154
|
+
['application/json-patch+json', 'application/json', 'text/json', 'application/*+json']))
|
4155
|
+
if _content_types_list:
|
4156
|
+
_header_params['Content-Type'] = _content_types_list
|
4157
|
+
|
4158
|
+
# authentication setting
|
4159
|
+
_auth_settings = ['oauth2'] # noqa: E501
|
4160
|
+
|
4161
|
+
_response_types_map = {
|
4162
|
+
'200': "VersionedResourceListOfHoldingContributor",
|
4163
|
+
'400': "LusidValidationProblemDetails",
|
4164
|
+
}
|
4165
|
+
|
4166
|
+
return self.api_client.call_api(
|
4167
|
+
'/api/transactionportfolios/{scope}/{code}/holdings/contributors/$get', 'POST',
|
4168
|
+
_path_params,
|
4169
|
+
_query_params,
|
4170
|
+
_header_params,
|
4171
|
+
body=_body_params,
|
4172
|
+
post_params=_form_params,
|
4173
|
+
files=_files,
|
4174
|
+
response_types_map=_response_types_map,
|
4175
|
+
auth_settings=_auth_settings,
|
4176
|
+
async_req=_params.get('async_req'),
|
4177
|
+
_return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501
|
4178
|
+
_preload_content=_params.get('_preload_content', True),
|
4179
|
+
_request_timeout=_params.get('_request_timeout'),
|
4180
|
+
opts=_params.get('opts'),
|
4181
|
+
collection_formats=_collection_formats,
|
4182
|
+
_request_auth=_params.get('_request_auth'))
|
4183
|
+
|
3942
4184
|
@overload
|
3943
4185
|
async 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, **kwargs) -> ResourceListOfInstrumentCashFlow: # noqa: E501
|
3944
4186
|
...
|
lusid/configuration.py
CHANGED
@@ -445,7 +445,7 @@ class Configuration:
|
|
445
445
|
return "Python SDK Debug Report:\n"\
|
446
446
|
"OS: {env}\n"\
|
447
447
|
"Python Version: {pyversion}\n"\
|
448
|
-
"Version of the API: 0.11.
|
448
|
+
"Version of the API: 0.11.6887\n"\
|
449
449
|
"SDK Package Version: {package_version}".\
|
450
450
|
format(env=sys.platform, pyversion=sys.version, package_version=package_version)
|
451
451
|
|
lusid/models/__init__.py
CHANGED
@@ -114,6 +114,9 @@ from lusid.models.calculation_info import CalculationInfo
|
|
114
114
|
from lusid.models.calendar import Calendar
|
115
115
|
from lusid.models.calendar_date import CalendarDate
|
116
116
|
from lusid.models.calendar_dependency import CalendarDependency
|
117
|
+
from lusid.models.cancel_order_and_move_remaining_result import CancelOrderAndMoveRemainingResult
|
118
|
+
from lusid.models.cancel_orders_and_move_remaining_request import CancelOrdersAndMoveRemainingRequest
|
119
|
+
from lusid.models.cancel_orders_and_move_remaining_response import CancelOrdersAndMoveRemainingResponse
|
117
120
|
from lusid.models.cancel_orders_response import CancelOrdersResponse
|
118
121
|
from lusid.models.cancel_placements_response import CancelPlacementsResponse
|
119
122
|
from lusid.models.cancelled_order_result import CancelledOrderResult
|
@@ -441,6 +444,7 @@ from lusid.models.holding_adjustment import HoldingAdjustment
|
|
441
444
|
from lusid.models.holding_adjustment_with_date import HoldingAdjustmentWithDate
|
442
445
|
from lusid.models.holding_context import HoldingContext
|
443
446
|
from lusid.models.holding_contributor import HoldingContributor
|
447
|
+
from lusid.models.holding_ids_request import HoldingIdsRequest
|
444
448
|
from lusid.models.holding_pricing_info import HoldingPricingInfo
|
445
449
|
from lusid.models.holdings_adjustment import HoldingsAdjustment
|
446
450
|
from lusid.models.holdings_adjustment_header import HoldingsAdjustmentHeader
|
@@ -510,6 +514,7 @@ from lusid.models.link import Link
|
|
510
514
|
from lusid.models.list_aggregation_reconciliation import ListAggregationReconciliation
|
511
515
|
from lusid.models.list_aggregation_response import ListAggregationResponse
|
512
516
|
from lusid.models.list_complex_market_data_with_meta_data_response import ListComplexMarketDataWithMetaDataResponse
|
517
|
+
from lusid.models.loan_facility import LoanFacility
|
513
518
|
from lusid.models.loan_period import LoanPeriod
|
514
519
|
from lusid.models.lock_period_diary_entry_request import LockPeriodDiaryEntryRequest
|
515
520
|
from lusid.models.lusid_instrument import LusidInstrument
|
@@ -1213,6 +1218,9 @@ __all__ = [
|
|
1213
1218
|
"Calendar",
|
1214
1219
|
"CalendarDate",
|
1215
1220
|
"CalendarDependency",
|
1221
|
+
"CancelOrderAndMoveRemainingResult",
|
1222
|
+
"CancelOrdersAndMoveRemainingRequest",
|
1223
|
+
"CancelOrdersAndMoveRemainingResponse",
|
1216
1224
|
"CancelOrdersResponse",
|
1217
1225
|
"CancelPlacementsResponse",
|
1218
1226
|
"CancelledOrderResult",
|
@@ -1540,6 +1548,7 @@ __all__ = [
|
|
1540
1548
|
"HoldingAdjustmentWithDate",
|
1541
1549
|
"HoldingContext",
|
1542
1550
|
"HoldingContributor",
|
1551
|
+
"HoldingIdsRequest",
|
1543
1552
|
"HoldingPricingInfo",
|
1544
1553
|
"HoldingsAdjustment",
|
1545
1554
|
"HoldingsAdjustmentHeader",
|
@@ -1609,6 +1618,7 @@ __all__ = [
|
|
1609
1618
|
"ListAggregationReconciliation",
|
1610
1619
|
"ListAggregationResponse",
|
1611
1620
|
"ListComplexMarketDataWithMetaDataResponse",
|
1621
|
+
"LoanFacility",
|
1612
1622
|
"LoanPeriod",
|
1613
1623
|
"LockPeriodDiaryEntryRequest",
|
1614
1624
|
"LusidInstrument",
|
lusid/models/basket.py
CHANGED
@@ -31,15 +31,15 @@ class Basket(LusidInstrument):
|
|
31
31
|
basket_name: BasketIdentifier = Field(..., alias="basketName")
|
32
32
|
basket_type: constr(strict=True, min_length=1) = Field(..., alias="basketType", description="What contents does the basket have. The validation will check that the instrument types contained match those expected. Supported string (enumeration) values are: [Bonds, Credits, Equities, EquitySwap].")
|
33
33
|
weighted_instruments: WeightedInstruments = Field(..., alias="weightedInstruments")
|
34
|
-
instrument_type: StrictStr = Field(..., alias="instrumentType", description="The available values are: QuotedSecurity, InterestRateSwap, FxForward, Future, ExoticInstrument, FxOption, CreditDefaultSwap, InterestRateSwaption, Bond, EquityOption, FixedLeg, FloatingLeg, BespokeCashFlowsLeg, Unknown, TermDeposit, ContractForDifference, EquitySwap, CashPerpetual, CapFloor, CashSettled, CdsIndex, Basket, FundingLeg, FxSwap, ForwardRateAgreement, SimpleInstrument, Repo, Equity, ExchangeTradedOption, ReferenceInstrument, ComplexBond, InflationLinkedBond, InflationSwap, SimpleCashFlowLoan, TotalReturnSwap, InflationLeg, FundShareClass, FlexibleLoan, UnsettledCash, Cash, MasteredInstrument")
|
34
|
+
instrument_type: StrictStr = Field(..., alias="instrumentType", description="The available values are: QuotedSecurity, InterestRateSwap, FxForward, Future, ExoticInstrument, FxOption, CreditDefaultSwap, InterestRateSwaption, Bond, EquityOption, FixedLeg, FloatingLeg, BespokeCashFlowsLeg, Unknown, TermDeposit, ContractForDifference, EquitySwap, CashPerpetual, CapFloor, CashSettled, CdsIndex, Basket, FundingLeg, FxSwap, ForwardRateAgreement, SimpleInstrument, Repo, Equity, ExchangeTradedOption, ReferenceInstrument, ComplexBond, InflationLinkedBond, InflationSwap, SimpleCashFlowLoan, TotalReturnSwap, InflationLeg, FundShareClass, FlexibleLoan, UnsettledCash, Cash, MasteredInstrument, LoanFacility")
|
35
35
|
additional_properties: Dict[str, Any] = {}
|
36
36
|
__properties = ["instrumentType", "basketName", "basketType", "weightedInstruments"]
|
37
37
|
|
38
38
|
@validator('instrument_type')
|
39
39
|
def instrument_type_validate_enum(cls, value):
|
40
40
|
"""Validates the enum"""
|
41
|
-
if value not in ('QuotedSecurity', 'InterestRateSwap', 'FxForward', 'Future', 'ExoticInstrument', 'FxOption', 'CreditDefaultSwap', 'InterestRateSwaption', 'Bond', 'EquityOption', 'FixedLeg', 'FloatingLeg', 'BespokeCashFlowsLeg', 'Unknown', 'TermDeposit', 'ContractForDifference', 'EquitySwap', 'CashPerpetual', 'CapFloor', 'CashSettled', 'CdsIndex', 'Basket', 'FundingLeg', 'FxSwap', 'ForwardRateAgreement', 'SimpleInstrument', 'Repo', 'Equity', 'ExchangeTradedOption', 'ReferenceInstrument', 'ComplexBond', 'InflationLinkedBond', 'InflationSwap', 'SimpleCashFlowLoan', 'TotalReturnSwap', 'InflationLeg', 'FundShareClass', 'FlexibleLoan', 'UnsettledCash', 'Cash', 'MasteredInstrument'):
|
42
|
-
raise ValueError("must be one of enum values ('QuotedSecurity', 'InterestRateSwap', 'FxForward', 'Future', 'ExoticInstrument', 'FxOption', 'CreditDefaultSwap', 'InterestRateSwaption', 'Bond', 'EquityOption', 'FixedLeg', 'FloatingLeg', 'BespokeCashFlowsLeg', 'Unknown', 'TermDeposit', 'ContractForDifference', 'EquitySwap', 'CashPerpetual', 'CapFloor', 'CashSettled', 'CdsIndex', 'Basket', 'FundingLeg', 'FxSwap', 'ForwardRateAgreement', 'SimpleInstrument', 'Repo', 'Equity', 'ExchangeTradedOption', 'ReferenceInstrument', 'ComplexBond', 'InflationLinkedBond', 'InflationSwap', 'SimpleCashFlowLoan', 'TotalReturnSwap', 'InflationLeg', 'FundShareClass', 'FlexibleLoan', 'UnsettledCash', 'Cash', 'MasteredInstrument')")
|
41
|
+
if value not in ('QuotedSecurity', 'InterestRateSwap', 'FxForward', 'Future', 'ExoticInstrument', 'FxOption', 'CreditDefaultSwap', 'InterestRateSwaption', 'Bond', 'EquityOption', 'FixedLeg', 'FloatingLeg', 'BespokeCashFlowsLeg', 'Unknown', 'TermDeposit', 'ContractForDifference', 'EquitySwap', 'CashPerpetual', 'CapFloor', 'CashSettled', 'CdsIndex', 'Basket', 'FundingLeg', 'FxSwap', 'ForwardRateAgreement', 'SimpleInstrument', 'Repo', 'Equity', 'ExchangeTradedOption', 'ReferenceInstrument', 'ComplexBond', 'InflationLinkedBond', 'InflationSwap', 'SimpleCashFlowLoan', 'TotalReturnSwap', 'InflationLeg', 'FundShareClass', 'FlexibleLoan', 'UnsettledCash', 'Cash', 'MasteredInstrument', 'LoanFacility'):
|
42
|
+
raise ValueError("must be one of enum values ('QuotedSecurity', 'InterestRateSwap', 'FxForward', 'Future', 'ExoticInstrument', 'FxOption', 'CreditDefaultSwap', 'InterestRateSwaption', 'Bond', 'EquityOption', 'FixedLeg', 'FloatingLeg', 'BespokeCashFlowsLeg', 'Unknown', 'TermDeposit', 'ContractForDifference', 'EquitySwap', 'CashPerpetual', 'CapFloor', 'CashSettled', 'CdsIndex', 'Basket', 'FundingLeg', 'FxSwap', 'ForwardRateAgreement', 'SimpleInstrument', 'Repo', 'Equity', 'ExchangeTradedOption', 'ReferenceInstrument', 'ComplexBond', 'InflationLinkedBond', 'InflationSwap', 'SimpleCashFlowLoan', 'TotalReturnSwap', 'InflationLeg', 'FundShareClass', 'FlexibleLoan', 'UnsettledCash', 'Cash', 'MasteredInstrument', 'LoanFacility')")
|
43
43
|
return value
|
44
44
|
|
45
45
|
class Config:
|
lusid/models/bond.py
CHANGED
@@ -43,15 +43,15 @@ class Bond(LusidInstrument):
|
|
43
43
|
rounding_conventions: Optional[conlist(RoundingConvention)] = Field(None, alias="roundingConventions", description="Rounding conventions for analytics, if any.")
|
44
44
|
ex_dividend_configuration: Optional[ExDividendConfiguration] = Field(None, alias="exDividendConfiguration")
|
45
45
|
original_issue_price: Optional[Union[StrictFloat, StrictInt]] = Field(None, alias="originalIssuePrice", description="The price the bond was issued at. This is to be entered as a percentage of par, for example a value of 98.5 would represent 98.5%.")
|
46
|
-
instrument_type: StrictStr = Field(..., alias="instrumentType", description="The available values are: QuotedSecurity, InterestRateSwap, FxForward, Future, ExoticInstrument, FxOption, CreditDefaultSwap, InterestRateSwaption, Bond, EquityOption, FixedLeg, FloatingLeg, BespokeCashFlowsLeg, Unknown, TermDeposit, ContractForDifference, EquitySwap, CashPerpetual, CapFloor, CashSettled, CdsIndex, Basket, FundingLeg, FxSwap, ForwardRateAgreement, SimpleInstrument, Repo, Equity, ExchangeTradedOption, ReferenceInstrument, ComplexBond, InflationLinkedBond, InflationSwap, SimpleCashFlowLoan, TotalReturnSwap, InflationLeg, FundShareClass, FlexibleLoan, UnsettledCash, Cash, MasteredInstrument")
|
46
|
+
instrument_type: StrictStr = Field(..., alias="instrumentType", description="The available values are: QuotedSecurity, InterestRateSwap, FxForward, Future, ExoticInstrument, FxOption, CreditDefaultSwap, InterestRateSwaption, Bond, EquityOption, FixedLeg, FloatingLeg, BespokeCashFlowsLeg, Unknown, TermDeposit, ContractForDifference, EquitySwap, CashPerpetual, CapFloor, CashSettled, CdsIndex, Basket, FundingLeg, FxSwap, ForwardRateAgreement, SimpleInstrument, Repo, Equity, ExchangeTradedOption, ReferenceInstrument, ComplexBond, InflationLinkedBond, InflationSwap, SimpleCashFlowLoan, TotalReturnSwap, InflationLeg, FundShareClass, FlexibleLoan, UnsettledCash, Cash, MasteredInstrument, LoanFacility")
|
47
47
|
additional_properties: Dict[str, Any] = {}
|
48
48
|
__properties = ["instrumentType", "startDate", "maturityDate", "domCcy", "flowConventions", "principal", "couponRate", "identifiers", "exDividendDays", "initialCouponDate", "firstCouponPayDate", "calculationType", "roundingConventions", "exDividendConfiguration", "originalIssuePrice"]
|
49
49
|
|
50
50
|
@validator('instrument_type')
|
51
51
|
def instrument_type_validate_enum(cls, value):
|
52
52
|
"""Validates the enum"""
|
53
|
-
if value not in ('QuotedSecurity', 'InterestRateSwap', 'FxForward', 'Future', 'ExoticInstrument', 'FxOption', 'CreditDefaultSwap', 'InterestRateSwaption', 'Bond', 'EquityOption', 'FixedLeg', 'FloatingLeg', 'BespokeCashFlowsLeg', 'Unknown', 'TermDeposit', 'ContractForDifference', 'EquitySwap', 'CashPerpetual', 'CapFloor', 'CashSettled', 'CdsIndex', 'Basket', 'FundingLeg', 'FxSwap', 'ForwardRateAgreement', 'SimpleInstrument', 'Repo', 'Equity', 'ExchangeTradedOption', 'ReferenceInstrument', 'ComplexBond', 'InflationLinkedBond', 'InflationSwap', 'SimpleCashFlowLoan', 'TotalReturnSwap', 'InflationLeg', 'FundShareClass', 'FlexibleLoan', 'UnsettledCash', 'Cash', 'MasteredInstrument'):
|
54
|
-
raise ValueError("must be one of enum values ('QuotedSecurity', 'InterestRateSwap', 'FxForward', 'Future', 'ExoticInstrument', 'FxOption', 'CreditDefaultSwap', 'InterestRateSwaption', 'Bond', 'EquityOption', 'FixedLeg', 'FloatingLeg', 'BespokeCashFlowsLeg', 'Unknown', 'TermDeposit', 'ContractForDifference', 'EquitySwap', 'CashPerpetual', 'CapFloor', 'CashSettled', 'CdsIndex', 'Basket', 'FundingLeg', 'FxSwap', 'ForwardRateAgreement', 'SimpleInstrument', 'Repo', 'Equity', 'ExchangeTradedOption', 'ReferenceInstrument', 'ComplexBond', 'InflationLinkedBond', 'InflationSwap', 'SimpleCashFlowLoan', 'TotalReturnSwap', 'InflationLeg', 'FundShareClass', 'FlexibleLoan', 'UnsettledCash', 'Cash', 'MasteredInstrument')")
|
53
|
+
if value not in ('QuotedSecurity', 'InterestRateSwap', 'FxForward', 'Future', 'ExoticInstrument', 'FxOption', 'CreditDefaultSwap', 'InterestRateSwaption', 'Bond', 'EquityOption', 'FixedLeg', 'FloatingLeg', 'BespokeCashFlowsLeg', 'Unknown', 'TermDeposit', 'ContractForDifference', 'EquitySwap', 'CashPerpetual', 'CapFloor', 'CashSettled', 'CdsIndex', 'Basket', 'FundingLeg', 'FxSwap', 'ForwardRateAgreement', 'SimpleInstrument', 'Repo', 'Equity', 'ExchangeTradedOption', 'ReferenceInstrument', 'ComplexBond', 'InflationLinkedBond', 'InflationSwap', 'SimpleCashFlowLoan', 'TotalReturnSwap', 'InflationLeg', 'FundShareClass', 'FlexibleLoan', 'UnsettledCash', 'Cash', 'MasteredInstrument', 'LoanFacility'):
|
54
|
+
raise ValueError("must be one of enum values ('QuotedSecurity', 'InterestRateSwap', 'FxForward', 'Future', 'ExoticInstrument', 'FxOption', 'CreditDefaultSwap', 'InterestRateSwaption', 'Bond', 'EquityOption', 'FixedLeg', 'FloatingLeg', 'BespokeCashFlowsLeg', 'Unknown', 'TermDeposit', 'ContractForDifference', 'EquitySwap', 'CashPerpetual', 'CapFloor', 'CashSettled', 'CdsIndex', 'Basket', 'FundingLeg', 'FxSwap', 'ForwardRateAgreement', 'SimpleInstrument', 'Repo', 'Equity', 'ExchangeTradedOption', 'ReferenceInstrument', 'ComplexBond', 'InflationLinkedBond', 'InflationSwap', 'SimpleCashFlowLoan', 'TotalReturnSwap', 'InflationLeg', 'FundShareClass', 'FlexibleLoan', 'UnsettledCash', 'Cash', 'MasteredInstrument', 'LoanFacility')")
|
55
55
|
return value
|
56
56
|
|
57
57
|
class Config:
|
@@ -0,0 +1,84 @@
|
|
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, Optional
|
22
|
+
from pydantic.v1 import BaseModel, Field
|
23
|
+
from lusid.models.order import Order
|
24
|
+
from lusid.models.resource_id import ResourceId
|
25
|
+
|
26
|
+
class CancelOrderAndMoveRemainingResult(BaseModel):
|
27
|
+
"""
|
28
|
+
CancelOrderAndMoveRemainingResult
|
29
|
+
"""
|
30
|
+
cancelled_order: Optional[Order] = Field(None, alias="cancelledOrder")
|
31
|
+
new_order: Optional[Order] = Field(None, alias="newOrder")
|
32
|
+
new_block_id: Optional[ResourceId] = Field(None, alias="newBlockId")
|
33
|
+
__properties = ["cancelledOrder", "newOrder", "newBlockId"]
|
34
|
+
|
35
|
+
class Config:
|
36
|
+
"""Pydantic configuration"""
|
37
|
+
allow_population_by_field_name = True
|
38
|
+
validate_assignment = True
|
39
|
+
|
40
|
+
def to_str(self) -> str:
|
41
|
+
"""Returns the string representation of the model using alias"""
|
42
|
+
return pprint.pformat(self.dict(by_alias=True))
|
43
|
+
|
44
|
+
def to_json(self) -> str:
|
45
|
+
"""Returns the JSON representation of the model using alias"""
|
46
|
+
return json.dumps(self.to_dict())
|
47
|
+
|
48
|
+
@classmethod
|
49
|
+
def from_json(cls, json_str: str) -> CancelOrderAndMoveRemainingResult:
|
50
|
+
"""Create an instance of CancelOrderAndMoveRemainingResult from a JSON string"""
|
51
|
+
return cls.from_dict(json.loads(json_str))
|
52
|
+
|
53
|
+
def to_dict(self):
|
54
|
+
"""Returns the dictionary representation of the model using alias"""
|
55
|
+
_dict = self.dict(by_alias=True,
|
56
|
+
exclude={
|
57
|
+
},
|
58
|
+
exclude_none=True)
|
59
|
+
# override the default output from pydantic by calling `to_dict()` of cancelled_order
|
60
|
+
if self.cancelled_order:
|
61
|
+
_dict['cancelledOrder'] = self.cancelled_order.to_dict()
|
62
|
+
# override the default output from pydantic by calling `to_dict()` of new_order
|
63
|
+
if self.new_order:
|
64
|
+
_dict['newOrder'] = self.new_order.to_dict()
|
65
|
+
# override the default output from pydantic by calling `to_dict()` of new_block_id
|
66
|
+
if self.new_block_id:
|
67
|
+
_dict['newBlockId'] = self.new_block_id.to_dict()
|
68
|
+
return _dict
|
69
|
+
|
70
|
+
@classmethod
|
71
|
+
def from_dict(cls, obj: dict) -> CancelOrderAndMoveRemainingResult:
|
72
|
+
"""Create an instance of CancelOrderAndMoveRemainingResult from a dict"""
|
73
|
+
if obj is None:
|
74
|
+
return None
|
75
|
+
|
76
|
+
if not isinstance(obj, dict):
|
77
|
+
return CancelOrderAndMoveRemainingResult.parse_obj(obj)
|
78
|
+
|
79
|
+
_obj = CancelOrderAndMoveRemainingResult.parse_obj({
|
80
|
+
"cancelled_order": Order.from_dict(obj.get("cancelledOrder")) if obj.get("cancelledOrder") is not None else None,
|
81
|
+
"new_order": Order.from_dict(obj.get("newOrder")) if obj.get("newOrder") is not None else None,
|
82
|
+
"new_block_id": ResourceId.from_dict(obj.get("newBlockId")) if obj.get("newBlockId") is not None else None
|
83
|
+
})
|
84
|
+
return _obj
|
@@ -0,0 +1,83 @@
|
|
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 BaseModel, Field
|
23
|
+
from lusid.models.resource_id import ResourceId
|
24
|
+
|
25
|
+
class CancelOrdersAndMoveRemainingRequest(BaseModel):
|
26
|
+
"""
|
27
|
+
A request to create or update a Order. # noqa: E501
|
28
|
+
"""
|
29
|
+
cancel_order_id: ResourceId = Field(..., alias="cancelOrderId")
|
30
|
+
move_remaining_to_order_id: ResourceId = Field(..., alias="moveRemainingToOrderId")
|
31
|
+
move_remaining_to_block_id: ResourceId = Field(..., alias="moveRemainingToBlockId")
|
32
|
+
__properties = ["cancelOrderId", "moveRemainingToOrderId", "moveRemainingToBlockId"]
|
33
|
+
|
34
|
+
class Config:
|
35
|
+
"""Pydantic configuration"""
|
36
|
+
allow_population_by_field_name = True
|
37
|
+
validate_assignment = True
|
38
|
+
|
39
|
+
def to_str(self) -> str:
|
40
|
+
"""Returns the string representation of the model using alias"""
|
41
|
+
return pprint.pformat(self.dict(by_alias=True))
|
42
|
+
|
43
|
+
def to_json(self) -> str:
|
44
|
+
"""Returns the JSON representation of the model using alias"""
|
45
|
+
return json.dumps(self.to_dict())
|
46
|
+
|
47
|
+
@classmethod
|
48
|
+
def from_json(cls, json_str: str) -> CancelOrdersAndMoveRemainingRequest:
|
49
|
+
"""Create an instance of CancelOrdersAndMoveRemainingRequest from a JSON string"""
|
50
|
+
return cls.from_dict(json.loads(json_str))
|
51
|
+
|
52
|
+
def to_dict(self):
|
53
|
+
"""Returns the dictionary representation of the model using alias"""
|
54
|
+
_dict = self.dict(by_alias=True,
|
55
|
+
exclude={
|
56
|
+
},
|
57
|
+
exclude_none=True)
|
58
|
+
# override the default output from pydantic by calling `to_dict()` of cancel_order_id
|
59
|
+
if self.cancel_order_id:
|
60
|
+
_dict['cancelOrderId'] = self.cancel_order_id.to_dict()
|
61
|
+
# override the default output from pydantic by calling `to_dict()` of move_remaining_to_order_id
|
62
|
+
if self.move_remaining_to_order_id:
|
63
|
+
_dict['moveRemainingToOrderId'] = self.move_remaining_to_order_id.to_dict()
|
64
|
+
# override the default output from pydantic by calling `to_dict()` of move_remaining_to_block_id
|
65
|
+
if self.move_remaining_to_block_id:
|
66
|
+
_dict['moveRemainingToBlockId'] = self.move_remaining_to_block_id.to_dict()
|
67
|
+
return _dict
|
68
|
+
|
69
|
+
@classmethod
|
70
|
+
def from_dict(cls, obj: dict) -> CancelOrdersAndMoveRemainingRequest:
|
71
|
+
"""Create an instance of CancelOrdersAndMoveRemainingRequest from a dict"""
|
72
|
+
if obj is None:
|
73
|
+
return None
|
74
|
+
|
75
|
+
if not isinstance(obj, dict):
|
76
|
+
return CancelOrdersAndMoveRemainingRequest.parse_obj(obj)
|
77
|
+
|
78
|
+
_obj = CancelOrdersAndMoveRemainingRequest.parse_obj({
|
79
|
+
"cancel_order_id": ResourceId.from_dict(obj.get("cancelOrderId")) if obj.get("cancelOrderId") is not None else None,
|
80
|
+
"move_remaining_to_order_id": ResourceId.from_dict(obj.get("moveRemainingToOrderId")) if obj.get("moveRemainingToOrderId") is not None else None,
|
81
|
+
"move_remaining_to_block_id": ResourceId.from_dict(obj.get("moveRemainingToBlockId")) if obj.get("moveRemainingToBlockId") is not None else None
|
82
|
+
})
|
83
|
+
return _obj
|