lusid-sdk 2.1.261__py3-none-any.whl → 2.1.320__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/__init__.py +38 -0
- lusid/api/compliance_api.py +191 -0
- lusid/api/funds_api.py +1 -1
- lusid/api/order_management_api.py +159 -0
- lusid/api/scopes_api.py +38 -9
- lusid/configuration.py +1 -1
- lusid/extensions/configuration_loaders.py +9 -1
- lusid/models/__init__.py +38 -0
- lusid/models/cancel_orders_response.py +153 -0
- lusid/models/cancelled_order_result.py +73 -0
- lusid/models/cash.py +93 -0
- lusid/models/compliance_run_configuration.py +73 -0
- lusid/models/component_filter.py +85 -0
- lusid/models/component_rule.py +13 -19
- lusid/models/contract_for_difference.py +4 -2
- lusid/models/fund.py +6 -1
- lusid/models/fund_amount.py +69 -0
- lusid/models/fund_configuration.py +16 -15
- lusid/models/fund_configuration_request.py +18 -12
- lusid/models/fund_pnl_breakdown.py +110 -0
- lusid/models/fund_previous_nav.py +69 -0
- lusid/models/fund_request.py +6 -1
- lusid/models/fund_valuation_point_data.py +152 -0
- lusid/models/futures_contract_details.py +9 -2
- lusid/models/lusid_instrument.py +3 -2
- lusid/models/market_data_key_rule.py +3 -3
- lusid/models/market_data_specific_rule.py +3 -3
- lusid/models/market_quote.py +3 -3
- lusid/models/model_selection.py +3 -3
- lusid/models/pre_trade_configuration.py +69 -0
- lusid/models/previous_fund_valuation_point_data.py +79 -0
- lusid/models/previous_nav.py +73 -0
- lusid/models/previous_share_class_breakdown.py +81 -0
- lusid/models/pricing_model.py +1 -0
- lusid/models/quote_series_id.py +4 -20
- lusid/models/quote_type.py +3 -0
- lusid/models/share_class_amount.py +73 -0
- lusid/models/share_class_breakdown.py +163 -0
- lusid/models/share_class_data.py +79 -0
- lusid/models/share_class_details.py +108 -0
- lusid/models/share_class_pnl_breakdown.py +110 -0
- lusid/models/staged_modification.py +8 -1
- lusid/models/template_field.py +3 -1
- lusid/models/transaction_configuration_movement_data.py +2 -2
- lusid/models/transaction_configuration_movement_data_request.py +1 -1
- lusid/models/transaction_field_map.py +1 -1
- lusid/models/transaction_type_movement.py +2 -2
- lusid/models/unitisation_data.py +73 -0
- lusid/models/valuation_point_data_response.py +30 -9
- {lusid_sdk-2.1.261.dist-info → lusid_sdk-2.1.320.dist-info}/METADATA +30 -215
- {lusid_sdk-2.1.261.dist-info → lusid_sdk-2.1.320.dist-info}/RECORD +52 -33
- {lusid_sdk-2.1.261.dist-info → lusid_sdk-2.1.320.dist-info}/WHEEL +0 -0
lusid/configuration.py
CHANGED
@@ -373,7 +373,7 @@ class Configuration:
|
|
373
373
|
return "Python SDK Debug Report:\n"\
|
374
374
|
"OS: {env}\n"\
|
375
375
|
"Python Version: {pyversion}\n"\
|
376
|
-
"Version of the API: 0.11.
|
376
|
+
"Version of the API: 0.11.6751\n"\
|
377
377
|
"SDK Package Version: {package_version}".\
|
378
378
|
format(env=sys.platform, pyversion=sys.version, package_version=package_version)
|
379
379
|
|
@@ -10,7 +10,8 @@ logger = logging.getLogger(__name__)
|
|
10
10
|
|
11
11
|
ENVIRONMENT_CONFIG_KEYS = {
|
12
12
|
"token_url": "FBN_TOKEN_URL",
|
13
|
-
"api_url": "
|
13
|
+
"api_url": "FBN_LUSID_URL",
|
14
|
+
"previous_api_url": "FBN_LUSID_API_URL",
|
14
15
|
"username": "FBN_USERNAME",
|
15
16
|
"password": "FBN_PASSWORD",
|
16
17
|
"client_id": "FBN_CLIENT_ID",
|
@@ -26,6 +27,7 @@ ENVIRONMENT_CONFIG_KEYS = {
|
|
26
27
|
SECRETS_FILE_CONFIG_KEYS = {
|
27
28
|
"token_url": "tokenUrl",
|
28
29
|
"api_url": "lusidUrl",
|
30
|
+
"previous_api_url": "lusidUrl",
|
29
31
|
"username": "username",
|
30
32
|
"password": "password",
|
31
33
|
"client_id": "clientId",
|
@@ -96,6 +98,9 @@ class SecretsFileConfigurationLoader:
|
|
96
98
|
for key, value in SECRETS_FILE_CONFIG_KEYS.items()
|
97
99
|
if "proxy" not in key
|
98
100
|
}
|
101
|
+
if not populated_api_config_values["api_url"]:
|
102
|
+
populated_api_config_values["api_url"] = populated_api_config_values["previous_api_url"]
|
103
|
+
del(populated_api_config_values["previous_api_url"])
|
99
104
|
proxy_config_section = config.get(proxy_config_key, {})
|
100
105
|
populated_proxy_values = {
|
101
106
|
key: proxy_config_section.get(value)
|
@@ -127,6 +132,9 @@ class EnvironmentVariablesConfigurationLoader:
|
|
127
132
|
for key, value in ENVIRONMENT_CONFIG_KEYS.items()
|
128
133
|
if "proxy" not in key
|
129
134
|
}
|
135
|
+
if not populated_api_config_values["api_url"]:
|
136
|
+
populated_api_config_values["api_url"] = populated_api_config_values["previous_api_url"]
|
137
|
+
del(populated_api_config_values["previous_api_url"])
|
130
138
|
populated_proxy_values = {
|
131
139
|
key: os.environ.get(value)
|
132
140
|
for key, value in ENVIRONMENT_CONFIG_KEYS.items()
|
lusid/models/__init__.py
CHANGED
@@ -106,10 +106,13 @@ from lusid.models.calculation_info import CalculationInfo
|
|
106
106
|
from lusid.models.calendar import Calendar
|
107
107
|
from lusid.models.calendar_date import CalendarDate
|
108
108
|
from lusid.models.calendar_dependency import CalendarDependency
|
109
|
+
from lusid.models.cancel_orders_response import CancelOrdersResponse
|
109
110
|
from lusid.models.cancel_placements_response import CancelPlacementsResponse
|
111
|
+
from lusid.models.cancelled_order_result import CancelledOrderResult
|
110
112
|
from lusid.models.cancelled_placement_result import CancelledPlacementResult
|
111
113
|
from lusid.models.cap_floor import CapFloor
|
112
114
|
from lusid.models.capital_distribution_event import CapitalDistributionEvent
|
115
|
+
from lusid.models.cash import Cash
|
113
116
|
from lusid.models.cash_and_security_offer_election import CashAndSecurityOfferElection
|
114
117
|
from lusid.models.cash_dependency import CashDependency
|
115
118
|
from lusid.models.cash_dividend_event import CashDividendEvent
|
@@ -161,6 +164,7 @@ from lusid.models.compliance_rule_result_v2 import ComplianceRuleResultV2
|
|
161
164
|
from lusid.models.compliance_rule_template import ComplianceRuleTemplate
|
162
165
|
from lusid.models.compliance_rule_upsert_request import ComplianceRuleUpsertRequest
|
163
166
|
from lusid.models.compliance_rule_upsert_response import ComplianceRuleUpsertResponse
|
167
|
+
from lusid.models.compliance_run_configuration import ComplianceRunConfiguration
|
164
168
|
from lusid.models.compliance_run_info import ComplianceRunInfo
|
165
169
|
from lusid.models.compliance_run_info_v2 import ComplianceRunInfoV2
|
166
170
|
from lusid.models.compliance_step import ComplianceStep
|
@@ -174,6 +178,7 @@ from lusid.models.compliance_template_parameter import ComplianceTemplateParamet
|
|
174
178
|
from lusid.models.compliance_template_variation import ComplianceTemplateVariation
|
175
179
|
from lusid.models.compliance_template_variation_dto import ComplianceTemplateVariationDto
|
176
180
|
from lusid.models.compliance_template_variation_request import ComplianceTemplateVariationRequest
|
181
|
+
from lusid.models.component_filter import ComponentFilter
|
177
182
|
from lusid.models.component_rule import ComponentRule
|
178
183
|
from lusid.models.component_transaction import ComponentTransaction
|
179
184
|
from lusid.models.composite_breakdown import CompositeBreakdown
|
@@ -341,12 +346,16 @@ from lusid.models.flow_conventions import FlowConventions
|
|
341
346
|
from lusid.models.forward_rate_agreement import ForwardRateAgreement
|
342
347
|
from lusid.models.from_recipe import FromRecipe
|
343
348
|
from lusid.models.fund import Fund
|
349
|
+
from lusid.models.fund_amount import FundAmount
|
344
350
|
from lusid.models.fund_configuration import FundConfiguration
|
345
351
|
from lusid.models.fund_configuration_properties import FundConfigurationProperties
|
346
352
|
from lusid.models.fund_configuration_request import FundConfigurationRequest
|
353
|
+
from lusid.models.fund_pnl_breakdown import FundPnlBreakdown
|
354
|
+
from lusid.models.fund_previous_nav import FundPreviousNAV
|
347
355
|
from lusid.models.fund_properties import FundProperties
|
348
356
|
from lusid.models.fund_request import FundRequest
|
349
357
|
from lusid.models.fund_share_class import FundShareClass
|
358
|
+
from lusid.models.fund_valuation_point_data import FundValuationPointData
|
350
359
|
from lusid.models.funding_leg import FundingLeg
|
351
360
|
from lusid.models.funding_leg_options import FundingLegOptions
|
352
361
|
from lusid.models.future import Future
|
@@ -654,7 +663,11 @@ from lusid.models.posting_module_request import PostingModuleRequest
|
|
654
663
|
from lusid.models.posting_module_response import PostingModuleResponse
|
655
664
|
from lusid.models.posting_module_rule import PostingModuleRule
|
656
665
|
from lusid.models.posting_module_rules_updated_response import PostingModuleRulesUpdatedResponse
|
666
|
+
from lusid.models.pre_trade_configuration import PreTradeConfiguration
|
657
667
|
from lusid.models.premium import Premium
|
668
|
+
from lusid.models.previous_fund_valuation_point_data import PreviousFundValuationPointData
|
669
|
+
from lusid.models.previous_nav import PreviousNAV
|
670
|
+
from lusid.models.previous_share_class_breakdown import PreviousShareClassBreakdown
|
658
671
|
from lusid.models.pricing_context import PricingContext
|
659
672
|
from lusid.models.pricing_model import PricingModel
|
660
673
|
from lusid.models.pricing_options import PricingOptions
|
@@ -835,6 +848,11 @@ from lusid.models.set_share_class_instruments_request import SetShareClassInstru
|
|
835
848
|
from lusid.models.set_transaction_configuration_alias import SetTransactionConfigurationAlias
|
836
849
|
from lusid.models.set_transaction_configuration_source_request import SetTransactionConfigurationSourceRequest
|
837
850
|
from lusid.models.settlement_schedule import SettlementSchedule
|
851
|
+
from lusid.models.share_class_amount import ShareClassAmount
|
852
|
+
from lusid.models.share_class_breakdown import ShareClassBreakdown
|
853
|
+
from lusid.models.share_class_data import ShareClassData
|
854
|
+
from lusid.models.share_class_details import ShareClassDetails
|
855
|
+
from lusid.models.share_class_pnl_breakdown import ShareClassPnlBreakdown
|
838
856
|
from lusid.models.side_configuration_data import SideConfigurationData
|
839
857
|
from lusid.models.side_configuration_data_request import SideConfigurationDataRequest
|
840
858
|
from lusid.models.side_definition import SideDefinition
|
@@ -928,6 +946,7 @@ from lusid.models.trial_balance_query_parameters import TrialBalanceQueryParamet
|
|
928
946
|
from lusid.models.trigger_event import TriggerEvent
|
929
947
|
from lusid.models.typed_resource_id import TypedResourceId
|
930
948
|
from lusid.models.unit_schema import UnitSchema
|
949
|
+
from lusid.models.unitisation_data import UnitisationData
|
931
950
|
from lusid.models.units_ratio import UnitsRatio
|
932
951
|
from lusid.models.unmatched_holding_method import UnmatchedHoldingMethod
|
933
952
|
from lusid.models.update_amortisation_rule_set_details_request import UpdateAmortisationRuleSetDetailsRequest
|
@@ -1118,10 +1137,13 @@ __all__ = [
|
|
1118
1137
|
"Calendar",
|
1119
1138
|
"CalendarDate",
|
1120
1139
|
"CalendarDependency",
|
1140
|
+
"CancelOrdersResponse",
|
1121
1141
|
"CancelPlacementsResponse",
|
1142
|
+
"CancelledOrderResult",
|
1122
1143
|
"CancelledPlacementResult",
|
1123
1144
|
"CapFloor",
|
1124
1145
|
"CapitalDistributionEvent",
|
1146
|
+
"Cash",
|
1125
1147
|
"CashAndSecurityOfferElection",
|
1126
1148
|
"CashDependency",
|
1127
1149
|
"CashDividendEvent",
|
@@ -1173,6 +1195,7 @@ __all__ = [
|
|
1173
1195
|
"ComplianceRuleTemplate",
|
1174
1196
|
"ComplianceRuleUpsertRequest",
|
1175
1197
|
"ComplianceRuleUpsertResponse",
|
1198
|
+
"ComplianceRunConfiguration",
|
1176
1199
|
"ComplianceRunInfo",
|
1177
1200
|
"ComplianceRunInfoV2",
|
1178
1201
|
"ComplianceStep",
|
@@ -1186,6 +1209,7 @@ __all__ = [
|
|
1186
1209
|
"ComplianceTemplateVariation",
|
1187
1210
|
"ComplianceTemplateVariationDto",
|
1188
1211
|
"ComplianceTemplateVariationRequest",
|
1212
|
+
"ComponentFilter",
|
1189
1213
|
"ComponentRule",
|
1190
1214
|
"ComponentTransaction",
|
1191
1215
|
"CompositeBreakdown",
|
@@ -1353,12 +1377,16 @@ __all__ = [
|
|
1353
1377
|
"ForwardRateAgreement",
|
1354
1378
|
"FromRecipe",
|
1355
1379
|
"Fund",
|
1380
|
+
"FundAmount",
|
1356
1381
|
"FundConfiguration",
|
1357
1382
|
"FundConfigurationProperties",
|
1358
1383
|
"FundConfigurationRequest",
|
1384
|
+
"FundPnlBreakdown",
|
1385
|
+
"FundPreviousNAV",
|
1359
1386
|
"FundProperties",
|
1360
1387
|
"FundRequest",
|
1361
1388
|
"FundShareClass",
|
1389
|
+
"FundValuationPointData",
|
1362
1390
|
"FundingLeg",
|
1363
1391
|
"FundingLegOptions",
|
1364
1392
|
"Future",
|
@@ -1666,7 +1694,11 @@ __all__ = [
|
|
1666
1694
|
"PostingModuleResponse",
|
1667
1695
|
"PostingModuleRule",
|
1668
1696
|
"PostingModuleRulesUpdatedResponse",
|
1697
|
+
"PreTradeConfiguration",
|
1669
1698
|
"Premium",
|
1699
|
+
"PreviousFundValuationPointData",
|
1700
|
+
"PreviousNAV",
|
1701
|
+
"PreviousShareClassBreakdown",
|
1670
1702
|
"PricingContext",
|
1671
1703
|
"PricingModel",
|
1672
1704
|
"PricingOptions",
|
@@ -1847,6 +1879,11 @@ __all__ = [
|
|
1847
1879
|
"SetTransactionConfigurationAlias",
|
1848
1880
|
"SetTransactionConfigurationSourceRequest",
|
1849
1881
|
"SettlementSchedule",
|
1882
|
+
"ShareClassAmount",
|
1883
|
+
"ShareClassBreakdown",
|
1884
|
+
"ShareClassData",
|
1885
|
+
"ShareClassDetails",
|
1886
|
+
"ShareClassPnlBreakdown",
|
1850
1887
|
"SideConfigurationData",
|
1851
1888
|
"SideConfigurationDataRequest",
|
1852
1889
|
"SideDefinition",
|
@@ -1940,6 +1977,7 @@ __all__ = [
|
|
1940
1977
|
"TriggerEvent",
|
1941
1978
|
"TypedResourceId",
|
1942
1979
|
"UnitSchema",
|
1980
|
+
"UnitisationData",
|
1943
1981
|
"UnitsRatio",
|
1944
1982
|
"UnmatchedHoldingMethod",
|
1945
1983
|
"UpdateAmortisationRuleSetDetailsRequest",
|
@@ -0,0 +1,153 @@
|
|
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.cancelled_order_result import CancelledOrderResult
|
24
|
+
from lusid.models.error_detail import ErrorDetail
|
25
|
+
from lusid.models.link import Link
|
26
|
+
from lusid.models.response_meta_data import ResponseMetaData
|
27
|
+
|
28
|
+
class CancelOrdersResponse(BaseModel):
|
29
|
+
"""
|
30
|
+
CancelOrdersResponse
|
31
|
+
"""
|
32
|
+
href: Optional[StrictStr] = Field(None, description="The specific Uniform Resource Identifier (URI) for this resource at the requested effective and asAt datetime.")
|
33
|
+
values: Optional[Dict[str, CancelledOrderResult]] = Field(None, description="The orders which have been successfully cancelled.")
|
34
|
+
failed: Optional[Dict[str, ErrorDetail]] = Field(None, description="The orders that could not be cancelled, along with a reason for their failure.")
|
35
|
+
metadata: Optional[Dict[str, conlist(ResponseMetaData)]] = Field(None, description="Meta data associated with the cancellation event.")
|
36
|
+
links: Optional[conlist(Link)] = None
|
37
|
+
__properties = ["href", "values", "failed", "metadata", "links"]
|
38
|
+
|
39
|
+
class Config:
|
40
|
+
"""Pydantic configuration"""
|
41
|
+
allow_population_by_field_name = True
|
42
|
+
validate_assignment = True
|
43
|
+
|
44
|
+
def to_str(self) -> str:
|
45
|
+
"""Returns the string representation of the model using alias"""
|
46
|
+
return pprint.pformat(self.dict(by_alias=True))
|
47
|
+
|
48
|
+
def to_json(self) -> str:
|
49
|
+
"""Returns the JSON representation of the model using alias"""
|
50
|
+
return json.dumps(self.to_dict())
|
51
|
+
|
52
|
+
@classmethod
|
53
|
+
def from_json(cls, json_str: str) -> CancelOrdersResponse:
|
54
|
+
"""Create an instance of CancelOrdersResponse from a JSON string"""
|
55
|
+
return cls.from_dict(json.loads(json_str))
|
56
|
+
|
57
|
+
def to_dict(self):
|
58
|
+
"""Returns the dictionary representation of the model using alias"""
|
59
|
+
_dict = self.dict(by_alias=True,
|
60
|
+
exclude={
|
61
|
+
},
|
62
|
+
exclude_none=True)
|
63
|
+
# override the default output from pydantic by calling `to_dict()` of each value in values (dict)
|
64
|
+
_field_dict = {}
|
65
|
+
if self.values:
|
66
|
+
for _key in self.values:
|
67
|
+
if self.values[_key]:
|
68
|
+
_field_dict[_key] = self.values[_key].to_dict()
|
69
|
+
_dict['values'] = _field_dict
|
70
|
+
# override the default output from pydantic by calling `to_dict()` of each value in failed (dict)
|
71
|
+
_field_dict = {}
|
72
|
+
if self.failed:
|
73
|
+
for _key in self.failed:
|
74
|
+
if self.failed[_key]:
|
75
|
+
_field_dict[_key] = self.failed[_key].to_dict()
|
76
|
+
_dict['failed'] = _field_dict
|
77
|
+
# override the default output from pydantic by calling `to_dict()` of each value in metadata (dict of array)
|
78
|
+
_field_dict_of_array = {}
|
79
|
+
if self.metadata:
|
80
|
+
for _key in self.metadata:
|
81
|
+
if self.metadata[_key]:
|
82
|
+
_field_dict_of_array[_key] = [
|
83
|
+
_item.to_dict() for _item in self.metadata[_key]
|
84
|
+
]
|
85
|
+
_dict['metadata'] = _field_dict_of_array
|
86
|
+
# override the default output from pydantic by calling `to_dict()` of each item in links (list)
|
87
|
+
_items = []
|
88
|
+
if self.links:
|
89
|
+
for _item in self.links:
|
90
|
+
if _item:
|
91
|
+
_items.append(_item.to_dict())
|
92
|
+
_dict['links'] = _items
|
93
|
+
# set to None if href (nullable) is None
|
94
|
+
# and __fields_set__ contains the field
|
95
|
+
if self.href is None and "href" in self.__fields_set__:
|
96
|
+
_dict['href'] = None
|
97
|
+
|
98
|
+
# set to None if values (nullable) is None
|
99
|
+
# and __fields_set__ contains the field
|
100
|
+
if self.values is None and "values" in self.__fields_set__:
|
101
|
+
_dict['values'] = None
|
102
|
+
|
103
|
+
# set to None if failed (nullable) is None
|
104
|
+
# and __fields_set__ contains the field
|
105
|
+
if self.failed is None and "failed" in self.__fields_set__:
|
106
|
+
_dict['failed'] = None
|
107
|
+
|
108
|
+
# set to None if metadata (nullable) is None
|
109
|
+
# and __fields_set__ contains the field
|
110
|
+
if self.metadata is None and "metadata" in self.__fields_set__:
|
111
|
+
_dict['metadata'] = None
|
112
|
+
|
113
|
+
# set to None if links (nullable) is None
|
114
|
+
# and __fields_set__ contains the field
|
115
|
+
if self.links is None and "links" in self.__fields_set__:
|
116
|
+
_dict['links'] = None
|
117
|
+
|
118
|
+
return _dict
|
119
|
+
|
120
|
+
@classmethod
|
121
|
+
def from_dict(cls, obj: dict) -> CancelOrdersResponse:
|
122
|
+
"""Create an instance of CancelOrdersResponse from a dict"""
|
123
|
+
if obj is None:
|
124
|
+
return None
|
125
|
+
|
126
|
+
if not isinstance(obj, dict):
|
127
|
+
return CancelOrdersResponse.parse_obj(obj)
|
128
|
+
|
129
|
+
_obj = CancelOrdersResponse.parse_obj({
|
130
|
+
"href": obj.get("href"),
|
131
|
+
"values": dict(
|
132
|
+
(_k, CancelledOrderResult.from_dict(_v))
|
133
|
+
for _k, _v in obj.get("values").items()
|
134
|
+
)
|
135
|
+
if obj.get("values") is not None
|
136
|
+
else None,
|
137
|
+
"failed": dict(
|
138
|
+
(_k, ErrorDetail.from_dict(_v))
|
139
|
+
for _k, _v in obj.get("failed").items()
|
140
|
+
)
|
141
|
+
if obj.get("failed") is not None
|
142
|
+
else None,
|
143
|
+
"metadata": dict(
|
144
|
+
(_k,
|
145
|
+
[ResponseMetaData.from_dict(_item) for _item in _v]
|
146
|
+
if _v is not None
|
147
|
+
else None
|
148
|
+
)
|
149
|
+
for _k, _v in obj.get("metadata").items()
|
150
|
+
),
|
151
|
+
"links": [Link.from_dict(_item) for _item in obj.get("links")] if obj.get("links") is not None else None
|
152
|
+
})
|
153
|
+
return _obj
|
@@ -0,0 +1,73 @@
|
|
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
|
23
|
+
from lusid.models.order import Order
|
24
|
+
|
25
|
+
class CancelledOrderResult(BaseModel):
|
26
|
+
"""
|
27
|
+
CancelledOrderResult
|
28
|
+
"""
|
29
|
+
order_state: Optional[Order] = Field(None, alias="orderState")
|
30
|
+
__properties = ["orderState"]
|
31
|
+
|
32
|
+
class Config:
|
33
|
+
"""Pydantic configuration"""
|
34
|
+
allow_population_by_field_name = True
|
35
|
+
validate_assignment = True
|
36
|
+
|
37
|
+
def to_str(self) -> str:
|
38
|
+
"""Returns the string representation of the model using alias"""
|
39
|
+
return pprint.pformat(self.dict(by_alias=True))
|
40
|
+
|
41
|
+
def to_json(self) -> str:
|
42
|
+
"""Returns the JSON representation of the model using alias"""
|
43
|
+
return json.dumps(self.to_dict())
|
44
|
+
|
45
|
+
@classmethod
|
46
|
+
def from_json(cls, json_str: str) -> CancelledOrderResult:
|
47
|
+
"""Create an instance of CancelledOrderResult from a JSON string"""
|
48
|
+
return cls.from_dict(json.loads(json_str))
|
49
|
+
|
50
|
+
def to_dict(self):
|
51
|
+
"""Returns the dictionary representation of the model using alias"""
|
52
|
+
_dict = self.dict(by_alias=True,
|
53
|
+
exclude={
|
54
|
+
},
|
55
|
+
exclude_none=True)
|
56
|
+
# override the default output from pydantic by calling `to_dict()` of order_state
|
57
|
+
if self.order_state:
|
58
|
+
_dict['orderState'] = self.order_state.to_dict()
|
59
|
+
return _dict
|
60
|
+
|
61
|
+
@classmethod
|
62
|
+
def from_dict(cls, obj: dict) -> CancelledOrderResult:
|
63
|
+
"""Create an instance of CancelledOrderResult from a dict"""
|
64
|
+
if obj is None:
|
65
|
+
return None
|
66
|
+
|
67
|
+
if not isinstance(obj, dict):
|
68
|
+
return CancelledOrderResult.parse_obj(obj)
|
69
|
+
|
70
|
+
_obj = CancelledOrderResult.parse_obj({
|
71
|
+
"order_state": Order.from_dict(obj.get("orderState")) if obj.get("orderState") is not None else None
|
72
|
+
})
|
73
|
+
return _obj
|
lusid/models/cash.py
ADDED
@@ -0,0 +1,93 @@
|
|
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, Union
|
22
|
+
from pydantic.v1 import Field, StrictFloat, StrictInt, StrictStr, validator
|
23
|
+
from lusid.models.lusid_instrument import LusidInstrument
|
24
|
+
|
25
|
+
class Cash(LusidInstrument):
|
26
|
+
"""
|
27
|
+
LUSID representation of Cash which is the sum of one or more cashflows from the past. # noqa: E501
|
28
|
+
"""
|
29
|
+
dom_ccy: StrictStr = Field(..., alias="domCcy", description="The domestic currency of the instrument.")
|
30
|
+
amount: Union[StrictFloat, StrictInt] = Field(..., description="Cash amount.")
|
31
|
+
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")
|
32
|
+
additional_properties: Dict[str, Any] = {}
|
33
|
+
__properties = ["instrumentType", "domCcy", "amount"]
|
34
|
+
|
35
|
+
@validator('instrument_type')
|
36
|
+
def instrument_type_validate_enum(cls, value):
|
37
|
+
"""Validates the enum"""
|
38
|
+
if value not in ('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'):
|
39
|
+
raise ValueError("must be one of enum values ('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')")
|
40
|
+
return value
|
41
|
+
|
42
|
+
class Config:
|
43
|
+
"""Pydantic configuration"""
|
44
|
+
allow_population_by_field_name = True
|
45
|
+
validate_assignment = True
|
46
|
+
|
47
|
+
def to_str(self) -> str:
|
48
|
+
"""Returns the string representation of the model using alias"""
|
49
|
+
return pprint.pformat(self.dict(by_alias=True))
|
50
|
+
|
51
|
+
def to_json(self) -> str:
|
52
|
+
"""Returns the JSON representation of the model using alias"""
|
53
|
+
return json.dumps(self.to_dict())
|
54
|
+
|
55
|
+
@classmethod
|
56
|
+
def from_json(cls, json_str: str) -> Cash:
|
57
|
+
"""Create an instance of Cash from a JSON string"""
|
58
|
+
return cls.from_dict(json.loads(json_str))
|
59
|
+
|
60
|
+
def to_dict(self):
|
61
|
+
"""Returns the dictionary representation of the model using alias"""
|
62
|
+
_dict = self.dict(by_alias=True,
|
63
|
+
exclude={
|
64
|
+
"additional_properties"
|
65
|
+
},
|
66
|
+
exclude_none=True)
|
67
|
+
# puts key-value pairs in additional_properties in the top level
|
68
|
+
if self.additional_properties is not None:
|
69
|
+
for _key, _value in self.additional_properties.items():
|
70
|
+
_dict[_key] = _value
|
71
|
+
|
72
|
+
return _dict
|
73
|
+
|
74
|
+
@classmethod
|
75
|
+
def from_dict(cls, obj: dict) -> Cash:
|
76
|
+
"""Create an instance of Cash from a dict"""
|
77
|
+
if obj is None:
|
78
|
+
return None
|
79
|
+
|
80
|
+
if not isinstance(obj, dict):
|
81
|
+
return Cash.parse_obj(obj)
|
82
|
+
|
83
|
+
_obj = Cash.parse_obj({
|
84
|
+
"instrument_type": obj.get("instrumentType"),
|
85
|
+
"dom_ccy": obj.get("domCcy"),
|
86
|
+
"amount": obj.get("amount")
|
87
|
+
})
|
88
|
+
# store additional fields in additional_properties
|
89
|
+
for _key in obj.keys():
|
90
|
+
if _key not in cls.__properties:
|
91
|
+
_obj.additional_properties[_key] = obj.get(_key)
|
92
|
+
|
93
|
+
return _obj
|
@@ -0,0 +1,73 @@
|
|
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
|
22
|
+
from pydantic.v1 import BaseModel, Field
|
23
|
+
from lusid.models.pre_trade_configuration import PreTradeConfiguration
|
24
|
+
|
25
|
+
class ComplianceRunConfiguration(BaseModel):
|
26
|
+
"""
|
27
|
+
Specification object for the configuration parameters of a compliance run # noqa: E501
|
28
|
+
"""
|
29
|
+
pre_trade_configuration: PreTradeConfiguration = Field(..., alias="preTradeConfiguration")
|
30
|
+
__properties = ["preTradeConfiguration"]
|
31
|
+
|
32
|
+
class Config:
|
33
|
+
"""Pydantic configuration"""
|
34
|
+
allow_population_by_field_name = True
|
35
|
+
validate_assignment = True
|
36
|
+
|
37
|
+
def to_str(self) -> str:
|
38
|
+
"""Returns the string representation of the model using alias"""
|
39
|
+
return pprint.pformat(self.dict(by_alias=True))
|
40
|
+
|
41
|
+
def to_json(self) -> str:
|
42
|
+
"""Returns the JSON representation of the model using alias"""
|
43
|
+
return json.dumps(self.to_dict())
|
44
|
+
|
45
|
+
@classmethod
|
46
|
+
def from_json(cls, json_str: str) -> ComplianceRunConfiguration:
|
47
|
+
"""Create an instance of ComplianceRunConfiguration from a JSON string"""
|
48
|
+
return cls.from_dict(json.loads(json_str))
|
49
|
+
|
50
|
+
def to_dict(self):
|
51
|
+
"""Returns the dictionary representation of the model using alias"""
|
52
|
+
_dict = self.dict(by_alias=True,
|
53
|
+
exclude={
|
54
|
+
},
|
55
|
+
exclude_none=True)
|
56
|
+
# override the default output from pydantic by calling `to_dict()` of pre_trade_configuration
|
57
|
+
if self.pre_trade_configuration:
|
58
|
+
_dict['preTradeConfiguration'] = self.pre_trade_configuration.to_dict()
|
59
|
+
return _dict
|
60
|
+
|
61
|
+
@classmethod
|
62
|
+
def from_dict(cls, obj: dict) -> ComplianceRunConfiguration:
|
63
|
+
"""Create an instance of ComplianceRunConfiguration from a dict"""
|
64
|
+
if obj is None:
|
65
|
+
return None
|
66
|
+
|
67
|
+
if not isinstance(obj, dict):
|
68
|
+
return ComplianceRunConfiguration.parse_obj(obj)
|
69
|
+
|
70
|
+
_obj = ComplianceRunConfiguration.parse_obj({
|
71
|
+
"pre_trade_configuration": PreTradeConfiguration.from_dict(obj.get("preTradeConfiguration")) if obj.get("preTradeConfiguration") is not None else None
|
72
|
+
})
|
73
|
+
return _obj
|
@@ -0,0 +1,85 @@
|
|
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
|
22
|
+
from pydantic.v1 import BaseModel, Field, constr, validator
|
23
|
+
|
24
|
+
class ComponentFilter(BaseModel):
|
25
|
+
"""
|
26
|
+
ComponentFilter
|
27
|
+
"""
|
28
|
+
filter_id: constr(strict=True, max_length=16384, min_length=1) = Field(..., alias="filterId")
|
29
|
+
filter: constr(strict=True, max_length=16384, min_length=1) = Field(...)
|
30
|
+
__properties = ["filterId", "filter"]
|
31
|
+
|
32
|
+
@validator('filter_id')
|
33
|
+
def filter_id_validate_regular_expression(cls, value):
|
34
|
+
"""Validates the regular expression"""
|
35
|
+
if not re.match(r"^[\s\S]*$", value):
|
36
|
+
raise ValueError(r"must validate the regular expression /^[\s\S]*$/")
|
37
|
+
return value
|
38
|
+
|
39
|
+
@validator('filter')
|
40
|
+
def filter_validate_regular_expression(cls, value):
|
41
|
+
"""Validates the regular expression"""
|
42
|
+
if not re.match(r"^[\s\S]*$", value):
|
43
|
+
raise ValueError(r"must validate the regular expression /^[\s\S]*$/")
|
44
|
+
return value
|
45
|
+
|
46
|
+
class Config:
|
47
|
+
"""Pydantic configuration"""
|
48
|
+
allow_population_by_field_name = True
|
49
|
+
validate_assignment = True
|
50
|
+
|
51
|
+
def to_str(self) -> str:
|
52
|
+
"""Returns the string representation of the model using alias"""
|
53
|
+
return pprint.pformat(self.dict(by_alias=True))
|
54
|
+
|
55
|
+
def to_json(self) -> str:
|
56
|
+
"""Returns the JSON representation of the model using alias"""
|
57
|
+
return json.dumps(self.to_dict())
|
58
|
+
|
59
|
+
@classmethod
|
60
|
+
def from_json(cls, json_str: str) -> ComponentFilter:
|
61
|
+
"""Create an instance of ComponentFilter from a JSON string"""
|
62
|
+
return cls.from_dict(json.loads(json_str))
|
63
|
+
|
64
|
+
def to_dict(self):
|
65
|
+
"""Returns the dictionary representation of the model using alias"""
|
66
|
+
_dict = self.dict(by_alias=True,
|
67
|
+
exclude={
|
68
|
+
},
|
69
|
+
exclude_none=True)
|
70
|
+
return _dict
|
71
|
+
|
72
|
+
@classmethod
|
73
|
+
def from_dict(cls, obj: dict) -> ComponentFilter:
|
74
|
+
"""Create an instance of ComponentFilter from a dict"""
|
75
|
+
if obj is None:
|
76
|
+
return None
|
77
|
+
|
78
|
+
if not isinstance(obj, dict):
|
79
|
+
return ComponentFilter.parse_obj(obj)
|
80
|
+
|
81
|
+
_obj = ComponentFilter.parse_obj({
|
82
|
+
"filter_id": obj.get("filterId"),
|
83
|
+
"filter": obj.get("filter")
|
84
|
+
})
|
85
|
+
return _obj
|