lusid-sdk 2.1.261__py3-none-any.whl → 2.1.292__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.
Files changed (44) hide show
  1. lusid/__init__.py +30 -0
  2. lusid/api/compliance_api.py +191 -0
  3. lusid/api/funds_api.py +1 -1
  4. lusid/configuration.py +1 -1
  5. lusid/models/__init__.py +30 -0
  6. lusid/models/cash.py +93 -0
  7. lusid/models/compliance_run_configuration.py +73 -0
  8. lusid/models/component_filter.py +85 -0
  9. lusid/models/component_rule.py +13 -19
  10. lusid/models/contract_for_difference.py +4 -2
  11. lusid/models/fund.py +6 -1
  12. lusid/models/fund_amount.py +69 -0
  13. lusid/models/fund_configuration.py +16 -15
  14. lusid/models/fund_configuration_request.py +18 -12
  15. lusid/models/fund_previous_nav.py +69 -0
  16. lusid/models/fund_request.py +6 -1
  17. lusid/models/fund_valuation_point_data.py +160 -0
  18. lusid/models/futures_contract_details.py +9 -2
  19. lusid/models/lusid_instrument.py +3 -2
  20. lusid/models/market_data_key_rule.py +3 -3
  21. lusid/models/market_data_specific_rule.py +3 -3
  22. lusid/models/market_quote.py +3 -3
  23. lusid/models/model_selection.py +3 -3
  24. lusid/models/pre_trade_configuration.py +69 -0
  25. lusid/models/previous_fund_valuation_point_data.py +79 -0
  26. lusid/models/previous_nav.py +73 -0
  27. lusid/models/previous_share_class_breakdown.py +81 -0
  28. lusid/models/pricing_model.py +1 -0
  29. lusid/models/quote_series_id.py +4 -20
  30. lusid/models/quote_type.py +3 -0
  31. lusid/models/share_class_amount.py +73 -0
  32. lusid/models/share_class_breakdown.py +171 -0
  33. lusid/models/share_class_data.py +79 -0
  34. lusid/models/share_class_details.py +108 -0
  35. lusid/models/staged_modification.py +8 -1
  36. lusid/models/transaction_configuration_movement_data.py +2 -2
  37. lusid/models/transaction_configuration_movement_data_request.py +1 -1
  38. lusid/models/transaction_field_map.py +1 -1
  39. lusid/models/transaction_type_movement.py +2 -2
  40. lusid/models/unitisation_data.py +73 -0
  41. lusid/models/valuation_point_data_response.py +30 -9
  42. {lusid_sdk-2.1.261.dist-info → lusid_sdk-2.1.292.dist-info}/METADATA +20 -4
  43. {lusid_sdk-2.1.261.dist-info → lusid_sdk-2.1.292.dist-info}/RECORD +44 -29
  44. {lusid_sdk-2.1.261.dist-info → lusid_sdk-2.1.292.dist-info}/WHEEL +0 -0
@@ -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
@@ -18,23 +18,16 @@ import re # noqa: F401
18
18
  import json
19
19
 
20
20
 
21
- from typing import Any, Dict, Optional
22
- from pydantic.v1 import BaseModel, Field, StrictStr, constr, validator
21
+ from typing import Any, Dict, List, Optional
22
+ from pydantic.v1 import BaseModel, conlist
23
+ from lusid.models.component_filter import ComponentFilter
23
24
 
24
25
  class ComponentRule(BaseModel):
25
26
  """
26
27
  ComponentRule
27
28
  """
28
- match_criteria: constr(strict=True, max_length=16384, min_length=1) = Field(..., alias="matchCriteria")
29
- components: Optional[Dict[str, StrictStr]] = None
30
- __properties = ["matchCriteria", "components"]
31
-
32
- @validator('match_criteria')
33
- def match_criteria_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
29
+ components: Optional[conlist(ComponentFilter)] = None
30
+ __properties = ["components"]
38
31
 
39
32
  class Config:
40
33
  """Pydantic configuration"""
@@ -60,11 +53,13 @@ class ComponentRule(BaseModel):
60
53
  exclude={
61
54
  },
62
55
  exclude_none=True)
63
- # set to None if components (nullable) is None
64
- # and __fields_set__ contains the field
65
- if self.components is None and "components" in self.__fields_set__:
66
- _dict['components'] = None
67
-
56
+ # override the default output from pydantic by calling `to_dict()` of each item in components (list)
57
+ _items = []
58
+ if self.components:
59
+ for _item in self.components:
60
+ if _item:
61
+ _items.append(_item.to_dict())
62
+ _dict['components'] = _items
68
63
  return _dict
