lusid-sdk 2.1.157__py3-none-any.whl → 2.1.198__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of lusid-sdk might be problematic. Click here for more details.

Files changed (64) hide show
  1. lusid/__init__.py +10 -0
  2. lusid/api/amortisation_rule_sets_api.py +1 -1
  3. lusid/api/chart_of_accounts_api.py +365 -0
  4. lusid/api/entities_api.py +18 -9
  5. lusid/api/fee_types_api.py +1 -1
  6. lusid/api/funds_api.py +259 -76
  7. lusid/api/relations_api.py +1 -1
  8. lusid/configuration.py +1 -1
  9. lusid/models/__init__.py +10 -0
  10. lusid/models/accumulation_event.py +3 -3
  11. lusid/models/amortisation_event.py +3 -3
  12. lusid/models/applicable_instrument_event.py +9 -4
  13. lusid/models/bond_coupon_event.py +3 -3
  14. lusid/models/bond_default_event.py +3 -3
  15. lusid/models/bond_principal_event.py +3 -3
  16. lusid/models/capital_distribution_event.py +3 -3
  17. lusid/models/cash_and_security_offer_election.py +90 -0
  18. lusid/models/cash_dividend_event.py +3 -3
  19. lusid/models/cash_flow_event.py +3 -3
  20. lusid/models/cash_offer_election.py +77 -0
  21. lusid/models/close_event.py +3 -3
  22. lusid/models/create_derived_property_definition_request.py +3 -3
  23. lusid/models/create_property_definition_request.py +3 -3
  24. lusid/models/dividend_option_event.py +3 -3
  25. lusid/models/dividend_reinvestment_event.py +3 -3
  26. lusid/models/exercise_event.py +3 -3
  27. lusid/models/expiry_event.py +3 -3
  28. lusid/models/fee.py +3 -3
  29. lusid/models/fee_accrual.py +4 -2
  30. lusid/models/fee_properties.py +115 -0
  31. lusid/models/fee_request.py +3 -3
  32. lusid/models/float_schedule.py +5 -3
  33. lusid/models/fx_forward_settlement_event.py +3 -3
  34. lusid/models/group_filter_step.py +2 -11
  35. lusid/models/informational_error_event.py +3 -3
  36. lusid/models/informational_event.py +3 -3
  37. lusid/models/instrument_event.py +6 -5
  38. lusid/models/instrument_event_type.py +1 -0
  39. lusid/models/journal_entry_lines_query_parameters.py +1 -1
  40. lusid/models/maturity_event.py +3 -3
  41. lusid/models/merger_event.py +172 -0
  42. lusid/models/open_event.py +3 -3
  43. lusid/models/portfolio_details.py +7 -1
  44. lusid/models/portfolio_entity.py +13 -1
  45. lusid/models/portfolio_properties.py +7 -1
  46. lusid/models/property_definition.py +3 -3
  47. lusid/models/property_definition_search_result.py +3 -3
  48. lusid/models/property_domain.py +1 -0
  49. lusid/models/raw_vendor_event.py +3 -3
  50. lusid/models/reset_event.py +3 -3
  51. lusid/models/reverse_stock_split_event.py +3 -3
  52. lusid/models/scrip_dividend_event.py +3 -3
  53. lusid/models/security_offer_election.py +79 -0
  54. lusid/models/spin_off_event.py +3 -3
  55. lusid/models/stock_dividend_event.py +3 -3
  56. lusid/models/stock_split_event.py +3 -3
  57. lusid/models/transaction_type_calculation.py +11 -3
  58. lusid/models/transition_event.py +3 -3
  59. lusid/models/trial_balance_query_parameters.py +1 -1
  60. lusid/models/trigger_event.py +3 -3
  61. lusid/models/upsert_valuation_point_request.py +2 -15
  62. {lusid_sdk-2.1.157.dist-info → lusid_sdk-2.1.198.dist-info}/METADATA +15 -7
  63. {lusid_sdk-2.1.157.dist-info → lusid_sdk-2.1.198.dist-info}/RECORD +64 -59
  64. {lusid_sdk-2.1.157.dist-info → lusid_sdk-2.1.198.dist-info}/WHEEL +0 -0
lusid/__init__.py CHANGED
@@ -186,6 +186,7 @@ from lusid.models.calendar_date import CalendarDate
186
186
  from lusid.models.calendar_dependency import CalendarDependency
187
187
  from lusid.models.cap_floor import CapFloor
188
188
  from lusid.models.capital_distribution_event import CapitalDistributionEvent
189
+ from lusid.models.cash_and_security_offer_election import CashAndSecurityOfferElection
189
190
  from lusid.models.cash_dependency import CashDependency
190
191
  from lusid.models.cash_dividend_event import CashDividendEvent
191
192
  from lusid.models.cash_election import CashElection
@@ -194,6 +195,7 @@ from lusid.models.cash_flow_lineage import CashFlowLineage
194
195
  from lusid.models.cash_flow_value import CashFlowValue
195
196
  from lusid.models.cash_flow_value_set import CashFlowValueSet
196
197
  from lusid.models.cash_ladder_record import CashLadderRecord
198
+ from lusid.models.cash_offer_election import CashOfferElection
197
199
  from lusid.models.cash_perpetual import CashPerpetual
198
200
  from lusid.models.cds_flow_conventions import CdsFlowConventions
199
201
  from lusid.models.cds_index import CdsIndex
@@ -388,6 +390,7 @@ from lusid.models.expanded_group import ExpandedGroup
388
390
  from lusid.models.expiry_event import ExpiryEvent
