lusid-sdk 2.1.900__py3-none-any.whl → 2.1.902__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
lusid/models/__init__.py CHANGED
@@ -660,6 +660,7 @@ from lusid.models.model_schema import ModelSchema
660
660
  from lusid.models.model_selection import ModelSelection
661
661
  from lusid.models.move_orders_to_different_blocks_request import MoveOrdersToDifferentBlocksRequest
662
662
  from lusid.models.moved_order_to_different_block_response import MovedOrderToDifferentBlockResponse
663
+ from lusid.models.movement_settlement_summary import MovementSettlementSummary
663
664
  from lusid.models.movement_type import MovementType
664
665
  from lusid.models.multi_currency_amounts import MultiCurrencyAmounts
665
666
  from lusid.models.nav_type_definition import NavTypeDefinition
@@ -1214,6 +1215,7 @@ from lusid.models.upsert_custom_entities_response import UpsertCustomEntitiesRes
1214
1215
  from lusid.models.upsert_custom_entity_access_metadata_request import UpsertCustomEntityAccessMetadataRequest
1215
1216
  from lusid.models.upsert_dialect_request import UpsertDialectRequest
1216
1217
  from lusid.models.upsert_flow_conventions_request import UpsertFlowConventionsRequest
1218
+ from lusid.models.upsert_fund_bookmark_request import UpsertFundBookmarkRequest
1217
1219
  from lusid.models.upsert_index_convention_request import UpsertIndexConventionRequest
1218
1220
  from lusid.models.upsert_instrument_event_request import UpsertInstrumentEventRequest
1219
1221
  from lusid.models.upsert_instrument_events_response import UpsertInstrumentEventsResponse
