lusid-sdk 2.1.574__py3-none-any.whl → 2.1.576__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/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.7030\n"\
448
+ "Version of the API: 0.11.7033\n"\
449
449
  "SDK Package Version: {package_version}".\
450
450
  format(env=sys.platform, pyversion=sys.version, package_version=package_version)
451
451
 
@@ -18,13 +18,14 @@ 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 BaseModel, Field, StrictFloat, StrictInt, StrictStr, constr, validator
21
+ from typing import Any, Dict, List, Optional, Union
22
+ from pydantic.v1 import BaseModel, Field, StrictFloat, StrictInt, StrictStr, conlist, constr, validator
23
23
  from lusid.models.currency_and_amount import CurrencyAndAmount
24
24
  from lusid.models.custodian_account import CustodianAccount
25
25
  from lusid.models.otc_confirmation import OtcConfirmation
26
26
  from lusid.models.perpetual_property import PerpetualProperty
27
27
  from lusid.models.resource_id import ResourceId
28
+ from lusid.models.strategy import Strategy
28
29
  from lusid.models.transaction_price import TransactionPrice
29
30
 
30
31
  class Transaction(BaseModel):
@@ -54,7 +55,8 @@ class Transaction(BaseModel):
54
55
  allocation_id: Optional[ResourceId] = Field(None, alias="allocationId")
55
56
  custodian_account: Optional[CustodianAccount] = Field(None, alias="custodianAccount")
56
57
  transaction_group_id: Optional[StrictStr] = Field(None, alias="transactionGroupId", description="The identifier for grouping economic events across multiple transactions")
57
- __properties = ["transactionId", "type", "instrumentIdentifiers", "instrumentScope", "instrumentUid", "transactionDate", "settlementDate", "units", "transactionPrice", "totalConsideration", "exchangeRate", "transactionCurrency", "properties", "counterpartyId", "source", "entryDateTime", "otcConfirmation", "transactionStatus", "cancelDateTime", "orderId", "allocationId", "custodianAccount", "transactionGroupId"]
58
+ strategy_tag: Optional[conlist(Strategy)] = Field(None, alias="strategyTag", description="A list of strategies representing the allocation of units across multiple sub-holding keys")
59
+ __properties = ["transactionId", "type", "instrumentIdentifiers", "instrumentScope", "instrumentUid", "transactionDate", "settlementDate", "units", "transactionPrice", "totalConsideration", "exchangeRate", "transactionCurrency", "properties", "counterpartyId", "source", "entryDateTime", "otcConfirmation", "transactionStatus", "cancelDateTime", "orderId", "allocationId", "custodianAccount", "transactionGroupId", "strategyTag"]
58
60
 
59
61
  @validator('transaction_status')
60
62
  def transaction_status_validate_enum(cls, value):
@@ -115,6 +117,13 @@ class Transaction(BaseModel):
115
117
  # override the default output from pydantic by calling `to_dict()` of custodian_account
116
118
  if self.custodian_account:
117
119
  _dict['custodianAccount'] = self.custodian_account.to_dict()
120
+ # override the default output from pydantic by calling `to_dict()` of each item in strategy_tag (list)
121
+ _items = []
122
+ if self.strategy_tag:
123
+ for _item in self.strategy_tag:
124
+ if _item:
125
+ _items.append(_item.to_dict())
126
+ _dict['strategyTag'] = _items
118
127
  # set to None if instrument_identifiers (nullable) is None
119
128
  # and __fields_set__ contains the field
120
129
  if self.instrument_identifiers is None and "instrument_identifiers" in self.__fields_set__:
@@ -160,6 +169,11 @@ class Transaction(BaseModel):
160
169
  if self.transaction_group_id is None and "transaction_group_id" in self.__fields_set__:
161
170
  _dict['transactionGroupId'] = None
162
171
 
172
+ # set to None if strategy_tag (nullable) is None
173
+ # and __fields_set__ contains the field
174
+ if self.strategy_tag is None and "strategy_tag" in self.__fields_set__:
175
+ _dict['strategyTag'] = None
176
+
163
177
  return _dict
164
178
 
165
179
  @classmethod
