lusid-sdk 2.1.131__py3-none-any.whl → 2.1.138__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.
Potentially problematic release.
This version of lusid-sdk might be problematic. Click here for more details.
- lusid/__init__.py +18 -0
- lusid/api/funds_api.py +1148 -198
- lusid/configuration.py +1 -1
- lusid/models/__init__.py +18 -0
- lusid/models/branch_step_request.py +91 -0
- lusid/models/check_step_request.py +91 -0
- lusid/models/compliance_step_request.py +41 -19
- lusid/models/compliance_step_type_request.py +0 -1
- lusid/models/fee.py +217 -0
- lusid/models/fee_request.py +163 -0
- lusid/models/filter_step_request.py +91 -0
- lusid/models/group_by_step_request.py +91 -0
- lusid/models/group_filter_step_request.py +91 -0
- lusid/models/intermediate_compliance_step_request.py +91 -0
- lusid/models/paged_resource_list_of_fee.py +113 -0
- {lusid_sdk-2.1.131.dist-info → lusid_sdk-2.1.138.dist-info}/METADATA +17 -3
- {lusid_sdk-2.1.131.dist-info → lusid_sdk-2.1.138.dist-info}/RECORD +18 -9
- {lusid_sdk-2.1.131.dist-info → lusid_sdk-2.1.138.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.6572\n"\
|
|
377
377
|
"SDK Package Version: {package_version}".\
|
|
378
378
|
format(env=sys.platform, pyversion=sys.version, package_version=package_version)
|
|
379
379
|
|
lusid/models/__init__.py
CHANGED
|
@@ -96,6 +96,7 @@ from lusid.models.book_transactions_response import BookTransactionsResponse
|
|
|
96
96
|
from lusid.models.bool_compliance_parameter import BoolComplianceParameter
|
|
97
97
|
from lusid.models.bool_list_compliance_parameter import BoolListComplianceParameter
|
|
98
98
|
from lusid.models.branch_step import BranchStep
|
|
99
|
+
from lusid.models.branch_step_request import BranchStepRequest
|
|
99
100
|
from lusid.models.bucketed_cash_flow_request import BucketedCashFlowRequest
|
|
100
101
|
from lusid.models.bucketed_cash_flow_response import BucketedCashFlowResponse
|
|
101
102
|
from lusid.models.bucketing_schedule import BucketingSchedule
|
|
@@ -125,6 +126,7 @@ from lusid.models.chart_of_accounts import ChartOfAccounts
|
|
|
125
126
|
from lusid.models.chart_of_accounts_properties import ChartOfAccountsProperties
|
|
126
127
|
from lusid.models.chart_of_accounts_request import ChartOfAccountsRequest
|
|
127
128
|
from lusid.models.check_step import CheckStep
|
|
129
|
+
from lusid.models.check_step_request import CheckStepRequest
|
|
128
130
|
from lusid.models.cleardown_module_details import CleardownModuleDetails
|
|
129
131
|
from lusid.models.cleardown_module_request import CleardownModuleRequest
|
|
130
132
|
from lusid.models.cleardown_module_response import CleardownModuleResponse
|
|
@@ -304,7 +306,9 @@ from lusid.models.exercise_event import ExerciseEvent
|
|
|
304
306
|
from lusid.models.exotic_instrument import ExoticInstrument
|
|
305
307
|
from lusid.models.expanded_group import ExpandedGroup
|
|
306
308
|
from lusid.models.expiry_event import ExpiryEvent
|
|
309
|
+
from lusid.models.fee import Fee
|
|
307
310
|
from lusid.models.fee_accrual import FeeAccrual
|
|
311
|
+
from lusid.models.fee_request import FeeRequest
|
|
308
312
|
from lusid.models.fee_rule import FeeRule
|
|
309
313
|
from lusid.models.fee_rule_upsert_request import FeeRuleUpsertRequest
|
|
310
314
|
from lusid.models.fee_rule_upsert_response import FeeRuleUpsertResponse
|
|
@@ -316,6 +320,7 @@ from lusid.models.field_value import FieldValue
|
|
|
316
320
|
from lusid.models.file_response import FileResponse
|
|
317
321
|
from lusid.models.filter_predicate_compliance_parameter import FilterPredicateComplianceParameter
|
|
318
322
|
from lusid.models.filter_step import FilterStep
|
|
323
|
+
from lusid.models.filter_step_request import FilterStepRequest
|
|
319
324
|
from lusid.models.fixed_leg import FixedLeg
|
|
320
325
|
from lusid.models.fixed_leg_all_of_overrides import FixedLegAllOfOverrides
|
|
321
326
|
from lusid.models.fixed_schedule import FixedSchedule
|
|
@@ -371,8 +376,10 @@ from lusid.models.get_structured_result_data_response import GetStructuredResult
|
|
|
371
376
|
from lusid.models.get_virtual_document_response import GetVirtualDocumentResponse
|
|
372
377
|
from lusid.models.group_by_selector_compliance_parameter import GroupBySelectorComplianceParameter
|
|
373
378
|
from lusid.models.group_by_step import GroupByStep
|
|
379
|
+
from lusid.models.group_by_step_request import GroupByStepRequest
|
|
374
380
|
from lusid.models.group_filter_predicate_compliance_parameter import GroupFilterPredicateComplianceParameter
|
|
375
381
|
from lusid.models.group_filter_step import GroupFilterStep
|
|
382
|
+
from lusid.models.group_filter_step_request import GroupFilterStepRequest
|
|
376
383
|
from lusid.models.group_of_market_data_key_rules import GroupOfMarketDataKeyRules
|
|
377
384
|
from lusid.models.grouped_result_of_address_key import GroupedResultOfAddressKey
|
|
378
385
|
from lusid.models.holding_adjustment import HoldingAdjustment
|
|
@@ -428,6 +435,7 @@ from lusid.models.instrument_type import InstrumentType
|
|
|
428
435
|
from lusid.models.interest_rate_swap import InterestRateSwap
|
|
429
436
|
from lusid.models.interest_rate_swaption import InterestRateSwaption
|
|
430
437
|
from lusid.models.intermediate_compliance_step import IntermediateComplianceStep
|
|
438
|
+
from lusid.models.intermediate_compliance_step_request import IntermediateComplianceStepRequest
|
|
431
439
|
from lusid.models.ir_vol_cube_data import IrVolCubeData
|
|
432
440
|
from lusid.models.ir_vol_dependency import IrVolDependency
|
|
433
441
|
from lusid.models.is_business_day_response import IsBusinessDayResponse
|
|
@@ -547,6 +555,7 @@ from lusid.models.paged_resource_list_of_data_type_summary import PagedResourceL
|
|
|
547
555
|
from lusid.models.paged_resource_list_of_dialect_id import PagedResourceListOfDialectId
|
|
548
556
|
from lusid.models.paged_resource_list_of_diary_entry import PagedResourceListOfDiaryEntry
|
|
549
557
|
from lusid.models.paged_resource_list_of_execution import PagedResourceListOfExecution
|
|
558
|
+
from lusid.models.paged_resource_list_of_fee import PagedResourceListOfFee
|
|
550
559
|
from lusid.models.paged_resource_list_of_fee_type import PagedResourceListOfFeeType
|
|
551
560
|
from lusid.models.paged_resource_list_of_fund import PagedResourceListOfFund
|
|
552
561
|
from lusid.models.paged_resource_list_of_general_ledger_profile_response import PagedResourceListOfGeneralLedgerProfileResponse
|
|
@@ -1073,6 +1082,7 @@ __all__ = [
|
|
|
1073
1082
|
"BoolComplianceParameter",
|
|
1074
1083
|
"BoolListComplianceParameter",
|
|
1075
1084
|
"BranchStep",
|
|
1085
|
+
"BranchStepRequest",
|
|
1076
1086
|
"BucketedCashFlowRequest",
|
|
1077
1087
|
"BucketedCashFlowResponse",
|
|
1078
1088
|
"BucketingSchedule",
|
|
@@ -1102,6 +1112,7 @@ __all__ = [
|
|
|
1102
1112
|
"ChartOfAccountsProperties",
|
|
1103
1113
|
"ChartOfAccountsRequest",
|
|
1104
1114
|
"CheckStep",
|
|
1115
|
+
"CheckStepRequest",
|
|
1105
1116
|
"CleardownModuleDetails",
|
|
1106
1117
|
"CleardownModuleRequest",
|
|
1107
1118
|
"CleardownModuleResponse",
|
|
@@ -1281,7 +1292,9 @@ __all__ = [
|
|
|
1281
1292
|
"ExoticInstrument",
|
|
1282
1293
|
"ExpandedGroup",
|
|
1283
1294
|
"ExpiryEvent",
|
|
1295
|
+
"Fee",
|
|
1284
1296
|
"FeeAccrual",
|
|
1297
|
+
"FeeRequest",
|
|
1285
1298
|
"FeeRule",
|
|
1286
1299
|
"FeeRuleUpsertRequest",
|
|
1287
1300
|
"FeeRuleUpsertResponse",
|
|
@@ -1293,6 +1306,7 @@ __all__ = [
|
|
|
1293
1306
|
"FileResponse",
|
|
1294
1307
|
"FilterPredicateComplianceParameter",
|
|
1295
1308
|
"FilterStep",
|
|
1309
|
+
"FilterStepRequest",
|
|
1296
1310
|
"FixedLeg",
|
|
1297
1311
|
"FixedLegAllOfOverrides",
|
|
1298
1312
|
"FixedSchedule",
|
|
@@ -1348,8 +1362,10 @@ __all__ = [
|
|
|
1348
1362
|
"GetVirtualDocumentResponse",
|
|
1349
1363
|
"GroupBySelectorComplianceParameter",
|
|
1350
1364
|
"GroupByStep",
|
|
1365
|
+
"GroupByStepRequest",
|
|
1351
1366
|
"GroupFilterPredicateComplianceParameter",
|
|
1352
1367
|
"GroupFilterStep",
|
|
1368
|
+
"GroupFilterStepRequest",
|
|
1353
1369
|
"GroupOfMarketDataKeyRules",
|
|
1354
1370
|
"GroupedResultOfAddressKey",
|
|
1355
1371
|
"HoldingAdjustment",
|
|
@@ -1405,6 +1421,7 @@ __all__ = [
|
|
|
1405
1421
|
"InterestRateSwap",
|
|
1406
1422
|
"InterestRateSwaption",
|
|
1407
1423
|
"IntermediateComplianceStep",
|
|
1424
|
+
"IntermediateComplianceStepRequest",
|
|
1408
1425
|
"IrVolCubeData",
|
|
1409
1426
|
"IrVolDependency",
|
|
1410
1427
|
"IsBusinessDayResponse",
|
|
@@ -1524,6 +1541,7 @@ __all__ = [
|
|
|
1524
1541
|
"PagedResourceListOfDialectId",
|
|
1525
1542
|
"PagedResourceListOfDiaryEntry",
|
|
1526
1543
|
"PagedResourceListOfExecution",
|
|
1544
|
+
"PagedResourceListOfFee",
|
|
1527
1545
|
"PagedResourceListOfFeeType",
|
|
1528
1546
|
"PagedResourceListOfFund",
|
|
1529
1547
|
"PagedResourceListOfGeneralLedgerProfileResponse",
|
|
@@ -0,0 +1,91 @@
|
|
|
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 Field, StrictStr, constr, validator
|
|
23
|
+
from lusid.models.compliance_step_request import ComplianceStepRequest
|
|
24
|
+
|
|
25
|
+
class BranchStepRequest(ComplianceStepRequest):
|
|
26
|
+
"""
|
|
27
|
+
BranchStepRequest
|
|
28
|
+
"""
|
|
29
|
+
label: constr(strict=True, max_length=64, min_length=1) = Field(..., description="The label of the compliance step")
|
|
30
|
+
compliance_step_type_request: StrictStr = Field(..., alias="complianceStepTypeRequest", description=". The available values are: FilterStepRequest, GroupByStepRequest, GroupFilterStepRequest, BranchStepRequest, CheckStepRequest")
|
|
31
|
+
additional_properties: Dict[str, Any] = {}
|
|
32
|
+
__properties = ["complianceStepTypeRequest", "label"]
|
|
33
|
+
|
|
34
|
+
@validator('compliance_step_type_request')
|
|
35
|
+
def compliance_step_type_request_validate_enum(cls, value):
|
|
36
|
+
"""Validates the enum"""
|
|
37
|
+
if value not in ('FilterStepRequest', 'GroupByStepRequest', 'GroupFilterStepRequest', 'BranchStepRequest', 'CheckStepRequest'):
|
|
38
|
+
raise ValueError("must be one of enum values ('FilterStepRequest', 'GroupByStepRequest', 'GroupFilterStepRequest', 'BranchStepRequest', 'CheckStepRequest')")
|
|
39
|
+
return value
|
|
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) -> BranchStepRequest:
|
|
56
|
+
"""Create an instance of BranchStepRequest 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
|
+
"additional_properties"
|
|
64
|
+
},
|
|
65
|
+
exclude_none=True)
|
|
66
|
+
# puts key-value pairs in additional_properties in the top level
|
|
67
|
+
if self.additional_properties is not None:
|
|
68
|
+
for _key, _value in self.additional_properties.items():
|
|
69
|
+
_dict[_key] = _value
|
|
70
|
+
|
|
71
|
+
return _dict
|
|
72
|
+
|
|
73
|
+
@classmethod
|
|
74
|
+
def from_dict(cls, obj: dict) -> BranchStepRequest:
|
|
75
|
+
"""Create an instance of BranchStepRequest from a dict"""
|
|
76
|
+
if obj is None:
|
|
77
|
+
return None
|
|
78
|
+
|
|
79
|
+
if not isinstance(obj, dict):
|
|
80
|
+
return BranchStepRequest.parse_obj(obj)
|
|
81
|
+
|
|
82
|
+
_obj = BranchStepRequest.parse_obj({
|
|
83
|
+
"compliance_step_type_request": obj.get("complianceStepTypeRequest"),
|
|
84
|
+
"label": obj.get("label")
|
|
85
|
+
})
|
|
86
|
+
# store additional fields in additional_properties
|
|
87
|
+
for _key in obj.keys():
|
|
88
|
+
if _key not in cls.__properties:
|
|
89
|
+
_obj.additional_properties[_key] = obj.get(_key)
|
|
90
|
+
|
|
91
|
+
return _obj
|
|
@@ -0,0 +1,91 @@
|
|
|
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 Field, StrictStr, constr, validator
|
|
23
|
+
from lusid.models.compliance_step_request import ComplianceStepRequest
|
|
24
|
+
|
|
25
|
+
class CheckStepRequest(ComplianceStepRequest):
|
|
26
|
+
"""
|
|
27
|
+
CheckStepRequest
|
|
28
|
+
"""
|
|
29
|
+
label: constr(strict=True, max_length=64, min_length=1) = Field(..., description="The label of the compliance step")
|
|
30
|
+
compliance_step_type_request: StrictStr = Field(..., alias="complianceStepTypeRequest", description=". The available values are: FilterStepRequest, GroupByStepRequest, GroupFilterStepRequest, BranchStepRequest, CheckStepRequest")
|
|
31
|
+
additional_properties: Dict[str, Any] = {}
|
|
32
|
+
__properties = ["complianceStepTypeRequest", "label"]
|
|
33
|
+
|
|
34
|
+
@validator('compliance_step_type_request')
|
|
35
|
+
def compliance_step_type_request_validate_enum(cls, value):
|
|
36
|
+
"""Validates the enum"""
|
|
37
|
+
if value not in ('FilterStepRequest', 'GroupByStepRequest', 'GroupFilterStepRequest', 'BranchStepRequest', 'CheckStepRequest'):
|
|
38
|
+
raise ValueError("must be one of enum values ('FilterStepRequest', 'GroupByStepRequest', 'GroupFilterStepRequest', 'BranchStepRequest', 'CheckStepRequest')")
|
|
39
|
+
return value
|
|
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) -> CheckStepRequest:
|
|
56
|
+
"""Create an instance of CheckStepRequest 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
|
+
"additional_properties"
|
|
64
|
+
},
|
|
65
|
+
exclude_none=True)
|
|
66
|
+
# puts key-value pairs in additional_properties in the top level
|
|
67
|
+
if self.additional_properties is not None:
|
|
68
|
+
for _key, _value in self.additional_properties.items():
|
|
69
|
+
_dict[_key] = _value
|
|
70
|
+
|
|
71
|
+
return _dict
|
|
72
|
+
|
|
73
|
+
@classmethod
|
|
74
|
+
def from_dict(cls, obj: dict) -> CheckStepRequest:
|
|
75
|
+
"""Create an instance of CheckStepRequest from a dict"""
|
|
76
|
+
if obj is None:
|
|
77
|
+
return None
|
|
78
|
+
|
|
79
|
+
if not isinstance(obj, dict):
|
|
80
|
+
return CheckStepRequest.parse_obj(obj)
|
|
81
|
+
|
|
82
|
+
_obj = CheckStepRequest.parse_obj({
|
|
83
|
+
"compliance_step_type_request": obj.get("complianceStepTypeRequest"),
|
|
84
|
+
"label": obj.get("label")
|
|
85
|
+
})
|
|
86
|
+
# store additional fields in additional_properties
|
|
87
|
+
for _key in obj.keys():
|
|
88
|
+
if _key not in cls.__properties:
|
|
89
|
+
_obj.additional_properties[_key] = obj.get(_key)
|
|
90
|
+
|
|
91
|
+
return _obj
|
|
@@ -18,21 +18,22 @@ import re # noqa: F401
|
|
|
18
18
|
import json
|
|
19
19
|
|
|
20
20
|
|
|
21
|
-
from typing import Any, Dict
|
|
21
|
+
from typing import Any, Dict, Union
|
|
22
22
|
from pydantic.v1 import BaseModel, Field, StrictStr, validator
|
|
23
|
+
import lusid.models
|
|
23
24
|
|
|
24
25
|
class ComplianceStepRequest(BaseModel):
|
|
25
26
|
"""
|
|
26
27
|
ComplianceStepRequest
|
|
27
28
|
"""
|
|
28
|
-
|
|
29
|
-
__properties = ["
|
|
29
|
+
compliance_step_type_request: StrictStr = Field(..., alias="complianceStepTypeRequest", description=". The available values are: FilterStepRequest, GroupByStepRequest, GroupFilterStepRequest, BranchStepRequest, CheckStepRequest")
|
|
30
|
+
__properties = ["complianceStepTypeRequest"]
|
|
30
31
|
|
|
31
|
-
@validator('
|
|
32
|
-
def
|
|
32
|
+
@validator('compliance_step_type_request')
|
|
33
|
+
def compliance_step_type_request_validate_enum(cls, value):
|
|
33
34
|
"""Validates the enum"""
|
|
34
|
-
if value not in ('FilterStepRequest', 'GroupByStepRequest', 'GroupFilterStepRequest', 'BranchStepRequest', '
|
|
35
|
-
raise ValueError("must be one of enum values ('FilterStepRequest', 'GroupByStepRequest', 'GroupFilterStepRequest', 'BranchStepRequest', '
|
|
35
|
+
if value not in ('FilterStepRequest', 'GroupByStepRequest', 'GroupFilterStepRequest', 'BranchStepRequest', 'CheckStepRequest'):
|
|
36
|
+
raise ValueError("must be one of enum values ('FilterStepRequest', 'GroupByStepRequest', 'GroupFilterStepRequest', 'BranchStepRequest', 'CheckStepRequest')")
|
|
36
37
|
return value
|
|
37
38
|
|
|
38
39
|
class Config:
|
|
@@ -40,6 +41,28 @@ class ComplianceStepRequest(BaseModel):
|
|
|
40
41
|
allow_population_by_field_name = True
|
|
41
42
|
validate_assignment = True
|
|
42
43
|
|
|
44
|
+
# JSON field name that stores the object type
|
|
45
|
+
__discriminator_property_name = 'complianceStepTypeRequest'
|
|
46
|
+
|
|
47
|
+
# discriminator mappings
|
|
48
|
+
__discriminator_value_class_map = {
|
|
49
|
+
'BranchStepRequest': 'BranchStepRequest',
|
|
50
|
+
'CheckStepRequest': 'CheckStepRequest',
|
|
51
|
+
'FilterStepRequest': 'FilterStepRequest',
|
|
52
|
+
'GroupByStepRequest': 'GroupByStepRequest',
|
|
53
|
+
'GroupFilterStepRequest': 'GroupFilterStepRequest',
|
|
54
|
+
'IntermediateComplianceStepRequest': 'IntermediateComplianceStepRequest'
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
@classmethod
|
|
58
|
+
def get_discriminator_value(cls, obj: dict) -> str:
|
|
59
|
+
"""Returns the discriminator value (object type) of the data"""
|
|
60
|
+
discriminator_value = obj[cls.__discriminator_property_name]
|
|
61
|
+
if discriminator_value:
|
|
62
|
+
return cls.__discriminator_value_class_map.get(discriminator_value)
|
|
63
|
+
else:
|
|
64
|
+
return None
|
|
65
|
+
|
|
43
66
|
def to_str(self) -> str:
|
|
44
67
|
"""Returns the string representation of the model using alias"""
|
|
45
68
|
return pprint.pformat(self.dict(by_alias=True))
|
|
@@ -49,7 +72,7 @@ class ComplianceStepRequest(BaseModel):
|
|
|
49
72
|
return json.dumps(self.to_dict())
|
|
50
73
|
|
|
51
74
|
@classmethod
|
|
52
|
-
def from_json(cls, json_str: str) ->
|
|
75
|
+
def from_json(cls, json_str: str) -> Union(BranchStepRequest, CheckStepRequest, FilterStepRequest, GroupByStepRequest, GroupFilterStepRequest, IntermediateComplianceStepRequest):
|
|
53
76
|
"""Create an instance of ComplianceStepRequest from a JSON string"""
|
|
54
77
|
return cls.from_dict(json.loads(json_str))
|
|
55
78
|
|
|
@@ -62,15 +85,14 @@ class ComplianceStepRequest(BaseModel):
|
|
|
62
85
|
return _dict
|
|
63
86
|
|
|
64
87
|
@classmethod
|
|
65
|
-
def from_dict(cls, obj: dict) ->
|
|
88
|
+
def from_dict(cls, obj: dict) -> Union(BranchStepRequest, CheckStepRequest, FilterStepRequest, GroupByStepRequest, GroupFilterStepRequest, IntermediateComplianceStepRequest):
|
|
66
89
|
"""Create an instance of ComplianceStepRequest from a dict"""
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
return
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
return _obj
|
|
90
|
+
# look up the object type based on discriminator mapping
|
|
91
|
+
object_type = cls.get_discriminator_value(obj)
|
|
92
|
+
if object_type:
|
|
93
|
+
klass = getattr(lusid.models, object_type)
|
|
94
|
+
return klass.from_dict(obj)
|
|
95
|
+
else:
|
|
96
|
+
raise ValueError("ComplianceStepRequest failed to lookup discriminator value from " +
|
|
97
|
+
json.dumps(obj) + ". Discriminator property name: " + cls.__discriminator_property_name +
|
|
98
|
+
", mapping: " + json.dumps(cls.__discriminator_value_class_map))
|
|
@@ -33,7 +33,6 @@ class ComplianceStepTypeRequest(str, Enum):
|
|
|
33
33
|
GROUPBYSTEPREQUEST = 'GroupByStepRequest'
|
|
34
34
|
GROUPFILTERSTEPREQUEST = 'GroupFilterStepRequest'
|
|
35
35
|
BRANCHSTEPREQUEST = 'BranchStepRequest'
|
|
36
|
-
RECOMBINESTEPREQUEST = 'RecombineStepRequest'
|
|
37
36
|
CHECKSTEPREQUEST = 'CheckStepRequest'
|
|
38
37
|
|
|
39
38
|
@classmethod
|
lusid/models/fee.py
ADDED
|
@@ -0,0 +1,217 @@
|
|
|
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, List, Optional, Union
|
|
22
|
+
from pydantic.v1 import BaseModel, Field, StrictFloat, StrictInt, StrictStr, conlist, constr, validator
|
|
23
|
+
from lusid.models.day_month import DayMonth
|
|
24
|
+
from lusid.models.link import Link
|
|
25
|
+
from lusid.models.model_property import ModelProperty
|
|
26
|
+
from lusid.models.resource_id import ResourceId
|
|
27
|
+
from lusid.models.version import Version
|
|
28
|
+
|
|
29
|
+
class Fee(BaseModel):
|
|
30
|
+
"""
|
|
31
|
+
Fee
|
|
32
|
+
"""
|
|
33
|
+
href: Optional[StrictStr] = Field(None, description="The specific Uniform Resource Identifier (URI) for this resource at the requested effective and asAt datetime.")
|
|
34
|
+
fee_code: Optional[constr(strict=True, max_length=64, min_length=1)] = Field(None, alias="feeCode", description="The code of the Fee.")
|
|
35
|
+
fee_type: ResourceId = Field(..., alias="feeType")
|
|
36
|
+
name: constr(strict=True, max_length=50, min_length=0) = Field(..., description="The name of the Fee.")
|
|
37
|
+
description: Optional[constr(strict=True, max_length=1024, min_length=0)] = Field(None, description="A description for the Fee.")
|
|
38
|
+
origin: Optional[constr(strict=True, max_length=512, min_length=1)] = Field(None, description="The origin or source of the Fee accrual.")
|
|
39
|
+
calculation_base: Optional[constr(strict=True, max_length=1024, min_length=0)] = Field(None, alias="calculationBase", description="The calculation base for the Fee that is calculated using a percentage.")
|
|
40
|
+
accrual_currency: constr(strict=True, max_length=3, min_length=0) = Field(..., alias="accrualCurrency", description="The accrual currency.")
|
|
41
|
+
treatment: constr(strict=True, min_length=1) = Field(..., description="The accrual period of the Fee; 'Monthly' or 'Daily'.")
|
|
42
|
+
total_annual_accrual_amount: Optional[Union[StrictFloat, StrictInt]] = Field(None, alias="totalAnnualAccrualAmount", description="The total accrued amount for the Fee.")
|
|
43
|
+
fee_rate_percentage: Optional[Union[StrictFloat, StrictInt]] = Field(None, alias="feeRatePercentage", description="The fee rate percentage.")
|
|
44
|
+
monthly_accrual: Optional[Union[StrictFloat, StrictInt]] = Field(None, alias="monthlyAccrual", description="The monthly accrual amount.")
|
|
45
|
+
daily_accrual: Optional[Union[StrictFloat, StrictInt]] = Field(None, alias="dailyAccrual", description="The daily accrual amount.")
|
|
46
|
+
payable_frequency: constr(strict=True, min_length=1) = Field(..., alias="payableFrequency", description="The payable frequency for the Fee; 'Annually', 'Quarterly' or 'Monthly'.")
|
|
47
|
+
business_day_convention: constr(strict=True, min_length=1) = Field(..., alias="businessDayConvention", description="The business day convention to use for Fee calculations on weekends.")
|
|
48
|
+
start_date: datetime = Field(..., alias="startDate", description="The start date of the Fee.")
|
|
49
|
+
end_date: Optional[datetime] = Field(None, alias="endDate", description="The end date of the Fee.")
|
|
50
|
+
anchor_date: Optional[DayMonth] = Field(None, alias="anchorDate")
|
|
51
|
+
properties: Optional[Dict[str, ModelProperty]] = Field(None, description="The Fee properties. These will be from the 'Fee' domain.")
|
|
52
|
+
version: Optional[Version] = None
|
|
53
|
+
links: Optional[conlist(Link)] = None
|
|
54
|
+
__properties = ["href", "feeCode", "feeType", "name", "description", "origin", "calculationBase", "accrualCurrency", "treatment", "totalAnnualAccrualAmount", "feeRatePercentage", "monthlyAccrual", "dailyAccrual", "payableFrequency", "businessDayConvention", "startDate", "endDate", "anchorDate", "properties", "version", "links"]
|
|
55
|
+
|
|
56
|
+
@validator('fee_code')
|
|
57
|
+
def fee_code_validate_regular_expression(cls, value):
|
|
58
|
+
"""Validates the regular expression"""
|
|
59
|
+
if value is None:
|
|
60
|
+
return value
|
|
61
|
+
|
|
62
|
+
if not re.match(r"^[a-zA-Z0-9\-_]+$", value):
|
|
63
|
+
raise ValueError(r"must validate the regular expression /^[a-zA-Z0-9\-_]+$/")
|
|
64
|
+
return value
|
|
65
|
+
|
|
66
|
+
@validator('description')
|
|
67
|
+
def description_validate_regular_expression(cls, value):
|
|
68
|
+
"""Validates the regular expression"""
|
|
69
|
+
if value is None:
|
|
70
|
+
return value
|
|
71
|
+
|
|
72
|
+
if not re.match(r"^[\s\S]*$", value):
|
|
73
|
+
raise ValueError(r"must validate the regular expression /^[\s\S]*$/")
|
|
74
|
+
return value
|
|
75
|
+
|
|
76
|
+
class Config:
|
|
77
|
+
"""Pydantic configuration"""
|
|
78
|
+
allow_population_by_field_name = True
|
|
79
|
+
validate_assignment = True
|
|
80
|
+
|
|
81
|
+
def to_str(self) -> str:
|
|
82
|
+
"""Returns the string representation of the model using alias"""
|
|
83
|
+
return pprint.pformat(self.dict(by_alias=True))
|
|
84
|
+
|
|
85
|
+
def to_json(self) -> str:
|
|
86
|
+
"""Returns the JSON representation of the model using alias"""
|
|
87
|
+
return json.dumps(self.to_dict())
|
|
88
|
+
|
|
89
|
+
@classmethod
|
|
90
|
+
def from_json(cls, json_str: str) -> Fee:
|
|
91
|
+
"""Create an instance of Fee from a JSON string"""
|
|
92
|
+
return cls.from_dict(json.loads(json_str))
|
|
93
|
+
|
|
94
|
+
def to_dict(self):
|
|
95
|
+
"""Returns the dictionary representation of the model using alias"""
|
|
96
|
+
_dict = self.dict(by_alias=True,
|
|
97
|
+
exclude={
|
|
98
|
+
},
|
|
99
|
+
exclude_none=True)
|
|
100
|
+
# override the default output from pydantic by calling `to_dict()` of fee_type
|
|
101
|
+
if self.fee_type:
|
|
102
|
+
_dict['feeType'] = self.fee_type.to_dict()
|
|
103
|
+
# override the default output from pydantic by calling `to_dict()` of anchor_date
|
|
104
|
+
if self.anchor_date:
|
|
105
|
+
_dict['anchorDate'] = self.anchor_date.to_dict()
|
|
106
|
+
# override the default output from pydantic by calling `to_dict()` of each value in properties (dict)
|
|
107
|
+
_field_dict = {}
|
|
108
|
+
if self.properties:
|
|
109
|
+
for _key in self.properties:
|
|
110
|
+
if self.properties[_key]:
|
|
111
|
+
_field_dict[_key] = self.properties[_key].to_dict()
|
|
112
|
+
_dict['properties'] = _field_dict
|
|
113
|
+
# override the default output from pydantic by calling `to_dict()` of version
|
|
114
|
+
if self.version:
|
|
115
|
+
_dict['version'] = self.version.to_dict()
|
|
116
|
+
# override the default output from pydantic by calling `to_dict()` of each item in links (list)
|
|
117
|
+
_items = []
|
|
118
|
+
if self.links:
|
|
119
|
+
for _item in self.links:
|
|
120
|
+
if _item:
|
|
121
|
+
_items.append(_item.to_dict())
|
|
122
|
+
_dict['links'] = _items
|
|
123
|
+
# set to None if href (nullable) is None
|
|
124
|
+
# and __fields_set__ contains the field
|
|
125
|
+
if self.href is None and "href" in self.__fields_set__:
|
|
126
|
+
_dict['href'] = None
|
|
127
|
+
|
|
128
|
+
# set to None if fee_code (nullable) is None
|
|
129
|
+
# and __fields_set__ contains the field
|
|
130
|
+
if self.fee_code is None and "fee_code" in self.__fields_set__:
|
|
131
|
+
_dict['feeCode'] = None
|
|
132
|
+
|
|
133
|
+
# set to None if description (nullable) is None
|
|
134
|
+
# and __fields_set__ contains the field
|
|
135
|
+
if self.description is None and "description" in self.__fields_set__:
|
|
136
|
+
_dict['description'] = None
|
|
137
|
+
|
|
138
|
+
# set to None if origin (nullable) is None
|
|
139
|
+
# and __fields_set__ contains the field
|
|
140
|
+
if self.origin is None and "origin" in self.__fields_set__:
|
|
141
|
+
_dict['origin'] = None
|
|
142
|
+
|
|
143
|
+
# set to None if calculation_base (nullable) is None
|
|
144
|
+
# and __fields_set__ contains the field
|
|
145
|
+
if self.calculation_base is None and "calculation_base" in self.__fields_set__:
|
|
146
|
+
_dict['calculationBase'] = None
|
|
147
|
+
|
|
148
|
+
# set to None if total_annual_accrual_amount (nullable) is None
|
|
149
|
+
# and __fields_set__ contains the field
|
|
150
|
+
if self.total_annual_accrual_amount is None and "total_annual_accrual_amount" in self.__fields_set__:
|
|
151
|
+
_dict['totalAnnualAccrualAmount'] = None
|
|
152
|
+
|
|
153
|
+
# set to None if fee_rate_percentage (nullable) is None
|
|
154
|
+
# and __fields_set__ contains the field
|
|
155
|
+
if self.fee_rate_percentage is None and "fee_rate_percentage" in self.__fields_set__:
|
|
156
|
+
_dict['feeRatePercentage'] = None
|
|
157
|
+
|
|
158
|
+
# set to None if monthly_accrual (nullable) is None
|
|
159
|
+
# and __fields_set__ contains the field
|
|
160
|
+
if self.monthly_accrual is None and "monthly_accrual" in self.__fields_set__:
|
|
161
|
+
_dict['monthlyAccrual'] = None
|
|
162
|
+
|
|
163
|
+
# set to None if daily_accrual (nullable) is None
|
|
164
|
+
# and __fields_set__ contains the field
|
|
165
|
+
if self.daily_accrual is None and "daily_accrual" in self.__fields_set__:
|
|
166
|
+
_dict['dailyAccrual'] = None
|
|
167
|
+
|
|
168
|
+
# set to None if properties (nullable) is None
|
|
169
|
+
# and __fields_set__ contains the field
|
|
170
|
+
if self.properties is None and "properties" in self.__fields_set__:
|
|
171
|
+
_dict['properties'] = None
|
|
172
|
+
|
|
173
|
+
# set to None if links (nullable) is None
|
|
174
|
+
# and __fields_set__ contains the field
|
|
175
|
+
if self.links is None and "links" in self.__fields_set__:
|
|
176
|
+
_dict['links'] = None
|
|
177
|
+
|
|
178
|
+
return _dict
|
|
179
|
+
|
|
180
|
+
@classmethod
|
|
181
|
+
def from_dict(cls, obj: dict) -> Fee:
|
|
182
|
+
"""Create an instance of Fee from a dict"""
|
|
183
|
+
if obj is None:
|
|
184
|
+
return None
|
|
185
|
+
|
|
186
|
+
if not isinstance(obj, dict):
|
|
187
|
+
return Fee.parse_obj(obj)
|
|
188
|
+
|
|
189
|
+
_obj = Fee.parse_obj({
|
|
190
|
+
"href": obj.get("href"),
|
|
191
|
+
"fee_code": obj.get("feeCode"),
|
|
192
|
+
"fee_type": ResourceId.from_dict(obj.get("feeType")) if obj.get("feeType") is not None else None,
|
|
193
|
+
"name": obj.get("name"),
|
|
194
|
+
"description": obj.get("description"),
|
|
195
|
+
"origin": obj.get("origin"),
|
|
196
|
+
"calculation_base": obj.get("calculationBase"),
|
|
197
|
+
"accrual_currency": obj.get("accrualCurrency"),
|
|
198
|
+
"treatment": obj.get("treatment"),
|
|
199
|
+
"total_annual_accrual_amount": obj.get("totalAnnualAccrualAmount"),
|
|
200
|
+
"fee_rate_percentage": obj.get("feeRatePercentage"),
|
|
201
|
+
"monthly_accrual": obj.get("monthlyAccrual"),
|
|
202
|
+
"daily_accrual": obj.get("dailyAccrual"),
|
|
203
|
+
"payable_frequency": obj.get("payableFrequency"),
|
|
204
|
+
"business_day_convention": obj.get("businessDayConvention"),
|
|
205
|
+
"start_date": obj.get("startDate"),
|
|
206
|
+
"end_date": obj.get("endDate"),
|
|
207
|
+
"anchor_date": DayMonth.from_dict(obj.get("anchorDate")) if obj.get("anchorDate") is not None else None,
|
|
208
|
+
"properties": dict(
|
|
209
|
+
(_k, ModelProperty.from_dict(_v))
|
|
210
|
+
for _k, _v in obj.get("properties").items()
|
|
211
|
+
)
|
|
212
|
+
if obj.get("properties") is not None
|
|
213
|
+
else None,
|
|
214
|
+
"version": Version.from_dict(obj.get("version")) if obj.get("version") is not None else None,
|
|
215
|
+
"links": [Link.from_dict(_item) for _item in obj.get("links")] if obj.get("links") is not None else None
|
|
216
|
+
})
|
|
217
|
+
return _obj
|