lusid-sdk 2.1.598__py3-none-any.whl → 2.1.600__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.
@@ -2893,15 +2893,15 @@ class TransactionPortfoliosApi:
2893
2893
  _request_auth=_params.get('_request_auth'))
2894
2894
 
2895
2895
  @overload
2896
- async def get_custodian_account(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.")], custodian_account_scope : Annotated[constr(strict=True, max_length=64, min_length=1), Field(..., description="The scope of the Custodian Account.")], custodian_account_code : Annotated[constr(strict=True, max_length=64, min_length=1), Field(..., description="The code of the Custodian Account.")], effective_at : Annotated[Optional[StrictStr], Field(description="The effective datetime or cut label at which to retrieve the Custodian Account properties. 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 Custodian Account definition. Defaults to returning the latest version of the Custodian Account definition if not specified.")] = None, property_keys : Annotated[Optional[conlist(StrictStr)], Field(description="A list of property keys from the 'CustodianAccount' domain to decorate onto the Custodian Account. These must take the format {domain}/{scope}/{code}, for example 'CustodianAccount/Manager/Id'. If not provided will return all the entitled properties for that Custodian Account.")] = None, **kwargs) -> CustodianAccount: # noqa: E501
2896
+ async def get_custodian_account(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.")], custodian_account_scope : Annotated[constr(strict=True, max_length=64, min_length=1), Field(..., description="The scope of the Custodian Account.")], custodian_account_code : Annotated[constr(strict=True, max_length=64, min_length=1), Field(..., description="The code of the Custodian Account.")], effective_at : Annotated[Optional[StrictStr], Field(description="The effective datetime or cut label at which to retrieve the Custodian Account properties. 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 Custodian Account definition. Defaults to returning the latest version of the Custodian Account definition if not specified.")] = None, property_keys : Annotated[Optional[conlist(StrictStr)], Field(description="A list of property keys from the 'CustodianAccount' domain to decorate onto the Custodian Account. These must take the format {domain}/{scope}/{code}, for example 'CustodianAccount/Manager/Id'. If no properties are specified, then no properties will be returned.")] = None, **kwargs) -> CustodianAccount: # noqa: E501
2897
2897
  ...
2898
2898
 
2899
2899
  @overload
2900
- def get_custodian_account(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.")], custodian_account_scope : Annotated[constr(strict=True, max_length=64, min_length=1), Field(..., description="The scope of the Custodian Account.")], custodian_account_code : Annotated[constr(strict=True, max_length=64, min_length=1), Field(..., description="The code of the Custodian Account.")], effective_at : Annotated[Optional[StrictStr], Field(description="The effective datetime or cut label at which to retrieve the Custodian Account properties. 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 Custodian Account definition. Defaults to returning the latest version of the Custodian Account definition if not specified.")] = None, property_keys : Annotated[Optional[conlist(StrictStr)], Field(description="A list of property keys from the 'CustodianAccount' domain to decorate onto the Custodian Account. These must take the format {domain}/{scope}/{code}, for example 'CustodianAccount/Manager/Id'. If not provided will return all the entitled properties for that Custodian Account.")] = None, async_req: Optional[bool]=True, **kwargs) -> CustodianAccount: # noqa: E501
2900
+ def get_custodian_account(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.")], custodian_account_scope : Annotated[constr(strict=True, max_length=64, min_length=1), Field(..., description="The scope of the Custodian Account.")], custodian_account_code : Annotated[constr(strict=True, max_length=64, min_length=1), Field(..., description="The code of the Custodian Account.")], effective_at : Annotated[Optional[StrictStr], Field(description="The effective datetime or cut label at which to retrieve the Custodian Account properties. 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 Custodian Account definition. Defaults to returning the latest version of the Custodian Account definition if not specified.")] = None, property_keys : Annotated[Optional[conlist(StrictStr)], Field(description="A list of property keys from the 'CustodianAccount' domain to decorate onto the Custodian Account. These must take the format {domain}/{scope}/{code}, for example 'CustodianAccount/Manager/Id'. If no properties are specified, then no properties will be returned.")] = None, async_req: Optional[bool]=True, **kwargs) -> CustodianAccount: # noqa: E501
2901
2901
  ...
2902
2902
 
2903
2903
  @validate_arguments
2904
- def get_custodian_account(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.")], custodian_account_scope : Annotated[constr(strict=True, max_length=64, min_length=1), Field(..., description="The scope of the Custodian Account.")], custodian_account_code : Annotated[constr(strict=True, max_length=64, min_length=1), Field(..., description="The code of the Custodian Account.")], effective_at : Annotated[Optional[StrictStr], Field(description="The effective datetime or cut label at which to retrieve the Custodian Account properties. 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 Custodian Account definition. Defaults to returning the latest version of the Custodian Account definition if not specified.")] = None, property_keys : Annotated[Optional[conlist(StrictStr)], Field(description="A list of property keys from the 'CustodianAccount' domain to decorate onto the Custodian Account. These must take the format {domain}/{scope}/{code}, for example 'CustodianAccount/Manager/Id'. If not provided will return all the entitled properties for that Custodian Account.")] = None, async_req: Optional[bool]=None, **kwargs) -> Union[CustodianAccount, Awaitable[CustodianAccount]]: # noqa: E501
2904
+ def get_custodian_account(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.")], custodian_account_scope : Annotated[constr(strict=True, max_length=64, min_length=1), Field(..., description="The scope of the Custodian Account.")], custodian_account_code : Annotated[constr(strict=True, max_length=64, min_length=1), Field(..., description="The code of the Custodian Account.")], effective_at : Annotated[Optional[StrictStr], Field(description="The effective datetime or cut label at which to retrieve the Custodian Account properties. 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 Custodian Account definition. Defaults to returning the latest version of the Custodian Account definition if not specified.")] = None, property_keys : Annotated[Optional[conlist(StrictStr)], Field(description="A list of property keys from the 'CustodianAccount' domain to decorate onto the Custodian Account. These must take the format {domain}/{scope}/{code}, for example 'CustodianAccount/Manager/Id'. If no properties are specified, then no properties will be returned.")] = None, async_req: Optional[bool]=None, **kwargs) -> Union[CustodianAccount, Awaitable[CustodianAccount]]: # noqa: E501
2905
2905
  """[EXPERIMENTAL] GetCustodianAccount: Get Custodian Account # noqa: E501
2906
2906
 
2907
2907
  Retrieve the definition of a particular Custodian Account which is part of a Transaction Portfolios. # noqa: E501
@@ -2923,7 +2923,7 @@ class TransactionPortfoliosApi:
2923
2923
  :type effective_at: str
2924
2924
  :param as_at: The asAt datetime at which to retrieve the Custodian Account definition. Defaults to returning the latest version of the Custodian Account definition if not specified.
2925
2925
  :type as_at: datetime
2926
- :param property_keys: A list of property keys from the 'CustodianAccount' domain to decorate onto the Custodian Account. These must take the format {domain}/{scope}/{code}, for example 'CustodianAccount/Manager/Id'. If not provided will return all the entitled properties for that Custodian Account.
2926
+ :param property_keys: A list of property keys from the 'CustodianAccount' domain to decorate onto the Custodian Account. These must take the format {domain}/{scope}/{code}, for example 'CustodianAccount/Manager/Id'. If no properties are specified, then no properties will be returned.
2927
2927
  :type property_keys: List[str]
2928
2928
  :param async_req: Whether to execute the request asynchronously.
2929
2929
  :type async_req: bool, optional
@@ -2944,7 +2944,7 @@ class TransactionPortfoliosApi:
2944
2944
  return self.get_custodian_account_with_http_info(scope, code, custodian_account_scope, custodian_account_code, effective_at, as_at, property_keys, **kwargs) # noqa: E501
2945
2945
 
2946
2946
  @validate_arguments
2947
- def get_custodian_account_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.")], custodian_account_scope : Annotated[constr(strict=True, max_length=64, min_length=1), Field(..., description="The scope of the Custodian Account.")], custodian_account_code : Annotated[constr(strict=True, max_length=64, min_length=1), Field(..., description="The code of the Custodian Account.")], effective_at : Annotated[Optional[StrictStr], Field(description="The effective datetime or cut label at which to retrieve the Custodian Account properties. 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 Custodian Account definition. Defaults to returning the latest version of the Custodian Account definition if not specified.")] = None, property_keys : Annotated[Optional[conlist(StrictStr)], Field(description="A list of property keys from the 'CustodianAccount' domain to decorate onto the Custodian Account. These must take the format {domain}/{scope}/{code}, for example 'CustodianAccount/Manager/Id'. If not provided will return all the entitled properties for that Custodian Account.")] = None, **kwargs) -> ApiResponse: # noqa: E501
2947
+ def get_custodian_account_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.")], custodian_account_scope : Annotated[constr(strict=True, max_length=64, min_length=1), Field(..., description="The scope of the Custodian Account.")], custodian_account_code : Annotated[constr(strict=True, max_length=64, min_length=1), Field(..., description="The code of the Custodian Account.")], effective_at : Annotated[Optional[StrictStr], Field(description="The effective datetime or cut label at which to retrieve the Custodian Account properties. 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 Custodian Account definition. Defaults to returning the latest version of the Custodian Account definition if not specified.")] = None, property_keys : Annotated[Optional[conlist(StrictStr)], Field(description="A list of property keys from the 'CustodianAccount' domain to decorate onto the Custodian Account. These must take the format {domain}/{scope}/{code}, for example 'CustodianAccount/Manager/Id'. If no properties are specified, then no properties will be returned.")] = None, **kwargs) -> ApiResponse: # noqa: E501
2948
2948
  """[EXPERIMENTAL] GetCustodianAccount: Get Custodian Account # noqa: E501
2949
2949
 
2950
2950
  Retrieve the definition of a particular Custodian Account which is part of a Transaction Portfolios. # noqa: E501
@@ -2966,7 +2966,7 @@ class TransactionPortfoliosApi:
2966
2966
  :type effective_at: str
2967
2967
  :param as_at: The asAt datetime at which to retrieve the Custodian Account definition. Defaults to returning the latest version of the Custodian Account definition if not specified.
2968
2968
  :type as_at: datetime
2969
- :param property_keys: A list of property keys from the 'CustodianAccount' domain to decorate onto the Custodian Account. These must take the format {domain}/{scope}/{code}, for example 'CustodianAccount/Manager/Id'. If not provided will return all the entitled properties for that Custodian Account.
2969
+ :param property_keys: A list of property keys from the 'CustodianAccount' domain to decorate onto the Custodian Account. These must take the format {domain}/{scope}/{code}, for example 'CustodianAccount/Manager/Id'. If no properties are specified, then no properties will be returned.
2970
2970
  :type property_keys: List[str]
2971
2971
  :param async_req: Whether to execute the request asynchronously.
2972
2972
  :type async_req: bool, optional
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.7082\n"\
448
+ "Version of the API: 0.11.7101\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
@@ -246,6 +246,7 @@ from lusid.models.create_relationship_request import CreateRelationshipRequest
246
246
  from lusid.models.create_sequence_request import CreateSequenceRequest
247
247
  from lusid.models.create_staging_rule_set_request import CreateStagingRuleSetRequest
248
248
  from lusid.models.create_tax_rule_set_request import CreateTaxRuleSetRequest
249
+ from lusid.models.create_timeline_request import CreateTimelineRequest
249
250
  from lusid.models.create_trade_tickets_response import CreateTradeTicketsResponse
250
251
  from lusid.models.create_transaction_portfolio_request import CreateTransactionPortfolioRequest
251
252
  from lusid.models.create_unit_definition import CreateUnitDefinition
@@ -989,6 +990,7 @@ from lusid.models.tender_event import TenderEvent
989
990
  from lusid.models.term_deposit import TermDeposit
990
991
  from lusid.models.term_deposit_interest_event import TermDepositInterestEvent
991
992
  from lusid.models.term_deposit_principal_event import TermDepositPrincipalEvent
993
+ from lusid.models.timeline import Timeline
992
994
  from lusid.models.total_return_swap import TotalReturnSwap
993
995
  from lusid.models.touch import Touch
994
996
  from lusid.models.trade_ticket import TradeTicket
@@ -1072,6 +1074,7 @@ from lusid.models.update_reference_data_request import UpdateReferenceDataReques
1072
1074
  from lusid.models.update_relationship_definition_request import UpdateRelationshipDefinitionRequest
1073
1075
  from lusid.models.update_staging_rule_set_request import UpdateStagingRuleSetRequest
1074
1076
  from lusid.models.update_tax_rule_set_request import UpdateTaxRuleSetRequest
1077
+ from lusid.models.update_timeline_request import UpdateTimelineRequest
1075
1078
  from lusid.models.update_unit_request import UpdateUnitRequest
1076
1079
  from lusid.models.upsert_cds_flow_conventions_request import UpsertCdsFlowConventionsRequest
1077
1080
  from lusid.models.upsert_complex_market_data_request import UpsertComplexMarketDataRequest
@@ -1393,6 +1396,7 @@ __all__ = [
1393
1396
  "CreateSequenceRequest",
1394
1397
  "CreateStagingRuleSetRequest",
1395
1398
  "CreateTaxRuleSetRequest",
1399
+ "CreateTimelineRequest",
1396
1400
  "CreateTradeTicketsResponse",
1397
1401
  "CreateTransactionPortfolioRequest",
1398
1402
  "CreateUnitDefinition",
@@ -2136,6 +2140,7 @@ __all__ = [
2136
2140
  "TermDeposit",
2137
2141
  "TermDepositInterestEvent",
2138
2142
  "TermDepositPrincipalEvent",
2143
+ "Timeline",
2139
2144
  "TotalReturnSwap",
2140
2145
  "Touch",
2141
2146
  "TradeTicket",
@@ -2219,6 +2224,7 @@ __all__ = [
2219
2224
  "UpdateRelationshipDefinitionRequest",
2220
2225
  "UpdateStagingRuleSetRequest",
2221
2226
  "UpdateTaxRuleSetRequest",
2227
+ "UpdateTimelineRequest",
2222
2228
  "UpdateUnitRequest",
2223
2229
  "UpsertCdsFlowConventionsRequest",
2224
2230
  "UpsertComplexMarketDataRequest",
@@ -19,7 +19,7 @@ import json
19
19
 
20
20
 
21
21
  from typing import Any, Dict, Optional
22
- from pydantic.v1 import BaseModel, Field, StrictStr, constr, validator
22
+ from pydantic.v1 import BaseModel, Field, StrictBool, StrictStr, constr, validator
23
23
  from lusid.models.resource_id import ResourceId
24
24
 
25
25
  class CreateDerivedPropertyDefinitionRequest(BaseModel):
@@ -33,7 +33,8 @@ class CreateDerivedPropertyDefinitionRequest(BaseModel):
33
33
  data_type_id: ResourceId = Field(..., alias="dataTypeId")
34
34
  property_description: Optional[constr(strict=True, max_length=512)] = Field(None, alias="propertyDescription", description="Describes the property")
35
35
  derivation_formula: constr(strict=True, min_length=1) = Field(..., alias="derivationFormula", description="The rule that defines how data is composed for a derived property.")
36
- __properties = ["domain", "scope", "code", "displayName", "dataTypeId", "propertyDescription", "derivationFormula"]
36
+ is_filterable: StrictBool = Field(..., alias="isFilterable", description="Bool indicating whether the values of this property are fitlerable, this is true for all non-derived property defintions. For a derived definition this must be set true to enable filtering.")
37
+ __properties = ["domain", "scope", "code", "displayName", "dataTypeId", "propertyDescription", "derivationFormula", "isFilterable"]
37
38
 
38
39
  @validator('domain')
39
40
  def domain_validate_enum(cls, value):
@@ -92,6 +93,7 @@ class CreateDerivedPropertyDefinitionRequest(BaseModel):
92
93
  "display_name": obj.get("displayName"),
93
94
  "data_type_id": ResourceId.from_dict(obj.get("dataTypeId")) if obj.get("dataTypeId") is not None else None,
94
95
  "property_description": obj.get("propertyDescription"),
95
- "derivation_formula": obj.get("derivationFormula")
96
+ "derivation_formula": obj.get("derivationFormula"),
97
+ "is_filterable": obj.get("isFilterable")
96
98
  })
97
99
  return _obj
@@ -0,0 +1,102 @@
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.model_property import ModelProperty
24
+ from lusid.models.resource_id import ResourceId
25
+
26
+ class CreateTimelineRequest(BaseModel):
27
+ """
28
+ CreateTimelineRequest
29
+ """
30
+ id: ResourceId = Field(...)
31
+ display_name: constr(strict=True, max_length=512, min_length=0) = Field(..., alias="displayName", description="The name of the Timeline.")
32
+ description: Optional[constr(strict=True, max_length=512, min_length=0)] = Field(None, description="A description for the Timeline.")
33
+ properties: Optional[Dict[str, ModelProperty]] = Field(None, description="The Timelines properties. These will be from the 'Timeline' domain.")
34
+ __properties = ["id", "displayName", "description", "properties"]
35
+
36
+ class Config:
37
+ """Pydantic configuration"""
38
+ allow_population_by_field_name = True
39
+ validate_assignment = True
40
+
41
+ def to_str(self) -> str:
42
+ """Returns the string representation of the model using alias"""
43
+ return pprint.pformat(self.dict(by_alias=True))
44
+
45
+ def to_json(self) -> str:
46
+ """Returns the JSON representation of the model using alias"""
47
+ return json.dumps(self.to_dict())
48
+
49
+ @classmethod
50
+ def from_json(cls, json_str: str) -> CreateTimelineRequest:
51
+ """Create an instance of CreateTimelineRequest from a JSON string"""
52
+ return cls.from_dict(json.loads(json_str))
53
+
54
+ def to_dict(self):
55
+ """Returns the dictionary representation of the model using alias"""
56
+ _dict = self.dict(by_alias=True,
57
+ exclude={
58
+ },
59
+ exclude_none=True)
60
+ # override the default output from pydantic by calling `to_dict()` of id
61
+ if self.id:
62
+ _dict['id'] = self.id.to_dict()
63
+ # override the default output from pydantic by calling `to_dict()` of each value in properties (dict)
64
+ _field_dict = {}
65
+ if self.properties:
66
+ for _key in self.properties:
67
+ if self.properties[_key]:
68
+ _field_dict[_key] = self.properties[_key].to_dict()
69
+ _dict['properties'] = _field_dict
70
+ # set to None if description (nullable) is None
71
+ # and __fields_set__ contains the field
72
+ if self.description is None and "description" in self.__fields_set__:
73
+ _dict['description'] = None
74
+
75
+ # set to None if properties (nullable) is None
76
+ # and __fields_set__ contains the field
77
+ if self.properties is None and "properties" in self.__fields_set__:
78
+ _dict['properties'] = None
79
+
80
+ return _dict
81
+
82
+ @classmethod
83
+ def from_dict(cls, obj: dict) -> CreateTimelineRequest:
84
+ """Create an instance of CreateTimelineRequest from a dict"""
85
+ if obj is None:
86
+ return None
87
+
88
+ if not isinstance(obj, dict):
89
+ return CreateTimelineRequest.parse_obj(obj)
90
+
91
+ _obj = CreateTimelineRequest.parse_obj({
92
+ "id": ResourceId.from_dict(obj.get("id")) if obj.get("id") is not None else None,
93
+ "display_name": obj.get("displayName"),
94
+ "description": obj.get("description"),
95
+ "properties": dict(
96
+ (_k, ModelProperty.from_dict(_v))
97
+ for _k, _v in obj.get("properties").items()
98
+ )
99
+ if obj.get("properties") is not None
100
+ else None
101
+ })
102
+ return _obj
@@ -21,6 +21,7 @@ from datetime import datetime
21
21
  from typing import Any, Dict, List, Optional, Union
22
22
  from pydantic.v1 import BaseModel, Field, StrictFloat, StrictInt, StrictStr, conlist, constr, validator
23
23
  from lusid.models.currency_and_amount import CurrencyAndAmount
24
+ from lusid.models.custodian_account import CustodianAccount
24
25
  from lusid.models.perpetual_property import PerpetualProperty
25
26
  from lusid.models.realised_gain_loss import RealisedGainLoss
26
27
  from lusid.models.transaction_price import TransactionPrice
@@ -55,9 +56,10 @@ class OutputTransaction(BaseModel):
55
56
  holding_ids: Optional[conlist(StrictInt)] = Field(None, alias="holdingIds", description="The collection of single identifiers for the holding within the portfolio. The holdingId is constructed from the LusidInstrumentId, sub-holding keys and currrency and is unique within the portfolio.")
56
57
  source_type: Optional[StrictStr] = Field(None, alias="sourceType", description="The type of source that the transaction originated from, eg: InputTransaction, InstrumentEvent, HoldingAdjustment")
57
58
  source_instrument_event_id: Optional[StrictStr] = Field(None, alias="sourceInstrumentEventId", description="The unique ID of the instrument event that the transaction is related to.")
59
+ custodian_account: Optional[CustodianAccount] = Field(None, alias="custodianAccount")
58
60
  transaction_group_id: Optional[StrictStr] = Field(None, alias="transactionGroupId", description="The identifier for grouping economic events across multiple transactions")
59
61
  resolved_transaction_type_details: Optional[TransactionTypeDetails] = Field(None, alias="resolvedTransactionTypeDetails")
60
- __properties = ["transactionId", "type", "description", "instrumentIdentifiers", "instrumentScope", "instrumentUid", "transactionDate", "settlementDate", "units", "transactionAmount", "transactionPrice", "totalConsideration", "exchangeRate", "transactionToPortfolioRate", "transactionCurrency", "properties", "counterpartyId", "source", "transactionStatus", "entryDateTime", "cancelDateTime", "realisedGainLoss", "holdingIds", "sourceType", "sourceInstrumentEventId", "transactionGroupId", "resolvedTransactionTypeDetails"]
62
+ __properties = ["transactionId", "type", "description", "instrumentIdentifiers", "instrumentScope", "instrumentUid", "transactionDate", "settlementDate", "units", "transactionAmount", "transactionPrice", "totalConsideration", "exchangeRate", "transactionToPortfolioRate", "transactionCurrency", "properties", "counterpartyId", "source", "transactionStatus", "entryDateTime", "cancelDateTime", "realisedGainLoss", "holdingIds", "sourceType", "sourceInstrumentEventId", "custodianAccount", "transactionGroupId", "resolvedTransactionTypeDetails"]
61
63
 
62
64
  @validator('transaction_status')
63
65
  def transaction_status_validate_enum(cls, value):
@@ -113,6 +115,9 @@ class OutputTransaction(BaseModel):
113
115
  if _item:
114
116
  _items.append(_item.to_dict())
115
117
  _dict['realisedGainLoss'] = _items
118
+ # override the default output from pydantic by calling `to_dict()` of custodian_account
119
+ if self.custodian_account:
120
+ _dict['custodianAccount'] = self.custodian_account.to_dict()
116
121
  # override the default output from pydantic by calling `to_dict()` of resolved_transaction_type_details
117
122
  if self.resolved_transaction_type_details:
118
123
  _dict['resolvedTransactionTypeDetails'] = self.resolved_transaction_type_details.to_dict()
@@ -228,6 +233,7 @@ class OutputTransaction(BaseModel):
228
233
  "holding_ids": obj.get("holdingIds"),
229
234
  "source_type": obj.get("sourceType"),
230
235
  "source_instrument_event_id": obj.get("sourceInstrumentEventId"),
236
+ "custodian_account": CustodianAccount.from_dict(obj.get("custodianAccount")) if obj.get("custodianAccount") is not None else None,
231
237
  "transaction_group_id": obj.get("transactionGroupId"),
232
238
  "resolved_transaction_type_details": TransactionTypeDetails.from_dict(obj.get("resolvedTransactionTypeDetails")) if obj.get("resolvedTransactionTypeDetails") is not None else None
233
239
  })
@@ -50,8 +50,9 @@ class PropertyDefinition(BaseModel):
50
50
  properties: Optional[Dict[str, ModelProperty]] = Field(None, description="Set of unique property definition properties and associated values to store with the property definition. Each property must be from the 'PropertyDefinition' domain.")
51
51
  version: Optional[Version] = None
52
52
  staged_modifications: Optional[StagedModificationsInfo] = Field(None, alias="stagedModifications")
53
+ is_filterable: Optional[StrictBool] = Field(None, alias="isFilterable", description="Bool indicating whether the values of this property are fitlerable, this is true for all non-derived property defintions. For a derived definition this must be set true to enable filtering.")
53
54
  links: Optional[conlist(Link)] = None
54
- __properties = ["href", "key", "valueType", "displayName", "dataTypeId", "type", "unitSchema", "domain", "scope", "code", "valueRequired", "lifeTime", "constraintStyle", "propertyDefinitionType", "propertyDescription", "derivationFormula", "collectionType", "properties", "version", "stagedModifications", "links"]
55
+ __properties = ["href", "key", "valueType", "displayName", "dataTypeId", "type", "unitSchema", "domain", "scope", "code", "valueRequired", "lifeTime", "constraintStyle", "propertyDefinitionType", "propertyDescription", "derivationFormula", "collectionType", "properties", "version", "stagedModifications", "isFilterable", "links"]
55
56
 
56
57
  @validator('value_type')
57
58
  def value_type_validate_enum(cls, value):
@@ -254,6 +255,7 @@ class PropertyDefinition(BaseModel):
254
255
  else None,
255
256
  "version": Version.from_dict(obj.get("version")) if obj.get("version") is not None else None,
256
257
  "staged_modifications": StagedModificationsInfo.from_dict(obj.get("stagedModifications")) if obj.get("stagedModifications") is not None else None,
258
+ "is_filterable": obj.get("isFilterable"),
257
259
  "links": [Link.from_dict(_item) for _item in obj.get("links")] if obj.get("links") is not None else None
258
260
  })
259
261
  return _obj
@@ -43,8 +43,9 @@ class PropertyDefinitionSearchResult(BaseModel):
43
43
  property_definition_type: Optional[StrictStr] = Field(None, alias="propertyDefinitionType", description="The definition type (DerivedDefinition or Definition). The available values are: ValueProperty, DerivedDefinition")
44
44
  property_description: Optional[StrictStr] = Field(None, alias="propertyDescription", description="A brief description of what a property of this property definition contains.")
45
45
  derivation_formula: Optional[StrictStr] = Field(None, alias="derivationFormula", description="The rule that defines how data is composed for a derived property.")
46
+ is_filterable: Optional[StrictBool] = Field(None, alias="isFilterable", description="Bool indicating whether the values of this property are fitlerable, this is true for all non-derived property defintions. For a derived definition this must be set true to enable filtering.")
46
47
  links: Optional[conlist(Link)] = None
47
- __properties = ["href", "key", "valueType", "displayName", "dataTypeId", "type", "unitSchema", "domain", "scope", "code", "valueRequired", "lifeTime", "constraintStyle", "propertyDefinitionType", "propertyDescription", "derivationFormula", "links"]
48
+ __properties = ["href", "key", "valueType", "displayName", "dataTypeId", "type", "unitSchema", "domain", "scope", "code", "valueRequired", "lifeTime", "constraintStyle", "propertyDefinitionType", "propertyDescription", "derivationFormula", "isFilterable", "links"]
48
49
 
49
50
  @validator('value_type')
50
51
  def value_type_validate_enum(cls, value):
@@ -215,6 +216,7 @@ class PropertyDefinitionSearchResult(BaseModel):
215
216
  "property_definition_type": obj.get("propertyDefinitionType"),
216
217
  "property_description": obj.get("propertyDescription"),
217
218
  "derivation_formula": obj.get("derivationFormula"),
219
+ "is_filterable": obj.get("isFilterable"),
218
220
  "links": [Link.from_dict(_item) for _item in obj.get("links")] if obj.get("links") is not None else None
219
221
  })
220
222
  return _obj
@@ -0,0 +1,135 @@
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, List, Optional
22
+ from pydantic.v1 import BaseModel, Field, StrictStr, conlist
23
+ from lusid.models.link import Link
24
+ from lusid.models.model_property import ModelProperty
25
+ from lusid.models.resource_id import ResourceId
26
+ from lusid.models.version import Version
27
+
28
+ class Timeline(BaseModel):
29
+ """
30
+ Timeline
31
+ """
32
+ id: Optional[ResourceId] = None
33
+ display_name: Optional[StrictStr] = Field(None, alias="displayName", description="The name of the Timeline.")
34
+ description: Optional[StrictStr] = Field(None, description="A description for the Timeline.")
35
+ properties: Optional[Dict[str, ModelProperty]] = Field(None, description="The Timelines properties. These will be from the 'Timeline' domain.")
36
+ version: Optional[Version] = None
37
+ href: Optional[StrictStr] = Field(None, description="The specific Uniform Resource Identifier (URI) for this resource at the requested asAt datetime.")
38
+ links: Optional[conlist(Link)] = None
39
+ __properties = ["id", "displayName", "description", "properties", "version", "href", "links"]
40
+
41
+ class Config:
42
+ """Pydantic configuration"""
43
+ allow_population_by_field_name = True
44
+ validate_assignment = True
45
+
46
+ def to_str(self) -> str:
47
+ """Returns the string representation of the model using alias"""
48
+ return pprint.pformat(self.dict(by_alias=True))
49
+
50
+ def to_json(self) -> str:
51
+ """Returns the JSON representation of the model using alias"""
52
+ return json.dumps(self.to_dict())
53
+
54
+ @classmethod
55
+ def from_json(cls, json_str: str) -> Timeline:
56
+ """Create an instance of Timeline from a JSON string"""
57
+ return cls.from_dict(json.loads(json_str))
58
+
59
+ def to_dict(self):
60
+ """Returns the dictionary representation of the model using alias"""
61
+ _dict = self.dict(by_alias=True,
62
+ exclude={
63
+ },
64
+ exclude_none=True)
65
+ # override the default output from pydantic by calling `to_dict()` of id
66
+ if self.id:
67
+ _dict['id'] = self.id.to_dict()
68
+ # override the default output from pydantic by calling `to_dict()` of each value in properties (dict)
69
+ _field_dict = {}
70
+ if self.properties:
71
+ for _key in self.properties:
72
+ if self.properties[_key]:
73
+ _field_dict[_key] = self.properties[_key].to_dict()
74
+ _dict['properties'] = _field_dict
75
+ # override the default output from pydantic by calling `to_dict()` of version
76
+ if self.version:
77
+ _dict['version'] = self.version.to_dict()
78
+ # override the default output from pydantic by calling `to_dict()` of each item in links (list)
79
+ _items = []
80
+ if self.links:
81
+ for _item in self.links:
82
+ if _item:
83
+ _items.append(_item.to_dict())
84
+ _dict['links'] = _items
85
+ # set to None if display_name (nullable) is None
86
+ # and __fields_set__ contains the field
87
+ if self.display_name is None and "display_name" in self.__fields_set__:
88
+ _dict['displayName'] = None
89
+
90
+ # set to None if description (nullable) is None
91
+ # and __fields_set__ contains the field
92
+ if self.description is None and "description" in self.__fields_set__:
93
+ _dict['description'] = None
94
+
95
+ # set to None if properties (nullable) is None
96
+ # and __fields_set__ contains the field
97
+ if self.properties is None and "properties" in self.__fields_set__:
98
+ _dict['properties'] = None
99
+
100
+ # set to None if href (nullable) is None
101
+ # and __fields_set__ contains the field
102
+ if self.href is None and "href" in self.__fields_set__:
103
+ _dict['href'] = None
104
+
105
+ # set to None if links (nullable) is None
106
+ # and __fields_set__ contains the field
107
+ if self.links is None and "links" in self.__fields_set__:
108
+ _dict['links'] = None
109
+
110
+ return _dict
111
+
112
+ @classmethod
113
+ def from_dict(cls, obj: dict) -> Timeline:
114
+ """Create an instance of Timeline from a dict"""
115
+ if obj is None:
116
+ return None
117
+
118
+ if not isinstance(obj, dict):
119
+ return Timeline.parse_obj(obj)
120
+
121
+ _obj = Timeline.parse_obj({
122
+ "id": ResourceId.from_dict(obj.get("id")) if obj.get("id") is not None else None,
123
+ "display_name": obj.get("displayName"),
124
+ "description": obj.get("description"),
125
+ "properties": dict(
126
+ (_k, ModelProperty.from_dict(_v))
127
+ for _k, _v in obj.get("properties").items()
128
+ )
129
+ if obj.get("properties") is not None
130
+ else None,
131
+ "version": Version.from_dict(obj.get("version")) if obj.get("version") is not None else None,
132
+ "href": obj.get("href"),
133
+ "links": [Link.from_dict(_item) for _item in obj.get("links")] if obj.get("links") is not None else None
134
+ })
135
+ return _obj
@@ -19,7 +19,7 @@ import json
19
19
 
20
20
 
21
21
  from typing import Any, Dict, Optional
22
- from pydantic.v1 import BaseModel, Field, constr
22
+ from pydantic.v1 import BaseModel, Field, StrictBool, constr
23
23
  from lusid.models.resource_id import ResourceId
24
24
 
25
25
  class UpdateDerivedPropertyDefinitionRequest(BaseModel):
@@ -30,7 +30,8 @@ class UpdateDerivedPropertyDefinitionRequest(BaseModel):
30
30
  data_type_id: ResourceId = Field(..., alias="dataTypeId")
31
31
  property_description: Optional[constr(strict=True, max_length=512)] = Field(None, alias="propertyDescription", description="Describes the property")
32
32
  derivation_formula: constr(strict=True, min_length=1) = Field(..., alias="derivationFormula", description="The rule that defines how data is composed for a derived property.")
33
- __properties = ["displayName", "dataTypeId", "propertyDescription", "derivationFormula"]
33
+ is_filterable: StrictBool = Field(..., alias="isFilterable", description="Bool indicating whether the values of this property are fitlerable, this is true for all non-derived property defintions. For a derived definition this must be set true to enable filtering.")
34
+ __properties = ["displayName", "dataTypeId", "propertyDescription", "derivationFormula", "isFilterable"]
34
35
 
35
36
  class Config:
36
37
  """Pydantic configuration"""
@@ -79,6 +80,7 @@ class UpdateDerivedPropertyDefinitionRequest(BaseModel):
79
80
  "display_name": obj.get("displayName"),
80
81
  "data_type_id": ResourceId.from_dict(obj.get("dataTypeId")) if obj.get("dataTypeId") is not None else None,
81
82
  "property_description": obj.get("propertyDescription"),
82
- "derivation_formula": obj.get("derivationFormula")
83
+ "derivation_formula": obj.get("derivationFormula"),
84
+ "is_filterable": obj.get("isFilterable")
83
85
  })