389
391
  from lusid.models.fee import Fee
390
392
  from lusid.models.fee_accrual import FeeAccrual
393
+ from lusid.models.fee_properties import FeeProperties
391
394
  from lusid.models.fee_request import FeeRequest
392
395
  from lusid.models.fee_rule import FeeRule
393
396
  from lusid.models.fee_rule_upsert_request import FeeRuleUpsertRequest
@@ -555,6 +558,7 @@ from lusid.models.market_options import MarketOptions
555
558
  from lusid.models.market_quote import MarketQuote
556
559
  from lusid.models.match_criterion import MatchCriterion
557
560
  from lusid.models.maturity_event import MaturityEvent
561
+ from lusid.models.merger_event import MergerEvent
558
562
  from lusid.models.metric_value import MetricValue
559
563
  from lusid.models.model_options import ModelOptions
560
564
  from lusid.models.model_options_type import ModelOptionsType
@@ -883,6 +887,7 @@ from lusid.models.scope_definition import ScopeDefinition
883
887
  from lusid.models.scrip_dividend_event import ScripDividendEvent
884
888
  from lusid.models.script_map_reference import ScriptMapReference
885
889
  from lusid.models.security_election import SecurityElection
890
+ from lusid.models.security_offer_election import SecurityOfferElection
886
891
  from lusid.models.sequence_definition import SequenceDefinition
887
892
  from lusid.models.set_amortisation_rules_request import SetAmortisationRulesRequest
888
893
  from lusid.models.set_legal_entity_identifiers_request import SetLegalEntityIdentifiersRequest
