lusid-sdk 2.1.607__py3-none-any.whl → 2.1.613__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.
@@ -33,6 +33,7 @@ from lusid.models.batch_adjust_holdings_response import BatchAdjustHoldingsRespo
33
33
  from lusid.models.batch_upsert_portfolio_transactions_response import BatchUpsertPortfolioTransactionsResponse
34
34
  from lusid.models.bucketed_cash_flow_request import BucketedCashFlowRequest
35
35
  from lusid.models.bucketed_cash_flow_response import BucketedCashFlowResponse
36
+ from lusid.models.cancel_single_holding_adjustment_request import CancelSingleHoldingAdjustmentRequest
36
37
  from lusid.models.create_portfolio_details import CreatePortfolioDetails
37
38
  from lusid.models.create_trade_tickets_response import CreateTradeTicketsResponse
38
39
  from lusid.models.create_transaction_portfolio_request import CreateTransactionPortfolioRequest
@@ -1414,6 +1415,188 @@ class TransactionPortfoliosApi:
1414
1415
  collection_formats=_collection_formats,
1415
1416
  _request_auth=_params.get('_request_auth'))
1416
1417
 
1418
+ @overload
1419
+ async def cancel_single_adjust_holding(self, scope : Annotated[constr(strict=True, max_length=64, min_length=1), Field(..., description="The scope of the transaction portfolio.")], code : Annotated[constr(strict=True, max_length=64, min_length=1), Field(..., description="The code of the transaction portfolio. Together with the scope this uniquely identifies the transaction portfolio.")], effective_at : Annotated[StrictStr, Field(..., description="The effective datetime or cut label at which the previous adjustment was made.")], cancel_single_holding_adjustment_request : Annotated[CancelSingleHoldingAdjustmentRequest, Field(..., description="The selected holding adjustment to be canceled.")], **kwargs) -> DeletedEntityResponse: # noqa: E501
1420
+ ...
1421
+
1422
+ @overload
1423
+ def cancel_single_adjust_holding(self, scope : Annotated[constr(strict=True, max_length=64, min_length=1), Field(..., description="The scope of the transaction portfolio.")], code : Annotated[constr(strict=True, max_length=64, min_length=1), Field(..., description="The code of the transaction portfolio. Together with the scope this uniquely identifies the transaction portfolio.")], effective_at : Annotated[StrictStr, Field(..., description="The effective datetime or cut label at which the previous adjustment was made.")], cancel_single_holding_adjustment_request : Annotated[CancelSingleHoldingAdjustmentRequest, Field(..., description="The selected holding adjustment to be canceled.")], async_req: Optional[bool]=True, **kwargs) -> DeletedEntityResponse: # noqa: E501
1424
+ ...
1425
+
1426
+ @validate_arguments
1427
+ def cancel_single_adjust_holding(self, scope : Annotated[constr(strict=True, max_length=64, min_length=1), Field(..., description="The scope of the transaction portfolio.")], code : Annotated[constr(strict=True, max_length=64, min_length=1), Field(..., description="The code of the transaction portfolio. Together with the scope this uniquely identifies the transaction portfolio.")], effective_at : Annotated[StrictStr, Field(..., description="The effective datetime or cut label at which the previous adjustment was made.")], cancel_single_holding_adjustment_request : Annotated[CancelSingleHoldingAdjustmentRequest, Field(..., description="The selected holding adjustment to be canceled.")], async_req: Optional[bool]=None, **kwargs) -> Union[DeletedEntityResponse, Awaitable[DeletedEntityResponse]]: # noqa: E501
1428
+ """[EARLY ACCESS] CancelSingleAdjustHolding: Cancel single holding adjustment. # noqa: E501
1429
+
1430
+ Cancel one previously sent holding adjustment without affecting the rest of the adjustment in the previous request on the specified effective datetime. # noqa: E501
1431
+ This method makes a synchronous HTTP request by default. To make an
1432
+ asynchronous HTTP request, please pass async_req=True
1433
+
1434
+ >>> thread = api.cancel_single_adjust_holding(scope, code, effective_at, cancel_single_holding_adjustment_request, async_req=True)
1435
+ >>> result = thread.get()
1436
+
1437
+ :param scope: The scope of the transaction portfolio. (required)
1438
+ :type scope: str
1439
+ :param code: The code of the transaction portfolio. Together with the scope this uniquely identifies the transaction portfolio. (required)
1440
+ :type code: str
1441
+ :param effective_at: The effective datetime or cut label at which the previous adjustment was made. (required)
1442
+ :type effective_at: str
1443
+ :param cancel_single_holding_adjustment_request: The selected holding adjustment to be canceled. (required)
1444
+ :type cancel_single_holding_adjustment_request: CancelSingleHoldingAdjustmentRequest
1445
+ :param async_req: Whether to execute the request asynchronously.
1446
+ :type async_req: bool, optional
1447
+ :param _request_timeout: Timeout setting. Do not use - use the opts parameter instead
1448
+ :param opts: Configuration options for this request
1449
+ :type opts: ConfigurationOptions, optional
1450
+ :return: Returns the result object.
1451
+ If the method is called asynchronously,
1452
+ returns the request thread.
1453
+ :rtype: DeletedEntityResponse
1454
+ """
1455
+ kwargs['_return_http_data_only'] = True
1456
+ if '_preload_content' in kwargs:
1457
+ message = "Error! Please call the cancel_single_adjust_holding_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501
1458
+ raise ValueError(message)
1459
+ if async_req is not None:
1460
+ kwargs['async_req'] = async_req
1461
+ return self.cancel_single_adjust_holding_with_http_info(scope, code, effective_at, cancel_single_holding_adjustment_request, **kwargs) # noqa: E501
1462
+
1463
+ @validate_arguments
1464
+ def cancel_single_adjust_holding_with_http_info(self, scope : Annotated[constr(strict=True, max_length=64, min_length=1), Field(..., description="The scope of the transaction portfolio.")], code : Annotated[constr(strict=True, max_length=64, min_length=1), Field(..., description="The code of the transaction portfolio. Together with the scope this uniquely identifies the transaction portfolio.")], effective_at : Annotated[StrictStr, Field(..., description="The effective datetime or cut label at which the previous adjustment was made.")], cancel_single_holding_adjustment_request : Annotated[CancelSingleHoldingAdjustmentRequest, Field(..., description="The selected holding adjustment to be canceled.")], **kwargs) -> ApiResponse: # noqa: E501
1465
+ """[EARLY ACCESS] CancelSingleAdjustHolding: Cancel single holding adjustment. # noqa: E501
1466
+
1467
+ Cancel one previously sent holding adjustment without affecting the rest of the adjustment in the previous request on the specified effective datetime. # noqa: E501
1468
+ This method makes a synchronous HTTP request by default. To make an
1469
+ asynchronous HTTP request, please pass async_req=True
1470
+
1471
+ >>> thread = api.cancel_single_adjust_holding_with_http_info(scope, code, effective_at, cancel_single_holding_adjustment_request, async_req=True)
1472
+ >>> result = thread.get()
1473
+
1474
+ :param scope: The scope of the transaction portfolio. (required)
1475
+ :type scope: str
1476
+ :param code: The code of the transaction portfolio. Together with the scope this uniquely identifies the transaction portfolio. (required)
1477
+ :type code: str
1478
+ :param effective_at: The effective datetime or cut label at which the previous adjustment was made. (required)
1479
+ :type effective_at: str
1480
+ :param cancel_single_holding_adjustment_request: The selected holding adjustment to be canceled. (required)
1481
+ :type cancel_single_holding_adjustment_request: CancelSingleHoldingAdjustmentRequest
1482
+ :param async_req: Whether to execute the request asynchronously.
1483
+ :type async_req: bool, optional
1484
+ :param _preload_content: if False, the ApiResponse.data will
1485
+ be set to none and raw_data will store the
1486
+ HTTP response body without reading/decoding.
1487
+ Default is True.
1488
+ :type _preload_content: bool, optional
1489
+ :param _return_http_data_only: response data instead of ApiResponse
1490
+ object with status code, headers, etc
1491
+ :type _return_http_data_only: bool, optional
1492
+ :param _request_timeout: Timeout setting. Do not use - use the opts parameter instead
1493
+ :param opts: Configuration options for this request
1494
+ :type opts: ConfigurationOptions, optional
1495
+ :param _request_auth: set to override the auth_settings for an a single
1496
+ request; this effectively ignores the authentication
1497
+ in the spec for a single request.
1498
+ :type _request_auth: dict, optional
1499
+ :type _content_type: string, optional: force content-type for the request
1500
+ :return: Returns the result object.
1501
+ If the method is called asynchronously,
1502
+ returns the request thread.
1503
+ :rtype: tuple(DeletedEntityResponse, status_code(int), headers(HTTPHeaderDict))
1504
+ """
1505
+
1506
+ _params = locals()
1507
+
1508
+ _all_params = [
1509
+ 'scope',
1510
+ 'code',
1511
+ 'effective_at',
1512
+ 'cancel_single_holding_adjustment_request'
1513
+ ]
1514
+ _all_params.extend(
1515
+ [
1516
+ 'async_req',
1517
+ '_return_http_data_only',
1518
+ '_preload_content',
1519
+ '_request_timeout',
1520
+ '_request_auth',
1521
+ '_content_type',
1522
+ '_headers',
1523
+ 'opts'
1524
+ ]
1525
+ )
1526
+
1527
+ # validate the arguments
1528
+ for _key, _val in _params['kwargs'].items():
1529
+ if _key not in _all_params:
1530
+ raise ApiTypeError(
1531
+ "Got an unexpected keyword argument '%s'"
1532
+ " to method cancel_single_adjust_holding" % _key
1533
+ )
1534
+ _params[_key] = _val
1535
+ del _params['kwargs']
1536
+
1537
+ _collection_formats = {}
1538
+
1539
+ # process the path parameters
1540
+ _path_params = {}
1541
+ if _params['scope']:
1542
+ _path_params['scope'] = _params['scope']
1543
+
1544
+ if _params['code']:
1545
+ _path_params['code'] = _params['code']
1546
+
1547
+
1548
+ # process the query parameters
1549
+ _query_params = []
1550
+ if _params.get('effective_at') is not None: # noqa: E501
1551
+ _query_params.append(('effectiveAt', _params['effective_at']))
1552
+
1553
+ # process the header parameters
1554
+ _header_params = dict(_params.get('_headers', {}))
1555
+ # process the form parameters
1556
+ _form_params = []
1557
+ _files = {}
1558
+ # process the body parameter
1559
+ _body_params = None
1560
+ if _params['cancel_single_holding_adjustment_request'] is not None:
1561
+ _body_params = _params['cancel_single_holding_adjustment_request']
1562
+
1563
+ # set the HTTP header `Accept`
1564
+ _header_params['Accept'] = self.api_client.select_header_accept(
1565
+ ['text/plain', 'application/json', 'text/json']) # noqa: E501
1566
+
1567
+ # set the HTTP header `Content-Type`
1568
+ _content_types_list = _params.get('_content_type',
1569
+ self.api_client.select_header_content_type(
1570
+ ['application/json-patch+json', 'application/json', 'text/json', 'application/*+json']))
1571
+ if _content_types_list:
1572
+ _header_params['Content-Type'] = _content_types_list
1573
+
1574
+ # authentication setting
1575
+ _auth_settings = ['oauth2'] # noqa: E501
1576
+
1577
+ _response_types_map = {
1578
+ '200': "DeletedEntityResponse",
1579
+ '400': "LusidValidationProblemDetails",
1580
+ }
1581
+
1582
+ return self.api_client.call_api(
1583
+ '/api/transactionportfolios/{scope}/{code}/holdings/$cancelAdjustment', 'POST',
1584
+ _path_params,
1585
+ _query_params,
1586
+ _header_params,
1587
+ body=_body_params,
1588
+ post_params=_form_params,
1589
+ files=_files,
1590
+ response_types_map=_response_types_map,
1591
+ auth_settings=_auth_settings,
1592
+ async_req=_params.get('async_req'),
1593
+ _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501
1594
+ _preload_content=_params.get('_preload_content', True),
1595
+ _request_timeout=_params.get('_request_timeout'),
1596
+ opts=_params.get('opts'),
1597
+ collection_formats=_collection_formats,
1598
+ _request_auth=_params.get('_request_auth'))
1599
+
1417
1600
  @overload