84
86
  return _obj
@@ -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, constr
23
+ from lusid.models.model_property import ModelProperty
24
+
25
+ class UpdateTimelineRequest(BaseModel):
26
+ """
27
+ UpdateTimelineRequest
28
+ """
29
+ display_name: constr(strict=True, max_length=512, min_length=0) = Field(..., alias="displayName", description="The name of the Timeline.")
30
+ description: Optional[constr(strict=True, max_length=512, min_length=0)] = Field(None, description="A description for the Timeline.")
31
+ properties: Optional[Dict[str, ModelProperty]] = Field(None, description="The Timelines properties. These will be from the 'Timeline' domain.")
32
+ __properties = ["displayName", "description", "properties"]
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) -> UpdateTimelineRequest:
49
+ """Create an instance of UpdateTimelineRequest 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 properties (dict)
59
+ _field_dict = {}
60
+ if self.properties:
61
+ for _key in self.properties:
62
+ if self.properties[_key]:
63
+ _field_dict[_key] = self.properties[_key].to_dict()
64
+ _dict['properties'] = _field_dict
65
+ # set to None if description (nullable) is None
66
+ # and __fields_set__ contains the field
67
+ if self.description is None and "description" in self.__fields_set__:
68
+ _dict['description'] = None
69
+
70
+ # set to None if properties (nullable) is None
71
+ # and __fields_set__ contains the field
72
+ if self.properties is None and "properties" in self.__fields_set__:
73
+ _dict['properties'] = None
74
+
75
+ return _dict
76
+
77
+ @classmethod
78
+ def from_dict(cls, obj: dict) -> UpdateTimelineRequest:
79
+ """Create an instance of UpdateTimelineRequest from a dict"""
80
+ if obj is None:
81
+ return None
82
+
83
+ if not isinstance(obj, dict):
84
+ return UpdateTimelineRequest.parse_obj(obj)
85
+
86
+ _obj = UpdateTimelineRequest.parse_obj({
87
+ "display_name": obj.get("displayName"),
88
+ "description": obj.get("description"),
89
+ "properties": dict(
90
+ (_k, ModelProperty.from_dict(_v))
91
+ for _k, _v in obj.get("properties").items()
92
+ )
93
+ if obj.get("properties") is not None
94
+ else None
95
+ })
96
+ return _obj