lusid-sdk 2.1.279__py3-none-any.whl → 2.1.280__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 CHANGED
@@ -422,12 +422,15 @@ from lusid.models.flow_conventions import FlowConventions
422
422
  from lusid.models.forward_rate_agreement import ForwardRateAgreement
423
423
  from lusid.models.from_recipe import FromRecipe
424
424
  from lusid.models.fund import Fund
425
+ from lusid.models.fund_amount import FundAmount
425
426
  from lusid.models.fund_configuration import FundConfiguration
426
427
  from lusid.models.fund_configuration_properties import FundConfigurationProperties
427
428
  from lusid.models.fund_configuration_request import FundConfigurationRequest
429
+ from lusid.models.fund_previous_nav import FundPreviousNAV
428
430
  from lusid.models.fund_properties import FundProperties
429
431
  from lusid.models.fund_request import FundRequest
430
432
  from lusid.models.fund_share_class import FundShareClass
433
+ from lusid.models.fund_valuation_point_data import FundValuationPointData
431
434
  from lusid.models.funding_leg import FundingLeg
432
435
  from lusid.models.funding_leg_options import FundingLegOptions
433
436
  from lusid.models.future import Future
@@ -736,6 +739,9 @@ from lusid.models.posting_module_response import PostingModuleResponse
736
739
  from lusid.models.posting_module_rule import PostingModuleRule
737
740
  from lusid.models.posting_module_rules_updated_response import PostingModuleRulesUpdatedResponse
738
741
  from lusid.models.premium import Premium
742
+ from lusid.models.previous_fund_valuation_point_data import PreviousFundValuationPointData
743
+ from lusid.models.previous_nav import PreviousNAV
744
+ from lusid.models.previous_share_class_breakdown import PreviousShareClassBreakdown
739
745
  from lusid.models.pricing_context import PricingContext
740
746
  from lusid.models.pricing_model import PricingModel
741
747
  from lusid.models.pricing_options import PricingOptions
@@ -916,6 +922,10 @@ from lusid.models.set_share_class_instruments_request import SetShareClassInstru
916
922
  from lusid.models.set_transaction_configuration_alias import SetTransactionConfigurationAlias
917
923
  from lusid.models.set_transaction_configuration_source_request import SetTransactionConfigurationSourceRequest
918
924
  from lusid.models.settlement_schedule import SettlementSchedule
925
+ from lusid.models.share_class_amount import ShareClassAmount
926
+ from lusid.models.share_class_breakdown import ShareClassBreakdown
927
+ from lusid.models.share_class_data import ShareClassData
928
+ from lusid.models.share_class_details import ShareClassDetails
919
929
  from lusid.models.side_configuration_data import SideConfigurationData
920
930
  from lusid.models.side_configuration_data_request import SideConfigurationDataRequest
921
931
  from lusid.models.side_definition import SideDefinition
@@ -1009,6 +1019,7 @@ from lusid.models.trial_balance_query_parameters import TrialBalanceQueryParamet
1009
1019
  from lusid.models.trigger_event import TriggerEvent
1010
1020
  from lusid.models.typed_resource_id import TypedResourceId
1011
1021
  from lusid.models.unit_schema import UnitSchema
1022
+ from lusid.models.unitisation_data import UnitisationData
1012
1023
  from lusid.models.units_ratio import UnitsRatio
1013
1024
  from lusid.models.unmatched_holding_method import UnmatchedHoldingMethod
1014
1025
  from lusid.models.update_amortisation_rule_set_details_request import UpdateAmortisationRuleSetDetailsRequest