1418
1601
  async def cancel_transactions(self, scope : Annotated[constr(strict=True, max_length=64, min_length=1), Field(..., description="The scope of the transaction portfolio.")], code : Annotated[constr(strict=True, max_length=64, min_length=1), Field(..., description="The code of the transaction portfolio. Together with the scope this uniquely identifies the transaction portfolio.")], transaction_ids : Annotated[conlist(StrictStr), Field(..., description="The IDs of the transactions to cancel.")], **kwargs) -> DeletedEntityResponse: # noqa: E501
1419
1602
  ...
lusid/configuration.py CHANGED
@@ -445,7 +445,7 @@ class Configuration:
445
445
  return "Python SDK Debug Report:\n"\
446
446
  "OS: {env}\n"\
447
447
  "Python Version: {pyversion}\n"\
448
- "Version of the API: 0.11.7111\n"\
448
+ "Version of the API: 0.11.7140\n"\
449
449
  "SDK Package Version: {package_version}".\
450
450
  format(env=sys.platform, pyversion=sys.version, package_version=package_version)
451
451
 
lusid/models/__init__.py CHANGED
@@ -123,6 +123,7 @@ from lusid.models.cancel_orders_and_move_remaining_request import CancelOrdersAn
123
123
  from lusid.models.cancel_orders_and_move_remaining_response import CancelOrdersAndMoveRemainingResponse