69
64
 
70
65
  @classmethod
@@ -77,7 +72,6 @@ class ComponentRule(BaseModel):
77
72
  return ComponentRule.parse_obj(obj)
78
73
 
79
74
  _obj = ComponentRule.parse_obj({
80
- "match_criteria": obj.get("matchCriteria"),
81
- "components": obj.get("components")
75
+ "components": [ComponentFilter.from_dict(_item) for _item in obj.get("components")] if obj.get("components") is not None else None
82
76
  })
83
77
  return _obj
@@ -35,9 +35,10 @@ class ContractForDifference(LusidInstrument):
35
35
  type: constr(strict=True, min_length=1) = Field(..., description="The type of CFD. Supported string (enumeration) values are: [Cash, Futures].")
36
36
  underlying_ccy: StrictStr = Field(..., alias="underlyingCcy", description="The currency of the underlying")
37
37
  underlying_identifier: constr(strict=True, min_length=1) = Field(..., alias="underlyingIdentifier", description="External market codes and identifiers for the CFD, e.g. RIC. Supported string (enumeration) values are: [LusidInstrumentId, Isin, Sedol, Cusip, ClientInternal, Figi, RIC, QuotePermId, REDCode, BBGId, ICECode].")
38
+ lot_size: Optional[StrictInt] = Field(None, alias="lotSize", description="CFD LotSize, the minimum number of shares that can be bought or sold at once. Optional, if set must be non-negative, if not set defaults to 1.")
38
39
  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")
39
40
  additional_properties: Dict[str, Any] = {}
40
- __properties = ["instrumentType", "startDate", "maturityDate", "code", "contractSize", "payCcy", "referenceRate", "type", "underlyingCcy", "underlyingIdentifier"]
41
+ __properties = ["instrumentType", "startDate", "maturityDate", "code", "contractSize", "payCcy", "referenceRate", "type", "underlyingCcy", "underlyingIdentifier", "lotSize"]
41
42
 
42
43
  @validator('instrument_type')
43
44
  def instrument_type_validate_enum(cls, value):
@@ -97,7 +98,8 @@ class ContractForDifference(LusidInstrument):
97
98
  "reference_rate": obj.get("referenceRate"),
98
99
  "type": obj.get("type"),
99
100
  "underlying_ccy": obj.get("underlyingCcy"),
100
- "underlying_identifier": obj.get("underlyingIdentifier")
101
+ "underlying_identifier": obj.get("underlyingIdentifier"),
102
+ "lot_size": obj.get("lotSize")
101
103
  })
102
104
  # store additional fields in additional_properties
103
105
  for _key in obj.keys():
lusid/models/fund.py CHANGED
@@ -35,6 +35,7 @@ class Fund(BaseModel):
35
35
  id: ResourceId = Field(...)
36
36
  display_name: Optional[constr(strict=True, max_length=256, min_length=1)] = Field(None, alias="displayName", description="The name of the Fund.")
37
37
  description: Optional[constr(strict=True, max_length=1024, min_length=0)] = Field(None, description="A description for the Fund.")
38
+ fund_configuration_id: Optional[ResourceId] = Field(None, alias="fundConfigurationId")
38
39
  abor_id: ResourceId = Field(..., alias="aborId")
39
40
  share_class_instruments: Optional[conlist(InstrumentResolutionDetail)] = Field(None, alias="shareClassInstruments", description="Details the user-provided instrument identifiers and the instrument resolved from them.")
40
41
  type: constr(strict=True, min_length=1) = Field(..., description="The type of fund; 'Standalone', 'Master' or 'Feeder'")
@@ -44,7 +45,7 @@ class Fund(BaseModel):
44
45
  properties: Optional[Dict[str, ModelProperty]] = Field(None, description="A set of properties for the Fund.")
45
46
  version: Optional[Version] = None
46
47
  links: Optional[conlist(Link)] = None
47
- __properties = ["href", "id", "displayName", "description", "aborId", "shareClassInstruments", "type", "inceptionDate", "decimalPlaces", "yearEndDate", "properties", "version", "links"]
48
+ __properties = ["href", "id", "displayName", "description", "fundConfigurationId", "aborId", "shareClassInstruments", "type", "inceptionDate", "decimalPlaces", "yearEndDate", "properties", "version", "links"]
48
49
 