@@ -1253,6 +1258,7 @@ __all__ = [
1253
1258
  "CalendarDependency",
1254
1259
  "CapFloor",
1255
1260
  "CapitalDistributionEvent",
1261
+ "CashAndSecurityOfferElection",
1256
1262
  "CashDependency",
1257
1263
  "CashDividendEvent",
1258
1264
  "CashElection",
@@ -1261,6 +1267,7 @@ __all__ = [
1261
1267
  "CashFlowValue",
1262
1268
  "CashFlowValueSet",
1263
1269
  "CashLadderRecord",
1270
+ "CashOfferElection",
1264
1271
  "CashPerpetual",
1265
1272
  "CdsFlowConventions",
1266
1273
  "CdsIndex",
@@ -1455,6 +1462,7 @@ __all__ = [
1455
1462
  "ExpiryEvent",
1456
1463
  "Fee",
1457
1464
  "FeeAccrual",
1465
+ "FeeProperties",
1458
1466
  "FeeRequest",
1459
1467
  "FeeRule",
1460
1468
  "FeeRuleUpsertRequest",
@@ -1622,6 +1630,7 @@ __all__ = [
1622
1630
  "MarketQuote",
1623
1631
  "MatchCriterion",
1624
1632
  "MaturityEvent",
1633
+ "MergerEvent",
1625
1634
  "MetricValue",
1626
1635
  "ModelOptions",
1627
1636
  "ModelOptionsType",
@@ -1950,6 +1959,7 @@ __all__ = [
1950
1959
  "ScripDividendEvent",
1951
1960
  "ScriptMapReference",
1952
1961
  "SecurityElection",
1962
+ "SecurityOfferElection",
1953
1963
  "SequenceDefinition",
1954
1964
  "SetAmortisationRulesRequest",
1955
1965
  "SetLegalEntityIdentifiersRequest",
@@ -198,7 +198,7 @@ class AmortisationRuleSetsApi:
198
198
  _auth_settings = ['oauth2'] # noqa: E501
199
199
 
200
200
  _response_types_map = {
201
- '200': "AmortisationRuleSet",
201
+ '201': "AmortisationRuleSet",
202
202
  '400': "LusidValidationProblemDetails",
203
203
  }
204
204
 
@@ -43,6 +43,7 @@ from lusid.models.general_ledger_profile_mapping import GeneralLedgerProfileMapp
43
43
  from lusid.models.general_ledger_profile_request import GeneralLedgerProfileRequest
44
44
  from lusid.models.general_ledger_profile_response import GeneralLedgerProfileResponse
45
45
  from lusid.models.model_property import ModelProperty
46
+ from lusid.models.operation import Operation
46
47
  from lusid.models.paged_resource_list_of_account import PagedResourceListOfAccount
47
48
  from lusid.models.paged_resource_list_of_chart_of_accounts import PagedResourceListOfChartOfAccounts
48
49
  from lusid.models.paged_resource_list_of_cleardown_module_response import PagedResourceListOfCleardownModuleResponse
@@ -3950,6 +3951,370 @@ class ChartOfAccountsApi:
3950
3951
  collection_formats=_collection_formats,
3951
3952
  _request_auth=_params.get('_request_auth'))
3952
3953
 
3954
+ @overload
3955
+ async def patch_cleardown_module(self, scope : Annotated[constr(strict=True, max_length=64, min_length=1), Field(..., description="The scope of the Chart of Accounts.")], code : Annotated[constr(strict=True, max_length=64, min_length=1), Field(..., description="The code of the Chart of Accounts. Together with the scope this uniquely identifies the Chart of Accounts.")], cleardown_module_code : Annotated[constr(strict=True, max_length=64, min_length=1), Field(..., description="The code of the Cleardown Module to be updated.")], operation : Annotated[conlist(Operation), Field(..., description="The json patch document. For more information see: https://datatracker.ietf.org/doc/html/rfc6902.")], **kwargs) -> CleardownModuleResponse: # noqa: E501
3956
+ ...
3957
+
3958
+ @overload
3959
+ def patch_cleardown_module(self, scope : Annotated[constr(strict=True, max_length=64, min_length=1), Field(..., description="The scope of the Chart of Accounts.")], code : Annotated[constr(strict=True, max_length=64, min_length=1), Field(..., description="The code of the Chart of Accounts. Together with the scope this uniquely identifies the Chart of Accounts.")], cleardown_module_code : Annotated[constr(strict=True, max_length=64, min_length=1), Field(..., description="The code of the Cleardown Module to be updated.")], operation : Annotated[conlist(Operation), Field(..., description="The json patch document. For more information see: https://datatracker.ietf.org/doc/html/rfc6902.")], async_req: Optional[bool]=True, **kwargs) -> CleardownModuleResponse: # noqa: E501
3960
+ ...
3961
+
3962
+ @validate_arguments
3963
+ def patch_cleardown_module(self, scope : Annotated[constr(strict=True, max_length=64, min_length=1), Field(..., description="The scope of the Chart of Accounts.")], code : Annotated[constr(strict=True, max_length=64, min_length=1), Field(..., description="The code of the Chart of Accounts. Together with the scope this uniquely identifies the Chart of Accounts.")], cleardown_module_code : Annotated[constr(strict=True, max_length=64, min_length=1), Field(..., description="The code of the Cleardown Module to be updated.")], operation : Annotated[conlist(Operation), Field(..., description="The json patch document. For more information see: https://datatracker.ietf.org/doc/html/rfc6902.")], async_req: Optional[bool]=None, **kwargs) -> Union[CleardownModuleResponse, Awaitable[CleardownModuleResponse]]: # noqa: E501
3964
+ """[EXPERIMENTAL] PatchCleardownModule: Patch a Cleardown Module # noqa: E501
3965
+
3966
+ Update fields on a Cleardown Module. The behaviour is defined by the JSON Patch specification. Currently supported fields are: DisplayName, Description, Rules. # noqa: E501
3967
+ This method makes a synchronous HTTP request by default. To make an
3968
+ asynchronous HTTP request, please pass async_req=True
3969
+
3970
+ >>> thread = api.patch_cleardown_module(scope, code, cleardown_module_code, operation, async_req=True)
3971
+ >>> result = thread.get()
3972
+
3973
+ :param scope: The scope of the Chart of Accounts. (required)
3974
+ :type scope: str
3975
+ :param code: The code of the Chart of Accounts. Together with the scope this uniquely identifies the Chart of Accounts. (required)
3976
+ :type code: str
3977
+ :param cleardown_module_code: The code of the Cleardown Module to be updated. (required)
3978
+ :type cleardown_module_code: str
3979
+ :param operation: The json patch document. For more information see: https://datatracker.ietf.org/doc/html/rfc6902. (required)
3980
+ :type operation: List[Operation]
3981
+ :param async_req: Whether to execute the request asynchronously.
3982
+ :type async_req: bool, optional
3983
+ :param _request_timeout: timeout setting for this request.
3984
+ If one number provided, it will be total request
3985
+ timeout. It can also be a pair (tuple) of
3986
+ (connection, read) timeouts.
3987
+ :return: Returns the result object.
3988
+ If the method is called asynchronously,
3989
+ returns the request thread.
3990
+ :rtype: CleardownModuleResponse
3991
+ """
3992
+ kwargs['_return_http_data_only'] = True
3993
+ if '_preload_content' in kwargs:
3994
+ message = "Error! Please call the patch_cleardown_module_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501
3995
+ raise ValueError(message)
3996
+ if async_req is not None:
3997
+ kwargs['async_req'] = async_req
3998
+ return self.patch_cleardown_module_with_http_info(scope, code, cleardown_module_code, operation, **kwargs) # noqa: E501
3999
+
4000
+ @validate_arguments
4001
+ def patch_cleardown_module_with_http_info(self, scope : Annotated[constr(strict=True, max_length=64, min_length=1), Field(..., description="The scope of the Chart of Accounts.")], code : Annotated[constr(strict=True, max_length=64, min_length=1), Field(..., description="The code of the Chart of Accounts. Together with the scope this uniquely identifies the Chart of Accounts.")], cleardown_module_code : Annotated[constr(strict=True, max_length=64, min_length=1), Field(..., description="The code of the Cleardown Module to be updated.")], operation : Annotated[conlist(Operation), Field(..., description="The json patch document. For more information see: https://datatracker.ietf.org/doc/html/rfc6902.")], **kwargs) -> ApiResponse: # noqa: E501
4002
+ """[EXPERIMENTAL] PatchCleardownModule: Patch a Cleardown Module # noqa: E501
4003
+
4004
+ Update fields on a Cleardown Module. The behaviour is defined by the JSON Patch specification. Currently supported fields are: DisplayName, Description, Rules. # noqa: E501
4005
+ This method makes a synchronous HTTP request by default. To make an
4006
+ asynchronous HTTP request, please pass async_req=True
4007
+
4008
+ >>> thread = api.patch_cleardown_module_with_http_info(scope, code, cleardown_module_code, operation, async_req=True)
4009
+ >>> result = thread.get()
4010
+
4011
+ :param scope: The scope of the Chart of Accounts. (required)
4012
+ :type scope: str
4013
+ :param code: The code of the Chart of Accounts. Together with the scope this uniquely identifies the Chart of Accounts. (required)
4014
+ :type code: str
4015
+ :param cleardown_module_code: The code of the Cleardown Module to be updated. (required)
4016
+ :type cleardown_module_code: str
4017
+ :param operation: The json patch document. For more information see: https://datatracker.ietf.org/doc/html/rfc6902. (required)
4018
+ :type operation: List[Operation]
4019
+ :param async_req: Whether to execute the request asynchronously.
4020
+ :type async_req: bool, optional
4021
+ :param _preload_content: if False, the ApiResponse.data will
4022
+ be set to none and raw_data will store the
4023
+ HTTP response body without reading/decoding.
4024
+ Default is True.
4025
+ :type _preload_content: bool, optional
4026
+ :param _return_http_data_only: response data instead of ApiResponse
4027
+ object with status code, headers, etc
4028
+ :type _return_http_data_only: bool, optional
4029
+ :param _request_timeout: timeout setting for this request. If one
4030
+ number provided, it will be total request
4031
+ timeout. It can also be a pair (tuple) of
4032
+ (connection, read) timeouts.
4033
+ :param _request_auth: set to override the auth_settings for an a single
4034
+ request; this effectively ignores the authentication
4035
+ in the spec for a single request.
4036
+ :type _request_auth: dict, optional
4037
+ :type _content_type: string, optional: force content-type for the request
4038
+ :return: Returns the result object.
4039
+ If the method is called asynchronously,
4040
+ returns the request thread.
4041
+ :rtype: tuple(CleardownModuleResponse, status_code(int), headers(HTTPHeaderDict))
4042
+ """
4043
+
4044
+ _params = locals()
4045
+
4046
+ _all_params = [
4047
+ 'scope',
4048
+ 'code',
4049
+ 'cleardown_module_code',
4050
+ 'operation'
4051
+ ]
4052
+ _all_params.extend(
4053
+ [
4054
+ 'async_req',
4055
+ '_return_http_data_only',
4056
+ '_preload_content',
4057
+ '_request_timeout',
4058
+ '_request_auth',
4059
+ '_content_type',
4060
+ '_headers'
4061
+ ]
4062
+ )
4063
+
4064
+ # validate the arguments
4065
+ for _key, _val in _params['kwargs'].items():
4066
+ if _key not in _all_params:
4067
+ raise ApiTypeError(
4068
+ "Got an unexpected keyword argument '%s'"
4069
+ " to method patch_cleardown_module" % _key
4070
+ )
4071
+ _params[_key] = _val
4072
+ del _params['kwargs']
4073
+
4074
+ _collection_formats = {}
4075
+
4076
+ # process the path parameters
4077
+ _path_params = {}
4078
+ if _params['scope']:
4079
+ _path_params['scope'] = _params['scope']
4080
+
4081
+ if _params['code']:
4082
+ _path_params['code'] = _params['code']
4083
+
4084
+ if _params['cleardown_module_code']:
4085
+ _path_params['cleardownModuleCode'] = _params['cleardown_module_code']
4086
+
4087
+
4088
+ # process the query parameters
4089
+ _query_params = []
4090
+ # process the header parameters
4091
+ _header_params = dict(_params.get('_headers', {}))
4092
+ # process the form parameters
4093
+ _form_params = []
4094
+ _files = {}
4095
+ # process the body parameter
4096
+ _body_params = None
4097
+ if _params['operation'] is not None:
4098
+ _body_params = _params['operation']
4099
+
4100
+ # set the HTTP header `Accept`
4101
+ _header_params['Accept'] = self.api_client.select_header_accept(
4102
+ ['text/plain', 'application/json', 'text/json']) # noqa: E501
4103
+
4104
+ # set the HTTP header `Content-Type`
4105
+ _content_types_list = _params.get('_content_type',
4106
+ self.api_client.select_header_content_type(
4107
+ ['application/json-patch+json', 'application/json', 'text/json', 'application/*+json']))
4108
+ if _content_types_list:
4109
+ _header_params['Content-Type'] = _content_types_list
4110
+
4111
+ # authentication setting
4112
+ _auth_settings = ['oauth2'] # noqa: E501
4113
+
4114
+ _response_types_map = {
4115
+ '200': "CleardownModuleResponse",
4116
+ '400': "LusidValidationProblemDetails",
4117
+ }
4118
+
4119
+ return self.api_client.call_api(
4120
+ '/api/chartofaccounts/{scope}/{code}/cleardownmodules/{cleardownModuleCode}', 'PATCH',
4121
+ _path_params,
4122
+ _query_params,
4123
+ _header_params,
4124
+ body=_body_params,
4125
+ post_params=_form_params,
4126
+ files=_files,
4127
+ response_types_map=_response_types_map,
4128
+ auth_settings=_auth_settings,
4129
+ async_req=_params.get('async_req'),
4130
+ _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501
4131
+ _preload_content=_params.get('_preload_content', True),
4132
+ _request_timeout=_params.get('_request_timeout'),
4133
+ collection_formats=_collection_formats,
4134
+ _request_auth=_params.get('_request_auth'))
4135
+
4136
+ @overload
4137
+ async def patch_posting_module(self, scope : Annotated[constr(strict=True, max_length=64, min_length=1), Field(..., description="The scope of the Chart of Accounts.")], code : Annotated[constr(strict=True, max_length=64, min_length=1), Field(..., description="The code of the Chart of Accounts. Together with the scope this uniquely identifies the Chart of Accounts.")], posting_module_code : Annotated[constr(strict=True, max_length=64, min_length=1), Field(..., description="The code of the Posting Module to be updated.")], operation : Annotated[conlist(Operation), Field(..., description="The json patch document. For more information see: https://datatracker.ietf.org/doc/html/rfc6902.")], **kwargs) -> PostingModuleResponse: # noqa: E501
4138
+ ...
4139
+
4140
+ @overload
4141
+ def patch_posting_module(self, scope : Annotated[constr(strict=True, max_length=64, min_length=1), Field(..., description="The scope of the Chart of Accounts.")], code : Annotated[constr(strict=True, max_length=64, min_length=1), Field(..., description="The code of the Chart of Accounts. Together with the scope this uniquely identifies the Chart of Accounts.")], posting_module_code : Annotated[constr(strict=True, max_length=64, min_length=1), Field(..., description="The code of the Posting Module to be updated.")], operation : Annotated[conlist(Operation), Field(..., description="The json patch document. For more information see: https://datatracker.ietf.org/doc/html/rfc6902.")], async_req: Optional[bool]=True, **kwargs) -> PostingModuleResponse: # noqa: E501
4142
+ ...
4143
+
4144
+ @validate_arguments
4145
+ def patch_posting_module(self, scope : Annotated[constr(strict=True, max_length=64, min_length=1), Field(..., description="The scope of the Chart of Accounts.")], code : Annotated[constr(strict=True, max_length=64, min_length=1), Field(..., description="The code of the Chart of Accounts. Together with the scope this uniquely identifies the Chart of Accounts.")], posting_module_code : Annotated[constr(strict=True, max_length=64, min_length=1), Field(..., description="The code of the Posting Module to be updated.")], operation : Annotated[conlist(Operation), Field(..., description="The json patch document. For more information see: https://datatracker.ietf.org/doc/html/rfc6902.")], async_req: Optional[bool]=None, **kwargs) -> Union[PostingModuleResponse, Awaitable[PostingModuleResponse]]: # noqa: E501
4146
+ """[EXPERIMENTAL] PatchPostingModule: Patch a Posting Module # noqa: E501
4147
+
4148
+ Update fields on a Posting Module. The behaviour is defined by the JSON Patch specification. Currently supported fields are: DisplayName, Description, Rules. # noqa: E501
4149
+ This method makes a synchronous HTTP request by default. To make an
4150
+ asynchronous HTTP request, please pass async_req=True
4151
+
4152
+ >>> thread = api.patch_posting_module(scope, code, posting_module_code, operation, async_req=True)
4153
+ >>> result = thread.get()
4154
+
4155
+ :param scope: The scope of the Chart of Accounts. (required)
4156
+ :type scope: str
4157
+ :param code: The code of the Chart of Accounts. Together with the scope this uniquely identifies the Chart of Accounts. (required)
4158
+ :type code: str
4159
+ :param posting_module_code: The code of the Posting Module to be updated. (required)
4160
+ :type posting_module_code: str
4161
+ :param operation: The json patch document. For more information see: https://datatracker.ietf.org/doc/html/rfc6902. (required)
4162
+ :type operation: List[Operation]
4163
+ :param async_req: Whether to execute the request asynchronously.
4164
+ :type async_req: bool, optional
4165
+ :param _request_timeout: timeout setting for this request.
4166
+ If one number provided, it will be total request
4167
+ timeout. It can also be a pair (tuple) of
4168
+ (connection, read) timeouts.
4169
+ :return: Returns the result object.
4170
+ If the method is called asynchronously,
4171
+ returns the request thread.
4172
+ :rtype: PostingModuleResponse
4173
+ """
4174
+ kwargs['_return_http_data_only'] = True
4175
+ if '_preload_content' in kwargs:
4176
+ message = "Error! Please call the patch_posting_module_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501
4177
+ raise ValueError(message)
4178
+ if async_req is not None:
4179
+ kwargs['async_req'] = async_req
4180
+ return self.patch_posting_module_with_http_info(scope, code, posting_module_code, operation, **kwargs) # noqa: E501
4181
+
4182
+ @validate_arguments
4183
+ def patch_posting_module_with_http_info(self, scope : Annotated[constr(strict=True, max_length=64, min_length=1), Field(..., description="The scope of the Chart of Accounts.")], code : Annotated[constr(strict=True, max_length=64, min_length=1), Field(..., description="The code of the Chart of Accounts. Together with the scope this uniquely identifies the Chart of Accounts.")], posting_module_code : Annotated[constr(strict=True, max_length=64, min_length=1), Field(..., description="The code of the Posting Module to be updated.")], operation : Annotated[conlist(Operation), Field(..., description="The json patch document. For more information see: https://datatracker.ietf.org/doc/html/rfc6902.")], **kwargs) -> ApiResponse: # noqa: E501
4184
+ """[EXPERIMENTAL] PatchPostingModule: Patch a Posting Module # noqa: E501
4185
+
4186
+ Update fields on a Posting Module. The behaviour is defined by the JSON Patch specification. Currently supported fields are: DisplayName, Description, Rules. # noqa: E501
4187
+ This method makes a synchronous HTTP request by default. To make an
4188
+ asynchronous HTTP request, please pass async_req=True
4189
+
4190
+ >>> thread = api.patch_posting_module_with_http_info(scope, code, posting_module_code, operation, async_req=True)
4191
+ >>> result = thread.get()
4192
+
4193
+ :param scope: The scope of the Chart of Accounts. (required)
4194
+ :type scope: str
4195
+ :param code: The code of the Chart of Accounts. Together with the scope this uniquely identifies the Chart of Accounts. (required)
4196
+ :type code: str
4197
+ :param posting_module_code: The code of the Posting Module to be updated. (required)
4198
+ :type posting_module_code: str
4199
+ :param operation: The json patch document. For more information see: https://datatracker.ietf.org/doc/html/rfc6902. (required)
4200
+ :type operation: List[Operation]
4201
+ :param async_req: Whether to execute the request asynchronously.
4202
+ :type async_req: bool, optional
4203
+ :param _preload_content: if False, the ApiResponse.data will
4204
+ be set to none and raw_data will store the
4205
+ HTTP response body without reading/decoding.
4206
+ Default is True.
4207
+ :type _preload_content: bool, optional
4208
+ :param _return_http_data_only: response data instead of ApiResponse
4209
+ object with status code, headers, etc
4210
+ :type _return_http_data_only: bool, optional
4211
+ :param _request_timeout: timeout setting for this request. If one
4212
+ number provided, it will be total request
4213
+ timeout. It can also be a pair (tuple) of
4214
+ (connection, read) timeouts.
4215
+ :param _request_auth: set to override the auth_settings for an a single
4216
+ request; this effectively ignores the authentication
4217
+ in the spec for a single request.
4218
+ :type _request_auth: dict, optional
4219
+ :type _content_type: string, optional: force content-type for the request
4220
+ :return: Returns the result object.
4221
+ If the method is called asynchronously,
4222
+ returns the request thread.
4223
+ :rtype: tuple(PostingModuleResponse, status_code(int), headers(HTTPHeaderDict))
4224
+ """
4225
+
4226
+ _params = locals()
4227
+
4228
+ _all_params = [
4229
+ 'scope',
4230
+ 'code',
4231
+ 'posting_module_code',
4232
+ 'operation'
4233
+ ]
4234
+ _all_params.extend(
4235
+ [
4236
+ 'async_req',
4237
+ '_return_http_data_only',
4238
+ '_preload_content',
4239
+ '_request_timeout',
4240
+ '_request_auth',
4241
+ '_content_type',
4242
+ '_headers'
4243
+ ]
4244
+ )
4245
+
4246
+ # validate the arguments
4247
+ for _key, _val in _params['kwargs'].items():
4248
+ if _key not in _all_params:
4249
+ raise ApiTypeError(
4250
+ "Got an unexpected keyword argument '%s'"
4251
+ " to method patch_posting_module" % _key
4252
+ )
4253
+ _params[_key] = _val
4254
+ del _params['kwargs']
4255
+
4256
+ _collection_formats = {}
4257
+
4258
+ # process the path parameters
4259
+ _path_params = {}
4260
+ if _params['scope']:
4261
+ _path_params['scope'] = _params['scope']
4262
+
4263
+ if _params['code']:
4264
+ _path_params['code'] = _params['code']
4265
+
4266
+ if _params['posting_module_code']:
4267
+ _path_params['postingModuleCode'] = _params['posting_module_code']
4268
+
4269
+
4270
+ # process the query parameters
4271
+ _query_params = []
4272
+ # process the header parameters
4273
+ _header_params = dict(_params.get('_headers', {}))
4274
+ # process the form parameters
4275
+ _form_params = []
4276
+ _files = {}
4277
+ # process the body parameter
4278
+ _body_params = None
4279
+ if _params['operation'] is not None:
4280
+ _body_params = _params['operation']
4281
+
4282
+ # set the HTTP header `Accept`
4283
+ _header_params['Accept'] = self.api_client.select_header_accept(
4284
+ ['text/plain', 'application/json', 'text/json']) # noqa: E501
4285
+
4286
+ # set the HTTP header `Content-Type`
4287
+ _content_types_list = _params.get('_content_type',
4288
+ self.api_client.select_header_content_type(
4289
+ ['application/json-patch+json', 'application/json', 'text/json', 'application/*+json']))
4290
+ if _content_types_list:
4291
+ _header_params['Content-Type'] = _content_types_list
4292
+
4293
+ # authentication setting
4294
+ _auth_settings = ['oauth2'] # noqa: E501
4295
+
4296
+ _response_types_map = {
4297
+ '200': "PostingModuleResponse",
4298
+ '400': "LusidValidationProblemDetails",
4299
+ }
4300
+
4301
+ return self.api_client.call_api(
4302
+ '/api/chartofaccounts/{scope}/{code}/postingmodules/{postingModuleCode}', 'PATCH',
4303
+ _path_params,
4304
+ _query_params,
4305
+ _header_params,
4306
+ body=_body_params,
4307
+ post_params=_form_params,
4308
+ files=_files,
4309
+ response_types_map=_response_types_map,
4310
+ auth_settings=_auth_settings,
4311
+ async_req=_params.get('async_req'),
4312
+ _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501
4313
+ _preload_content=_params.get('_preload_content', True),
4314
+ _request_timeout=_params.get('_request_timeout'),
4315
+ collection_formats=_collection_formats,
4316
+ _request_auth=_params.get('_request_auth'))
4317
+
3953
4318
  @overload
3954
4319
  async def set_cleardown_module_details(self, scope : Annotated[constr(strict=True, max_length=64, min_length=1), Field(..., description="The scope of the Chart of Accounts.")], code : Annotated[constr(strict=True, max_length=64, min_length=1), Field(..., description="The code of the Chart of Accounts. Together with the scope this uniquely identifies the Chart of Accounts.")], cleardown_module_code : Annotated[constr(strict=True, max_length=64, min_length=1), Field(..., description="The code of the Cleardown Module to be updated.")], cleardown_module_details : Annotated[CleardownModuleDetails, Field(..., description="The new details for the Cleardown Module.")], **kwargs) -> CleardownModuleResponse: # noqa: E501
3955
4320
  ...
lusid/api/entities_api.py CHANGED
@@ -22,7 +22,7 @@ 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, constr, validator
25
+ from pydantic.v1 import Field, StrictStr, conlist, constr, validator
26
26
 
27
27
  from typing import Optional
28
28
 
@@ -50,22 +50,22 @@ class EntitiesApi:
50
50
  self.api_client = api_client
51
51
 
52
52
  @overload
53
- async def get_portfolio_by_entity_unique_id(self, entity_unique_id : Annotated[constr(strict=True, max_length=40, min_length=30), Field(..., description="The universally unique identifier of the portfolio definition.")], effective_at : Annotated[Optional[StrictStr], Field(description="The effective datetime or cut label at which to retrieve the portfolio definition. Defaults to the current LUSID system datetime if not specified.")] = None, as_at : Annotated[Optional[datetime], Field(description="The asAt datetime at which to retrieve the portfolio definition. Defaults to returning the latest version of the portfolio definition if not specified.")] = None, **kwargs) -> PortfolioEntity: # noqa: E501
53
+ async def get_portfolio_by_entity_unique_id(self, entity_unique_id : Annotated[constr(strict=True, max_length=40, min_length=30), Field(..., description="The universally unique identifier of the portfolio definition.")], effective_at : Annotated[Optional[StrictStr], Field(description="The effective datetime or cut label at which to retrieve the portfolio definition. Defaults to the current LUSID system datetime if not specified.")] = None, as_at : Annotated[Optional[datetime], Field(description="The asAt datetime at which to retrieve the portfolio definition. Defaults to returning the latest version of the portfolio definition if not specified.")] = None, previews : Annotated[Optional[conlist(StrictStr)], Field(description="The ids of the staged modifications to be previewed in the response.")] = None, **kwargs) -> PortfolioEntity: # noqa: E501
54
54
  ...
55
55
 
56
56
  @overload
57
- def get_portfolio_by_entity_unique_id(self, entity_unique_id : Annotated[constr(strict=True, max_length=40, min_length=30), Field(..., description="The universally unique identifier of the portfolio definition.")], effective_at : Annotated[Optional[StrictStr], Field(description="The effective datetime or cut label at which to retrieve the portfolio definition. Defaults to the current LUSID system datetime if not specified.")] = None, as_at : Annotated[Optional[datetime], Field(description="The asAt datetime at which to retrieve the portfolio definition. Defaults to returning the latest version of the portfolio definition if not specified.")] = None, async_req: Optional[bool]=True, **kwargs) -> PortfolioEntity: # noqa: E501
57
+ def get_portfolio_by_entity_unique_id(self, entity_unique_id : Annotated[constr(strict=True, max_length=40, min_length=30), Field(..., description="The universally unique identifier of the portfolio definition.")], effective_at : Annotated[Optional[StrictStr], Field(description="The effective datetime or cut label at which to retrieve the portfolio definition. Defaults to the current LUSID system datetime if not specified.")] = None, as_at : Annotated[Optional[datetime], Field(description="The asAt datetime at which to retrieve the portfolio definition. Defaults to returning the latest version of the portfolio definition if not specified.")] = None, previews : Annotated[Optional[conlist(StrictStr)], Field(description="The ids of the staged modifications to be previewed in the response.")] = None, async_req: Optional[bool]=True, **kwargs) -> PortfolioEntity: # noqa: E501
58
58
  ...
59
59
 
60
60
  @validate_arguments
61
- def get_portfolio_by_entity_unique_id(self, entity_unique_id : Annotated[constr(strict=True, max_length=40, min_length=30), Field(..., description="The universally unique identifier of the portfolio definition.")], effective_at : Annotated[Optional[StrictStr], Field(description="The effective datetime or cut label at which to retrieve the portfolio definition. Defaults to the current LUSID system datetime if not specified.")] = None, as_at : Annotated[Optional[datetime], Field(description="The asAt datetime at which to retrieve the portfolio definition. Defaults to returning the latest version of the portfolio definition if not specified.")] = None, async_req: Optional[bool]=None, **kwargs) -> Union[PortfolioEntity, Awaitable[PortfolioEntity]]: # noqa: E501
61
+ def get_portfolio_by_entity_unique_id(self, entity_unique_id : Annotated[constr(strict=True, max_length=40, min_length=30), Field(..., description="The universally unique identifier of the portfolio definition.")], effective_at : Annotated[Optional[StrictStr], Field(description="The effective datetime or cut label at which to retrieve the portfolio definition. Defaults to the current LUSID system datetime if not specified.")] = None, as_at : Annotated[Optional[datetime], Field(description="The asAt datetime at which to retrieve the portfolio definition. Defaults to returning the latest version of the portfolio definition if not specified.")] = None, previews : Annotated[Optional[conlist(StrictStr)], Field(description="The ids of the staged modifications to be previewed in the response.")] = None, async_req: Optional[bool]=None, **kwargs) -> Union[PortfolioEntity, Awaitable[PortfolioEntity]]: # noqa: E501
62
62
  """[EXPERIMENTAL] GetPortfolioByEntityUniqueId: Get portfolio by EntityUniqueId # noqa: E501
63
63
 
64
64
  Retrieve the definition of a particular portfolio. If the portfolio is deleted, this will return the state of the portfolio immediately prior to deletion. # noqa: E501
65
65
  This method makes a synchronous HTTP request by default. To make an
66
66
  asynchronous HTTP request, please pass async_req=True
67
67
 
68
- >>> thread = api.get_portfolio_by_entity_unique_id(entity_unique_id, effective_at, as_at, async_req=True)
68
+ >>> thread = api.get_portfolio_by_entity_unique_id(entity_unique_id, effective_at, as_at, previews, async_req=True)
69
69
  >>> result = thread.get()
70
70
 
71
71
  :param entity_unique_id: The universally unique identifier of the portfolio definition. (required)
@@ -74,6 +74,8 @@ class EntitiesApi:
74
74
  :type effective_at: str
75
75
  :param as_at: The asAt datetime at which to retrieve the portfolio definition. Defaults to returning the latest version of the portfolio definition if not specified.
76
76
  :type as_at: datetime
77
+ :param previews: The ids of the staged modifications to be previewed in the response.
78
+ :type previews: List[str]
77
79
  :param async_req: Whether to execute the request asynchronously.
78
80
  :type async_req: bool, optional
79
81
  :param _request_timeout: timeout setting for this request.
@@ -91,17 +93,17 @@ class EntitiesApi:
91
93
  raise ValueError(message)
92
94
  if async_req is not None:
93
95
  kwargs['async_req'] = async_req
94
- return self.get_portfolio_by_entity_unique_id_with_http_info(entity_unique_id, effective_at, as_at, **kwargs) # noqa: E501
96
+ return self.get_portfolio_by_entity_unique_id_with_http_info(entity_unique_id, effective_at, as_at, previews, **kwargs) # noqa: E501
95
97
 
96
98
  @validate_arguments
97
- def get_portfolio_by_entity_unique_id_with_http_info(self, entity_unique_id : Annotated[constr(strict=True, max_length=40, min_length=30), Field(..., description="The universally unique identifier of the portfolio definition.")], effective_at : Annotated[Optional[StrictStr], Field(description="The effective datetime or cut label at which to retrieve the portfolio definition. Defaults to the current LUSID system datetime if not specified.")] = None, as_at : Annotated[Optional[datetime], Field(description="The asAt datetime at which to retrieve the portfolio definition. Defaults to returning the latest version of the portfolio definition if not specified.")] = None, **kwargs) -> ApiResponse: # noqa: E501
99
+ def get_portfolio_by_entity_unique_id_with_http_info(self, entity_unique_id : Annotated[constr(strict=True, max_length=40, min_length=30), Field(..., description="The universally unique identifier of the portfolio definition.")], effective_at : Annotated[Optional[StrictStr], Field(description="The effective datetime or cut label at which to retrieve the portfolio definition. Defaults to the current LUSID system datetime if not specified.")] = None, as_at : Annotated[Optional[datetime], Field(description="The asAt datetime at which to retrieve the portfolio definition. Defaults to returning the latest version of the portfolio definition if not specified.")] = None, previews : Annotated[Optional[conlist(StrictStr)], Field(description="The ids of the staged modifications to be previewed in the response.")] = None, **kwargs) -> ApiResponse: # noqa: E501
98
100
  """[EXPERIMENTAL] GetPortfolioByEntityUniqueId: Get portfolio by EntityUniqueId # noqa: E501
99
101
 
100
102
  Retrieve the definition of a particular portfolio. If the portfolio is deleted, this will return the state of the portfolio immediately prior to deletion. # noqa: E501
101
103
  This method makes a synchronous HTTP request by default. To make an
102
104
  asynchronous HTTP request, please pass async_req=True
103
105
 
104
- >>> thread = api.get_portfolio_by_entity_unique_id_with_http_info(entity_unique_id, effective_at, as_at, async_req=True)
106
+ >>> thread = api.get_portfolio_by_entity_unique_id_with_http_info(entity_unique_id, effective_at, as_at, previews, async_req=True)
105
107
  >>> result = thread.get()
106
108
 
107
109
  :param entity_unique_id: The universally unique identifier of the portfolio definition. (required)
@@ -110,6 +112,8 @@ class EntitiesApi:
110
112
  :type effective_at: str
111
113
  :param as_at: The asAt datetime at which to retrieve the portfolio definition. Defaults to returning the latest version of the portfolio definition if not specified.
112
114
  :type as_at: datetime
115
+ :param previews: The ids of the staged modifications to be previewed in the response.
116
+ :type previews: List[str]
113
117
  :param async_req: Whether to execute the request asynchronously.
114
118
  :type async_req: bool, optional
115
119
  :param _preload_content: if False, the ApiResponse.data will
@@ -140,7 +144,8 @@ class EntitiesApi:
140
144
  _all_params = [
141
145
  'entity_unique_id',
142
146
  'effective_at',
143
- 'as_at'
147
+ 'as_at',
148
+ 'previews'
144
149
  ]
145
150
  _all_params.extend(
146
151
  [
@@ -183,6 +188,10 @@ class EntitiesApi:
183
188
  else:
184
189
  _query_params.append(('asAt', _params['as_at']))
185
190
 
191
+ if _params.get('previews') is not None: # noqa: E501
192
+ _query_params.append(('previews', _params['previews']))
193
+ _collection_formats['previews'] = 'multi'
194
+
186
195
  # process the header parameters
187
196
  _header_params = dict(_params.get('_headers', {}))
188
197
  # process the form parameters
@@ -197,7 +197,7 @@ class FeeTypesApi:
197
197
  _auth_settings = ['oauth2'] # noqa: E501
198
198
 
199
199
  _response_types_map = {
200
- '200': "FeeType",
200
+ '201': "FeeType",
201
201
  '400': "LusidValidationProblemDetails",
202
202
  }
203
203