124
124
  from lusid.models.cancel_orders_response import CancelOrdersResponse
125
125
  from lusid.models.cancel_placements_response import CancelPlacementsResponse
126
+ from lusid.models.cancel_single_holding_adjustment_request import CancelSingleHoldingAdjustmentRequest
126
127
  from lusid.models.cancelled_order_result import CancelledOrderResult
127
128
  from lusid.models.cancelled_placement_result import CancelledPlacementResult
128
129
  from lusid.models.cap_floor import CapFloor
@@ -246,6 +247,7 @@ from lusid.models.create_relation_definition_request import CreateRelationDefini
246
247
  from lusid.models.create_relation_request import CreateRelationRequest
247
248
  from lusid.models.create_relationship_definition_request import CreateRelationshipDefinitionRequest
248
249
  from lusid.models.create_relationship_request import CreateRelationshipRequest
250
+ from lusid.models.create_risk_model_factor_set_request import CreateRiskModelFactorSetRequest
249
251
  from lusid.models.create_sequence_request import CreateSequenceRequest
250
252
  from lusid.models.create_staging_rule_set_request import CreateStagingRuleSetRequest
251
253
  from lusid.models.create_tax_rule_set_request import CreateTaxRuleSetRequest
@@ -560,6 +562,7 @@ from lusid.models.lusid_validation_problem_details import LusidValidationProblem
560
562
  from lusid.models.mapped_string import MappedString
561
563
  from lusid.models.mapping import Mapping
562
564
  from lusid.models.mapping_rule import MappingRule
565
+ from lusid.models.mark_to_market_conventions import MarkToMarketConventions
563
566
  from lusid.models.market_context import MarketContext
564
567
  from lusid.models.market_context_suppliers import MarketContextSuppliers
565
568
  from lusid.models.market_data_key_rule import MarketDataKeyRule
@@ -695,6 +698,7 @@ from lusid.models.paged_resource_list_of_property_definition_search_result impor
695
698
  from lusid.models.paged_resource_list_of_reconciliation import PagedResourceListOfReconciliation
696
699
  from lusid.models.paged_resource_list_of_reference_list_response import PagedResourceListOfReferenceListResponse
697
700
  from lusid.models.paged_resource_list_of_relationship_definition import PagedResourceListOfRelationshipDefinition
