lusid-sdk 2.1.599__py3-none-any.whl → 2.1.642__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 +36 -0
- lusid/api/corporate_action_sources_api.py +6 -6
- lusid/api/entities_api.py +24 -24
- lusid/api/funds_api.py +438 -1
- lusid/api/order_management_api.py +16 -8
- lusid/api/staged_modifications_api.py +12 -12
- lusid/api/timelines_api.py +579 -3
- lusid/api/transaction_portfolios_api.py +183 -0
- lusid/api/workspace_api.py +96 -48
- lusid/configuration.py +1 -1
- lusid/models/__init__.py +36 -0
- lusid/models/accounted_transaction.py +88 -0
- lusid/models/accumulation_event.py +3 -3
- lusid/models/adjust_global_commitment_event.py +93 -0
- lusid/models/amortisation_event.py +3 -3
- lusid/models/basket.py +3 -3
- lusid/models/bond.py +11 -5
- lusid/models/bond_coupon_event.py +3 -3
- lusid/models/bond_default_event.py +3 -3
- lusid/models/bond_principal_event.py +3 -3
- lusid/models/bonus_issue_event.py +3 -3
- lusid/models/call_on_intermediate_securities_event.py +3 -3
- lusid/models/cancel_single_holding_adjustment_request.py +96 -0
- lusid/models/cap_floor.py +22 -7
- lusid/models/capital_distribution_event.py +3 -3
- lusid/models/cash.py +3 -3
- lusid/models/cash_dividend_event.py +3 -3
- lusid/models/cash_flow_event.py +3 -3
- lusid/models/cash_perpetual.py +3 -3
- lusid/models/cds_credit_event.py +3 -3
- lusid/models/cds_index.py +3 -3
- lusid/models/cdx_credit_event.py +3 -3
- lusid/models/close_event.py +3 -3
- lusid/models/closed_period.py +128 -0
- lusid/models/complete_portfolio.py +3 -3
- lusid/models/complex_bond.py +20 -7
- lusid/models/contract_details.py +101 -0
- lusid/models/contract_for_difference.py +3 -3
- lusid/models/contract_initialisation_event.py +99 -0
- lusid/models/create_closed_period_request.py +96 -0
- lusid/models/create_derived_property_definition_request.py +3 -3
- lusid/models/create_derived_transaction_portfolio_request.py +8 -2
- lusid/models/create_property_definition_request.py +3 -3
- lusid/models/credit_default_swap.py +3 -3
- lusid/models/credit_premium_cash_flow_event.py +3 -3
- lusid/models/dependency_source_filter.py +19 -4
- lusid/models/dividend_option_event.py +3 -3
- lusid/models/dividend_reinvestment_event.py +3 -3
- lusid/models/drawdown_event.py +99 -0
- lusid/models/early_redemption_event.py +3 -3
- lusid/models/eligibility_calculation.py +6 -4
- lusid/models/equity.py +3 -3
- lusid/models/equity_option.py +23 -7
- lusid/models/equity_swap.py +3 -3
- lusid/models/exchange_traded_option.py +12 -6
- lusid/models/exercise_event.py +3 -3
- lusid/models/exotic_instrument.py +3 -3
- lusid/models/expiry_event.py +3 -3
- lusid/models/fee_accrual.py +3 -1
- lusid/models/fixed_leg.py +3 -3
- lusid/models/flexible_deposit.py +105 -0
- 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 +19 -7
- lusid/models/future_expiry_event.py +3 -3
- lusid/models/future_mark_to_market_event.py +100 -0
- lusid/models/fx_forward.py +3 -3
- lusid/models/fx_forward_settlement_event.py +3 -3
- lusid/models/fx_option.py +3 -3
- lusid/models/fx_swap.py +3 -3
- lusid/models/group_reconciliation_summary.py +2 -2
- lusid/models/inflation_leg.py +3 -3
- lusid/models/inflation_linked_bond.py +11 -5
- lusid/models/inflation_swap.py +3 -3
- lusid/models/informational_error_event.py +3 -3
- lusid/models/informational_event.py +3 -3
- lusid/models/instrument_event.py +10 -5
- lusid/models/instrument_event_instruction.py +9 -2
- lusid/models/instrument_event_instruction_request.py +10 -3
- lusid/models/instrument_event_type.py +5 -0
- 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/intermediate_securities_distribution_event.py +3 -3
- lusid/models/loan_facility.py +3 -3
- lusid/models/loan_interest_repayment_event.py +97 -0
- lusid/models/lusid_instrument.py +6 -5
- lusid/models/mark_to_market_conventions.py +74 -0
- lusid/models/market_data_key_rule.py +1 -1
- lusid/models/market_data_specific_rule.py +1 -1
- lusid/models/mastered_instrument.py +3 -3
- lusid/models/maturity_event.py +3 -3
- lusid/models/mbs_coupon_event.py +3 -3
- lusid/models/mbs_interest_deferral_event.py +3 -3
- lusid/models/mbs_interest_shortfall_event.py +3 -3
- lusid/models/mbs_principal_event.py +3 -3
- lusid/models/mbs_principal_write_off_event.py +3 -3
- lusid/models/merger_event.py +3 -3
- lusid/models/open_event.py +3 -3
- lusid/models/option_exercise_cash_event.py +3 -3
- lusid/models/option_exercise_physical_event.py +3 -3
- lusid/models/paged_resource_list_of_closed_period.py +113 -0
- lusid/models/pnl_journal_entry_line.py +95 -0
- lusid/models/portfolio.py +3 -3
- lusid/models/portfolio_id.py +80 -0
- lusid/models/portfolio_search_result.py +3 -3
- lusid/models/portfolio_type.py +1 -0
- lusid/models/portfolio_without_href.py +3 -3
- lusid/models/property_definition.py +3 -3
- lusid/models/property_definition_search_result.py +3 -3
- lusid/models/property_domain.py +1 -0
- lusid/models/protection_payout_cash_flow_event.py +3 -3
- lusid/models/raw_vendor_event.py +3 -3
- lusid/models/reference_instrument.py +3 -3
- lusid/models/repo.py +3 -3
- lusid/models/reset_event.py +3 -3
- lusid/models/reverse_stock_split_event.py +3 -3
- lusid/models/scrip_dividend_event.py +3 -3
- lusid/models/side_definition.py +8 -1
- lusid/models/side_definition_request.py +9 -2
- lusid/models/simple_cash_flow_loan.py +3 -3
- lusid/models/simple_instrument.py +3 -3
- lusid/models/spin_off_event.py +3 -3
- lusid/models/stock_dividend_event.py +3 -3
- lusid/models/stock_split_event.py +3 -3
- lusid/models/swap_cash_flow_event.py +3 -3
- lusid/models/swap_principal_event.py +3 -3
- lusid/models/tender_event.py +3 -3
- lusid/models/term_deposit.py +3 -3
- lusid/models/term_deposit_interest_event.py +3 -3
- lusid/models/term_deposit_principal_event.py +3 -3
- lusid/models/total_return_swap.py +3 -3
- lusid/models/trading_conventions.py +73 -0
- lusid/models/transition_event.py +3 -3
- lusid/models/trigger_event.py +3 -3
- lusid/models/valuation_point_resource_list_of_accounted_transaction.py +125 -0
- lusid/models/valuation_point_resource_list_of_pnl_journal_entry_line.py +125 -0
- lusid/models/workspace.py +1 -1
- lusid/models/workspace_creation_request.py +1 -1
- lusid/models/workspace_item.py +4 -2
- lusid/models/workspace_item_creation_request.py +11 -2
- {lusid_sdk-2.1.599.dist-info → lusid_sdk-2.1.642.dist-info}/METADATA +34 -10
- {lusid_sdk-2.1.599.dist-info → lusid_sdk-2.1.642.dist-info}/RECORD +148 -130
- {lusid_sdk-2.1.599.dist-info → lusid_sdk-2.1.642.dist-info}/WHEEL +0 -0
lusid/api/timelines_api.py
CHANGED
@@ -22,12 +22,15 @@ from typing import overload, Optional, Union, Awaitable
|
|
22
22
|
from typing_extensions import Annotated
|
23
23
|
from datetime import datetime
|
24
24
|
|
25
|
-
from pydantic.v1 import Field, StrictStr, conlist, constr, validator
|
25
|
+
from pydantic.v1 import Field, StrictStr, conint, conlist, constr, validator
|
26
26
|
|
27
27
|
from typing import Optional
|
28
28
|
|
29
|
+
from lusid.models.closed_period import ClosedPeriod
|
30
|
+
from lusid.models.create_closed_period_request import CreateClosedPeriodRequest
|
29
31
|
from lusid.models.create_timeline_request import CreateTimelineRequest
|
30
32
|
from lusid.models.deleted_entity_response import DeletedEntityResponse
|
33
|
+
from lusid.models.paged_resource_list_of_closed_period import PagedResourceListOfClosedPeriod
|
31
34
|
from lusid.models.timeline import Timeline
|
32
35
|
from lusid.models.update_timeline_request import UpdateTimelineRequest
|
33
36
|
|
@@ -52,6 +55,180 @@ class TimelinesApi:
|
|
52
55
|
api_client = ApiClient.get_default()
|
53
56
|
self.api_client = api_client
|
54
57
|
|
58
|
+
@overload
|
59
|
+
async def create_closed_period(self, scope : Annotated[constr(strict=True, max_length=64, min_length=1), Field(..., description="The scope of the specified Timeline.")], code : Annotated[constr(strict=True, max_length=64, min_length=1), Field(..., description="The code of the specified Timeline. Together with the domain and scope this uniquely identifies the Timeline.")], create_closed_period_request : Annotated[Optional[CreateClosedPeriodRequest], Field(description="The request containing the details of the Closed Period")] = None, **kwargs) -> ClosedPeriod: # noqa: E501
|
60
|
+
...
|
61
|
+
|
62
|
+
@overload
|
63
|
+
def create_closed_period(self, scope : Annotated[constr(strict=True, max_length=64, min_length=1), Field(..., description="The scope of the specified Timeline.")], code : Annotated[constr(strict=True, max_length=64, min_length=1), Field(..., description="The code of the specified Timeline. Together with the domain and scope this uniquely identifies the Timeline.")], create_closed_period_request : Annotated[Optional[CreateClosedPeriodRequest], Field(description="The request containing the details of the Closed Period")] = None, async_req: Optional[bool]=True, **kwargs) -> ClosedPeriod: # noqa: E501
|
64
|
+
...
|
65
|
+
|
66
|
+
@validate_arguments
|
67
|
+
def create_closed_period(self, scope : Annotated[constr(strict=True, max_length=64, min_length=1), Field(..., description="The scope of the specified Timeline.")], code : Annotated[constr(strict=True, max_length=64, min_length=1), Field(..., description="The code of the specified Timeline. Together with the domain and scope this uniquely identifies the Timeline.")], create_closed_period_request : Annotated[Optional[CreateClosedPeriodRequest], Field(description="The request containing the details of the Closed Period")] = None, async_req: Optional[bool]=None, **kwargs) -> Union[ClosedPeriod, Awaitable[ClosedPeriod]]: # noqa: E501
|
68
|
+
"""[EXPERIMENTAL] CreateClosedPeriod: Create a new closed period against a timeline entity # noqa: E501
|
69
|
+
|
70
|
+
Creates a new closed period against a timeline entity Returns the newly created closed period entity with properties # noqa: E501
|
71
|
+
This method makes a synchronous HTTP request by default. To make an
|
72
|
+
asynchronous HTTP request, please pass async_req=True
|
73
|
+
|
74
|
+
>>> thread = api.create_closed_period(scope, code, create_closed_period_request, async_req=True)
|
75
|
+
>>> result = thread.get()
|
76
|
+
|
77
|
+
:param scope: The scope of the specified Timeline. (required)
|
78
|
+
:type scope: str
|
79
|
+
:param code: The code of the specified Timeline. Together with the domain and scope this uniquely identifies the Timeline. (required)
|
80
|
+
:type code: str
|
81
|
+
:param create_closed_period_request: The request containing the details of the Closed Period
|
82
|
+
:type create_closed_period_request: CreateClosedPeriodRequest
|
83
|
+
:param async_req: Whether to execute the request asynchronously.
|
84
|
+
:type async_req: bool, optional
|
85
|
+
:param _request_timeout: Timeout setting. Do not use - use the opts parameter instead
|
86
|
+
:param opts: Configuration options for this request
|
87
|
+
:type opts: ConfigurationOptions, optional
|
88
|
+
:return: Returns the result object.
|
89
|
+
If the method is called asynchronously,
|
90
|
+
returns the request thread.
|
91
|
+
:rtype: ClosedPeriod
|
92
|
+
"""
|
93
|
+
kwargs['_return_http_data_only'] = True
|
94
|
+
if '_preload_content' in kwargs:
|
95
|
+
message = "Error! Please call the create_closed_period_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501
|
96
|
+
raise ValueError(message)
|
97
|
+
if async_req is not None:
|
98
|
+
kwargs['async_req'] = async_req
|
99
|
+
return self.create_closed_period_with_http_info(scope, code, create_closed_period_request, **kwargs) # noqa: E501
|
100
|
+
|
101
|
+
@validate_arguments
|
102
|
+
def create_closed_period_with_http_info(self, scope : Annotated[constr(strict=True, max_length=64, min_length=1), Field(..., description="The scope of the specified Timeline.")], code : Annotated[constr(strict=True, max_length=64, min_length=1), Field(..., description="The code of the specified Timeline. Together with the domain and scope this uniquely identifies the Timeline.")], create_closed_period_request : Annotated[Optional[CreateClosedPeriodRequest], Field(description="The request containing the details of the Closed Period")] = None, **kwargs) -> ApiResponse: # noqa: E501
|
103
|
+
"""[EXPERIMENTAL] CreateClosedPeriod: Create a new closed period against a timeline entity # noqa: E501
|
104
|
+
|
105
|
+
Creates a new closed period against a timeline entity Returns the newly created closed period entity with properties # noqa: E501
|
106
|
+
This method makes a synchronous HTTP request by default. To make an
|
107
|
+
asynchronous HTTP request, please pass async_req=True
|
108
|
+
|
109
|
+
>>> thread = api.create_closed_period_with_http_info(scope, code, create_closed_period_request, async_req=True)
|
110
|
+
>>> result = thread.get()
|
111
|
+
|
112
|
+
:param scope: The scope of the specified Timeline. (required)
|
113
|
+
:type scope: str
|
114
|
+
:param code: The code of the specified Timeline. Together with the domain and scope this uniquely identifies the Timeline. (required)
|
115
|
+
:type code: str
|
116
|
+
:param create_closed_period_request: The request containing the details of the Closed Period
|
117
|
+
:type create_closed_period_request: CreateClosedPeriodRequest
|
118
|
+
:param async_req: Whether to execute the request asynchronously.
|
119
|
+
:type async_req: bool, optional
|
120
|
+
:param _preload_content: if False, the ApiResponse.data will
|
121
|
+
be set to none and raw_data will store the
|
122
|
+
HTTP response body without reading/decoding.
|
123
|
+
Default is True.
|
124
|
+
:type _preload_content: bool, optional
|
125
|
+
:param _return_http_data_only: response data instead of ApiResponse
|
126
|
+
object with status code, headers, etc
|
127
|
+
:type _return_http_data_only: bool, optional
|
128
|
+
:param _request_timeout: Timeout setting. Do not use - use the opts parameter instead
|
129
|
+
:param opts: Configuration options for this request
|
130
|
+
:type opts: ConfigurationOptions, optional
|
131
|
+
:param _request_auth: set to override the auth_settings for an a single
|
132
|
+
request; this effectively ignores the authentication
|
133
|
+
in the spec for a single request.
|
134
|
+
:type _request_auth: dict, optional
|
135
|
+
:type _content_type: string, optional: force content-type for the request
|
136
|
+
:return: Returns the result object.
|
137
|
+
If the method is called asynchronously,
|
138
|
+
returns the request thread.
|
139
|
+
:rtype: tuple(ClosedPeriod, status_code(int), headers(HTTPHeaderDict))
|
140
|
+
"""
|
141
|
+
|
142
|
+
_params = locals()
|
143
|
+
|
144
|
+
_all_params = [
|
145
|
+
'scope',
|
146
|
+
'code',
|
147
|
+
'create_closed_period_request'
|
148
|
+
]
|
149
|
+
_all_params.extend(
|
150
|
+
[
|
151
|
+
'async_req',
|
152
|
+
'_return_http_data_only',
|
153
|
+
'_preload_content',
|
154
|
+
'_request_timeout',
|
155
|
+
'_request_auth',
|
156
|
+
'_content_type',
|
157
|
+
'_headers',
|
158
|
+
'opts'
|
159
|
+
]
|
160
|
+
)
|
161
|
+
|
162
|
+
# validate the arguments
|
163
|
+
for _key, _val in _params['kwargs'].items():
|
164
|
+
if _key not in _all_params:
|
165
|
+
raise ApiTypeError(
|
166
|
+
"Got an unexpected keyword argument '%s'"
|
167
|
+
" to method create_closed_period" % _key
|
168
|
+
)
|
169
|
+
_params[_key] = _val
|
170
|
+
del _params['kwargs']
|
171
|
+
|
172
|
+
_collection_formats = {}
|
173
|
+
|
174
|
+
# process the path parameters
|
175
|
+
_path_params = {}
|
176
|
+
if _params['scope']:
|
177
|
+
_path_params['scope'] = _params['scope']
|
178
|
+
|
179
|
+
if _params['code']:
|
180
|
+
_path_params['code'] = _params['code']
|
181
|
+
|
182
|
+
|
183
|
+
# process the query parameters
|
184
|
+
_query_params = []
|
185
|
+
# process the header parameters
|
186
|
+
_header_params = dict(_params.get('_headers', {}))
|
187
|
+
# process the form parameters
|
188
|
+
_form_params = []
|
189
|
+
_files = {}
|
190
|
+
# process the body parameter
|
191
|
+
_body_params = None
|
192
|
+
if _params['create_closed_period_request'] is not None:
|
193
|
+
_body_params = _params['create_closed_period_request']
|
194
|
+
|
195
|
+
# set the HTTP header `Accept`
|
196
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
197
|
+
['text/plain', 'application/json', 'text/json']) # noqa: E501
|
198
|
+
|
199
|
+
# set the HTTP header `Content-Type`
|
200
|
+
_content_types_list = _params.get('_content_type',
|
201
|
+
self.api_client.select_header_content_type(
|
202
|
+
['application/json-patch+json', 'application/json', 'text/json', 'application/*+json']))
|
203
|
+
if _content_types_list:
|
204
|
+
_header_params['Content-Type'] = _content_types_list
|
205
|
+
|
206
|
+
# authentication setting
|
207
|
+
_auth_settings = ['oauth2'] # noqa: E501
|
208
|
+
|
209
|
+
_response_types_map = {
|
210
|
+
'201': "ClosedPeriod",
|
211
|
+
'400': "LusidValidationProblemDetails",
|
212
|
+
}
|
213
|
+
|
214
|
+
return self.api_client.call_api(
|
215
|
+
'/api/timelines/{scope}/{code}/closedperiods', 'POST',
|
216
|
+
_path_params,
|
217
|
+
_query_params,
|
218
|
+
_header_params,
|
219
|
+
body=_body_params,
|
220
|
+
post_params=_form_params,
|
221
|
+
files=_files,
|
222
|
+
response_types_map=_response_types_map,
|
223
|
+
auth_settings=_auth_settings,
|
224
|
+
async_req=_params.get('async_req'),
|
225
|
+
_return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501
|
226
|
+
_preload_content=_params.get('_preload_content', True),
|
227
|
+
_request_timeout=_params.get('_request_timeout'),
|
228
|
+
opts=_params.get('opts'),
|
229
|
+
collection_formats=_collection_formats,
|
230
|
+
_request_auth=_params.get('_request_auth'))
|
231
|
+
|
55
232
|
@overload
|
56
233
|
async def create_timeline(self, create_timeline_request : Annotated[Optional[CreateTimelineRequest], Field(description="The request containing the details of the Timeline")] = None, **kwargs) -> Timeline: # noqa: E501
|
57
234
|
...
|
@@ -369,6 +546,193 @@ class TimelinesApi:
|
|
369
546
|
collection_formats=_collection_formats,
|
370
547
|
_request_auth=_params.get('_request_auth'))
|
371
548
|
|
549
|
+
@overload
|
550
|
+
async def get_closed_period(self, scope : Annotated[constr(strict=True, max_length=64, min_length=1), Field(..., description="The scope of the Timeline.")], code : Annotated[constr(strict=True, max_length=64, min_length=1), Field(..., description="The code of the Timeline. Together with the scope this uniquely identifies the Timeline.")], closed_period_id : Annotated[constr(strict=True, max_length=64, min_length=1), Field(..., description="The id of the Closed Period. Together with the scope and code of the Timeline, this uniquely identifies the ClosedPeriod")], as_at : Annotated[Optional[datetime], Field(description="The asAt datetime at which to retrieve the ClosedPeriod definition. Defaults to return the latest version of the definition if not specified.")] = None, property_keys : Annotated[Optional[conlist(StrictStr)], Field(description="A list of property keys from the 'ClosedPeriod' domain to decorate onto the ClosedPeriod. These must have the format {domain}/{scope}/{code}, for example 'ClosedPeriod/system/Name'.")] = None, **kwargs) -> ClosedPeriod: # noqa: E501
|
551
|
+
...
|
552
|
+
|
553
|
+
@overload
|
554
|
+
def get_closed_period(self, scope : Annotated[constr(strict=True, max_length=64, min_length=1), Field(..., description="The scope of the Timeline.")], code : Annotated[constr(strict=True, max_length=64, min_length=1), Field(..., description="The code of the Timeline. Together with the scope this uniquely identifies the Timeline.")], closed_period_id : Annotated[constr(strict=True, max_length=64, min_length=1), Field(..., description="The id of the Closed Period. Together with the scope and code of the Timeline, this uniquely identifies the ClosedPeriod")], as_at : Annotated[Optional[datetime], Field(description="The asAt datetime at which to retrieve the ClosedPeriod definition. Defaults to return the latest version of the definition if not specified.")] = None, property_keys : Annotated[Optional[conlist(StrictStr)], Field(description="A list of property keys from the 'ClosedPeriod' domain to decorate onto the ClosedPeriod. These must have the format {domain}/{scope}/{code}, for example 'ClosedPeriod/system/Name'.")] = None, async_req: Optional[bool]=True, **kwargs) -> ClosedPeriod: # noqa: E501
|
555
|
+
...
|
556
|
+
|
557
|
+
@validate_arguments
|
558
|
+
def get_closed_period(self, scope : Annotated[constr(strict=True, max_length=64, min_length=1), Field(..., description="The scope of the Timeline.")], code : Annotated[constr(strict=True, max_length=64, min_length=1), Field(..., description="The code of the Timeline. Together with the scope this uniquely identifies the Timeline.")], closed_period_id : Annotated[constr(strict=True, max_length=64, min_length=1), Field(..., description="The id of the Closed Period. Together with the scope and code of the Timeline, this uniquely identifies the ClosedPeriod")], as_at : Annotated[Optional[datetime], Field(description="The asAt datetime at which to retrieve the ClosedPeriod definition. Defaults to return the latest version of the definition if not specified.")] = None, property_keys : Annotated[Optional[conlist(StrictStr)], Field(description="A list of property keys from the 'ClosedPeriod' domain to decorate onto the ClosedPeriod. These must have the format {domain}/{scope}/{code}, for example 'ClosedPeriod/system/Name'.")] = None, async_req: Optional[bool]=None, **kwargs) -> Union[ClosedPeriod, Awaitable[ClosedPeriod]]: # noqa: E501
|
559
|
+
"""[EXPERIMENTAL] GetClosedPeriod: Gets a Closed Period entity. # noqa: E501
|
560
|
+
|
561
|
+
Retrieves one ClosedPeriod uniquely defined by the Timelines Scope/Code and a ClosedPeriodId. # noqa: E501
|
562
|
+
This method makes a synchronous HTTP request by default. To make an
|
563
|
+
asynchronous HTTP request, please pass async_req=True
|
564
|
+
|
565
|
+
>>> thread = api.get_closed_period(scope, code, closed_period_id, as_at, property_keys, async_req=True)
|
566
|
+
>>> result = thread.get()
|
567
|
+
|
568
|
+
:param scope: The scope of the Timeline. (required)
|
569
|
+
:type scope: str
|
570
|
+
:param code: The code of the Timeline. Together with the scope this uniquely identifies the Timeline. (required)
|
571
|
+
:type code: str
|
572
|
+
:param closed_period_id: The id of the Closed Period. Together with the scope and code of the Timeline, this uniquely identifies the ClosedPeriod (required)
|
573
|
+
:type closed_period_id: str
|
574
|
+
:param as_at: The asAt datetime at which to retrieve the ClosedPeriod definition. Defaults to return the latest version of the definition if not specified.
|
575
|
+
:type as_at: datetime
|
576
|
+
:param property_keys: A list of property keys from the 'ClosedPeriod' domain to decorate onto the ClosedPeriod. These must have the format {domain}/{scope}/{code}, for example 'ClosedPeriod/system/Name'.
|
577
|
+
:type property_keys: List[str]
|
578
|
+
:param async_req: Whether to execute the request asynchronously.
|
579
|
+
:type async_req: bool, optional
|
580
|
+
:param _request_timeout: Timeout setting. Do not use - use the opts parameter instead
|
581
|
+
:param opts: Configuration options for this request
|
582
|
+
:type opts: ConfigurationOptions, optional
|
583
|
+
:return: Returns the result object.
|
584
|
+
If the method is called asynchronously,
|
585
|
+
returns the request thread.
|
586
|
+
:rtype: ClosedPeriod
|
587
|
+
"""
|
588
|
+
kwargs['_return_http_data_only'] = True
|
589
|
+
if '_preload_content' in kwargs:
|
590
|
+
message = "Error! Please call the get_closed_period_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501
|
591
|
+
raise ValueError(message)
|
592
|
+
if async_req is not None:
|
593
|
+
kwargs['async_req'] = async_req
|
594
|
+
return self.get_closed_period_with_http_info(scope, code, closed_period_id, as_at, property_keys, **kwargs) # noqa: E501
|
595
|
+
|
596
|
+
@validate_arguments
|
597
|
+
def get_closed_period_with_http_info(self, scope : Annotated[constr(strict=True, max_length=64, min_length=1), Field(..., description="The scope of the Timeline.")], code : Annotated[constr(strict=True, max_length=64, min_length=1), Field(..., description="The code of the Timeline. Together with the scope this uniquely identifies the Timeline.")], closed_period_id : Annotated[constr(strict=True, max_length=64, min_length=1), Field(..., description="The id of the Closed Period. Together with the scope and code of the Timeline, this uniquely identifies the ClosedPeriod")], as_at : Annotated[Optional[datetime], Field(description="The asAt datetime at which to retrieve the ClosedPeriod definition. Defaults to return the latest version of the definition if not specified.")] = None, property_keys : Annotated[Optional[conlist(StrictStr)], Field(description="A list of property keys from the 'ClosedPeriod' domain to decorate onto the ClosedPeriod. These must have the format {domain}/{scope}/{code}, for example 'ClosedPeriod/system/Name'.")] = None, **kwargs) -> ApiResponse: # noqa: E501
|
598
|
+
"""[EXPERIMENTAL] GetClosedPeriod: Gets a Closed Period entity. # noqa: E501
|
599
|
+
|
600
|
+
Retrieves one ClosedPeriod uniquely defined by the Timelines Scope/Code and a ClosedPeriodId. # noqa: E501
|
601
|
+
This method makes a synchronous HTTP request by default. To make an
|
602
|
+
asynchronous HTTP request, please pass async_req=True
|
603
|
+
|
604
|
+
>>> thread = api.get_closed_period_with_http_info(scope, code, closed_period_id, as_at, property_keys, async_req=True)
|
605
|
+
>>> result = thread.get()
|
606
|
+
|
607
|
+
:param scope: The scope of the Timeline. (required)
|
608
|
+
:type scope: str
|
609
|
+
:param code: The code of the Timeline. Together with the scope this uniquely identifies the Timeline. (required)
|
610
|
+
:type code: str
|
611
|
+
:param closed_period_id: The id of the Closed Period. Together with the scope and code of the Timeline, this uniquely identifies the ClosedPeriod (required)
|
612
|
+
:type closed_period_id: str
|
613
|
+
:param as_at: The asAt datetime at which to retrieve the ClosedPeriod definition. Defaults to return the latest version of the definition if not specified.
|
614
|
+
:type as_at: datetime
|
615
|
+
:param property_keys: A list of property keys from the 'ClosedPeriod' domain to decorate onto the ClosedPeriod. These must have the format {domain}/{scope}/{code}, for example 'ClosedPeriod/system/Name'.
|
616
|
+
:type property_keys: List[str]
|
617
|
+
:param async_req: Whether to execute the request asynchronously.
|
618
|
+
:type async_req: bool, optional
|
619
|
+
:param _preload_content: if False, the ApiResponse.data will
|
620
|
+
be set to none and raw_data will store the
|
621
|
+
HTTP response body without reading/decoding.
|
622
|
+
Default is True.
|
623
|
+
:type _preload_content: bool, optional
|
624
|
+
:param _return_http_data_only: response data instead of ApiResponse
|
625
|
+
object with status code, headers, etc
|
626
|
+
:type _return_http_data_only: bool, optional
|
627
|
+
:param _request_timeout: Timeout setting. Do not use - use the opts parameter instead
|
628
|
+
:param opts: Configuration options for this request
|
629
|
+
:type opts: ConfigurationOptions, optional
|
630
|
+
:param _request_auth: set to override the auth_settings for an a single
|
631
|
+
request; this effectively ignores the authentication
|
632
|
+
in the spec for a single request.
|
633
|
+
:type _request_auth: dict, optional
|
634
|
+
:type _content_type: string, optional: force content-type for the request
|
635
|
+
:return: Returns the result object.
|
636
|
+
If the method is called asynchronously,
|
637
|
+
returns the request thread.
|
638
|
+
:rtype: tuple(ClosedPeriod, status_code(int), headers(HTTPHeaderDict))
|
639
|
+
"""
|
640
|
+
|
641
|
+
_params = locals()
|
642
|
+
|
643
|
+
_all_params = [
|
644
|
+
'scope',
|
645
|
+
'code',
|
646
|
+
'closed_period_id',
|
647
|
+
'as_at',
|
648
|
+
'property_keys'
|
649
|
+
]
|
650
|
+
_all_params.extend(
|
651
|
+
[
|
652
|
+
'async_req',
|
653
|
+
'_return_http_data_only',
|
654
|
+
'_preload_content',
|
655
|
+
'_request_timeout',
|
656
|
+
'_request_auth',
|
657
|
+
'_content_type',
|
658
|
+
'_headers',
|
659
|
+
'opts'
|
660
|
+
]
|
661
|
+
)
|
662
|
+
|
663
|
+
# validate the arguments
|
664
|
+
for _key, _val in _params['kwargs'].items():
|
665
|
+
if _key not in _all_params:
|
666
|
+
raise ApiTypeError(
|
667
|
+
"Got an unexpected keyword argument '%s'"
|
668
|
+
" to method get_closed_period" % _key
|
669
|
+
)
|
670
|
+
_params[_key] = _val
|
671
|
+
del _params['kwargs']
|
672
|
+
|
673
|
+
_collection_formats = {}
|
674
|
+
|
675
|
+
# process the path parameters
|
676
|
+
_path_params = {}
|
677
|
+
if _params['scope']:
|
678
|
+
_path_params['scope'] = _params['scope']
|
679
|
+
|
680
|
+
if _params['code']:
|
681
|
+
_path_params['code'] = _params['code']
|
682
|
+
|
683
|
+
if _params['closed_period_id']:
|
684
|
+
_path_params['closedPeriodId'] = _params['closed_period_id']
|
685
|
+
|
686
|
+
|
687
|
+
# process the query parameters
|
688
|
+
_query_params = []
|
689
|
+
if _params.get('as_at') is not None: # noqa: E501
|
690
|
+
if isinstance(_params['as_at'], datetime):
|
691
|
+
_query_params.append(('asAt', _params['as_at'].strftime(self.api_client.configuration.datetime_format)))
|
692
|
+
else:
|
693
|
+
_query_params.append(('asAt', _params['as_at']))
|
694
|
+
|
695
|
+
if _params.get('property_keys') is not None: # noqa: E501
|
696
|
+
_query_params.append(('propertyKeys', _params['property_keys']))
|
697
|
+
_collection_formats['propertyKeys'] = 'multi'
|
698
|
+
|
699
|
+
# process the header parameters
|
700
|
+
_header_params = dict(_params.get('_headers', {}))
|
701
|
+
# process the form parameters
|
702
|
+
_form_params = []
|
703
|
+
_files = {}
|
704
|
+
# process the body parameter
|
705
|
+
_body_params = None
|
706
|
+
# set the HTTP header `Accept`
|
707
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
708
|
+
['text/plain', 'application/json', 'text/json']) # noqa: E501
|
709
|
+
|
710
|
+
# authentication setting
|
711
|
+
_auth_settings = ['oauth2'] # noqa: E501
|
712
|
+
|
713
|
+
_response_types_map = {
|
714
|
+
'200': "ClosedPeriod",
|
715
|
+
'400': "LusidValidationProblemDetails",
|
716
|
+
}
|
717
|
+
|
718
|
+
return self.api_client.call_api(
|
719
|
+
'/api/timelines/{scope}/{code}/closedperiods/{closedPeriodId}', 'GET',
|
720
|
+
_path_params,
|
721
|
+
_query_params,
|
722
|
+
_header_params,
|
723
|
+
body=_body_params,
|
724
|
+
post_params=_form_params,
|
725
|
+
files=_files,
|
726
|
+
response_types_map=_response_types_map,
|
727
|
+
auth_settings=_auth_settings,
|
728
|
+
async_req=_params.get('async_req'),
|
729
|
+
_return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501
|
730
|
+
_preload_content=_params.get('_preload_content', True),
|
731
|
+
_request_timeout=_params.get('_request_timeout'),
|
732
|
+
opts=_params.get('opts'),
|
733
|
+
collection_formats=_collection_formats,
|
734
|
+
_request_auth=_params.get('_request_auth'))
|
735
|
+
|
372
736
|
@overload
|
373
737
|
async def get_timeline(self, scope : Annotated[constr(strict=True, max_length=64, min_length=1), Field(..., description="The scope of the specified Timeline.")], code : Annotated[constr(strict=True, max_length=64, min_length=1), Field(..., description="The code of the specified Timeline. Together with the scope this uniquely identifies the Timeline.")], as_at : Annotated[Optional[datetime], Field(description="The asAt datetime at which to retrieve the Timeline definition. Defaults to return the latest version of the definition if not specified.")] = None, effective_at : Annotated[Optional[StrictStr], Field(description="The effective datetime or cut label at which to retrieve the timeline properties. Defaults to the current LUSID system datetime if not specified.")] = None, property_keys : Annotated[Optional[conlist(StrictStr)], Field(description="A list of property keys from the 'Timeline' domain to decorate onto the Timeline. These must have the format {domain}/{scope}/{code}, for example 'Timeline/system/Name'.")] = None, **kwargs) -> Timeline: # noqa: E501
|
374
738
|
...
|
@@ -556,6 +920,218 @@ class TimelinesApi:
|
|
556
920
|
collection_formats=_collection_formats,
|
557
921
|
_request_auth=_params.get('_request_auth'))
|
558
922
|
|
923
|
+
@overload
|
924
|
+
async def list_closed_periods(self, scope : Annotated[constr(strict=True, max_length=64, min_length=1), Field(..., description="The scope of the Timeline.")], code : Annotated[constr(strict=True, max_length=64, min_length=1), Field(..., description="The code of the Timeline.")], as_at : Annotated[Optional[datetime], Field(description="The asAt datetime at which to list the ClosedPeriods. Defaults to returning the latest version of each ClosedPeriod 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 ClosedPeriods; this value is returned from the previous call. If a pagination token is provided, the filter, effectiveAt and asAt fields must not have changed since the original request.")] = None, limit : Annotated[Optional[conint(strict=True, le=5000, ge=1)], Field(description="When paginating, limit the results to this number. Defaults to 100 if not specified.")] = None, filter : Annotated[Optional[constr(strict=True, max_length=16384, min_length=0)], Field(description="Expression to filter the results. For example, to filter on the effectiveEnd, specify \"effectiveEnd gt 2019-01-15T10:00:00\". For more information about filtering results, see https://support.lusid.com/knowledgebase/article/KA-01914.")] = None, sort_by : Annotated[Optional[conlist(StrictStr)], Field(description="A list of field names or properties to sort by, each suffixed by \" ASC\" or \" DESC\"")] = None, property_keys : Annotated[Optional[conlist(StrictStr)], Field(description="A list of property keys from the 'ClosedPeriod' domain to decorate onto each ClosedPeriod. These must take the format {domain}/{scope}/{code}, for example 'ClosedPeriod/Account/id'.")] = None, **kwargs) -> PagedResourceListOfClosedPeriod: # noqa: E501
|
925
|
+
...
|
926
|
+
|
927
|
+
@overload
|
928
|
+
def list_closed_periods(self, scope : Annotated[constr(strict=True, max_length=64, min_length=1), Field(..., description="The scope of the Timeline.")], code : Annotated[constr(strict=True, max_length=64, min_length=1), Field(..., description="The code of the Timeline.")], as_at : Annotated[Optional[datetime], Field(description="The asAt datetime at which to list the ClosedPeriods. Defaults to returning the latest version of each ClosedPeriod 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 ClosedPeriods; this value is returned from the previous call. If a pagination token is provided, the filter, effectiveAt and asAt fields must not have changed since the original request.")] = None, limit : Annotated[Optional[conint(strict=True, le=5000, ge=1)], Field(description="When paginating, limit the results to this number. Defaults to 100 if not specified.")] = None, filter : Annotated[Optional[constr(strict=True, max_length=16384, min_length=0)], Field(description="Expression to filter the results. For example, to filter on the effectiveEnd, specify \"effectiveEnd gt 2019-01-15T10:00:00\". For more information about filtering results, see https://support.lusid.com/knowledgebase/article/KA-01914.")] = None, sort_by : Annotated[Optional[conlist(StrictStr)], Field(description="A list of field names or properties to sort by, each suffixed by \" ASC\" or \" DESC\"")] = None, property_keys : Annotated[Optional[conlist(StrictStr)], Field(description="A list of property keys from the 'ClosedPeriod' domain to decorate onto each ClosedPeriod. These must take the format {domain}/{scope}/{code}, for example 'ClosedPeriod/Account/id'.")] = None, async_req: Optional[bool]=True, **kwargs) -> PagedResourceListOfClosedPeriod: # noqa: E501
|
929
|
+
...
|
930
|
+
|
931
|
+
@validate_arguments
|
932
|
+
def list_closed_periods(self, scope : Annotated[constr(strict=True, max_length=64, min_length=1), Field(..., description="The scope of the Timeline.")], code : Annotated[constr(strict=True, max_length=64, min_length=1), Field(..., description="The code of the Timeline.")], as_at : Annotated[Optional[datetime], Field(description="The asAt datetime at which to list the ClosedPeriods. Defaults to returning the latest version of each ClosedPeriod 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 ClosedPeriods; this value is returned from the previous call. If a pagination token is provided, the filter, effectiveAt and asAt fields must not have changed since the original request.")] = None, limit : Annotated[Optional[conint(strict=True, le=5000, ge=1)], Field(description="When paginating, limit the results to this number. Defaults to 100 if not specified.")] = None, filter : Annotated[Optional[constr(strict=True, max_length=16384, min_length=0)], Field(description="Expression to filter the results. For example, to filter on the effectiveEnd, specify \"effectiveEnd gt 2019-01-15T10:00:00\". For more information about filtering results, see https://support.lusid.com/knowledgebase/article/KA-01914.")] = None, sort_by : Annotated[Optional[conlist(StrictStr)], Field(description="A list of field names or properties to sort by, each suffixed by \" ASC\" or \" DESC\"")] = None, property_keys : Annotated[Optional[conlist(StrictStr)], Field(description="A list of property keys from the 'ClosedPeriod' domain to decorate onto each ClosedPeriod. These must take the format {domain}/{scope}/{code}, for example 'ClosedPeriod/Account/id'.")] = None, async_req: Optional[bool]=None, **kwargs) -> Union[PagedResourceListOfClosedPeriod, Awaitable[PagedResourceListOfClosedPeriod]]: # noqa: E501
|
933
|
+
"""[EXPERIMENTAL] ListClosedPeriods: List ClosedPeriods for a specified Timeline. # noqa: E501
|
934
|
+
|
935
|
+
List all the ClosedPeriods matching a particular criteria. # noqa: E501
|
936
|
+
This method makes a synchronous HTTP request by default. To make an
|
937
|
+
asynchronous HTTP request, please pass async_req=True
|
938
|
+
|
939
|
+
>>> thread = api.list_closed_periods(scope, code, as_at, page, limit, filter, sort_by, property_keys, async_req=True)
|
940
|
+
>>> result = thread.get()
|
941
|
+
|
942
|
+
:param scope: The scope of the Timeline. (required)
|
943
|
+
:type scope: str
|
944
|
+
:param code: The code of the Timeline. (required)
|
945
|
+
:type code: str
|
946
|
+
:param as_at: The asAt datetime at which to list the ClosedPeriods. Defaults to returning the latest version of each ClosedPeriod if not specified.
|
947
|
+
:type as_at: datetime
|
948
|
+
:param page: The pagination token to use to continue listing ClosedPeriods; this value is returned from the previous call. If a pagination token is provided, the filter, effectiveAt and asAt fields must not have changed since the original request.
|
949
|
+
:type page: str
|
950
|
+
:param limit: When paginating, limit the results to this number. Defaults to 100 if not specified.
|
951
|
+
:type limit: int
|
952
|
+
:param filter: Expression to filter the results. For example, to filter on the effectiveEnd, specify \"effectiveEnd gt 2019-01-15T10:00:00\". For more information about filtering results, see https://support.lusid.com/knowledgebase/article/KA-01914.
|
953
|
+
:type filter: str
|
954
|
+
:param sort_by: A list of field names or properties to sort by, each suffixed by \" ASC\" or \" DESC\"
|
955
|
+
:type sort_by: List[str]
|
956
|
+
:param property_keys: A list of property keys from the 'ClosedPeriod' domain to decorate onto each ClosedPeriod. These must take the format {domain}/{scope}/{code}, for example 'ClosedPeriod/Account/id'.
|
957
|
+
:type property_keys: List[str]
|
958
|
+
:param async_req: Whether to execute the request asynchronously.
|
959
|
+
:type async_req: bool, optional
|
960
|
+
:param _request_timeout: Timeout setting. Do not use - use the opts parameter instead
|
961
|
+
:param opts: Configuration options for this request
|
962
|
+
:type opts: ConfigurationOptions, optional
|
963
|
+
:return: Returns the result object.
|
964
|
+
If the method is called asynchronously,
|
965
|
+
returns the request thread.
|
966
|
+
:rtype: PagedResourceListOfClosedPeriod
|
967
|
+
"""
|
968
|
+
kwargs['_return_http_data_only'] = True
|
969
|
+
if '_preload_content' in kwargs:
|
970
|
+
message = "Error! Please call the list_closed_periods_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501
|
971
|
+
raise ValueError(message)
|
972
|
+
if async_req is not None:
|
973
|
+
kwargs['async_req'] = async_req
|
974
|
+
return self.list_closed_periods_with_http_info(scope, code, as_at, page, limit, filter, sort_by, property_keys, **kwargs) # noqa: E501
|
975
|
+
|
976
|
+
@validate_arguments
|
977
|
+
def list_closed_periods_with_http_info(self, scope : Annotated[constr(strict=True, max_length=64, min_length=1), Field(..., description="The scope of the Timeline.")], code : Annotated[constr(strict=True, max_length=64, min_length=1), Field(..., description="The code of the Timeline.")], as_at : Annotated[Optional[datetime], Field(description="The asAt datetime at which to list the ClosedPeriods. Defaults to returning the latest version of each ClosedPeriod 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 ClosedPeriods; this value is returned from the previous call. If a pagination token is provided, the filter, effectiveAt and asAt fields must not have changed since the original request.")] = None, limit : Annotated[Optional[conint(strict=True, le=5000, ge=1)], Field(description="When paginating, limit the results to this number. Defaults to 100 if not specified.")] = None, filter : Annotated[Optional[constr(strict=True, max_length=16384, min_length=0)], Field(description="Expression to filter the results. For example, to filter on the effectiveEnd, specify \"effectiveEnd gt 2019-01-15T10:00:00\". For more information about filtering results, see https://support.lusid.com/knowledgebase/article/KA-01914.")] = None, sort_by : Annotated[Optional[conlist(StrictStr)], Field(description="A list of field names or properties to sort by, each suffixed by \" ASC\" or \" DESC\"")] = None, property_keys : Annotated[Optional[conlist(StrictStr)], Field(description="A list of property keys from the 'ClosedPeriod' domain to decorate onto each ClosedPeriod. These must take the format {domain}/{scope}/{code}, for example 'ClosedPeriod/Account/id'.")] = None, **kwargs) -> ApiResponse: # noqa: E501
|
978
|
+
"""[EXPERIMENTAL] ListClosedPeriods: List ClosedPeriods for a specified Timeline. # noqa: E501
|
979
|
+
|
980
|
+
List all the ClosedPeriods matching a particular criteria. # noqa: E501
|
981
|
+
This method makes a synchronous HTTP request by default. To make an
|
982
|
+
asynchronous HTTP request, please pass async_req=True
|
983
|
+
|
984
|
+
>>> thread = api.list_closed_periods_with_http_info(scope, code, as_at, page, limit, filter, sort_by, property_keys, async_req=True)
|
985
|
+
>>> result = thread.get()
|
986
|
+
|
987
|
+
:param scope: The scope of the Timeline. (required)
|
988
|
+
:type scope: str
|
989
|
+
:param code: The code of the Timeline. (required)
|
990
|
+
:type code: str
|
991
|
+
:param as_at: The asAt datetime at which to list the ClosedPeriods. Defaults to returning the latest version of each ClosedPeriod if not specified.
|
992
|
+
:type as_at: datetime
|
993
|
+
:param page: The pagination token to use to continue listing ClosedPeriods; this value is returned from the previous call. If a pagination token is provided, the filter, effectiveAt and asAt fields must not have changed since the original request.
|
994
|
+
:type page: str
|
995
|
+
:param limit: When paginating, limit the results to this number. Defaults to 100 if not specified.
|
996
|
+
:type limit: int
|
997
|
+
:param filter: Expression to filter the results. For example, to filter on the effectiveEnd, specify \"effectiveEnd gt 2019-01-15T10:00:00\". For more information about filtering results, see https://support.lusid.com/knowledgebase/article/KA-01914.
|
998
|
+
:type filter: str
|
999
|
+
:param sort_by: A list of field names or properties to sort by, each suffixed by \" ASC\" or \" DESC\"
|
1000
|
+
:type sort_by: List[str]
|
1001
|
+
:param property_keys: A list of property keys from the 'ClosedPeriod' domain to decorate onto each ClosedPeriod. These must take the format {domain}/{scope}/{code}, for example 'ClosedPeriod/Account/id'.
|
1002
|
+
:type property_keys: List[str]
|
1003
|
+
:param async_req: Whether to execute the request asynchronously.
|
1004
|
+
:type async_req: bool, optional
|
1005
|
+
:param _preload_content: if False, the ApiResponse.data will
|
1006
|
+
be set to none and raw_data will store the
|
1007
|
+
HTTP response body without reading/decoding.
|
1008
|
+
Default is True.
|
1009
|
+
:type _preload_content: bool, optional
|
1010
|
+
:param _return_http_data_only: response data instead of ApiResponse
|
1011
|
+
object with status code, headers, etc
|
1012
|
+
:type _return_http_data_only: bool, optional
|
1013
|
+
:param _request_timeout: Timeout setting. Do not use - use the opts parameter instead
|
1014
|
+
:param opts: Configuration options for this request
|
1015
|
+
:type opts: ConfigurationOptions, optional
|
1016
|
+
:param _request_auth: set to override the auth_settings for an a single
|
1017
|
+
request; this effectively ignores the authentication
|
1018
|
+
in the spec for a single request.
|
1019
|
+
:type _request_auth: dict, optional
|
1020
|
+
:type _content_type: string, optional: force content-type for the request
|
1021
|
+
:return: Returns the result object.
|
1022
|
+
If the method is called asynchronously,
|
1023
|
+
returns the request thread.
|
1024
|
+
:rtype: tuple(PagedResourceListOfClosedPeriod, status_code(int), headers(HTTPHeaderDict))
|
1025
|
+
"""
|
1026
|
+
|
1027
|
+
_params = locals()
|
1028
|
+
|
1029
|
+
_all_params = [
|
1030
|
+
'scope',
|
1031
|
+
'code',
|
1032
|
+
'as_at',
|
1033
|
+
'page',
|
1034
|
+
'limit',
|
1035
|
+
'filter',
|
1036
|
+
'sort_by',
|
1037
|
+
'property_keys'
|
1038
|
+
]
|
1039
|
+
_all_params.extend(
|
1040
|
+
[
|
1041
|
+
'async_req',
|
1042
|
+
'_return_http_data_only',
|
1043
|
+
'_preload_content',
|
1044
|
+
'_request_timeout',
|
1045
|
+
'_request_auth',
|
1046
|
+
'_content_type',
|
1047
|
+
'_headers',
|
1048
|
+
'opts'
|
1049
|
+
]
|
1050
|
+
)
|
1051
|
+
|
1052
|
+
# validate the arguments
|
1053
|
+
for _key, _val in _params['kwargs'].items():
|
1054
|
+
if _key not in _all_params:
|
1055
|
+
raise ApiTypeError(
|
1056
|
+
"Got an unexpected keyword argument '%s'"
|
1057
|
+
" to method list_closed_periods" % _key
|
1058
|
+
)
|
1059
|
+
_params[_key] = _val
|
1060
|
+
del _params['kwargs']
|
1061
|
+
|
1062
|
+
_collection_formats = {}
|
1063
|
+
|
1064
|
+
# process the path parameters
|
1065
|
+
_path_params = {}
|
1066
|
+
if _params['scope']:
|
1067
|
+
_path_params['scope'] = _params['scope']
|
1068
|
+
|
1069
|
+
if _params['code']:
|
1070
|
+
_path_params['code'] = _params['code']
|
1071
|
+
|
1072
|
+
|
1073
|
+
# process the query parameters
|
1074
|
+
_query_params = []
|
1075
|
+
if _params.get('as_at') is not None: # noqa: E501
|
1076
|
+
if isinstance(_params['as_at'], datetime):
|
1077
|
+
_query_params.append(('asAt', _params['as_at'].strftime(self.api_client.configuration.datetime_format)))
|
1078
|
+
else:
|
1079
|
+
_query_params.append(('asAt', _params['as_at']))
|
1080
|
+
|
1081
|
+
if _params.get('page') is not None: # noqa: E501
|
1082
|
+
_query_params.append(('page', _params['page']))
|
1083
|
+
|
1084
|
+
if _params.get('limit') is not None: # noqa: E501
|
1085
|
+
_query_params.append(('limit', _params['limit']))
|
1086
|
+
|
1087
|
+
if _params.get('filter') is not None: # noqa: E501
|
1088
|
+
_query_params.append(('filter', _params['filter']))
|
1089
|
+
|
1090
|
+
if _params.get('sort_by') is not None: # noqa: E501
|
1091
|
+
_query_params.append(('sortBy', _params['sort_by']))
|
1092
|
+
_collection_formats['sortBy'] = 'multi'
|
1093
|
+
|
1094
|
+
if _params.get('property_keys') is not None: # noqa: E501
|
1095
|
+
_query_params.append(('propertyKeys', _params['property_keys']))
|
1096
|
+
_collection_formats['propertyKeys'] = 'multi'
|
1097
|
+
|
1098
|
+
# process the header parameters
|
1099
|
+
_header_params = dict(_params.get('_headers', {}))
|
1100
|
+
# process the form parameters
|
1101
|
+
_form_params = []
|
1102
|
+
_files = {}
|
1103
|
+
# process the body parameter
|
1104
|
+
_body_params = None
|
1105
|
+
# set the HTTP header `Accept`
|
1106
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
1107
|
+
['text/plain', 'application/json', 'text/json']) # noqa: E501
|
1108
|
+
|
1109
|
+
# authentication setting
|
1110
|
+
_auth_settings = ['oauth2'] # noqa: E501
|
1111
|
+
|
1112
|
+
_response_types_map = {
|
1113
|
+
'200': "PagedResourceListOfClosedPeriod",
|
1114
|
+
'400': "LusidValidationProblemDetails",
|
1115
|
+
}
|
1116
|
+
|
1117
|
+
return self.api_client.call_api(
|
1118
|
+
'/api/timelines/{scope}/{code}/closedperiods', 'GET',
|
1119
|
+
_path_params,
|
1120
|
+
_query_params,
|
1121
|
+
_header_params,
|
1122
|
+
body=_body_params,
|
1123
|
+
post_params=_form_params,
|
1124
|
+
files=_files,
|
1125
|
+
response_types_map=_response_types_map,
|
1126
|
+
auth_settings=_auth_settings,
|
1127
|
+
async_req=_params.get('async_req'),
|
1128
|
+
_return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501
|
1129
|
+
_preload_content=_params.get('_preload_content', True),
|
1130
|
+
_request_timeout=_params.get('_request_timeout'),
|
1131
|
+
opts=_params.get('opts'),
|
1132
|
+
collection_formats=_collection_formats,
|
1133
|
+
_request_auth=_params.get('_request_auth'))
|
1134
|
+
|
559
1135
|
@overload
|
560
1136
|
async def update_timeline(self, scope : Annotated[constr(strict=True, max_length=64, min_length=1), Field(..., description="The scope of the specified Timeline.")], code : Annotated[constr(strict=True, max_length=64, min_length=1), Field(..., description="The code of the specified Timeline. Together with the domain and scope this uniquely identifies the Timeline.")], update_timeline_request : Annotated[Optional[UpdateTimelineRequest], Field(description="The request containing the updated details of the Timeline")] = None, **kwargs) -> Timeline: # noqa: E501
|
561
1137
|
...
|
@@ -568,7 +1144,7 @@ class TimelinesApi:
|
|
568
1144
|
def update_timeline(self, scope : Annotated[constr(strict=True, max_length=64, min_length=1), Field(..., description="The scope of the specified Timeline.")], code : Annotated[constr(strict=True, max_length=64, min_length=1), Field(..., description="The code of the specified Timeline. Together with the domain and scope this uniquely identifies the Timeline.")], update_timeline_request : Annotated[Optional[UpdateTimelineRequest], Field(description="The request containing the updated details of the Timeline")] = None, async_req: Optional[bool]=None, **kwargs) -> Union[Timeline, Awaitable[Timeline]]: # noqa: E501
|
569
1145
|
"""[EXPERIMENTAL] UpdateTimeline: Update Timeline defined by scope and code # noqa: E501
|
570
1146
|
|
571
|
-
Overwrites an existing Timeline Update request has the same required fields as Create apart from the
|
1147
|
+
Overwrites an existing Timeline Update request has the same required fields as Create apart from the id. Returns the updated Timeline at the current effectiveAt. Note that Timelines are mono-temporal, however they can have Time-Variant Properties. Updated Properties will be returned at the latest AsAt and EffectiveAt # noqa: E501
|
572
1148
|
This method makes a synchronous HTTP request by default. To make an
|
573
1149
|
asynchronous HTTP request, please pass async_req=True
|
574
1150
|
|
@@ -603,7 +1179,7 @@ class TimelinesApi:
|
|
603
1179
|
def update_timeline_with_http_info(self, scope : Annotated[constr(strict=True, max_length=64, min_length=1), Field(..., description="The scope of the specified Timeline.")], code : Annotated[constr(strict=True, max_length=64, min_length=1), Field(..., description="The code of the specified Timeline. Together with the domain and scope this uniquely identifies the Timeline.")], update_timeline_request : Annotated[Optional[UpdateTimelineRequest], Field(description="The request containing the updated details of the Timeline")] = None, **kwargs) -> ApiResponse: # noqa: E501
|
604
1180
|
"""[EXPERIMENTAL] UpdateTimeline: Update Timeline defined by scope and code # noqa: E501
|
605
1181
|
|
606
|
-
Overwrites an existing Timeline Update request has the same required fields as Create apart from the
|
1182
|
+
Overwrites an existing Timeline Update request has the same required fields as Create apart from the id. Returns the updated Timeline at the current effectiveAt. Note that Timelines are mono-temporal, however they can have Time-Variant Properties. Updated Properties will be returned at the latest AsAt and EffectiveAt # noqa: E501
|
607
1183
|
This method makes a synchronous HTTP request by default. To make an
|
608
1184
|
asynchronous HTTP request, please pass async_req=True
|
609
1185
|
|