@@ -1514,12 +1525,15 @@ __all__ = [
1514
1525
  "ForwardRateAgreement",
1515
1526
  "FromRecipe",
1516
1527
  "Fund",
1528
+ "FundAmount",
1517
1529
  "FundConfiguration",
1518
1530
  "FundConfigurationProperties",
1519
1531
  "FundConfigurationRequest",
1532
+ "FundPreviousNAV",
1520
1533
  "FundProperties",
1521
1534
  "FundRequest",
1522
1535
  "FundShareClass",
1536
+ "FundValuationPointData",
1523
1537
  "FundingLeg",
1524
1538
  "FundingLegOptions",
1525
1539
  "Future",
@@ -1828,6 +1842,9 @@ __all__ = [
1828
1842
  "PostingModuleRule",
1829
1843
  "PostingModuleRulesUpdatedResponse",
1830
1844
  "Premium",
1845
+ "PreviousFundValuationPointData",
1846
+ "PreviousNAV",
1847
+ "PreviousShareClassBreakdown",
1831
1848
  "PricingContext",
1832
1849
  "PricingModel",
1833
1850
  "PricingOptions",
@@ -2008,6 +2025,10 @@ __all__ = [
2008
2025
  "SetTransactionConfigurationAlias",
2009
2026
  "SetTransactionConfigurationSourceRequest",
2010
2027
  "SettlementSchedule",
2028
+ "ShareClassAmount",
2029
+ "ShareClassBreakdown",
2030
+ "ShareClassData",
2031
+ "ShareClassDetails",
2011
2032
  "SideConfigurationData",
2012
2033
  "SideConfigurationDataRequest",
2013
2034
  "SideDefinition",
@@ -2101,6 +2122,7 @@ __all__ = [
2101
2122
  "TriggerEvent",
2102
2123
  "TypedResourceId",
2103
2124
  "UnitSchema",
2125
+ "UnitisationData",
2104
2126
  "UnitsRatio",
2105
2127
  "UnmatchedHoldingMethod",
2106
2128
  "UpdateAmortisationRuleSetDetailsRequest",
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.6712\n"\
376
+ "Version of the API: 0.11.6713\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
@@ -343,12 +343,15 @@ from lusid.models.flow_conventions import FlowConventions
343
343
  from lusid.models.forward_rate_agreement import ForwardRateAgreement
344
344
  from lusid.models.from_recipe import FromRecipe
345
345
  from lusid.models.fund import Fund
346
+ from lusid.models.fund_amount import FundAmount
346
347
  from lusid.models.fund_configuration import FundConfiguration
347
348
  from lusid.models.fund_configuration_properties import FundConfigurationProperties
348
349
  from lusid.models.fund_configuration_request import FundConfigurationRequest
350
+ from lusid.models.fund_previous_nav import FundPreviousNAV
349
351
  from lusid.models.fund_properties import FundProperties
350
352
  from lusid.models.fund_request import FundRequest
351
353
  from lusid.models.fund_share_class import FundShareClass
354
+ from lusid.models.fund_valuation_point_data import FundValuationPointData
352
355
  from lusid.models.funding_leg import FundingLeg
353
356
  from lusid.models.funding_leg_options import FundingLegOptions
354
357
  from lusid.models.future import Future
@@ -657,6 +660,9 @@ from lusid.models.posting_module_response import PostingModuleResponse
657
660
  from lusid.models.posting_module_rule import PostingModuleRule
658
661
  from lusid.models.posting_module_rules_updated_response import PostingModuleRulesUpdatedResponse
659
662
  from lusid.models.premium import Premium
663
+ from lusid.models.previous_fund_valuation_point_data import PreviousFundValuationPointData
664
+ from lusid.models.previous_nav import PreviousNAV
665
+ from lusid.models.previous_share_class_breakdown import PreviousShareClassBreakdown
660
666
  from lusid.models.pricing_context import PricingContext
661
667
  from lusid.models.pricing_model import PricingModel
662
668
  from lusid.models.pricing_options import PricingOptions
@@ -837,6 +843,10 @@ from lusid.models.set_share_class_instruments_request import SetShareClassInstru
837
843
  from lusid.models.set_transaction_configuration_alias import SetTransactionConfigurationAlias
838
844
  from lusid.models.set_transaction_configuration_source_request import SetTransactionConfigurationSourceRequest
839
845
  from lusid.models.settlement_schedule import SettlementSchedule
846
+ from lusid.models.share_class_amount import ShareClassAmount
847
+ from lusid.models.share_class_breakdown import ShareClassBreakdown
848
+ from lusid.models.share_class_data import ShareClassData
849
+ from lusid.models.share_class_details import ShareClassDetails
840
850
  from lusid.models.side_configuration_data import SideConfigurationData
841
851
  from lusid.models.side_configuration_data_request import SideConfigurationDataRequest
842
852
  from lusid.models.side_definition import SideDefinition
@@ -930,6 +940,7 @@ from lusid.models.trial_balance_query_parameters import TrialBalanceQueryParamet
930
940
  from lusid.models.trigger_event import TriggerEvent
931
941
  from lusid.models.typed_resource_id import TypedResourceId
932
942
  from lusid.models.unit_schema import UnitSchema
943
+ from lusid.models.unitisation_data import UnitisationData
933
944
  from lusid.models.units_ratio import UnitsRatio
934
945
  from lusid.models.unmatched_holding_method import UnmatchedHoldingMethod
935
946
  from lusid.models.update_amortisation_rule_set_details_request import UpdateAmortisationRuleSetDetailsRequest
@@ -1357,12 +1368,15 @@ __all__ = [
1357
1368
  "ForwardRateAgreement",
1358
1369
  "FromRecipe",
1359
1370
  "Fund",
1371
+ "FundAmount",
1360
1372
  "FundConfiguration",
1361
1373
  "FundConfigurationProperties",
1362
1374
  "FundConfigurationRequest",
1375
+ "FundPreviousNAV",
1363
1376
  "FundProperties",
1364
1377
  "FundRequest",
1365
1378
  "FundShareClass",
1379
+ "FundValuationPointData",
1366
1380
  "FundingLeg",
1367
1381
  "FundingLegOptions",
1368
1382
  "Future",
@@ -1671,6 +1685,9 @@ __all__ = [
1671
1685
  "PostingModuleRule",
1672
1686
  "PostingModuleRulesUpdatedResponse",
1673
1687
  "Premium",
1688
+ "PreviousFundValuationPointData",
1689
+ "PreviousNAV",
1690
+ "PreviousShareClassBreakdown",
1674
1691
  "PricingContext",
1675
1692
  "PricingModel",
1676
1693
  "PricingOptions",
@@ -1851,6 +1868,10 @@ __all__ = [
1851
1868
  "SetTransactionConfigurationAlias",
1852
1869
  "SetTransactionConfigurationSourceRequest",
1853
1870
  "SettlementSchedule",
1871
+ "ShareClassAmount",
1872
+ "ShareClassBreakdown",
1873
+ "ShareClassData",
1874
+ "ShareClassDetails",
1854
1875
  "SideConfigurationData",
1855
1876
  "SideConfigurationDataRequest",
1856
1877
  "SideDefinition",
@@ -1944,6 +1965,7 @@ __all__ = [
1944
1965
  "TriggerEvent",
1945
1966
  "TypedResourceId",
1946
1967
  "UnitSchema",
1968
+ "UnitisationData",
1947
1969
  "UnitsRatio",
1948
1970
  "UnmatchedHoldingMethod",
1949
1971
  "UpdateAmortisationRuleSetDetailsRequest",
@@ -0,0 +1,69 @@
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 BaseModel, Field, StrictFloat, StrictInt
23
+
24
+ class FundAmount(BaseModel):
25
+ """
26
+ FundAmount
27
+ """
28
+ value: Optional[Union[StrictFloat, StrictInt]] = Field(None, description="The value of the amount.")
29
+ __properties = ["value"]
30
+
31
+ class Config:
32
+ """Pydantic configuration"""
33
+ allow_population_by_field_name = True
34
+ validate_assignment = True
35
+
36
+ def to_str(self) -> str:
37
+ """Returns the string representation of the model using alias"""
38
+ return pprint.pformat(self.dict(by_alias=True))
39
+
40
+ def to_json(self) -> str:
41
+ """Returns the JSON representation of the model using alias"""
42
+ return json.dumps(self.to_dict())
43
+
44
+ @classmethod
45
+ def from_json(cls, json_str: str) -> FundAmount:
46
+ """Create an instance of FundAmount from a JSON string"""
47
+ return cls.from_dict(json.loads(json_str))
48
+
49
+ def to_dict(self):
50
+ """Returns the dictionary representation of the model using alias"""
51
+ _dict = self.dict(by_alias=True,
52
+ exclude={
53
+ },
54
+ exclude_none=True)
55
+ return _dict
56
+
57
+ @classmethod
58
+ def from_dict(cls, obj: dict) -> FundAmount:
59
+ """Create an instance of FundAmount from a dict"""
60
+ if obj is None:
61
+ return None
62
+
63
+ if not isinstance(obj, dict):
64
+ return FundAmount.parse_obj(obj)
65
+
66
+ _obj = FundAmount.parse_obj({
67
+ "value": obj.get("value")
68
+ })
69
+ return _obj
@@ -0,0 +1,69 @@
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 BaseModel, Field, StrictFloat, StrictInt
23
+
24
+ class FundPreviousNAV(BaseModel):
25
+ """
26
+ FundPreviousNAV
27
+ """
28
+ amount: Optional[Union[StrictFloat, StrictInt]] = Field(None, description="The amount of the previous NAV.")
29
+ __properties = ["amount"]
30
+
31
+ class Config:
32
+ """Pydantic configuration"""
33
+ allow_population_by_field_name = True
34
+ validate_assignment = True
35
+
36
+ def to_str(self) -> str:
37
+ """Returns the string representation of the model using alias"""
38
+ return pprint.pformat(self.dict(by_alias=True))
39
+
40
+ def to_json(self) -> str:
41
+ """Returns the JSON representation of the model using alias"""
42
+ return json.dumps(self.to_dict())
43
+
44
+ @classmethod
45
+ def from_json(cls, json_str: str) -> FundPreviousNAV:
46
+ """Create an instance of FundPreviousNAV from a JSON string"""
47
+ return cls.from_dict(json.loads(json_str))
48
+
49
+ def to_dict(self):
50
+ """Returns the dictionary representation of the model using alias"""
51
+ _dict = self.dict(by_alias=True,
52
+ exclude={
53
+ },
54
+ exclude_none=True)
55
+ return _dict
56
+
57
+ @classmethod
58
+ def from_dict(cls, obj: dict) -> FundPreviousNAV:
59
+ """Create an instance of FundPreviousNAV from a dict"""
60
+ if obj is None:
61
+ return None
62
+
63
+ if not isinstance(obj, dict):
64
+ return FundPreviousNAV.parse_obj(obj)
65
+
66
+ _obj = FundPreviousNAV.parse_obj({
67
+ "amount": obj.get("amount")
68
+ })
69
+ return _obj
@@ -0,0 +1,160 @@
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 BaseModel, Field, StrictFloat, StrictInt
23
+ from lusid.models.fee_accrual import FeeAccrual
24
+ from lusid.models.fund_amount import FundAmount
25
+ from lusid.models.previous_fund_valuation_point_data import PreviousFundValuationPointData
26
+ from lusid.models.unitisation_data import UnitisationData
27
+
28
+ class FundValuationPointData(BaseModel):
29
+ """
30
+ The Valuation Point Data for a Fund on a specified date. # noqa: E501
31
+ """
32
+ back_out: Dict[str, FundAmount] = Field(..., alias="backOut", description="Bucket of detail for the Valuation Point where data points have been 'backed out'.")
33
+ dealing: Dict[str, FundAmount] = Field(..., description="Bucket of detail for any 'Dealing' that has occured inside the queried period.")
34
+ pn_l: Dict[str, FundAmount] = Field(..., alias="pnL", description="Bucket of detail for 'PnL' that has occured inside the queried period.")
35
+ gav: Union[StrictFloat, StrictInt] = Field(..., description="The Gross Asset Value of the Fund or Share Class at the Valuation Point. This is effectively a summation of all Trial balance entries linked to accounts of types 'Asset' and 'Liabilities'.")
36
+ fees: Dict[str, FeeAccrual] = Field(..., description="Bucket of detail for any 'Fees' that have been charged in the selected period.")
37
+ nav: Union[StrictFloat, StrictInt] = Field(..., description="The Net Asset Value of the Fund or Share Class at the Valuation Point. This represents the GAV with any fees applied in the period.")
38
+ unitisation: Optional[UnitisationData] = None
39
+ miscellaneous: Optional[Dict[str, FundAmount]] = Field(None, description="Not used directly by the LUSID engines but serves as a holding area for any custom derived data points that may be useful in, for example, fee calculations).")
40
+ previous_valuation_point_data: Optional[PreviousFundValuationPointData] = Field(None, alias="previousValuationPointData")
41
+ __properties = ["backOut", "dealing", "pnL", "gav", "fees", "nav", "unitisation", "miscellaneous", "previousValuationPointData"]
42
+
43
+ class Config:
44
+ """Pydantic configuration"""
45
+ allow_population_by_field_name = True
46
+ validate_assignment = True
47
+
48
+ def to_str(self) -> str:
49
+ """Returns the string representation of the model using alias"""
50
+ return pprint.pformat(self.dict(by_alias=True))
51
+
52
+ def to_json(self) -> str:
53
+ """Returns the JSON representation of the model using alias"""
54
+ return json.dumps(self.to_dict())
55
+
56
+ @classmethod
57
+ def from_json(cls, json_str: str) -> FundValuationPointData:
58
+ """Create an instance of FundValuationPointData from a JSON string"""
59
+ return cls.from_dict(json.loads(json_str))
60
+
61
+ def to_dict(self):
62
+ """Returns the dictionary representation of the model using alias"""
63
+ _dict = self.dict(by_alias=True,
64
+ exclude={
65
+ },
66
+ exclude_none=True)
67
+ # override the default output from pydantic by calling `to_dict()` of each value in back_out (dict)
68
+ _field_dict = {}
69
+ if self.back_out:
70
+ for _key in self.back_out:
71
+ if self.back_out[_key]:
72
+ _field_dict[_key] = self.back_out[_key].to_dict()
73
+ _dict['backOut'] = _field_dict
74
+ # override the default output from pydantic by calling `to_dict()` of each value in dealing (dict)
75
+ _field_dict = {}
76
+ if self.dealing:
77
+ for _key in self.dealing:
78
+ if self.dealing[_key]:
79
+ _field_dict[_key] = self.dealing[_key].to_dict()
80
+ _dict['dealing'] = _field_dict
81
+ # override the default output from pydantic by calling `to_dict()` of each value in pn_l (dict)
82
+ _field_dict = {}
83
+ if self.pn_l:
84
+ for _key in self.pn_l:
85
+ if self.pn_l[_key]:
86
+ _field_dict[_key] = self.pn_l[_key].to_dict()
87
+ _dict['pnL'] = _field_dict
88
+ # override the default output from pydantic by calling `to_dict()` of each value in fees (dict)
89
+ _field_dict = {}
90
+ if self.fees:
91
+ for _key in self.fees:
92
+ if self.fees[_key]:
93
+ _field_dict[_key] = self.fees[_key].to_dict()
94
+ _dict['fees'] = _field_dict
95
+ # override the default output from pydantic by calling `to_dict()` of unitisation
96
+ if self.unitisation:
97
+ _dict['unitisation'] = self.unitisation.to_dict()
98
+ # override the default output from pydantic by calling `to_dict()` of each value in miscellaneous (dict)
99
+ _field_dict = {}
100
+ if self.miscellaneous:
101
+ for _key in self.miscellaneous:
102
+ if self.miscellaneous[_key]:
103
+ _field_dict[_key] = self.miscellaneous[_key].to_dict()
104
+ _dict['miscellaneous'] = _field_dict
105
+ # override the default output from pydantic by calling `to_dict()` of previous_valuation_point_data
106
+ if self.previous_valuation_point_data:
107
+ _dict['previousValuationPointData'] = self.previous_valuation_point_data.to_dict()
108
+ # set to None if miscellaneous (nullable) is None
109
+ # and __fields_set__ contains the field
110
+ if self.miscellaneous is None and "miscellaneous" in self.__fields_set__:
111
+ _dict['miscellaneous'] = None
112
+
113
+ return _dict
114
+
115
+ @classmethod
116
+ def from_dict(cls, obj: dict) -> FundValuationPointData:
117
+ """Create an instance of FundValuationPointData from a dict"""
118
+ if obj is None:
119
+ return None
120
+
121
+ if not isinstance(obj, dict):
122
+ return FundValuationPointData.parse_obj(obj)
123
+
124
+ _obj = FundValuationPointData.parse_obj({
125
+ "back_out": dict(
126
+ (_k, FundAmount.from_dict(_v))
127
+ for _k, _v in obj.get("backOut").items()
128
+ )
129
+ if obj.get("backOut") is not None
130
+ else None,
131
+ "dealing": dict(
132
+ (_k, FundAmount.from_dict(_v))
133
+ for _k, _v in obj.get("dealing").items()
134
+ )
135
+ if obj.get("dealing") is not None
136
+ else None,
137
+ "pn_l": dict(
138
+ (_k, FundAmount.from_dict(_v))
139
+ for _k, _v in obj.get("pnL").items()
140
+ )
141
+ if obj.get("pnL") is not None
142
+ else None,
143
+ "gav": obj.get("gav"),
144
+ "fees": dict(
145
+ (_k, FeeAccrual.from_dict(_v))
146
+ for _k, _v in obj.get("fees").items()
147
+ )
148
+ if obj.get("fees") is not None
149
+ else None,
150
+ "nav": obj.get("nav"),
151
+ "unitisation": UnitisationData.from_dict(obj.get("unitisation")) if obj.get("unitisation") is not None else None,
152
+ "miscellaneous": dict(
153
+ (_k, FundAmount.from_dict(_v))
154
+ for _k, _v in obj.get("miscellaneous").items()
155
+ )
156
+ if obj.get("miscellaneous") is not None
157
+ else None,
158
+ "previous_valuation_point_data": PreviousFundValuationPointData.from_dict(obj.get("previousValuationPointData")) if obj.get("previousValuationPointData") is not None else None
159
+ })
160
+ return _obj
@@ -0,0 +1,79 @@
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.fund_previous_nav import FundPreviousNAV
24
+ from lusid.models.unitisation_data import UnitisationData
25
+
26
+ class PreviousFundValuationPointData(BaseModel):
27
+ """
28
+ The data for a Fund at the previous valuation point. # noqa: E501
29
+ """
30
+ nav: FundPreviousNAV = Field(...)
31
+ unitisation: Optional[UnitisationData] = None
32
+ __properties = ["nav", "unitisation"]
33
+
34
+ class Config:
35
+ """Pydantic configuration"""
36
+ allow_population_by_field_name = True
37
+ validate_assignment = True
38
+
39
+ def to_str(self) -> str:
40
+ """Returns the string representation of the model using alias"""
41
+ return pprint.pformat(self.dict(by_alias=True))
42
+
43
+ def to_json(self) -> str:
44
+ """Returns the JSON representation of the model using alias"""
45
+ return json.dumps(self.to_dict())
46
+
47
+ @classmethod
48
+ def from_json(cls, json_str: str) -> PreviousFundValuationPointData:
49
+ """Create an instance of PreviousFundValuationPointData from a JSON string"""
50
+ return cls.from_dict(json.loads(json_str))
51
+
52
+ def to_dict(self):
53
+ """Returns the dictionary representation of the model using alias"""
54
+ _dict = self.dict(by_alias=True,
55
+ exclude={
56
+ },
57
+ exclude_none=True)
58
+ # override the default output from pydantic by calling `to_dict()` of nav
59
+ if self.nav:
60
+ _dict['nav'] = self.nav.to_dict()
61
+ # override the default output from pydantic by calling `to_dict()` of unitisation
62
+ if self.unitisation:
63
+ _dict['unitisation'] = self.unitisation.to_dict()
64
+ return _dict
65
+
66
+ @classmethod
67
+ def from_dict(cls, obj: dict) -> PreviousFundValuationPointData:
68
+ """Create an instance of PreviousFundValuationPointData from a dict"""
69
+ if obj is None:
70
+ return None
71
+
72
+ if not isinstance(obj, dict):
73
+ return PreviousFundValuationPointData.parse_obj(obj)
74
+
75
+ _obj = PreviousFundValuationPointData.parse_obj({
76
+ "nav": FundPreviousNAV.from_dict(obj.get("nav")) if obj.get("nav") is not None else None,
77
+ "unitisation": UnitisationData.from_dict(obj.get("unitisation")) if obj.get("unitisation") is not None else None
78
+ })
79
+ 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
23
+ from lusid.models.multi_currency_amounts import MultiCurrencyAmounts
24
+
25
+ class PreviousNAV(BaseModel):
26
+ """
27
+ PreviousNAV
28
+ """
29
+ amount: Optional[MultiCurrencyAmounts] = None
30
+ __properties = ["amount"]
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) -> PreviousNAV:
47
+ """Create an instance of PreviousNAV 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 amount
57
+ if self.amount:
58
+ _dict['amount'] = self.amount.to_dict()
59
+ return _dict
60
+
61
+ @classmethod
62
+ def from_dict(cls, obj: dict) -> PreviousNAV:
63
+ """Create an instance of PreviousNAV from a dict"""
64
+ if obj is None:
65
+ return None
66
+
67
+ if not isinstance(obj, dict):
68
+ return PreviousNAV.parse_obj(obj)
69
+
70
+ _obj = PreviousNAV.parse_obj({
71
+ "amount": MultiCurrencyAmounts.from_dict(obj.get("amount")) if obj.get("amount") is not None else None
72
+ })
73
+ return _obj