701
+ from lusid.models.paged_resource_list_of_risk_model_factor_set import PagedResourceListOfRiskModelFactorSet
698
702
  from lusid.models.paged_resource_list_of_sequence_definition import PagedResourceListOfSequenceDefinition
699
703
  from lusid.models.paged_resource_list_of_staged_modification import PagedResourceListOfStagedModification
700
704
  from lusid.models.paged_resource_list_of_staged_modifications_requested_change_interval import PagedResourceListOfStagedModificationsRequestedChangeInterval
@@ -921,6 +925,7 @@ from lusid.models.result_value_string import ResultValueString
921
925
  from lusid.models.result_value_type import ResultValueType
922
926
  from lusid.models.return_zero_pv_options import ReturnZeroPvOptions
923
927
  from lusid.models.reverse_stock_split_event import ReverseStockSplitEvent
928
+ from lusid.models.risk_model_factor_set import RiskModelFactorSet
924
929
  from lusid.models.rounding_configuration import RoundingConfiguration
925
930
  from lusid.models.rounding_configuration_component import RoundingConfigurationComponent
926
931
  from lusid.models.rounding_convention import RoundingConvention
@@ -1001,6 +1006,7 @@ from lusid.models.total_return_swap import TotalReturnSwap
1001
1006
  from lusid.models.touch import Touch
1002
1007
  from lusid.models.trade_ticket import TradeTicket
1003
1008
  from lusid.models.trade_ticket_type import TradeTicketType
1009
+ from lusid.models.trading_conventions import TradingConventions
1004
1010
  from lusid.models.transaction import Transaction
1005
1011
  from lusid.models.transaction_configuration_data import TransactionConfigurationData
1006
1012
  from lusid.models.transaction_configuration_data_request import TransactionConfigurationDataRequest
@@ -1078,6 +1084,7 @@ from lusid.models.update_property_definition_request import UpdatePropertyDefini
1078
1084
  from lusid.models.update_reconciliation_request import UpdateReconciliationRequest
1079
1085
  from lusid.models.update_reference_data_request import UpdateReferenceDataRequest
1080
1086
  from lusid.models.update_relationship_definition_request import UpdateRelationshipDefinitionRequest
1087
+ from lusid.models.update_risk_model_factor_set_request import UpdateRiskModelFactorSetRequest
1081
1088
  from lusid.models.update_staging_rule_set_request import UpdateStagingRuleSetRequest
1082
1089
  from lusid.models.update_tax_rule_set_request import UpdateTaxRuleSetRequest
1083
1090
  from lusid.models.update_timeline_request import UpdateTimelineRequest