49
50
  @validator('description')
50
51
  def description_validate_regular_expression(cls, value):
@@ -83,6 +84,9 @@ class Fund(BaseModel):
83
84
  # override the default output from pydantic by calling `to_dict()` of id
84
85
  if self.id:
85
86
  _dict['id'] = self.id.to_dict()
87
+ # override the default output from pydantic by calling `to_dict()` of fund_configuration_id
88
+ if self.fund_configuration_id:
89
+ _dict['fundConfigurationId'] = self.fund_configuration_id.to_dict()
86
90
  # override the default output from pydantic by calling `to_dict()` of abor_id
87
91
  if self.abor_id:
88
92
  _dict['aborId'] = self.abor_id.to_dict()
@@ -164,6 +168,7 @@ class Fund(BaseModel):
164
168
  "id": ResourceId.from_dict(obj.get("id")) if obj.get("id") is not None else None,
165
169
  "display_name": obj.get("displayName"),
166
170
  "description": obj.get("description"),
171
+ "fund_configuration_id": ResourceId.from_dict(obj.get("fundConfigurationId")) if obj.get("fundConfigurationId") is not None else None,
167
172
  "abor_id": ResourceId.from_dict(obj.get("aborId")) if obj.get("aborId") is not None else None,
168
173
  "share_class_instruments": [InstrumentResolutionDetail.from_dict(_item) for _item in obj.get("shareClassInstruments")] if obj.get("shareClassInstruments") is not None else None,
169
174
  "type": obj.get("type"),
@@ -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
@@ -34,11 +34,13 @@ class FundConfiguration(BaseModel):
34
34
  id: ResourceId = Field(...)
35
35
  display_name: Optional[StrictStr] = Field(None, alias="displayName", description="The name of the FundConfiguration.")
36
36
  description: Optional[StrictStr] = Field(None, description="A description for the FundConfiguration.")
37
- component_rules: Optional[conlist(ComponentRule)] = Field(None, alias="componentRules", description="The first matching rule decides the set of filters used.")
37
+ dealing_rule: Optional[ComponentRule] = Field(None, alias="dealingRule")
38
+ fund_pnl_exclusion_rule: Optional[ComponentRule] = Field(None, alias="fundPnlExclusionRule")
39
+ back_out_rule: Optional[ComponentRule] = Field(None, alias="backOutRule")
38
40
  properties: Optional[Dict[str, ModelProperty]] = Field(None, description="A set of properties for the Fund Configuration.")
39
41
  version: Optional[Version] = None
40
42
  links: Optional[conlist(Link)] = None
41
- __properties = ["href", "id", "displayName", "description", "componentRules", "properties", "version", "links"]
43
+ __properties = ["href", "id", "displayName", "description", "dealingRule", "fundPnlExclusionRule", "backOutRule", "properties", "version", "links"]
42
44
 
43
45
  class Config:
44
46
  """Pydantic configuration"""
@@ -67,13 +69,15 @@ class FundConfiguration(BaseModel):
67
69
  # override the default output from pydantic by calling `to_dict()` of id
68
70
  if self.id:
69
71
  _dict['id'] = self.id.to_dict()
70
- # override the default output from pydantic by calling `to_dict()` of each item in component_rules (list)
71
- _items = []
72
- if self.component_rules:
73
- for _item in self.component_rules:
74
- if _item:
75
- _items.append(_item.to_dict())
76
- _dict['componentRules'] = _items
72
+ # override the default output from pydantic by calling `to_dict()` of dealing_rule
73
+ if self.dealing_rule:
74
+ _dict['dealingRule'] = self.dealing_rule.to_dict()
75
+ # override the default output from pydantic by calling `to_dict()` of fund_pnl_exclusion_rule
76
+ if self.fund_pnl_exclusion_rule:
77
+ _dict['fundPnlExclusionRule'] = self.fund_pnl_exclusion_rule.to_dict()
78
+ # override the default output from pydantic by calling `to_dict()` of back_out_rule
79
+ if self.back_out_rule:
80
+ _dict['backOutRule'] = self.back_out_rule.to_dict()
77
81
  # override the default output from pydantic by calling `to_dict()` of each value in properties (dict)
78
82
  _field_dict = {}
79
83
  if self.properties:
@@ -106,11 +110,6 @@ class FundConfiguration(BaseModel):
106
110
  if self.description is None and "description" in self.__fields_set__:
107
111
  _dict['description'] = None
