lusid-sdk 2.1.429__py3-none-any.whl → 2.1.435__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 CHANGED
@@ -42,7 +42,7 @@ from lusid.api.derived_transaction_portfolios_api import DerivedTransactionPortf
42
42
  from lusid.api.entities_api import EntitiesApi
43
43
  from lusid.api.executions_api import ExecutionsApi
44
44
  from lusid.api.fee_types_api import FeeTypesApi
45
- from lusid.api.fund_configuration_entities_api import FundConfigurationEntitiesApi
45
+ from lusid.api.fund_configuration_api import FundConfigurationApi
46
46
  from lusid.api.funds_api import FundsApi
47
47
  from lusid.api.group_reconciliations_api import GroupReconciliationsApi
48
48
  from lusid.api.instrument_event_types_api import InstrumentEventTypesApi
@@ -159,6 +159,7 @@ from lusid.models.barrier import Barrier
159
159
  from lusid.models.basket import Basket
160
160
  from lusid.models.basket_identifier import BasketIdentifier
161
161
  from lusid.models.batch_adjust_holdings_response import BatchAdjustHoldingsResponse
162
+ from lusid.models.batch_upsert_dates_for_calendar_response import BatchUpsertDatesForCalendarResponse
162
163
  from lusid.models.batch_upsert_instrument_properties_response import BatchUpsertInstrumentPropertiesResponse
163
164
  from lusid.models.batch_upsert_portfolio_access_metadata_request import BatchUpsertPortfolioAccessMetadataRequest
164
165
  from lusid.models.batch_upsert_portfolio_access_metadata_response import BatchUpsertPortfolioAccessMetadataResponse
@@ -1093,6 +1094,7 @@ from lusid.models.update_portfolio_group_request import UpdatePortfolioGroupRequ
1093
1094
  from lusid.models.update_portfolio_request import UpdatePortfolioRequest
1094
1095
  from lusid.models.update_property_definition_request import UpdatePropertyDefinitionRequest
1095
1096
  from lusid.models.update_reconciliation_request import UpdateReconciliationRequest
1097
+ from lusid.models.update_reference_data_request import UpdateReferenceDataRequest
1096
1098
  from lusid.models.update_relationship_definition_request import UpdateRelationshipDefinitionRequest
1097
1099
  from lusid.models.update_staging_rule_set_request import UpdateStagingRuleSetRequest
1098
1100
  from lusid.models.update_tax_rule_set_request import UpdateTaxRuleSetRequest