@@ -1943,6 +1945,7 @@ __all__ = [
1943
1945
  "ModelSelection",
1944
1946
  "MoveOrdersToDifferentBlocksRequest",
1945
1947
  "MovedOrderToDifferentBlockResponse",
1948
+ "MovementSettlementSummary",
1946
1949
  "MovementType",
1947
1950
  "MultiCurrencyAmounts",
1948
1951
  "NavTypeDefinition",
@@ -2497,6 +2500,7 @@ __all__ = [
2497
2500
  "UpsertCustomEntityAccessMetadataRequest",
2498
2501
  "UpsertDialectRequest",
2499
2502
  "UpsertFlowConventionsRequest",
2503
+ "UpsertFundBookmarkRequest",
2500
2504
  "UpsertIndexConventionRequest",
2501
2505
  "UpsertInstrumentEventRequest",
2502
2506
  "UpsertInstrumentEventsResponse",
@@ -22,6 +22,7 @@ from typing import Any, Dict, List, Optional
22
22
  from pydantic.v1 import StrictStr, Field, BaseModel, Field, conlist, constr
23
23
  from lusid.models.custom_entity_field import CustomEntityField
24
24
  from lusid.models.custom_entity_id import CustomEntityId
25
+ from lusid.models.model_property import ModelProperty
25
26
 
26
27
  class CustomEntityRequest(BaseModel):
27
28
  """
@@ -31,7 +32,8 @@ class CustomEntityRequest(BaseModel):
31
32
  description: StrictStr = Field(...,alias="description", description="A description of the custom entity.")
32
33
  identifiers: conlist(CustomEntityId) = Field(..., description="The identifiers the custom entity will be upserted with.")
33
34
  fields: Optional[conlist(CustomEntityField)] = Field(None, description="The fields that decorate the custom entity.")
34
- __properties = ["displayName", "description", "identifiers", "fields"]
35
+ properties: Optional[Dict[str, ModelProperty]] = Field(None, description="The properties that decorate the custom entity.")
36
+ __properties = ["displayName", "description", "identifiers", "fields", "properties"]
35
37
 
36
38
  class Config:
37
39
  """Pydantic configuration"""
@@ -79,11 +81,23 @@ class CustomEntityRequest(BaseModel):
79
81
  if _item:
80
82
  _items.append(_item.to_dict())
81
83
  _dict['fields'] = _items
84
+ # override the default output from pydantic by calling `to_dict()` of each value in properties (dict)
85
+ _field_dict = {}
86
+ if self.properties:
87
+ for _key in self.properties:
88
+ if self.properties[_key]:
89
+ _field_dict[_key] = self.properties[_key].to_dict()
90
+ _dict['properties'] = _field_dict
82
91
  # set to None if fields (nullable) is None
83
92
  # and __fields_set__ contains the field
84
93
  if self.fields is None and "fields" in self.__fields_set__:
85
94
  _dict['fields'] = None
86
95
 
96
+ # set to None if properties (nullable) is None
97
+ # and __fields_set__ contains the field
98
+ if self.properties is None and "properties" in self.__fields_set__:
99
+ _dict['properties'] = None
100
+
87
101
  return _dict
88
102
 
89
103
  @classmethod
@@ -99,6 +113,12 @@ class CustomEntityRequest(BaseModel):
99
113
  "display_name": obj.get("displayName"),
100
114
  "description": obj.get("description"),
101
115
  "identifiers": [CustomEntityId.from_dict(_item) for _item in obj.get("identifiers")] if obj.get("identifiers") is not None else None,
102
- "fields": [CustomEntityField.from_dict(_item) for _item in obj.get("fields")] if obj.get("fields") is not None else None
116
+ "fields": [CustomEntityField.from_dict(_item) for _item in obj.get("fields")] if obj.get("fields") is not None else None,
117
+ "properties": dict(
118
+ (_k, ModelProperty.from_dict(_v))
119
+ for _k, _v in obj.get("properties").items()
120
+ )
121
+ if obj.get("properties") is not None
122
+ else None
103
123
  })
104
124
  return _obj
@@ -23,6 +23,7 @@ from pydantic.v1 import StrictStr, Field, BaseModel, Field, StrictStr, conlist,
23
23
  from lusid.models.custom_entity_field import CustomEntityField
24
24
  from lusid.models.custom_entity_id import CustomEntityId
25
25
  from lusid.models.link import Link
26
+ from lusid.models.model_property import ModelProperty
26
27
  from lusid.models.relationship import Relationship
27
28
  from lusid.models.staged_modifications_info import StagedModificationsInfo
28
29
  from lusid.models.version import Version
@@ -40,8 +41,9 @@ class CustomEntityResponse(BaseModel):
40
41
  identifiers: conlist(CustomEntityId) = Field(..., description="The identifiers the custom entity will be upserted with.")
41
42
  fields: conlist(CustomEntityField) = Field(..., description="The fields that decorate the custom entity.")
42
43
  relationships: conlist(Relationship) = Field(..., description="A set of relationships associated to the custom entity.")
44
+ properties: Optional[Dict[str, ModelProperty]] = Field(None, description="The properties that decorate the custom entity.")
43
45
  links: Optional[conlist(Link)] = None
44
- __properties = ["href", "entityType", "version", "stagedModifications", "displayName", "description", "identifiers", "fields", "relationships", "links"]
46
+ __properties = ["href", "entityType", "version", "stagedModifications", "displayName", "description", "identifiers", "fields", "relationships", "properties", "links"]
45
47
 
46
48
  class Config:
47
49
  """Pydantic configuration"""
@@ -102,6 +104,13 @@ class CustomEntityResponse(BaseModel):
102
104
  if _item:
103
105
  _items.append(_item.to_dict())
104
106
  _dict['relationships'] = _items
107
+ # override the default output from pydantic by calling `to_dict()` of each value in properties (dict)
108
+ _field_dict = {}
109
+ if self.properties:
110
+ for _key in self.properties:
111
+ if self.properties[_key]:
112
+ _field_dict[_key] = self.properties[_key].to_dict()
113
+ _dict['properties'] = _field_dict
105
114
  # override the default output from pydantic by calling `to_dict()` of each item in links (list)
106
115
  _items = []
107
116
  if self.links:
@@ -119,6 +128,11 @@ class CustomEntityResponse(BaseModel):
119
128
  if self.description is None and "description" in self.__fields_set__:
120
129
  _dict['description'] = None
121
130
 
131
+ # set to None if properties (nullable) is None
132
+ # and __fields_set__ contains the field
133
+ if self.properties is None and "properties" in self.__fields_set__:
134
+ _dict['properties'] = None
135
+
122
136
  # set to None if links (nullable) is None
123
137
  # and __fields_set__ contains the field
124
138
  if self.links is None and "links" in self.__fields_set__:
@@ -145,6 +159,12 @@ class CustomEntityResponse(BaseModel):
145
159
  "identifiers": [CustomEntityId.from_dict(_item) for _item in obj.get("identifiers")] if obj.get("identifiers") is not None else None,
146
160
  "fields": [CustomEntityField.from_dict(_item) for _item in obj.get("fields")] if obj.get("fields") is not None else None,
147
161
  "relationships": [Relationship.from_dict(_item) for _item in obj.get("relationships")] if obj.get("relationships") is not None else None,
162
+ "properties": dict(
163
+ (_k, ModelProperty.from_dict(_v))
164
+ for _k, _v in obj.get("properties").items()
165
+ )
166
+ if obj.get("properties") is not None
167
+ else None,
148
168
  "links": [Link.from_dict(_item) for _item in obj.get("links")] if obj.get("links") is not None else None
149
169
  })
150
170
  return _obj
@@ -19,7 +19,7 @@ import json
19
19
 
20
20
  from datetime import datetime
21
21
  from typing import Any, Dict, List, Optional
22
- from pydantic.v1 import StrictStr, Field, BaseModel, Field, StrictStr, conlist, constr, validator
22
+ from pydantic.v1 import StrictStr, Field, BaseModel, Field, StrictBool, StrictStr, conlist, constr, validator
23
23
  from lusid.models.link import Link
24
24
  from lusid.models.model_property import ModelProperty
25
25
  from lusid.models.resource_id import ResourceId
@@ -35,13 +35,14 @@ class DiaryEntry(BaseModel):
35
35
  type: StrictStr = Field(...,alias="type", description="The type of the diary entry.")
36
36
  name: Optional[StrictStr] = Field(None,alias="name", description="The name of the diary entry.")
37
37
  status: StrictStr = Field(...,alias="status", description="The status of the diary entry. Statuses are constrained and defaulted by 'Type' specified. Type 'Other' defaults to 'Undefined' and supports 'Undefined', 'Estimate', 'Candidate', and 'Final'. Type 'PeriodBoundary' defaults to 'Estimate' when closing a period, and supports 'Estimate' and 'Final' for closing periods and 'Final' for locking periods. Type 'ValuationPoint' defaults to 'Estimate' when upserting a diary entry, moves to 'Candidate' or 'Final' when a ValuationPoint is accepted, and 'Final' when it is finalised.")
38
+ apply_clear_down: Optional[StrictBool] = Field(None, alias="applyClearDown", description="Defaults to false. Set to true if you want that the closed period to have the clear down applied.")
38
39
  effective_at: datetime = Field(..., alias="effectiveAt", description="The effective time of the diary entry.")
39
40
  query_as_at: Optional[datetime] = Field(None, alias="queryAsAt", description="The query time of the diary entry. Defaults to latest.")
40
41
  previous_entry_time: Optional[datetime] = Field(None, alias="previousEntryTime", description="The entry time of the previous diary entry.")
41
42
  properties: Optional[Dict[str, ModelProperty]] = Field(None, description="A set of properties for the diary entry.")
42
43
  version: Optional[Version] = None
43
44
  links: Optional[conlist(Link)] = None
44
- __properties = ["href", "aborId", "diaryEntryCode", "type", "name", "status", "effectiveAt", "queryAsAt", "previousEntryTime", "properties", "version", "links"]
45
+ __properties = ["href", "aborId", "diaryEntryCode", "type", "name", "status", "applyClearDown", "effectiveAt", "queryAsAt", "previousEntryTime", "properties", "version", "links"]
45
46
 
46
47
  class Config:
47
48
  """Pydantic configuration"""
@@ -138,6 +139,7 @@ class DiaryEntry(BaseModel):
138
139
  "type": obj.get("type"),
139
140
  "name": obj.get("name"),
140
141
  "status": obj.get("status"),
142
+ "apply_clear_down": obj.get("applyClearDown"),
141
143
  "effective_at": obj.get("effectiveAt"),
142
144
  "query_as_at": obj.get("queryAsAt"),
143
145
  "previous_entry_time": obj.get("previousEntryTime"),
@@ -19,7 +19,7 @@ import json
19
19
 
20
20
  from datetime import datetime
21
21
  from typing import Any, Dict, Optional
22
- from pydantic.v1 import StrictStr, Field, BaseModel, Field, StrictStr, constr, validator
22
+ from pydantic.v1 import StrictStr, Field, BaseModel, Field, StrictBool, StrictStr, constr, validator
23
23
  from lusid.models.version import Version
24
24
 
25
25
  class FundCalendarEntry(BaseModel):
@@ -30,13 +30,14 @@ class FundCalendarEntry(BaseModel):
30
30
  display_name: StrictStr = Field(...,alias="displayName", description="The name of the Fund Calendar entry.")
31
31
  description: Optional[StrictStr] = Field(None,alias="description", description="A description for the Fund Calendar entry.")
32
32
  nav_type_code: StrictStr = Field(...,alias="navTypeCode", description="The navTypeCode of the Fund Calendar Entry. This is the code of the NAV type that this Calendar Entry is associated with.")
33
- effective_at: datetime = Field(..., alias="effectiveAt", description="The effective at of the Calendar Entry.")
33
+ effective_at: Optional[datetime] = Field(None, alias="effectiveAt", description="The effective at of the Calendar Entry.")
34
34
  as_at: datetime = Field(..., alias="asAt", description="The asAt datetime for the Calendar Entry.")
35
- entry_type: StrictStr = Field(...,alias="entryType", description="The type of the Fund Calendar Entry. Only 'ValuationPoint' currently supported. The available values are: ValuationPointFundCalendarEntry")
35
+ entry_type: StrictStr = Field(...,alias="entryType", description="The type of the Fund Calendar Entry. Only 'ValuationPoint' currently supported. The available values are: ValuationPointFundCalendarEntry, BookmarkFundCalendarEntry")
36
36
  status: Optional[StrictStr] = Field(None,alias="status", description="The status of the Fund Calendar Entry. Can be 'Estimate', 'Candidate' or 'Final'.")
37
+ apply_clear_down: StrictBool = Field(..., alias="applyClearDown", description="Set to true if that closed period shoould have the clear down applied.")
37
38
  version: Version = Field(...)
38
39
  href: Optional[StrictStr] = Field(None,alias="href", description="The specific Uniform Resource Identifier (URI) for this resource at the requested asAt datetime.")
39
- __properties = ["code", "displayName", "description", "navTypeCode", "effectiveAt", "asAt", "entryType", "status", "version", "href"]
40
+ __properties = ["code", "displayName", "description", "navTypeCode", "effectiveAt", "asAt", "entryType", "status", "applyClearDown", "version", "href"]
40
41
 
41
42
  @validator('entry_type')
42
43
  def entry_type_validate_enum(cls, value):
@@ -93,8 +94,8 @@ class FundCalendarEntry(BaseModel):
93
94
  if "entry_type" != "type":
94
95
  return value
95
96
 
96
- if value not in ('ValuationPointFundCalendarEntry'):
97
- raise ValueError("must be one of enum values ('ValuationPointFundCalendarEntry')")
97
+ if value not in ('ValuationPointFundCalendarEntry', 'BookmarkFundCalendarEntry'):
98
+ raise ValueError("must be one of enum values ('ValuationPointFundCalendarEntry', 'BookmarkFundCalendarEntry')")
98
99
  return value
99
100
 
100
101
  class Config:
@@ -167,6 +168,7 @@ class FundCalendarEntry(BaseModel):
167
168
  "as_at": obj.get("asAt"),
168
169
  "entry_type": obj.get("entryType"),
169
170
  "status": obj.get("status"),
171
+ "apply_clear_down": obj.get("applyClearDown"),
170
172
  "version": Version.from_dict(obj.get("version")) if obj.get("version") is not None else None,
171
173
  "href": obj.get("href")
172
174
  })
@@ -30,6 +30,7 @@ class FundCalendarEntryType(str, Enum):
30
30
  allowed enum values
31
31
  """
32
32
  VALUATIONPOINTFUNDCALENDARENTRY = 'ValuationPointFundCalendarEntry'
33
+ BOOKMARKFUNDCALENDARENTRY = 'BookmarkFundCalendarEntry'
33
34
 
34
35
  @classmethod
35
36
  def from_json(cls, json_str: str) -> FundCalendarEntryType:
@@ -18,8 +18,9 @@ import re # noqa: F401
18
18
  import json
19
19
 
20
20
 
21
- from typing import Any, Dict, Optional
22
- from pydantic.v1 import StrictStr, Field, BaseModel, Field, StrictInt
21
+ from typing import Any, Dict, List, Optional
22
+ from pydantic.v1 import StrictStr, Field, BaseModel, Field, StrictInt, conlist
23
+ from lusid.models.movement_settlement_summary import MovementSettlementSummary
23
24
  from lusid.models.transaction import Transaction
24
25
 
25
26
  class HoldingContributor(BaseModel):
@@ -28,7 +29,8 @@ class HoldingContributor(BaseModel):
28
29
  """
29
30
  transaction: Transaction = Field(...)
30
31
  holding_id: Optional[StrictInt] = Field(None, alias="holdingId", description="The unique holding identifier")
31
- __properties = ["transaction", "holdingId"]
32
+ movements: Optional[conlist(MovementSettlementSummary)] = Field(None, description="Movements contributed to holding")
33
+ __properties = ["transaction", "holdingId", "movements"]
32
34
 
33
35
  class Config:
34
36
  """Pydantic configuration"""
@@ -65,11 +67,23 @@ class HoldingContributor(BaseModel):
65
67
  # override the default output from pydantic by calling `to_dict()` of transaction
66
68
  if self.transaction:
67
69
  _dict['transaction'] = self.transaction.to_dict()
70
+ # override the default output from pydantic by calling `to_dict()` of each item in movements (list)
71
+ _items = []
72
+ if self.movements:
73
+ for _item in self.movements:
74
+ if _item:
75
+ _items.append(_item.to_dict())
76
+ _dict['movements'] = _items
68
77
  # set to None if holding_id (nullable) is None
69
78
  # and __fields_set__ contains the field
70
79
  if self.holding_id is None and "holding_id" in self.__fields_set__:
71
80
  _dict['holdingId'] = None
72
81
 
82
+ # set to None if movements (nullable) is None
83
+ # and __fields_set__ contains the field
84
+ if self.movements is None and "movements" in self.__fields_set__:
85
+ _dict['movements'] = None
86
+
73
87
  return _dict
74
88
 
75
89
  @classmethod
@@ -83,6 +97,7 @@ class HoldingContributor(BaseModel):
83
97
 
84
98
  _obj = HoldingContributor.parse_obj({
85
99
  "transaction": Transaction.from_dict(obj.get("transaction")) if obj.get("transaction") is not None else None,
86
- "holding_id": obj.get("holdingId")
100
+ "holding_id": obj.get("holdingId"),
101
+ "movements": [MovementSettlementSummary.from_dict(_item) for _item in obj.get("movements")] if obj.get("movements") is not None else None
87
102
  })
88
103
  return _obj
@@ -0,0 +1,125 @@
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, Union
22
+ from pydantic.v1 import StrictStr, Field, BaseModel, Field, StrictFloat, StrictInt, StrictStr
23
+
24
+ class MovementSettlementSummary(BaseModel):
25
+ """
26
+ MovementSettlementSummary
27
+ """
28
+ name: Optional[StrictStr] = Field(None,alias="name")
29
+ type: Optional[StrictStr] = Field(None,alias="type")
30
+ lusid_instrument_id: Optional[StrictStr] = Field(None,alias="lusidInstrumentId")
31
+ instrument_scope: Optional[StrictStr] = Field(None,alias="instrumentScope")
32
+ settlement_mode: Optional[StrictStr] = Field(None,alias="settlementMode")
33
+ contractual_settlement_date: Optional[StrictStr] = Field(None,alias="contractualSettlementDate")
34
+ units: Optional[Union[StrictFloat, StrictInt]] = None
35
+ settled_units: Optional[Union[StrictFloat, StrictInt]] = Field(None, alias="settledUnits")
36
+ unsettled_units: Optional[Union[StrictFloat, StrictInt]] = Field(None, alias="unsettledUnits")
37
+ overdue_units: Optional[Union[StrictFloat, StrictInt]] = Field(None, alias="overdueUnits")
38
+ __properties = ["name", "type", "lusidInstrumentId", "instrumentScope", "settlementMode", "contractualSettlementDate", "units", "settledUnits", "unsettledUnits", "overdueUnits"]
39
+
40
+ class Config:
41
+ """Pydantic configuration"""
42
+ allow_population_by_field_name = True
43
+ validate_assignment = True
44
+
45
+ def __str__(self):
46
+ """For `print` and `pprint`"""
47
+ return pprint.pformat(self.dict(by_alias=False))
48
+
49
+ def __repr__(self):
50
+ """For `print` and `pprint`"""
51
+ return self.to_str()
52
+
53
+ def to_str(self) -> str:
54
+ """Returns the string representation of the model using alias"""
55
+ return pprint.pformat(self.dict(by_alias=True))
56
+
57
+ def to_json(self) -> str:
58
+ """Returns the JSON representation of the model using alias"""
59
+ return json.dumps(self.to_dict())
60
+
61
+ @classmethod
62
+ def from_json(cls, json_str: str) -> MovementSettlementSummary:
63
+ """Create an instance of MovementSettlementSummary from a JSON string"""
64
+ return cls.from_dict(json.loads(json_str))
65
+
66
+ def to_dict(self):
67
+ """Returns the dictionary representation of the model using alias"""
68
+ _dict = self.dict(by_alias=True,
69
+ exclude={
70
+ },
71
+ exclude_none=True)
72
+ # set to None if name (nullable) is None
73
+ # and __fields_set__ contains the field
74
+ if self.name is None and "name" in self.__fields_set__:
75
+ _dict['name'] = None
76
+
77
+ # set to None if type (nullable) is None
78
+ # and __fields_set__ contains the field
79
+ if self.type is None and "type" in self.__fields_set__:
80
+ _dict['type'] = None
81
+
82
+ # set to None if lusid_instrument_id (nullable) is None
83
+ # and __fields_set__ contains the field
84
+ if self.lusid_instrument_id is None and "lusid_instrument_id" in self.__fields_set__:
85
+ _dict['lusidInstrumentId'] = None
86
+
87
+ # set to None if instrument_scope (nullable) is None
88
+ # and __fields_set__ contains the field
89
+ if self.instrument_scope is None and "instrument_scope" in self.__fields_set__:
90
+ _dict['instrumentScope'] = None
91
+
92
+ # set to None if settlement_mode (nullable) is None
93
+ # and __fields_set__ contains the field
94
+ if self.settlement_mode is None and "settlement_mode" in self.__fields_set__:
95
+ _dict['settlementMode'] = None
96
+
97
+ # set to None if contractual_settlement_date (nullable) is None
98
+ # and __fields_set__ contains the field
99
+ if self.contractual_settlement_date is None and "contractual_settlement_date" in self.__fields_set__:
100
+ _dict['contractualSettlementDate'] = None
101
+
102
+ return _dict
103
+
104
+ @classmethod
105
+ def from_dict(cls, obj: dict) -> MovementSettlementSummary:
106
+ """Create an instance of MovementSettlementSummary from a dict"""
107
+ if obj is None:
108
+ return None
109
+
110
+ if not isinstance(obj, dict):
111
+ return MovementSettlementSummary.parse_obj(obj)
112
+
113
+ _obj = MovementSettlementSummary.parse_obj({
114
+ "name": obj.get("name"),
115
+ "type": obj.get("type"),
116
+ "lusid_instrument_id": obj.get("lusidInstrumentId"),
117
+ "instrument_scope": obj.get("instrumentScope"),
118
+ "settlement_mode": obj.get("settlementMode"),
119
+ "contractual_settlement_date": obj.get("contractualSettlementDate"),
120
+ "units": obj.get("units"),
121
+ "settled_units": obj.get("settledUnits"),
122
+ "unsettled_units": obj.get("unsettledUnits"),
123
+ "overdue_units": obj.get("overdueUnits")
124
+ })
125
+ return _obj
@@ -0,0 +1,115 @@
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
+ from datetime import datetime
21
+ from typing import Any, Dict, Optional
22
+ from pydantic.v1 import StrictStr, Field, BaseModel, Field, constr, validator
23
+ from lusid.models.model_property import ModelProperty
24
+
25
+ class UpsertFundBookmarkRequest(BaseModel):
26
+ """
27
+ A definition for the period you wish to close # noqa: E501
28
+ """
29
+ bookmark_code: StrictStr = Field(...,alias="bookmarkCode", description="Unique code for the Bookmark.")
30
+ display_name: StrictStr = Field(...,alias="displayName", description="Identifiable Name assigned to the Bookmark.")
31
+ description: Optional[StrictStr] = Field(None,alias="description", description="Description assigned to the Bookmark.")
32
+ effective_at: datetime = Field(..., alias="effectiveAt", description="The effective time of the diary entry.")
33
+ query_as_at: Optional[datetime] = Field(None, alias="queryAsAt", description="The query time of the diary entry. Defaults to latest.")
34
+ properties: Optional[Dict[str, ModelProperty]] = Field(None, description="A set of properties for the diary entry.")
35
+ __properties = ["bookmarkCode", "displayName", "description", "effectiveAt", "queryAsAt", "properties"]
36
+
37
+ class Config:
38
+ """Pydantic configuration"""
39
+ allow_population_by_field_name = True
40
+ validate_assignment = True
41
+
42
+ def __str__(self):
43
+ """For `print` and `pprint`"""
44
+ return pprint.pformat(self.dict(by_alias=False))
45
+
46
+ def __repr__(self):
47
+ """For `print` and `pprint`"""
48
+ return self.to_str()
49
+
50
+ def to_str(self) -> str:
51
+ """Returns the string representation of the model using alias"""
52
+ return pprint.pformat(self.dict(by_alias=True))
53
+
54
+ def to_json(self) -> str:
55
+ """Returns the JSON representation of the model using alias"""
56
+ return json.dumps(self.to_dict())
57
+
58
+ @classmethod
59
+ def from_json(cls, json_str: str) -> UpsertFundBookmarkRequest:
60
+ """Create an instance of UpsertFundBookmarkRequest from a JSON string"""
61
+ return cls.from_dict(json.loads(json_str))
62
+
63
+ def to_dict(self):
64
+ """Returns the dictionary representation of the model using alias"""
65
+ _dict = self.dict(by_alias=True,
66
+ exclude={
67
+ },
68
+ exclude_none=True)
69
+ # override the default output from pydantic by calling `to_dict()` of each value in properties (dict)
70
+ _field_dict = {}
71
+ if self.properties:
72
+ for _key in self.properties:
73
+ if self.properties[_key]:
74
+ _field_dict[_key] = self.properties[_key].to_dict()
75
+ _dict['properties'] = _field_dict
76
+ # set to None if description (nullable) is None
77
+ # and __fields_set__ contains the field
78
+ if self.description is None and "description" in self.__fields_set__:
79
+ _dict['description'] = None
80
+
81
+ # set to None if query_as_at (nullable) is None
82
+ # and __fields_set__ contains the field
83
+ if self.query_as_at is None and "query_as_at" in self.__fields_set__:
84
+ _dict['queryAsAt'] = None
85
+
86
+ # set to None if properties (nullable) is None
87
+ # and __fields_set__ contains the field
88
+ if self.properties is None and "properties" in self.__fields_set__:
89
+ _dict['properties'] = None
90
+
91
+ return _dict
92
+
93
+ @classmethod
94
+ def from_dict(cls, obj: dict) -> UpsertFundBookmarkRequest:
95
+ """Create an instance of UpsertFundBookmarkRequest from a dict"""
96
+ if obj is None:
97
+ return None
98
+
99
+ if not isinstance(obj, dict):
100
+ return UpsertFundBookmarkRequest.parse_obj(obj)
101
+
102
+ _obj = UpsertFundBookmarkRequest.parse_obj({
103
+ "bookmark_code": obj.get("bookmarkCode"),
104
+ "display_name": obj.get("displayName"),
105
+ "description": obj.get("description"),
106
+ "effective_at": obj.get("effectiveAt"),
107
+ "query_as_at": obj.get("queryAsAt"),
108
+ "properties": dict(
109
+ (_k, ModelProperty.from_dict(_v))
110
+ for _k, _v in obj.get("properties").items()
111
+ )
112
+ if obj.get("properties") is not None
113
+ else None
114
+ })
115
+ return _obj
@@ -19,7 +19,7 @@ import json
19
19
 
20
20
  from datetime import datetime
21
21
  from typing import Any, Dict, Optional
22
- from pydantic.v1 import StrictStr, Field, BaseModel, Field, constr, validator
22
+ from pydantic.v1 import StrictStr, Field, BaseModel, Field, StrictBool, constr, validator
23
23
  from lusid.models.model_property import ModelProperty
24
24
 
25
25
  class UpsertValuationPointRequest(BaseModel):
@@ -31,7 +31,8 @@ class UpsertValuationPointRequest(BaseModel):
31
31
  effective_at: datetime = Field(..., alias="effectiveAt", description="The effective time of the diary entry.")
32
32
  query_as_at: Optional[datetime] = Field(None, alias="queryAsAt", description="The query time of the diary entry. Defaults to latest.")
33
33
  properties: Optional[Dict[str, ModelProperty]] = Field(None, description="A set of properties for the diary entry.")
34
- __properties = ["diaryEntryCode", "name", "effectiveAt", "queryAsAt", "properties"]
34
+ apply_clear_down: Optional[StrictBool] = Field(None, alias="applyClearDown", description="Defaults to false. Set to true if you want that the closed period to have the clear down applied.")
35
+ __properties = ["diaryEntryCode", "name", "effectiveAt", "queryAsAt", "properties", "applyClearDown"]
35
36
 
36
37
  class Config:
37
38
  """Pydantic configuration"""
@@ -108,6 +109,7 @@ class UpsertValuationPointRequest(BaseModel):
108
109
  for _k, _v in obj.get("properties").items()
109
110
  )
110
111
  if obj.get("properties") is not None
111
- else None
112
+ else None,
113
+ "apply_clear_down": obj.get("applyClearDown")
112
114
  })
113
115
  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 StrictStr, Field, BaseModel, Field
22
+ from pydantic.v1 import StrictStr, Field, BaseModel, Field, StrictBool
23
23
  from lusid.models.date_or_diary_entry import DateOrDiaryEntry
24
24
 
25
25
  class ValuationPointDataQueryParameters(BaseModel):
@@ -28,7 +28,8 @@ class ValuationPointDataQueryParameters(BaseModel):
28
28
  """
29
29
  start: Optional[DateOrDiaryEntry] = None
30
30
  end: DateOrDiaryEntry = Field(...)
31
- __properties = ["start", "end"]
31
+ exclude_cleardown_module: Optional[StrictBool] = Field(None, alias="excludeCleardownModule", description="By deafult this flag is set to false, if this is set to true, no cleardown module will be applied to the trial balance.")
32
+ __properties = ["start", "end", "excludeCleardownModule"]
32
33
 
33
34
  class Config:
34
35
  """Pydantic configuration"""
@@ -81,6 +82,7 @@ class ValuationPointDataQueryParameters(BaseModel):
81
82
 
82
83
  _obj = ValuationPointDataQueryParameters.parse_obj({
83
84
  "start": DateOrDiaryEntry.from_dict(obj.get("start")) if obj.get("start") is not None else None,
84
- "end": DateOrDiaryEntry.from_dict(obj.get("end")) if obj.get("end") is not None else None
85
+ "end": DateOrDiaryEntry.from_dict(obj.get("end")) if obj.get("end") is not None else None,
86
+ "exclude_cleardown_module": obj.get("excludeCleardownModule")
85
87
  })
86
88
  return _obj
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: lusid-sdk
3
- Version: 2.1.900
3
+ Version: 2.1.902
4
4
  Summary: LUSID API
5
5
  Home-page: https://github.com/finbourne/lusid-sdk-python
6
6
  License: MIT
@@ -264,6 +264,7 @@ Class | Method | HTTP request | Description
264
264
  *FundsApi* | [**create_fee**](docs/FundsApi.md#create_fee) | **POST** /api/funds/{scope}/{code}/fees | [EXPERIMENTAL] CreateFee: Create a Fee.
265
265
  *FundsApi* | [**create_fund**](docs/FundsApi.md#create_fund) | **POST** /api/funds/{scope} | [EXPERIMENTAL] CreateFund: Create a Fund.
266
266
  *FundsApi* | [**create_fund_v2**](docs/FundsApi.md#create_fund_v2) | **POST** /api/funds/v2/{scope} | [EXPERIMENTAL] CreateFundV2: Create a Fund V2 (Preview).
267
+ *FundsApi* | [**delete_bookmark**](docs/FundsApi.md#delete_bookmark) | **DELETE** /api/funds/{scope}/{code}/bookmarks/{bookmarkCode} | [EXPERIMENTAL] DeleteBookmark: Delete a Bookmark.
267
268
  *FundsApi* | [**delete_fee**](docs/FundsApi.md#delete_fee) | **DELETE** /api/funds/{scope}/{code}/fees/{feeCode} | [EXPERIMENTAL] DeleteFee: Delete a Fee.
268
269
  *FundsApi* | [**delete_fund**](docs/FundsApi.md#delete_fund) | **DELETE** /api/funds/{scope}/{code} | [EXPERIMENTAL] DeleteFund: Delete a Fund.
269
270
  *FundsApi* | [**delete_valuation_point**](docs/FundsApi.md#delete_valuation_point) | **DELETE** /api/funds/{scope}/{code}/valuationpoints/{diaryEntryCode} | [EXPERIMENTAL] DeleteValuationPoint: Delete a Valuation Point.
@@ -286,6 +287,7 @@ Class | Method | HTTP request | Description
286
287
  *FundsApi* | [**patch_fee**](docs/FundsApi.md#patch_fee) | **PATCH** /api/funds/{scope}/{code}/fees/{feeCode} | [EXPERIMENTAL] PatchFee: Patch Fee.
287
288
  *FundsApi* | [**patch_fund**](docs/FundsApi.md#patch_fund) | **PATCH** /api/funds/{scope}/{code} | [EXPERIMENTAL] PatchFund: Patch a Fund.
288
289
  *FundsApi* | [**set_share_class_instruments**](docs/FundsApi.md#set_share_class_instruments) | **PUT** /api/funds/{scope}/{code}/shareclasses | [EXPERIMENTAL] SetShareClassInstruments: Set the ShareClass Instruments on a fund.
290
+ *FundsApi* | [**upsert_bookmark**](docs/FundsApi.md#upsert_bookmark) | **POST** /api/funds/{scope}/{code}/bookmarks | [EXPERIMENTAL] UpsertBookmark: Upsert a bookmark.
289
291
  *FundsApi* | [**upsert_diary_entry_type_valuation_point**](docs/FundsApi.md#upsert_diary_entry_type_valuation_point) | **POST** /api/funds/{scope}/{code}/valuationpoints | [EXPERIMENTAL] UpsertDiaryEntryTypeValuationPoint: Upsert Valuation Point.
290
292
  *FundsApi* | [**upsert_fee_properties**](docs/FundsApi.md#upsert_fee_properties) | **POST** /api/funds/{scope}/{code}/fees/{feeCode}/properties/$upsert | [EXPERIMENTAL] UpsertFeeProperties: Upsert Fee properties.
291
293
  *FundsApi* | [**upsert_fund_properties**](docs/FundsApi.md#upsert_fund_properties) | **POST** /api/funds/{scope}/{code}/properties/$upsert | [EXPERIMENTAL] UpsertFundProperties: Upsert Fund properties.
@@ -1332,6 +1334,7 @@ Class | Method | HTTP request | Description
1332
1334
  - [ModelSelection](docs/ModelSelection.md)
1333
1335
  - [MoveOrdersToDifferentBlocksRequest](docs/MoveOrdersToDifferentBlocksRequest.md)
1334
1336
  - [MovedOrderToDifferentBlockResponse](docs/MovedOrderToDifferentBlockResponse.md)
1337
+ - [MovementSettlementSummary](docs/MovementSettlementSummary.md)
1335
1338
  - [MovementType](docs/MovementType.md)
1336
1339
  - [MultiCurrencyAmounts](docs/MultiCurrencyAmounts.md)
1337
1340
  - [NavTypeDefinition](docs/NavTypeDefinition.md)
@@ -1886,6 +1889,7 @@ Class | Method | HTTP request | Description
1886
1889
  - [UpsertCustomEntityAccessMetadataRequest](docs/UpsertCustomEntityAccessMetadataRequest.md)
1887
1890
  - [UpsertDialectRequest](docs/UpsertDialectRequest.md)
1888
1891
  - [UpsertFlowConventionsRequest](docs/UpsertFlowConventionsRequest.md)
1892
+ - [UpsertFundBookmarkRequest](docs/UpsertFundBookmarkRequest.md)
1889
1893
  - [UpsertIndexConventionRequest](docs/UpsertIndexConventionRequest.md)
1890
1894
  - [UpsertInstrumentEventRequest](docs/UpsertInstrumentEventRequest.md)
1891
1895
  - [UpsertInstrumentEventsResponse](docs/UpsertInstrumentEventsResponse.md)