108
112
 
109
- # set to None if component_rules (nullable) is None
110
- # and __fields_set__ contains the field
111
- if self.component_rules is None and "component_rules" in self.__fields_set__:
112
- _dict['componentRules'] = None
113
-
114
113
  # set to None if properties (nullable) is None
115
114
  # and __fields_set__ contains the field
116
115
  if self.properties is None and "properties" in self.__fields_set__:
@@ -137,7 +136,9 @@ class FundConfiguration(BaseModel):
137
136
  "id": ResourceId.from_dict(obj.get("id")) if obj.get("id") is not None else None,
138
137
  "display_name": obj.get("displayName"),
139
138
  "description": obj.get("description"),
140
- "component_rules": [ComponentRule.from_dict(_item) for _item in obj.get("componentRules")] if obj.get("componentRules") is not None else None,
139
+ "dealing_rule": ComponentRule.from_dict(obj.get("dealingRule")) if obj.get("dealingRule") is not None else None,
140
+ "fund_pnl_exclusion_rule": ComponentRule.from_dict(obj.get("fundPnlExclusionRule")) if obj.get("fundPnlExclusionRule") is not None else None,
141
+ "back_out_rule": ComponentRule.from_dict(obj.get("backOutRule")) if obj.get("backOutRule") is not None else None,
141
142
  "properties": dict(
142
143
  (_k, ModelProperty.from_dict(_v))
143
144
  for _k, _v in obj.get("properties").items()
@@ -18,8 +18,8 @@ import re # noqa: F401
18
18
  import json
19
19
 
20
20
 
21
- from typing import Any, Dict, List, Optional
22
- from pydantic.v1 import BaseModel, Field, conlist, constr, validator
21
+ from typing import Any, Dict, Optional
22
+ from pydantic.v1 import BaseModel, Field, constr, validator
23
23
  from lusid.models.component_rule import ComponentRule
24
24
  from lusid.models.model_property import ModelProperty
25
25
 
@@ -30,9 +30,11 @@ class FundConfigurationRequest(BaseModel):
30
30
  code: constr(strict=True, max_length=64, min_length=1) = Field(...)
31
31
  display_name: Optional[constr(strict=True, max_length=256, min_length=1)] = Field(None, alias="displayName", description="The name of the Fund.")
32
32
  description: Optional[constr(strict=True, max_length=1024, min_length=0)] = Field(None, description="A description for the Fund.")
33
- component_rules: conlist(ComponentRule) = Field(..., alias="componentRules")
33
+ dealing_rule: ComponentRule = Field(..., alias="dealingRule")
34
+ fund_pnl_exclusion_rule: Optional[ComponentRule] = Field(None, alias="fundPnlExclusionRule")
35
+ back_out_rule: ComponentRule = Field(..., alias="backOutRule")
34
36
  properties: Optional[Dict[str, ModelProperty]] = Field(None, description="A set of properties for the Fund Configuration.")
35
- __properties = ["code", "displayName", "description", "componentRules", "properties"]
37
+ __properties = ["code", "displayName", "description", "dealingRule", "fundPnlExclusionRule", "backOutRule", "properties"]
36
38
 
37
39
  @validator('code')
38
40
  def code_validate_regular_expression(cls, value):
@@ -75,13 +77,15 @@ class FundConfigurationRequest(BaseModel):
75
77
  exclude={
76
78
  },
77
79
  exclude_none=True)
78
- # override the default output from pydantic by calling `to_dict()` of each item in component_rules (list)
79
- _items = []
80
- if self.component_rules:
81
- for _item in self.component_rules:
82
- if _item:
83
- _items.append(_item.to_dict())
84
- _dict['componentRules'] = _items
80
+ # override the default output from pydantic by calling `to_dict()` of dealing_rule
81
+ if self.dealing_rule:
82
+ _dict['dealingRule'] = self.dealing_rule.to_dict()
83
+ # override the default output from pydantic by calling `to_dict()` of fund_pnl_exclusion_rule
84
+ if self.fund_pnl_exclusion_rule:
85
+ _dict['fundPnlExclusionRule'] = self.fund_pnl_exclusion_rule.to_dict()
86
+ # override the default output from pydantic by calling `to_dict()` of back_out_rule
87
+ if self.back_out_rule:
88
+ _dict['backOutRule'] = self.back_out_rule.to_dict()
85
89
  # override the default output from pydantic by calling `to_dict()` of each value in properties (dict)