@@ -1220,7 +1222,7 @@ __all__ = [
1220
1222
  "EntitiesApi",
1221
1223
  "ExecutionsApi",
1222
1224
  "FeeTypesApi",
1223
- "FundConfigurationEntitiesApi",
1225
+ "FundConfigurationApi",
1224
1226
  "FundsApi",
1225
1227
  "GroupReconciliationsApi",
1226
1228
  "InstrumentEventTypesApi",
@@ -1327,6 +1329,7 @@ __all__ = [
1327
1329
  "Basket",
1328
1330
  "BasketIdentifier",
1329
1331
  "BatchAdjustHoldingsResponse",
1332
+ "BatchUpsertDatesForCalendarResponse",
1330
1333
  "BatchUpsertInstrumentPropertiesResponse",
1331
1334
  "BatchUpsertPortfolioAccessMetadataRequest",
1332
1335
  "BatchUpsertPortfolioAccessMetadataResponse",
@@ -2261,6 +2264,7 @@ __all__ = [
2261
2264
  "UpdatePortfolioRequest",
2262
2265
  "UpdatePropertyDefinitionRequest",
2263
2266
  "UpdateReconciliationRequest",
2267
+ "UpdateReferenceDataRequest",
2264
2268
  "UpdateRelationshipDefinitionRequest",
2265
2269
  "UpdateStagingRuleSetRequest",
2266
2270
  "UpdateTaxRuleSetRequest",
lusid/api/__init__.py CHANGED
@@ -26,7 +26,7 @@ from lusid.api.derived_transaction_portfolios_api import DerivedTransactionPortf
26
26
  from lusid.api.entities_api import EntitiesApi
27
27
  from lusid.api.executions_api import ExecutionsApi
28
28
  from lusid.api.fee_types_api import FeeTypesApi
29
- from lusid.api.fund_configuration_entities_api import FundConfigurationEntitiesApi
29
+ from lusid.api.fund_configuration_api import FundConfigurationApi
30
30
  from lusid.api.funds_api import FundsApi
31
31
  from lusid.api.group_reconciliations_api import GroupReconciliationsApi
32
32
  from lusid.api.instrument_event_types_api import InstrumentEventTypesApi
@@ -97,7 +97,7 @@ __all__ = [
97
97
  "EntitiesApi",
98
98
  "ExecutionsApi",
99
99
  "FeeTypesApi",
100
- "FundConfigurationEntitiesApi",
100
+ "FundConfigurationApi",
101
101
  "FundsApi",
102
102
  "GroupReconciliationsApi",
103
103
  "InstrumentEventTypesApi",
@@ -24,10 +24,11 @@ from datetime import datetime
24
24
 
25
25
  from pydantic.v1 import Field, StrictStr, conint, conlist, constr, validator
26
26
 
27
- from typing import List, Optional
27
+ from typing import Dict, List, Optional
28
28
 
29
29
  from lusid.models.add_business_days_to_date_request import AddBusinessDaysToDateRequest
30
30
  from lusid.models.add_business_days_to_date_response import AddBusinessDaysToDateResponse
31
+ from lusid.models.batch_upsert_dates_for_calendar_response import BatchUpsertDatesForCalendarResponse
31
32
  from lusid.models.calendar import Calendar
32
33
  from lusid.models.calendar_date import CalendarDate
33
34
  from lusid.models.create_calendar_request import CreateCalendarRequest
@@ -398,6 +399,188 @@ class CalendarsApi:
398
399
  collection_formats=_collection_formats,
399
400
  _request_auth=_params.get('_request_auth'))
400
401
 
402
+ @overload
403
+ async def batch_upsert_dates_for_calendar(self, scope : Annotated[constr(strict=True, max_length=64, min_length=1), Field(..., description="Scope of the calendar")], code : Annotated[constr(strict=True, max_length=64, min_length=1), Field(..., description="Code of the calendar")], success_mode : Annotated[constr(strict=True, max_length=64, min_length=1), Field(..., description="Whether the batch request should fail Atomically or in a Partial fashion - Allowed Values: Atomic, Partial.")], request_body : Annotated[Dict[str, CreateDateRequest], Field(..., description="Create Date Requests of dates to upsert")], **kwargs) -> BatchUpsertDatesForCalendarResponse: # noqa: E501
404
+ ...
405
+
406
+ @overload
407
+ def batch_upsert_dates_for_calendar(self, scope : Annotated[constr(strict=True, max_length=64, min_length=1), Field(..., description="Scope of the calendar")], code : Annotated[constr(strict=True, max_length=64, min_length=1), Field(..., description="Code of the calendar")], success_mode : Annotated[constr(strict=True, max_length=64, min_length=1), Field(..., description="Whether the batch request should fail Atomically or in a Partial fashion - Allowed Values: Atomic, Partial.")], request_body : Annotated[Dict[str, CreateDateRequest], Field(..., description="Create Date Requests of dates to upsert")], async_req: Optional[bool]=True, **kwargs) -> BatchUpsertDatesForCalendarResponse: # noqa: E501
408
+ ...
409
+
410
+ @validate_arguments
411
+ def batch_upsert_dates_for_calendar(self, scope : Annotated[constr(strict=True, max_length=64, min_length=1), Field(..., description="Scope of the calendar")], code : Annotated[constr(strict=True, max_length=64, min_length=1), Field(..., description="Code of the calendar")], success_mode : Annotated[constr(strict=True, max_length=64, min_length=1), Field(..., description="Whether the batch request should fail Atomically or in a Partial fashion - Allowed Values: Atomic, Partial.")], request_body : Annotated[Dict[str, CreateDateRequest], Field(..., description="Create Date Requests of dates to upsert")], async_req: Optional[bool]=None, **kwargs) -> Union[BatchUpsertDatesForCalendarResponse, Awaitable[BatchUpsertDatesForCalendarResponse]]: # noqa: E501
412
+ """BatchUpsertDatesForCalendar: Batch upsert dates to a calendar # noqa: E501
413
+
414
+ Create or update events in the calendar. These Events can be a maximum of 24 hours and must be specified in UTC. A local date will be calculated by the system and applied to the calendar before processing. # noqa: E501
415
+ This method makes a synchronous HTTP request by default. To make an
416
+ asynchronous HTTP request, please pass async_req=True
417
+
418
+ >>> thread = api.batch_upsert_dates_for_calendar(scope, code, success_mode, request_body, async_req=True)
419
+ >>> result = thread.get()
420
+
421
+ :param scope: Scope of the calendar (required)
422
+ :type scope: str
423
+ :param code: Code of the calendar (required)
424
+ :type code: str
425
+ :param success_mode: Whether the batch request should fail Atomically or in a Partial fashion - Allowed Values: Atomic, Partial. (required)
426
+ :type success_mode: str
427
+ :param request_body: Create Date Requests of dates to upsert (required)
428
+ :type request_body: Dict[str, CreateDateRequest]
429
+ :param async_req: Whether to execute the request asynchronously.
430
+ :type async_req: bool, optional
431
+ :param _request_timeout: timeout setting for this request.
432
+ If one number provided, it will be total request
433
+ timeout. It can also be a pair (tuple) of
434
+ (connection, read) timeouts.
435
+ :return: Returns the result object.
436
+ If the method is called asynchronously,
437
+ returns the request thread.
438
+ :rtype: BatchUpsertDatesForCalendarResponse
439
+ """
440
+ kwargs['_return_http_data_only'] = True
441
+ if '_preload_content' in kwargs:
442
+ message = "Error! Please call the batch_upsert_dates_for_calendar_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501
443
+ raise ValueError(message)
444
+ if async_req is not None:
445
+ kwargs['async_req'] = async_req
446
+ return self.batch_upsert_dates_for_calendar_with_http_info(scope, code, success_mode, request_body, **kwargs) # noqa: E501
447
+
448
+ @validate_arguments
449
+ def batch_upsert_dates_for_calendar_with_http_info(self, scope : Annotated[constr(strict=True, max_length=64, min_length=1), Field(..., description="Scope of the calendar")], code : Annotated[constr(strict=True, max_length=64, min_length=1), Field(..., description="Code of the calendar")], success_mode : Annotated[constr(strict=True, max_length=64, min_length=1), Field(..., description="Whether the batch request should fail Atomically or in a Partial fashion - Allowed Values: Atomic, Partial.")], request_body : Annotated[Dict[str, CreateDateRequest], Field(..., description="Create Date Requests of dates to upsert")], **kwargs) -> ApiResponse: # noqa: E501
450
+ """BatchUpsertDatesForCalendar: Batch upsert dates to a calendar # noqa: E501
451
+
452
+ Create or update events in the calendar. These Events can be a maximum of 24 hours and must be specified in UTC. A local date will be calculated by the system and applied to the calendar before processing. # noqa: E501
453
+ This method makes a synchronous HTTP request by default. To make an
454
+ asynchronous HTTP request, please pass async_req=True
455
+
456
+ >>> thread = api.batch_upsert_dates_for_calendar_with_http_info(scope, code, success_mode, request_body, async_req=True)
457
+ >>> result = thread.get()
458
+
459
+ :param scope: Scope of the calendar (required)
460
+ :type scope: str
461
+ :param code: Code of the calendar (required)
462
+ :type code: str
463
+ :param success_mode: Whether the batch request should fail Atomically or in a Partial fashion - Allowed Values: Atomic, Partial. (required)
464
+ :type success_mode: str
465
+ :param request_body: Create Date Requests of dates to upsert (required)
466
+ :type request_body: Dict[str, CreateDateRequest]
467
+ :param async_req: Whether to execute the request asynchronously.
468
+ :type async_req: bool, optional
469
+ :param _preload_content: if False, the ApiResponse.data will
470
+ be set to none and raw_data will store the
471
+ HTTP response body without reading/decoding.
472
+ Default is True.
473
+ :type _preload_content: bool, optional
474
+ :param _return_http_data_only: response data instead of ApiResponse
475
+ object with status code, headers, etc
476
+ :type _return_http_data_only: bool, optional
477
+ :param _request_timeout: timeout setting for this request. If one
478
+ number provided, it will be total request
479
+ timeout. It can also be a pair (tuple) of
480
+ (connection, read) timeouts.
481
+ :param _request_auth: set to override the auth_settings for an a single
482
+ request; this effectively ignores the authentication
483
+ in the spec for a single request.
484
+ :type _request_auth: dict, optional
485
+ :type _content_type: string, optional: force content-type for the request
486
+ :return: Returns the result object.
487
+ If the method is called asynchronously,
488
+ returns the request thread.
489
+ :rtype: tuple(BatchUpsertDatesForCalendarResponse, status_code(int), headers(HTTPHeaderDict))
490
+ """
491
+
492
+ _params = locals()
493
+
494
+ _all_params = [
495
+ 'scope',
496
+ 'code',
497
+ 'success_mode',
498
+ 'request_body'
499
+ ]
500
+ _all_params.extend(
501
+ [
502
+ 'async_req',
503
+ '_return_http_data_only',
504
+ '_preload_content',
505
+ '_request_timeout',
506
+ '_request_auth',
507
+ '_content_type',
508
+ '_headers'
509
+ ]
510
+ )
511
+
512
+ # validate the arguments
513
+ for _key, _val in _params['kwargs'].items():
514
+ if _key not in _all_params:
515
+ raise ApiTypeError(
516
+ "Got an unexpected keyword argument '%s'"
517
+ " to method batch_upsert_dates_for_calendar" % _key
518
+ )
519
+ _params[_key] = _val
520
+ del _params['kwargs']
521
+
522
+ _collection_formats = {}
523
+
524
+ # process the path parameters
525
+ _path_params = {}
526
+ if _params['scope']:
527
+ _path_params['scope'] = _params['scope']
528
+
529
+ if _params['code']:
530
+ _path_params['code'] = _params['code']
531
+
532
+
533
+ # process the query parameters
534
+ _query_params = []
535
+ if _params.get('success_mode') is not None: # noqa: E501
536
+ _query_params.append(('successMode', _params['success_mode']))
537
+
538
+ # process the header parameters
539
+ _header_params = dict(_params.get('_headers', {}))
540
+ # process the form parameters
541
+ _form_params = []
542
+ _files = {}
543
+ # process the body parameter
544
+ _body_params = None
545
+ if _params['request_body'] is not None:
546
+ _body_params = _params['request_body']
547
+
548
+ # set the HTTP header `Accept`
549
+ _header_params['Accept'] = self.api_client.select_header_accept(
550
+ ['text/plain', 'application/json', 'text/json']) # noqa: E501
551
+
552
+ # set the HTTP header `Content-Type`
553
+ _content_types_list = _params.get('_content_type',
554
+ self.api_client.select_header_content_type(
555
+ ['application/json-patch+json', 'application/json', 'text/json', 'application/*+json']))
556
+ if _content_types_list:
557
+ _header_params['Content-Type'] = _content_types_list
558
+
559
+ # authentication setting
560
+ _auth_settings = ['oauth2'] # noqa: E501
561
+
562
+ _response_types_map = {
563
+ '200': "BatchUpsertDatesForCalendarResponse",
564
+ '400': "LusidValidationProblemDetails",
565
+ }
566
+
567
+ return self.api_client.call_api(
568
+ '/api/calendars/generic/{scope}/{code}/dates/$batchUpsert', 'POST',
569
+ _path_params,
570
+ _query_params,
571
+ _header_params,
572
+ body=_body_params,
573
+ post_params=_form_params,
574
+ files=_files,
575
+ response_types_map=_response_types_map,
576
+ auth_settings=_auth_settings,
577
+ async_req=_params.get('async_req'),
578
+ _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501
579
+ _preload_content=_params.get('_preload_content', True),
580
+ _request_timeout=_params.get('_request_timeout'),
581
+ collection_formats=_collection_formats,
582
+ _request_auth=_params.get('_request_auth'))
583
+
401
584
  @overload
402
585
  async def create_calendar(self, create_calendar_request : Annotated[CreateCalendarRequest, Field(..., description="A request to create the calendar")], **kwargs) -> Calendar: # noqa: E501
403
586
  ...
@@ -725,7 +908,7 @@ class CalendarsApi:
725
908
 
726
909
  @validate_arguments
727
910
  def delete_date_from_calendar(self, scope : Annotated[constr(strict=True, max_length=64, min_length=1), Field(..., description="Scope of the calendar")], code : Annotated[constr(strict=True, max_length=64, min_length=1), Field(..., description="Code of the calendar")], date_id : Annotated[constr(strict=True, max_length=256, min_length=1), Field(..., description="Identifier of the date to be removed")], async_req: Optional[bool]=None, **kwargs) -> Union[CalendarDate, Awaitable[CalendarDate]]: # noqa: E501
728
- """[EARLY ACCESS] DeleteDateFromCalendar: Remove a date from a calendar # noqa: E501
911
+ """DeleteDateFromCalendar: Remove a date from a calendar # noqa: E501
729
912
 
730
913
  Remove a date from a calendar. # noqa: E501
731
914
  This method makes a synchronous HTTP request by default. To make an
@@ -761,7 +944,7 @@ class CalendarsApi:
761
944
 
762
945
  @validate_arguments
763
946
  def delete_date_from_calendar_with_http_info(self, scope : Annotated[constr(strict=True, max_length=64, min_length=1), Field(..., description="Scope of the calendar")], code : Annotated[constr(strict=True, max_length=64, min_length=1), Field(..., description="Code of the calendar")], date_id : Annotated[constr(strict=True, max_length=256, min_length=1), Field(..., description="Identifier of the date to be removed")], **kwargs) -> ApiResponse: # noqa: E501
764
- """[EARLY ACCESS] DeleteDateFromCalendar: Remove a date from a calendar # noqa: E501
947
+ """DeleteDateFromCalendar: Remove a date from a calendar # noqa: E501
765
948
 
766
949
  Remove a date from a calendar. # noqa: E501
767
950
  This method makes a synchronous HTTP request by default. To make an
@@ -882,6 +1065,180 @@ class CalendarsApi:
882
1065
  collection_formats=_collection_formats,
883
1066
  _request_auth=_params.get('_request_auth'))
884
1067
 
1068
+ @overload
1069
+ async def delete_dates_from_calendar(self, scope : Annotated[constr(strict=True, max_length=64, min_length=1), Field(..., description="Scope of the calendar")], code : Annotated[constr(strict=True, max_length=64, min_length=1), Field(..., description="Code of the calendar")], request_body : Annotated[conlist(StrictStr), Field(..., description="Identifiers of the dates to be removed")], **kwargs) -> Dict[str, CalendarDate]: # noqa: E501
1070
+ ...
1071
+
1072
+ @overload
1073
+ def delete_dates_from_calendar(self, scope : Annotated[constr(strict=True, max_length=64, min_length=1), Field(..., description="Scope of the calendar")], code : Annotated[constr(strict=True, max_length=64, min_length=1), Field(..., description="Code of the calendar")], request_body : Annotated[conlist(StrictStr), Field(..., description="Identifiers of the dates to be removed")], async_req: Optional[bool]=True, **kwargs) -> Dict[str, CalendarDate]: # noqa: E501
1074
+ ...
1075
+
1076
+ @validate_arguments
1077
+ def delete_dates_from_calendar(self, scope : Annotated[constr(strict=True, max_length=64, min_length=1), Field(..., description="Scope of the calendar")], code : Annotated[constr(strict=True, max_length=64, min_length=1), Field(..., description="Code of the calendar")], request_body : Annotated[conlist(StrictStr), Field(..., description="Identifiers of the dates to be removed")], async_req: Optional[bool]=None, **kwargs) -> Union[Dict[str, CalendarDate], Awaitable[Dict[str, CalendarDate]]]: # noqa: E501
1078
+ """DeleteDatesFromCalendar: Delete dates from a calendar # noqa: E501
1079
+
1080
+ Delete dates from a calendar. # noqa: E501
1081
+ This method makes a synchronous HTTP request by default. To make an
1082
+ asynchronous HTTP request, please pass async_req=True
1083
+
1084
+ >>> thread = api.delete_dates_from_calendar(scope, code, request_body, async_req=True)
1085
+ >>> result = thread.get()
1086
+
1087
+ :param scope: Scope of the calendar (required)
1088
+ :type scope: str
1089
+ :param code: Code of the calendar (required)
1090
+ :type code: str
1091
+ :param request_body: Identifiers of the dates to be removed (required)
1092
+ :type request_body: List[str]
1093
+ :param async_req: Whether to execute the request asynchronously.
1094
+ :type async_req: bool, optional
1095
+ :param _request_timeout: timeout setting for this request.
1096
+ If one number provided, it will be total request
1097
+ timeout. It can also be a pair (tuple) of
1098
+ (connection, read) timeouts.
1099
+ :return: Returns the result object.
1100
+ If the method is called asynchronously,
1101
+ returns the request thread.
1102
+ :rtype: Dict[str, CalendarDate]
1103
+ """
1104
+ kwargs['_return_http_data_only'] = True
1105
+ if '_preload_content' in kwargs:
1106
+ message = "Error! Please call the delete_dates_from_calendar_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501
1107
+ raise ValueError(message)
1108
+ if async_req is not None:
1109
+ kwargs['async_req'] = async_req
1110
+ return self.delete_dates_from_calendar_with_http_info(scope, code, request_body, **kwargs) # noqa: E501
1111
+
1112
+ @validate_arguments
1113
+ def delete_dates_from_calendar_with_http_info(self, scope : Annotated[constr(strict=True, max_length=64, min_length=1), Field(..., description="Scope of the calendar")], code : Annotated[constr(strict=True, max_length=64, min_length=1), Field(..., description="Code of the calendar")], request_body : Annotated[conlist(StrictStr), Field(..., description="Identifiers of the dates to be removed")], **kwargs) -> ApiResponse: # noqa: E501
1114
+ """DeleteDatesFromCalendar: Delete dates from a calendar # noqa: E501
1115
+
1116
+ Delete dates from a calendar. # noqa: E501
1117
+ This method makes a synchronous HTTP request by default. To make an
1118
+ asynchronous HTTP request, please pass async_req=True
1119
+
1120
+ >>> thread = api.delete_dates_from_calendar_with_http_info(scope, code, request_body, async_req=True)
1121
+ >>> result = thread.get()
1122
+
1123
+ :param scope: Scope of the calendar (required)
1124
+ :type scope: str
1125
+ :param code: Code of the calendar (required)
1126
+ :type code: str
1127
+ :param request_body: Identifiers of the dates to be removed (required)
1128
+ :type request_body: List[str]
1129
+ :param async_req: Whether to execute the request asynchronously.
1130
+ :type async_req: bool, optional
1131
+ :param _preload_content: if False, the ApiResponse.data will
1132
+ be set to none and raw_data will store the
1133
+ HTTP response body without reading/decoding.
1134
+ Default is True.
1135
+ :type _preload_content: bool, optional
1136
+ :param _return_http_data_only: response data instead of ApiResponse
1137
+ object with status code, headers, etc
1138
+ :type _return_http_data_only: bool, optional
1139
+ :param _request_timeout: timeout setting for this request. If one
1140
+ number provided, it will be total request
1141
+ timeout. It can also be a pair (tuple) of
1142
+ (connection, read) timeouts.
1143
+ :param _request_auth: set to override the auth_settings for an a single
1144
+ request; this effectively ignores the authentication
1145
+ in the spec for a single request.
1146
+ :type _request_auth: dict, optional
1147
+ :type _content_type: string, optional: force content-type for the request
1148
+ :return: Returns the result object.
1149
+ If the method is called asynchronously,
1150
+ returns the request thread.
1151
+ :rtype: tuple(Dict[str, CalendarDate], status_code(int), headers(HTTPHeaderDict))
1152
+ """
1153
+
1154
+ _params = locals()
1155
+
1156
+ _all_params = [
1157
+ 'scope',
1158
+ 'code',
1159
+ 'request_body'
1160
+ ]
1161
+ _all_params.extend(
1162
+ [
1163
+ 'async_req',
1164
+ '_return_http_data_only',
1165
+ '_preload_content',
1166
+ '_request_timeout',
1167
+ '_request_auth',
1168
+ '_content_type',
1169
+ '_headers'
1170
+ ]
1171
+ )
1172
+
1173
+ # validate the arguments
1174
+ for _key, _val in _params['kwargs'].items():
1175
+ if _key not in _all_params:
1176
+ raise ApiTypeError(
1177
+ "Got an unexpected keyword argument '%s'"
1178
+ " to method delete_dates_from_calendar" % _key
1179
+ )
1180
+ _params[_key] = _val
1181
+ del _params['kwargs']
1182
+
1183
+ _collection_formats = {}
1184
+
1185
+ # process the path parameters
1186
+ _path_params = {}
1187
+ if _params['scope']:
1188
+ _path_params['scope'] = _params['scope']
1189
+
1190
+ if _params['code']:
1191
+ _path_params['code'] = _params['code']
1192
+
1193
+
1194
+ # process the query parameters
1195
+ _query_params = []
1196
+ # process the header parameters
1197
+ _header_params = dict(_params.get('_headers', {}))
1198
+ # process the form parameters
1199
+ _form_params = []
1200
+ _files = {}
1201
+ # process the body parameter
1202
+ _body_params = None
1203
+ if _params['request_body'] is not None:
1204
+ _body_params = _params['request_body']
1205
+
1206
+ # set the HTTP header `Accept`
1207
+ _header_params['Accept'] = self.api_client.select_header_accept(
1208
+ ['text/plain', 'application/json', 'text/json']) # noqa: E501
1209
+
1210
+ # set the HTTP header `Content-Type`
1211
+ _content_types_list = _params.get('_content_type',
1212
+ self.api_client.select_header_content_type(
1213
+ ['application/json-patch+json', 'application/json', 'text/json', 'application/*+json']))
1214
+ if _content_types_list:
1215
+ _header_params['Content-Type'] = _content_types_list
1216
+
1217
+ # authentication setting
1218
+ _auth_settings = ['oauth2'] # noqa: E501
1219
+
1220
+ _response_types_map = {
1221
+ '200': "Dict[str, CalendarDate]",
1222
+ '400': "LusidValidationProblemDetails",
1223
+ }
1224
+
1225
+ return self.api_client.call_api(
1226
+ '/api/calendars/generic/{scope}/{code}/dates/$delete', 'POST',
1227
+ _path_params,
1228
+ _query_params,
1229
+ _header_params,
1230
+ body=_body_params,
1231
+ post_params=_form_params,
1232
+ files=_files,
1233
+ response_types_map=_response_types_map,
1234
+ auth_settings=_auth_settings,
1235
+ async_req=_params.get('async_req'),
1236
+ _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501
1237
+ _preload_content=_params.get('_preload_content', True),
1238
+ _request_timeout=_params.get('_request_timeout'),
1239
+ collection_formats=_collection_formats,
1240
+ _request_auth=_params.get('_request_auth'))
1241
+
885
1242
  @overload
886
1243
  async def generate_schedule(self, scope : Annotated[constr(strict=True, max_length=64, min_length=1), Field(..., description="Scope of the calendars to use")], valuation_schedule : Annotated[ValuationSchedule, Field(..., description="The ValuationSchedule to generate schedule dates from")], as_at : Annotated[Optional[datetime], Field(description="Optional AsAt for searching the calendar store. Defaults to Latest.")] = None, **kwargs) -> List[datetime]: # noqa: E501
887
1244
  ...
@@ -34,6 +34,7 @@ from lusid.models.paged_resource_list_of_data_type_summary import PagedResourceL
34
34
  from lusid.models.resource_list_of_data_type import ResourceListOfDataType
35
35
  from lusid.models.resource_list_of_i_unit_definition_dto import ResourceListOfIUnitDefinitionDto
36
36
  from lusid.models.update_data_type_request import UpdateDataTypeRequest
37
+ from lusid.models.update_reference_data_request import UpdateReferenceDataRequest
37
38
 
38
39
  from lusid.api_client import ApiClient
39
40
  from lusid.api_response import ApiResponse
@@ -1285,6 +1286,180 @@ class DataTypesApi:
1285
1286
  collection_formats=_collection_formats,
1286
1287
  _request_auth=_params.get('_request_auth'))
1287
1288
 
1289
+ @overload
1290
+ async def update_reference_data(self, scope : Annotated[constr(strict=True, max_length=64, min_length=1), Field(..., description="The scope of the data type")], code : Annotated[constr(strict=True, max_length=64, min_length=1), Field(..., description="The code of the data type")], update_reference_data_request : Annotated[UpdateReferenceDataRequest, Field(..., description="The updated reference data")], **kwargs) -> DataType: # noqa: E501
1291
+ ...
1292
+
1293
+ @overload
1294
+ def update_reference_data(self, scope : Annotated[constr(strict=True, max_length=64, min_length=1), Field(..., description="The scope of the data type")], code : Annotated[constr(strict=True, max_length=64, min_length=1), Field(..., description="The code of the data type")], update_reference_data_request : Annotated[UpdateReferenceDataRequest, Field(..., description="The updated reference data")], async_req: Optional[bool]=True, **kwargs) -> DataType: # noqa: E501
1295
+ ...
1296
+
1297
+ @validate_arguments
1298
+ def update_reference_data(self, scope : Annotated[constr(strict=True, max_length=64, min_length=1), Field(..., description="The scope of the data type")], code : Annotated[constr(strict=True, max_length=64, min_length=1), Field(..., description="The code of the data type")], update_reference_data_request : Annotated[UpdateReferenceDataRequest, Field(..., description="The updated reference data")], async_req: Optional[bool]=None, **kwargs) -> Union[DataType, Awaitable[DataType]]: # noqa: E501
1299
+ """[EARLY ACCESS] UpdateReferenceData: Update all reference data on a data type, includes the reference values, the field definitions, field values # noqa: E501
1300
+
1301
+ Replaces the whole set of reference data # noqa: E501
1302
+ This method makes a synchronous HTTP request by default. To make an
1303
+ asynchronous HTTP request, please pass async_req=True
1304
+
1305
+ >>> thread = api.update_reference_data(scope, code, update_reference_data_request, async_req=True)
1306
+ >>> result = thread.get()
1307
+
1308
+ :param scope: The scope of the data type (required)
1309
+ :type scope: str
1310
+ :param code: The code of the data type (required)
1311
+ :type code: str
1312
+ :param update_reference_data_request: The updated reference data (required)
1313
+ :type update_reference_data_request: UpdateReferenceDataRequest
1314
+ :param async_req: Whether to execute the request asynchronously.
1315
+ :type async_req: bool, optional
1316
+ :param _request_timeout: timeout setting for this request.
1317
+ If one number provided, it will be total request
1318
+ timeout. It can also be a pair (tuple) of
1319
+ (connection, read) timeouts.
1320
+ :return: Returns the result object.
1321
+ If the method is called asynchronously,
1322
+ returns the request thread.
1323
+ :rtype: DataType
1324
+ """
1325
+ kwargs['_return_http_data_only'] = True
1326
+ if '_preload_content' in kwargs:
1327
+ message = "Error! Please call the update_reference_data_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501
1328
+ raise ValueError(message)
1329
+ if async_req is not None:
1330
+ kwargs['async_req'] = async_req
1331
+ return self.update_reference_data_with_http_info(scope, code, update_reference_data_request, **kwargs) # noqa: E501
1332
+
1333
+ @validate_arguments
1334
+ def update_reference_data_with_http_info(self, scope : Annotated[constr(strict=True, max_length=64, min_length=1), Field(..., description="The scope of the data type")], code : Annotated[constr(strict=True, max_length=64, min_length=1), Field(..., description="The code of the data type")], update_reference_data_request : Annotated[UpdateReferenceDataRequest, Field(..., description="The updated reference data")], **kwargs) -> ApiResponse: # noqa: E501
1335
+ """[EARLY ACCESS] UpdateReferenceData: Update all reference data on a data type, includes the reference values, the field definitions, field values # noqa: E501
1336
+
1337
+ Replaces the whole set of reference data # noqa: E501
1338
+ This method makes a synchronous HTTP request by default. To make an
1339
+ asynchronous HTTP request, please pass async_req=True
1340
+
1341
+ >>> thread = api.update_reference_data_with_http_info(scope, code, update_reference_data_request, async_req=True)
1342
+ >>> result = thread.get()
1343
+
1344
+ :param scope: The scope of the data type (required)
1345
+ :type scope: str
1346
+ :param code: The code of the data type (required)
1347
+ :type code: str
1348
+ :param update_reference_data_request: The updated reference data (required)
1349
+ :type update_reference_data_request: UpdateReferenceDataRequest
1350
+ :param async_req: Whether to execute the request asynchronously.
1351
+ :type async_req: bool, optional
1352
+ :param _preload_content: if False, the ApiResponse.data will
1353
+ be set to none and raw_data will store the
1354
+ HTTP response body without reading/decoding.
1355
+ Default is True.
1356
+ :type _preload_content: bool, optional
1357
+ :param _return_http_data_only: response data instead of ApiResponse
1358
+ object with status code, headers, etc
1359
+ :type _return_http_data_only: bool, optional
1360
+ :param _request_timeout: timeout setting for this request. If one
1361
+ number provided, it will be total request
1362
+ timeout. It can also be a pair (tuple) of
1363
+ (connection, read) timeouts.
1364
+ :param _request_auth: set to override the auth_settings for an a single
1365
+ request; this effectively ignores the authentication
1366
+ in the spec for a single request.
1367
+ :type _request_auth: dict, optional
1368
+ :type _content_type: string, optional: force content-type for the request
1369
+ :return: Returns the result object.
1370
+ If the method is called asynchronously,
1371
+ returns the request thread.
1372
+ :rtype: tuple(DataType, status_code(int), headers(HTTPHeaderDict))
1373
+ """
1374
+
1375
+ _params = locals()
1376
+
1377
+ _all_params = [
1378
+ 'scope',
1379
+ 'code',
1380
+ 'update_reference_data_request'
1381
+ ]
1382
+ _all_params.extend(
1383
+ [
1384
+ 'async_req',
1385
+ '_return_http_data_only',
1386
+ '_preload_content',
1387
+ '_request_timeout',
1388
+ '_request_auth',
1389
+ '_content_type',
1390
+ '_headers'
1391
+ ]
1392
+ )
1393
+
1394
+ # validate the arguments
1395
+ for _key, _val in _params['kwargs'].items():
1396
+ if _key not in _all_params:
1397
+ raise ApiTypeError(
1398
+ "Got an unexpected keyword argument '%s'"
1399
+ " to method update_reference_data" % _key
1400
+ )
1401
+ _params[_key] = _val
1402
+ del _params['kwargs']
1403
+
1404
+ _collection_formats = {}
1405
+
1406
+ # process the path parameters
1407
+ _path_params = {}
1408
+ if _params['scope']:
1409
+ _path_params['scope'] = _params['scope']
1410
+
1411
+ if _params['code']:
1412
+ _path_params['code'] = _params['code']
1413
+
1414
+
1415
+ # process the query parameters
1416
+ _query_params = []
1417
+ # process the header parameters
1418
+ _header_params = dict(_params.get('_headers', {}))
1419
+ # process the form parameters
1420
+ _form_params = []
1421
+ _files = {}
1422
+ # process the body parameter
1423
+ _body_params = None
1424
+ if _params['update_reference_data_request'] is not None:
1425
+ _body_params = _params['update_reference_data_request']
1426
+
1427
+ # set the HTTP header `Accept`
1428
+ _header_params['Accept'] = self.api_client.select_header_accept(
1429
+ ['text/plain', 'application/json', 'text/json']) # noqa: E501
1430
+
1431
+ # set the HTTP header `Content-Type`
1432
+ _content_types_list = _params.get('_content_type',
1433
+ self.api_client.select_header_content_type(
1434
+ ['application/json-patch+json', 'application/json', 'text/json', 'application/*+json']))
1435
+ if _content_types_list:
1436
+ _header_params['Content-Type'] = _content_types_list
1437
+
1438
+ # authentication setting
1439
+ _auth_settings = ['oauth2'] # noqa: E501
1440
+
1441
+ _response_types_map = {
1442
+ '200': "DataType",
1443
+ '400': "LusidValidationProblemDetails",
1444
+ }
1445
+
1446
+ return self.api_client.call_api(
1447
+ '/api/datatypes/{scope}/{code}/referencedata', 'PUT',
1448
+ _path_params,
1449
+ _query_params,
1450
+ _header_params,
1451
+ body=_body_params,
1452
+ post_params=_form_params,
1453
+ files=_files,
1454
+ response_types_map=_response_types_map,
1455
+ auth_settings=_auth_settings,
1456
+ async_req=_params.get('async_req'),
1457
+ _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501
1458
+ _preload_content=_params.get('_preload_content', True),
1459
+ _request_timeout=_params.get('_request_timeout'),
1460
+ collection_formats=_collection_formats,
1461
+ _request_auth=_params.get('_request_auth'))
1462
+
1288
1463
  @overload
1289
1464
  async def update_reference_values(self, scope : Annotated[constr(strict=True, max_length=64, min_length=1), Field(..., description="The scope of the data type")], code : Annotated[constr(strict=True, max_length=64, min_length=1), Field(..., description="The code of the data type")], field_value : Annotated[conlist(FieldValue), Field(..., description="The updated reference values")], **kwargs) -> DataType: # noqa: E501
1290
1465
  ...