@@ -199,6 +213,7 @@ class Transaction(BaseModel):
199
213
  "order_id": ResourceId.from_dict(obj.get("orderId")) if obj.get("orderId") is not None else None,
200
214
  "allocation_id": ResourceId.from_dict(obj.get("allocationId")) if obj.get("allocationId") is not None else None,
201
215
  "custodian_account": CustodianAccount.from_dict(obj.get("custodianAccount")) if obj.get("custodianAccount") is not None else None,
202
- "transaction_group_id": obj.get("transactionGroupId")
216
+ "transaction_group_id": obj.get("transactionGroupId"),
217
+ "strategy_tag": [Strategy.from_dict(_item) for _item in obj.get("strategyTag")] if obj.get("strategyTag") is not None else None
203
218
  })
204
219
  return _obj
@@ -49,7 +49,7 @@ class TransactionRequest(BaseModel):
49
49
  allocation_id: Optional[ResourceId] = Field(None, alias="allocationId")
50
50
  custodian_account_id: Optional[ResourceId] = Field(None, alias="custodianAccountId")
51
51
  transaction_group_id: Optional[constr(strict=True, max_length=64, min_length=1)] = Field(None, alias="transactionGroupId", description="The identifier for grouping economic events across multiple transactions")
52
- strategy_tag: Optional[conlist(Strategy)] = Field(None, alias="strategyTag", description="A Json representing the allocation of units accross multiple sub-holding keys")
52
+ strategy_tag: Optional[conlist(Strategy)] = Field(None, alias="strategyTag", description="A list of strategies representing the allocation of units across multiple sub-holding keys")
53
53
  __properties = ["transactionId", "type", "instrumentIdentifiers", "transactionDate", "settlementDate", "units", "transactionPrice", "totalConsideration", "exchangeRate", "transactionCurrency", "properties", "counterpartyId", "source", "otcConfirmation", "orderId", "allocationId", "custodianAccountId", "transactionGroupId", "strategyTag"]
54
54
 
55
55
  class Config:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: lusid-sdk
3
- Version: 2.1.574
3
+ Version: 2.1.576
4
4
  Summary: LUSID API
5
5
  Home-page: https://github.com/finbourne/lusid-sdk-python
6
6
  License: MIT
@@ -70,7 +70,7 @@ lusid/api/translation_api.py,sha256=nIyuLncCvVC5k2d7Nm32zR8AQ1dkrVm1OThkmELY_OM,
70
70
  lusid/api/workspace_api.py,sha256=mYQPqFUVf1VKYeWQUV5VkcdSqwejSmPDGd66Az86-_E,191319
71
71
  lusid/api_client.py,sha256=ewMTmf9SRurY8pYnUx9jy24RdldPCOa4US38pnrVxjA,31140
72
72
  lusid/api_response.py,sha256=6-gnhty6lu8MMAERt3_kTVD7UxQgWFfcjgpcq6iN5IU,855
73
- lusid/configuration.py,sha256=35FiKF3M68JYSf6aGJ8yl8pRbdmn-aSAvFXtiXXpM0o,17972
73
+ lusid/configuration.py,sha256=Zfb6UzhvaAQ7DA78g-3PxDAVCnzXipspJ4_NcZO3eN8,17972
74
74
  lusid/exceptions.py,sha256=HIQwgmQrszLlcVCLaqex8dO0laVuejUyOMz7U2ZWJ6s,5326
75
75
  lusid/extensions/__init__.py,sha256=dzDHEzpn-9smd2-_UMWQzeyX6Ha4jGf6fnqx7qxKxNI,630
76
76
  lusid/extensions/api_client.py,sha256=GzygWg_h603QK1QS2HvAijuE2R1TnvoF6-Yg0CeM3ug,30943
@@ -1063,7 +1063,7 @@ lusid/models/total_return_swap.py,sha256=x3RBIefY7oiI9MfIK3A2okvuAdeVEk025jp6F5g
1063
1063
  lusid/models/touch.py,sha256=OECUpEFcCT1kPT5SJIsoNHtR8k2AhEAbDd6P86NcF4s,2726