86
90
  _field_dict = {}
87
91
  if self.properties:
@@ -119,7 +123,9 @@ class FundConfigurationRequest(BaseModel):
119
123
  "code": obj.get("code"),
120
124
  "display_name": obj.get("displayName"),
121
125
  "description": obj.get("description"),
122
- "component_rules": [ComponentRule.from_dict(_item) for _item in obj.get("componentRules")] if obj.get("componentRules") is not None else None,
126
+ "dealing_rule": ComponentRule.from_dict(obj.get("dealingRule")) if obj.get("dealingRule") is not None else None,
127
+ "fund_pnl_exclusion_rule": ComponentRule.from_dict(obj.get("fundPnlExclusionRule")) if obj.get("fundPnlExclusionRule") is not None else None,
128
+ "back_out_rule": ComponentRule.from_dict(obj.get("backOutRule")) if obj.get("backOutRule") is not None else None,
123
129
  "properties": dict(
124
130
  (_k, ModelProperty.from_dict(_v))
125
131
  for _k, _v in obj.get("properties").items()
@@ -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
@@ -32,6 +32,7 @@ class FundRequest(BaseModel):
32
32
  code: constr(strict=True, max_length=64, min_length=1) = Field(..., description="The code given for the Fund.")
33
33
  display_name: Optional[constr(strict=True, max_length=256, min_length=1)] = Field(None, alias="displayName", description="The name of the Fund.")
34
34
  description: Optional[constr(strict=True, max_length=1024, min_length=0)] = Field(None, description="A description for the Fund.")
35
+ fund_configuration_id: Optional[ResourceId] = Field(None, alias="fundConfigurationId")
35
36
  abor_id: ResourceId = Field(..., alias="aborId")
36
37
  share_class_instrument_scopes: Optional[conlist(StrictStr, max_items=1)] = Field(None, alias="shareClassInstrumentScopes", description="The scopes in which the instruments lie, currently limited to one.")
37
38
  share_class_instruments: Optional[conlist(InstrumentResolutionDetail)] = Field(None, alias="shareClassInstruments", description="Details the user-provided instrument identifiers and the instrument resolved from them.")
@@ -40,7 +41,7 @@ class FundRequest(BaseModel):
40
41
  decimal_places: Optional[conint(strict=True, le=30, ge=0)] = Field(None, alias="decimalPlaces", description="Number of decimal places for reporting")
41
42
  year_end_date: DayMonth = Field(..., alias="yearEndDate")
42
43
  properties: Optional[Dict[str, ModelProperty]] = Field(None, description="A set of properties for the Fund.")
43
- __properties = ["code", "displayName", "description", "aborId", "shareClassInstrumentScopes", "shareClassInstruments", "type", "inceptionDate", "decimalPlaces", "yearEndDate", "properties"]
44
+ __properties = ["code", "displayName", "description", "fundConfigurationId", "aborId", "shareClassInstrumentScopes", "shareClassInstruments", "type", "inceptionDate", "decimalPlaces", "yearEndDate", "properties"]
44
45
 
45
46
  @validator('code')
46
47
  def code_validate_regular_expression(cls, value):
@@ -83,6 +84,9 @@ class FundRequest(BaseModel):
83
84
  exclude={
84
85
  },
85
86
  exclude_none=True)
87
+ # override the default output from pydantic by calling `to_dict()` of fund_configuration_id
88
+ if self.fund_configuration_id:
89
+ _dict['fundConfigurationId'] = self.fund_configuration_id.to_dict()
86
90
  # override the default output from pydantic by calling `to_dict()` of abor_id
87
91
  if self.abor_id:
88
92
  _dict['aborId'] = self.abor_id.to_dict()
@@ -148,6 +152,7 @@ class FundRequest(BaseModel):
148
152
  "code": obj.get("code"),
149
153
  "display_name": obj.get("displayName"),
150
154
  "description": obj.get("description"),
155
+ "fund_configuration_id": ResourceId.from_dict(obj.get("fundConfigurationId")) if obj.get("fundConfigurationId") is not None else None,
151
156
  "abor_id": ResourceId.from_dict(obj.get("aborId")) if obj.get("aborId") is not None else None,
152
157
  "share_class_instrument_scopes": obj.get("shareClassInstrumentScopes"),
153
158
  "share_class_instruments": [InstrumentResolutionDetail.from_dict(_item) for _item in obj.get("shareClassInstruments")] if obj.get("shareClassInstruments") is not None else None,