@@ -1279,6 +1286,7 @@ __all__ = [
1279
1286
  "CancelOrdersAndMoveRemainingResponse",
1280
1287
  "CancelOrdersResponse",
1281
1288
  "CancelPlacementsResponse",
1289
+ "CancelSingleHoldingAdjustmentRequest",
1282
1290
  "CancelledOrderResult",
1283
1291
  "CancelledPlacementResult",
1284
1292
  "CapFloor",
@@ -1402,6 +1410,7 @@ __all__ = [
1402
1410
  "CreateRelationRequest",
1403
1411
  "CreateRelationshipDefinitionRequest",
1404
1412
  "CreateRelationshipRequest",
1413
+ "CreateRiskModelFactorSetRequest",
1405
1414
  "CreateSequenceRequest",
1406
1415
  "CreateStagingRuleSetRequest",
1407
1416
  "CreateTaxRuleSetRequest",
@@ -1716,6 +1725,7 @@ __all__ = [
1716
1725
  "MappedString",
1717
1726
  "Mapping",
1718
1727
  "MappingRule",
1728
+ "MarkToMarketConventions",
1719
1729
  "MarketContext",
1720
1730
  "MarketContextSuppliers",
1721
1731
  "MarketDataKeyRule",
@@ -1851,6 +1861,7 @@ __all__ = [
1851
1861
  "PagedResourceListOfReconciliation",
1852
1862
  "PagedResourceListOfReferenceListResponse",
1853
1863
  "PagedResourceListOfRelationshipDefinition",
1864
+ "PagedResourceListOfRiskModelFactorSet",
1854
1865
  "PagedResourceListOfSequenceDefinition",
1855
1866
  "PagedResourceListOfStagedModification",
1856
1867
  "PagedResourceListOfStagedModificationsRequestedChangeInterval",
@@ -2077,6 +2088,7 @@ __all__ = [
2077
2088
  "ResultValueType",
2078
2089
  "ReturnZeroPvOptions",
2079
2090
  "ReverseStockSplitEvent",
2091
+ "RiskModelFactorSet",
2080
2092
  "RoundingConfiguration",
2081
2093
  "RoundingConfigurationComponent",
2082
2094
  "RoundingConvention",
@@ -2157,6 +2169,7 @@ __all__ = [
2157
2169
  "Touch",
2158
2170
  "TradeTicket",
2159
2171
  "TradeTicketType",
2172
+ "TradingConventions",
2160
2173
  "Transaction",
2161
2174
  "TransactionConfigurationData",
2162
2175
  "TransactionConfigurationDataRequest",
@@ -2234,6 +2247,7 @@ __all__ = [
2234
2247
  "UpdateReconciliationRequest",
2235
2248
  "UpdateReferenceDataRequest",
2236
2249
  "UpdateRelationshipDefinitionRequest",
2250
+ "UpdateRiskModelFactorSetRequest",
2237
2251
  "UpdateStagingRuleSetRequest",
2238
2252
  "UpdateTaxRuleSetRequest",
2239
2253
  "UpdateTimelineRequest",
lusid/models/bond.py CHANGED
@@ -24,6 +24,7 @@ from lusid.models.ex_dividend_configuration import ExDividendConfiguration
24
24
  from lusid.models.flow_conventions import FlowConventions
25
25
  from lusid.models.lusid_instrument import LusidInstrument
26
26
  from lusid.models.rounding_convention import RoundingConvention
27
+ from lusid.models.trading_conventions import TradingConventions
27
28
 
28
29
  class Bond(LusidInstrument):
29
30
  """
@@ -43,9 +44,10 @@ class Bond(LusidInstrument):
43
44
  rounding_conventions: Optional[conlist(RoundingConvention)] = Field(None, alias="roundingConventions", description="Rounding conventions for analytics, if any.")
44
45
  ex_dividend_configuration: Optional[ExDividendConfiguration] = Field(None, alias="exDividendConfiguration")
45
46
  original_issue_price: Optional[Union[StrictFloat, StrictInt]] = Field(None, alias="originalIssuePrice", description="The price the bond was issued at. This is to be entered as a percentage of par, for example a value of 98.5 would represent 98.5%.")
47
+ trading_conventions: Optional[TradingConventions] = Field(None, alias="tradingConventions")
46
48
  instrument_type: StrictStr = Field(..., alias="instrumentType", description="The available values are: QuotedSecurity, InterestRateSwap, FxForward, Future, ExoticInstrument, FxOption, CreditDefaultSwap, InterestRateSwaption, Bond, EquityOption, FixedLeg, FloatingLeg, BespokeCashFlowsLeg, Unknown, TermDeposit, ContractForDifference, EquitySwap, CashPerpetual, CapFloor, CashSettled, CdsIndex, Basket, FundingLeg, FxSwap, ForwardRateAgreement, SimpleInstrument, Repo, Equity, ExchangeTradedOption, ReferenceInstrument, ComplexBond, InflationLinkedBond, InflationSwap, SimpleCashFlowLoan, TotalReturnSwap, InflationLeg, FundShareClass, FlexibleLoan, UnsettledCash, Cash, MasteredInstrument, LoanFacility, FlexibleDeposit")
47
49
  additional_properties: Dict[str, Any] = {}
48
- __properties = ["instrumentType", "startDate", "maturityDate", "domCcy", "flowConventions", "principal", "couponRate", "identifiers", "exDividendDays", "initialCouponDate", "firstCouponPayDate", "calculationType", "roundingConventions", "exDividendConfiguration", "originalIssuePrice"]
50
+ __properties = ["instrumentType", "startDate", "maturityDate", "domCcy", "flowConventions", "principal", "couponRate", "identifiers", "exDividendDays", "initialCouponDate", "firstCouponPayDate", "calculationType", "roundingConventions", "exDividendConfiguration", "originalIssuePrice", "tradingConventions"]
49
51
 
50
52
  @validator('instrument_type')
51
53
  def instrument_type_validate_enum(cls, value):
@@ -92,6 +94,9 @@ class Bond(LusidInstrument):
92
94
  # override the default output from pydantic by calling `to_dict()` of ex_dividend_configuration
93
95
  if self.ex_dividend_configuration:
94
96
  _dict['exDividendConfiguration'] = self.ex_dividend_configuration.to_dict()
97
+ # override the default output from pydantic by calling `to_dict()` of trading_conventions
98
+ if self.trading_conventions:
99
+ _dict['tradingConventions'] = self.trading_conventions.to_dict()
95
100
  # puts key-value pairs in additional_properties in the top level
96
101
  if self.additional_properties is not None:
97
102
  for _key, _value in self.additional_properties.items():
@@ -158,7 +163,8 @@ class Bond(LusidInstrument):
158
163
  "calculation_type": obj.get("calculationType"),
159
164
  "rounding_conventions": [RoundingConvention.from_dict(_item) for _item in obj.get("roundingConventions")] if obj.get("roundingConventions") is not None else None,
160
165
  "ex_dividend_configuration": ExDividendConfiguration.from_dict(obj.get("exDividendConfiguration")) if obj.get("exDividendConfiguration") is not None else None,
161
- "original_issue_price": obj.get("originalIssuePrice")
166
+ "original_issue_price": obj.get("originalIssuePrice"),
167
+ "trading_conventions": TradingConventions.from_dict(obj.get("tradingConventions")) if obj.get("tradingConventions") is not None else None
162
168
  })
163
169
  # store additional fields in additional_properties
164
170
  for _key in obj.keys():
@@ -0,0 +1,96 @@
1
+ # coding: utf-8
2
+
3
+ """
4
+ LUSID API
5
+
6
+ FINBOURNE Technology # noqa: E501
7
+
8
+ Contact: info@finbourne.com
9
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
10
+
11
+ Do not edit the class manually.
12
+ """
13
+
14
+
15
+ from __future__ import annotations
16
+ import pprint
17
+ import re # noqa: F401
18
+ import json
19
+
20
+
21
+ from typing import Any, Dict, Optional
22
+ from pydantic.v1 import BaseModel, Field, StrictStr
23
+ from lusid.models.perpetual_property import PerpetualProperty
24
+
25
+ class CancelSingleHoldingAdjustmentRequest(BaseModel):
26
+ """
27
+ This request specifies single target holding. i.e. holding data that the system should match. And deletes previous adjustment made to that holding # noqa: E501
28
+ """
29
+ instrument_identifiers: Dict[str, StrictStr] = Field(..., alias="instrumentIdentifiers", description="A set of instrument identifiers that can resolve the holding adjustment to a unique instrument.")
30
+ sub_holding_keys: Optional[Dict[str, PerpetualProperty]] = Field(None, alias="subHoldingKeys", description="The sub-holding properties which identify the holding. Each property must be from the 'Transaction' domain.")
31
+ currency: Optional[StrictStr] = Field(None, description="The Holding currency.")
32
+ __properties = ["instrumentIdentifiers", "subHoldingKeys", "currency"]
33
+
34
+ class Config:
35
+ """Pydantic configuration"""
36
+ allow_population_by_field_name = True
37
+ validate_assignment = True
38
+
39
+ def to_str(self) -> str:
40
+ """Returns the string representation of the model using alias"""
41
+ return pprint.pformat(self.dict(by_alias=True))
42
+
43
+ def to_json(self) -> str:
44
+ """Returns the JSON representation of the model using alias"""
45
+ return json.dumps(self.to_dict())
46
+
47
+ @classmethod
48
+ def from_json(cls, json_str: str) -> CancelSingleHoldingAdjustmentRequest:
49
+ """Create an instance of CancelSingleHoldingAdjustmentRequest from a JSON string"""
50
+ return cls.from_dict(json.loads(json_str))
51
+
52
+ def to_dict(self):
53
+ """Returns the dictionary representation of the model using alias"""
54
+ _dict = self.dict(by_alias=True,
55
+ exclude={
56
+ },
57
+ exclude_none=True)
58
+ # override the default output from pydantic by calling `to_dict()` of each value in sub_holding_keys (dict)
59
+ _field_dict = {}
60
+ if self.sub_holding_keys:
61
+ for _key in self.sub_holding_keys:
62
+ if self.sub_holding_keys[_key]:
63
+ _field_dict[_key] = self.sub_holding_keys[_key].to_dict()
64
+ _dict['subHoldingKeys'] = _field_dict
65
+ # set to None if sub_holding_keys (nullable) is None
66
+ # and __fields_set__ contains the field
67
+ if self.sub_holding_keys is None and "sub_holding_keys" in self.__fields_set__:
68
+ _dict['subHoldingKeys'] = None
69
+
70
+ # set to None if currency (nullable) is None
71
+ # and __fields_set__ contains the field
72
+ if self.currency is None and "currency" in self.__fields_set__:
73
+ _dict['currency'] = None
74
+
75
+ return _dict
76
+
77
+ @classmethod
78
+ def from_dict(cls, obj: dict) -> CancelSingleHoldingAdjustmentRequest:
79
+ """Create an instance of CancelSingleHoldingAdjustmentRequest from a dict"""
80
+ if obj is None:
81
+ return None
82
+
83
+ if not isinstance(obj, dict):
84
+ return CancelSingleHoldingAdjustmentRequest.parse_obj(obj)
85
+
86
+ _obj = CancelSingleHoldingAdjustmentRequest.parse_obj({
87
+ "instrument_identifiers": obj.get("instrumentIdentifiers"),
88
+ "sub_holding_keys": dict(
89
+ (_k, PerpetualProperty.from_dict(_v))
90
+ for _k, _v in obj.get("subHoldingKeys").items()
91
+ )
92
+ if obj.get("subHoldingKeys") is not None
93
+ else None,
94
+ "currency": obj.get("currency")
95
+ })
96
+ return _obj
@@ -23,6 +23,7 @@ from pydantic.v1 import Field, StrictBool, StrictStr, conlist, constr, validator
23
23
  from lusid.models.lusid_instrument import LusidInstrument
24
24
  from lusid.models.rounding_convention import RoundingConvention
25
25
  from lusid.models.schedule import Schedule
26
+ from lusid.models.trading_conventions import TradingConventions
26
27
 
27
28
  class ComplexBond(LusidInstrument):
28
29
  """
@@ -34,9 +35,10 @@ class ComplexBond(LusidInstrument):
34
35
  rounding_conventions: Optional[conlist(RoundingConvention)] = Field(None, alias="roundingConventions", description="Rounding conventions for analytics, if any.")
35
36
  asset_backed: Optional[StrictBool] = Field(None, alias="assetBacked", description="If this flag is set to true, then the outstanding notional and principal repayments will be calculated based on pool factors in the quote store. Usually AssetBacked bonds also require a RollConvention setting of within the FlowConventions any given rates schedule (to ensure payment dates always happen on the same day of the month) and US Agency MBSs with Pay Delay features also require their rates schedules to include an ExDividendConfiguration to drive the lag between interest accrual and payment.")
36
37
  asset_pool_identifier: Optional[constr(strict=True, max_length=50, min_length=0)] = Field(None, alias="assetPoolIdentifier", description="Identifier used to retrieve pool factor information about this bond from the quote store. This is typically the bond's ISIN, but can also be ClientInternal. Please ensure you align the MarketDataKeyRule with the correct Quote (Quote.ClientInternal.* or Quote.Isin.*)")
38
+ trading_conventions: Optional[TradingConventions] = Field(None, alias="tradingConventions")
37
39
  instrument_type: StrictStr = Field(..., alias="instrumentType", description="The available values are: QuotedSecurity, InterestRateSwap, FxForward, Future, ExoticInstrument, FxOption, CreditDefaultSwap, InterestRateSwaption, Bond, EquityOption, FixedLeg, FloatingLeg, BespokeCashFlowsLeg, Unknown, TermDeposit, ContractForDifference, EquitySwap, CashPerpetual, CapFloor, CashSettled, CdsIndex, Basket, FundingLeg, FxSwap, ForwardRateAgreement, SimpleInstrument, Repo, Equity, ExchangeTradedOption, ReferenceInstrument, ComplexBond, InflationLinkedBond, InflationSwap, SimpleCashFlowLoan, TotalReturnSwap, InflationLeg, FundShareClass, FlexibleLoan, UnsettledCash, Cash, MasteredInstrument, LoanFacility, FlexibleDeposit")
38
40
  additional_properties: Dict[str, Any] = {}
39
- __properties = ["instrumentType", "identifiers", "calculationType", "schedules", "roundingConventions", "assetBacked", "assetPoolIdentifier"]
41
+ __properties = ["instrumentType", "identifiers", "calculationType", "schedules", "roundingConventions", "assetBacked", "assetPoolIdentifier", "tradingConventions"]
40
42
 
41
43
  @validator('instrument_type')
42
44
  def instrument_type_validate_enum(cls, value):
@@ -84,6 +86,9 @@ class ComplexBond(LusidInstrument):
84
86
  if _item:
85
87
  _items.append(_item.to_dict())
86
88
  _dict['roundingConventions'] = _items
89
+ # override the default output from pydantic by calling `to_dict()` of trading_conventions
90
+ if self.trading_conventions:
91
+ _dict['tradingConventions'] = self.trading_conventions.to_dict()
87
92
  # puts key-value pairs in additional_properties in the top level
88
93
  if self.additional_properties is not None:
89
94
  for _key, _value in self.additional_properties.items():
@@ -137,7 +142,8 @@ class ComplexBond(LusidInstrument):
137
142
  "schedules": [Schedule.from_dict(_item) for _item in obj.get("schedules")] if obj.get("schedules") is not None else None,
138
143
  "rounding_conventions": [RoundingConvention.from_dict(_item) for _item in obj.get("roundingConventions")] if obj.get("roundingConventions") is not None else None,
139
144
  "asset_backed": obj.get("assetBacked"),
140
- "asset_pool_identifier": obj.get("assetPoolIdentifier")
145
+ "asset_pool_identifier": obj.get("assetPoolIdentifier"),
146
+ "trading_conventions": TradingConventions.from_dict(obj.get("tradingConventions")) if obj.get("tradingConventions") is not None else None
141
147
  })
142
148
  # store additional fields in additional_properties
143
149
  for _key in obj.keys():
@@ -0,0 +1,75 @@
1
+ # coding: utf-8
2
+
3
+ """
4
+ LUSID API
5
+
6
+ FINBOURNE Technology # noqa: E501
7
+
8
+ Contact: info@finbourne.com
9
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
10
+
11
+ Do not edit the class manually.
12
+ """
13
+
14
+
15
+ from __future__ import annotations
16
+ import pprint
17
+ import re # noqa: F401
18
+ import json
19
+
20
+
21
+ from typing import Any, Dict, Optional
22
+ from pydantic.v1 import BaseModel, Field, constr
23
+ from lusid.models.resource_id import ResourceId
24
+
25
+ class CreateRiskModelFactorSetRequest(BaseModel):
26
+ """
27
+ CreateRiskModelFactorSetRequest
28
+ """
29
+ id: Optional[ResourceId] = None
30
+ display_name: constr(strict=True, max_length=256, min_length=1) = Field(..., alias="displayName", description="Factor Set name.")
31
+ __properties = ["id", "displayName"]
32
+
33
+ class Config:
34
+ """Pydantic configuration"""
35
+ allow_population_by_field_name = True
36
+ validate_assignment = True
37
+
38
+ def to_str(self) -> str:
39
+ """Returns the string representation of the model using alias"""
40
+ return pprint.pformat(self.dict(by_alias=True))
41
+
42
+ def to_json(self) -> str:
43
+ """Returns the JSON representation of the model using alias"""
44
+ return json.dumps(self.to_dict())
45
+
46
+ @classmethod
47
+ def from_json(cls, json_str: str) -> CreateRiskModelFactorSetRequest:
48
+ """Create an instance of CreateRiskModelFactorSetRequest from a JSON string"""
49
+ return cls.from_dict(json.loads(json_str))
50
+
51
+ def to_dict(self):
52
+ """Returns the dictionary representation of the model using alias"""
53
+ _dict = self.dict(by_alias=True,
54
+ exclude={
55
+ },
56
+ exclude_none=True)
57
+ # override the default output from pydantic by calling `to_dict()` of id
58
+ if self.id:
59
+ _dict['id'] = self.id.to_dict()
60
+ return _dict
61
+
62
+ @classmethod
63
+ def from_dict(cls, obj: dict) -> CreateRiskModelFactorSetRequest:
64
+ """Create an instance of CreateRiskModelFactorSetRequest from a dict"""
65
+ if obj is None:
66
+ return None
67
+
68
+ if not isinstance(obj, dict):
69
+ return CreateRiskModelFactorSetRequest.parse_obj(obj)
70
+
71
+ _obj = CreateRiskModelFactorSetRequest.parse_obj({
72
+ "id": ResourceId.from_dict(obj.get("id")) if obj.get("id") is not None else None,
73
+ "display_name": obj.get("displayName")
74
+ })
75
+ return _obj
@@ -18,8 +18,8 @@ import re # noqa: F401
18
18
  import json
19
19
 
20
20
  from datetime import datetime
21
- from typing import Any, Dict, Optional, Union
22
- from pydantic.v1 import Field, StrictFloat, StrictInt, StrictStr, constr, validator
21
+ from typing import Any, Dict, List, Optional, Union
22
+ from pydantic.v1 import Field, StrictFloat, StrictInt, StrictStr, conlist, constr, validator
23
23
  from lusid.models.lusid_instrument import LusidInstrument
24
24
  from lusid.models.premium import Premium
25
25
 
@@ -41,9 +41,12 @@ class EquityOption(LusidInstrument):
41
41
  premium: Optional[Premium] = None
42
42
  exercise_type: Optional[StrictStr] = Field(None, alias="exerciseType", description="Type of optionality that is present; European, American. Supported string (enumeration) values are: [European, American].")
43
43
  underlying: Optional[LusidInstrument] = None
44
+ delivery_days: Optional[StrictInt] = Field(None, alias="deliveryDays", description="Number of business days between exercise date and settlement of the option payoff or underlying.")
45
+ business_day_convention: Optional[StrictStr] = Field(None, alias="businessDayConvention", description="Business day convention for option exercise date to settlement date calculation. Supported string (enumeration) values are: [NoAdjustment, Previous, P, Following, F, ModifiedPrevious, MP, ModifiedFollowing, MF, HalfMonthModifiedFollowing, Nearest].")
46
+ settlement_calendars: Optional[conlist(StrictStr)] = Field(None, alias="settlementCalendars", description="Holiday calendars for option exercise date to settlement date calculation.")
44
47
  instrument_type: StrictStr = Field(..., alias="instrumentType", description="The available values are: QuotedSecurity, InterestRateSwap, FxForward, Future, ExoticInstrument, FxOption, CreditDefaultSwap, InterestRateSwaption, Bond, EquityOption, FixedLeg, FloatingLeg, BespokeCashFlowsLeg, Unknown, TermDeposit, ContractForDifference, EquitySwap, CashPerpetual, CapFloor, CashSettled, CdsIndex, Basket, FundingLeg, FxSwap, ForwardRateAgreement, SimpleInstrument, Repo, Equity, ExchangeTradedOption, ReferenceInstrument, ComplexBond, InflationLinkedBond, InflationSwap, SimpleCashFlowLoan, TotalReturnSwap, InflationLeg, FundShareClass, FlexibleLoan, UnsettledCash, Cash, MasteredInstrument, LoanFacility, FlexibleDeposit")
45
48
  additional_properties: Dict[str, Any] = {}
46
- __properties = ["instrumentType", "startDate", "optionMaturityDate", "optionSettlementDate", "deliveryType", "optionType", "strike", "domCcy", "underlyingIdentifier", "code", "equityOptionType", "numberOfShares", "premium", "exerciseType", "underlying"]
49
+ __properties = ["instrumentType", "startDate", "optionMaturityDate", "optionSettlementDate", "deliveryType", "optionType", "strike", "domCcy", "underlyingIdentifier", "code", "equityOptionType", "numberOfShares", "premium", "exerciseType", "underlying", "deliveryDays", "businessDayConvention", "settlementCalendars"]
47
50
 
48
51
  @validator('instrument_type')
49
52
  def instrument_type_validate_enum(cls, value):
@@ -118,6 +121,16 @@ class EquityOption(LusidInstrument):
118
121
  if self.exercise_type is None and "exercise_type" in self.__fields_set__:
119
122
  _dict['exerciseType'] = None
120
123
 
124
+ # set to None if business_day_convention (nullable) is None
125
+ # and __fields_set__ contains the field
126
+ if self.business_day_convention is None and "business_day_convention" in self.__fields_set__:
127
+ _dict['businessDayConvention'] = None
128
+
129
+ # set to None if settlement_calendars (nullable) is None
130
+ # and __fields_set__ contains the field
131
+ if self.settlement_calendars is None and "settlement_calendars" in self.__fields_set__:
132
+ _dict['settlementCalendars'] = None
133
+
121
134
  return _dict
122
135
 
123
136
  @classmethod
@@ -144,7 +157,10 @@ class EquityOption(LusidInstrument):
144
157
  "number_of_shares": obj.get("numberOfShares"),
145
158
  "premium": Premium.from_dict(obj.get("premium")) if obj.get("premium") is not None else None,
146
159
  "exercise_type": obj.get("exerciseType"),
147
- "underlying": LusidInstrument.from_dict(obj.get("underlying")) if obj.get("underlying") is not None else None
160
+ "underlying": LusidInstrument.from_dict(obj.get("underlying")) if obj.get("underlying") is not None else None,
161
+ "delivery_days": obj.get("deliveryDays"),
162
+ "business_day_convention": obj.get("businessDayConvention"),
163
+ "settlement_calendars": obj.get("settlementCalendars")
148
164
  })
149
165
  # store additional fields in additional_properties
150
166
  for _key in obj.keys():