1064
1064
  lusid/models/trade_ticket.py,sha256=ONpDAdaWs3yfUqMxI7Mq0cYpX0aJkN8XH_9n9rIs5IA,2320
1065
1065
  lusid/models/trade_ticket_type.py,sha256=j7f2bfiA_cxaFtjZpT3Natl4BoaGAaEXF6E0ltEzTWE,706
1066
- lusid/models/transaction.py,sha256=_Ss6xjcpciz4hXfTI1Uf-tqGSOvOLoJBcFEYvQkk20o,12099
1066
+ lusid/models/transaction.py,sha256=ILLCvrD3plO54exBwbrckEeAvmHOkwudZc-SbWWb4ig,13050
1067
1067
  lusid/models/transaction_configuration_data.py,sha256=BSHXnMn6TWaubn2zTxPvbRUOsRtGYb0N4sDNUcf1SaY,4318
1068
1068
  lusid/models/transaction_configuration_data_request.py,sha256=mypVKRfltmkG5NEUGqDDyBYdIir3S1nkYzGL8BwHWgo,4398
1069
1069
  lusid/models/transaction_configuration_movement_data.py,sha256=ofaJZQOHloSpT4Y09Sgw-JtQq3RWNwkBl-JLMGg_yYo,7418
@@ -1083,7 +1083,7 @@ lusid/models/transaction_query_mode.py,sha256=q3QNcFSP-LwfdQF_yRUOZMd6ElemQm03yO
1083
1083
  lusid/models/transaction_query_parameters.py,sha256=sYKAouptXvwNtAzz2SdOi7F-9M5q2xOwqT1kjz8vSNE,3365
1084
1084
  lusid/models/transaction_reconciliation_request.py,sha256=pys1JU22geF_MiZwGBlzhiXQ_daHZ0Cffpce8Wvq7ec,4294
1085
1085
  lusid/models/transaction_reconciliation_request_v2.py,sha256=YjOKUfgsoXVlXLbAP2qDc8wsRV-Te-sxtsvKGJe1cjg,5946
1086
- lusid/models/transaction_request.py,sha256=DzbZiQbPT8k40M8Ey1CEqXWMNUIo21mBmKXNVwHsIlc,10834
1086
+ lusid/models/transaction_request.py,sha256=W0qAUjOVWrS7fVK2qP4VtETic5AAGmM1DPXu-6Rcfl8,10847
1087
1087
  lusid/models/transaction_roles.py,sha256=1r-BzcchffLl6p4lSUhRAUmsVdrl7Bvce2cCiwxJanE,839
1088
1088
  lusid/models/transaction_set_configuration_data.py,sha256=CmMrtyOxpcJd5LXW2egsTf4yPCkoJ7yGUA-WFL07zI4,4411
1089
1089
  lusid/models/transaction_set_configuration_data_request.py,sha256=YWx3s0gvxI-6Zh9HmrbcUw9SO2t7OoEq5rXYJyNOFYU,3947
@@ -1227,6 +1227,6 @@ lusid/models/workspace_update_request.py,sha256=uUXEpX-dJ5UiL9w1wMxIFeovSBiTJ-vi
1227
1227
  lusid/models/yield_curve_data.py,sha256=SbxvdJ4-GWK9kpMdw4Fnxc7_kvIMwgsRsd_31UJn7nw,6330
1228
1228
  lusid/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
1229
1229
  lusid/rest.py,sha256=HQT__5LQEMu6_1sLKvYj-DI4FH1DJXBIPYfZCTTyrY4,13431
1230
- lusid_sdk-2.1.574.dist-info/METADATA,sha256=W4qwWLVbOF2npf1Etjb2gDPMeZ0H8z_ljZPglKb5Xqo,209172
1231
- lusid_sdk-2.1.574.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
1232
- lusid_sdk-2.1.574.dist-info/RECORD,,
1230
+ lusid_sdk-2.1.576.dist-info/METADATA,sha256=HhIdN0oPpX1mG9OsM0coGiw9ocBDV4zikgw0EyFQET8,209172
1231
+ lusid_sdk-2.1.576.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
1232
+ lusid_sdk-2.1.576.dist-info/RECORD,,