lusid-sdk 2.1.429__py3-none-any.whl → 2.1.435__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.
@@ -41,7 +41,7 @@ from lusid.exceptions import ( # noqa: F401
41
41
  )
42
42
 
43
43
 
44
- class FundConfigurationEntitiesApi:
44
+ class FundConfigurationApi:
45
45
  """NOTE: This class is auto generated by OpenAPI Generator
46
46
  Ref: https://openapi-generator.tech
47
47
 
lusid/configuration.py CHANGED
@@ -382,7 +382,7 @@ class Configuration:
382
382
  return "Python SDK Debug Report:\n"\
383
383
  "OS: {env}\n"\
384
384
  "Python Version: {pyversion}\n"\
385
- "Version of the API: 0.11.6859\n"\
385
+ "Version of the API: 0.11.6865\n"\
386
386
  "SDK Package Version: {package_version}".\
387
387
  format(env=sys.platform, pyversion=sys.version, package_version=package_version)
388
388
 
lusid/models/__init__.py CHANGED
@@ -78,6 +78,7 @@ from lusid.models.barrier import Barrier
78
78
  from lusid.models.basket import Basket
79
79
  from lusid.models.basket_identifier import BasketIdentifier
80
80
  from lusid.models.batch_adjust_holdings_response import BatchAdjustHoldingsResponse
81
+ from lusid.models.batch_upsert_dates_for_calendar_response import BatchUpsertDatesForCalendarResponse
81
82
  from lusid.models.batch_upsert_instrument_properties_response import BatchUpsertInstrumentPropertiesResponse
82
83
  from lusid.models.batch_upsert_portfolio_access_metadata_request import BatchUpsertPortfolioAccessMetadataRequest
83
84
  from lusid.models.batch_upsert_portfolio_access_metadata_response import BatchUpsertPortfolioAccessMetadataResponse
@@ -1012,6 +1013,7 @@ from lusid.models.update_portfolio_group_request import UpdatePortfolioGroupRequ
1012
1013
  from lusid.models.update_portfolio_request import UpdatePortfolioRequest
1013
1014
  from lusid.models.update_property_definition_request import UpdatePropertyDefinitionRequest
1014
1015
  from lusid.models.update_reconciliation_request import UpdateReconciliationRequest
1016
+ from lusid.models.update_reference_data_request import UpdateReferenceDataRequest
1015
1017
  from lusid.models.update_relationship_definition_request import UpdateRelationshipDefinitionRequest
1016
1018
  from lusid.models.update_staging_rule_set_request import UpdateStagingRuleSetRequest
1017
1019
  from lusid.models.update_tax_rule_set_request import UpdateTaxRuleSetRequest
@@ -1166,6 +1168,7 @@ __all__ = [
1166
1168
  "Basket",
1167
1169
  "BasketIdentifier",
1168
1170
  "BatchAdjustHoldingsResponse",
1171
+ "BatchUpsertDatesForCalendarResponse",
1169
1172
  "BatchUpsertInstrumentPropertiesResponse",
1170
1173
  "BatchUpsertPortfolioAccessMetadataRequest",
1171
1174
  "BatchUpsertPortfolioAccessMetadataResponse",
@@ -2100,6 +2103,7 @@ __all__ = [
2100
2103
  "UpdatePortfolioRequest",
2101
2104
  "UpdatePropertyDefinitionRequest",
2102
2105
  "UpdateReconciliationRequest",
2106
+ "UpdateReferenceDataRequest",
2103
2107
  "UpdateRelationshipDefinitionRequest",
2104
2108
  "UpdateStagingRuleSetRequest",
2105
2109
  "UpdateTaxRuleSetRequest",
@@ -0,0 +1,146 @@
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, conlist
23
+ from lusid.models.calendar_date import CalendarDate
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 BatchUpsertDatesForCalendarResponse(BaseModel):
29
+ """
30
+ BatchUpsertDatesForCalendarResponse
31
+ """
32
+ values: Optional[Dict[str, CalendarDate]] = Field(None, description="The dates which have been successfully upserted.")
33
+ failed: Optional[Dict[str, ErrorDetail]] = Field(None, description="The dates that could not be upserted along with a reason for their failure.")
34
+ metadata: Optional[Dict[str, conlist(ResponseMetaData)]] = Field(None, description="Contains warnings related to the upserted dates")
35
+ links: Optional[conlist(Link)] = None
36
+ __properties = ["values", "failed", "metadata", "links"]
37
+
38
+ class Config:
39
+ """Pydantic configuration"""
40
+ allow_population_by_field_name = True
41
+ validate_assignment = True
42
+
43
+ def to_str(self) -> str:
44
+ """Returns the string representation of the model using alias"""
45
+ return pprint.pformat(self.dict(by_alias=True))
46
+
47
+ def to_json(self) -> str:
48
+ """Returns the JSON representation of the model using alias"""
49
+ return json.dumps(self.to_dict())
50
+
51
+ @classmethod
52
+ def from_json(cls, json_str: str) -> BatchUpsertDatesForCalendarResponse:
53
+ """Create an instance of BatchUpsertDatesForCalendarResponse from a JSON string"""
54
+ return cls.from_dict(json.loads(json_str))
55
+
56
+ def to_dict(self):
57
+ """Returns the dictionary representation of the model using alias"""
58
+ _dict = self.dict(by_alias=True,
59
+ exclude={
60
+ },
61
+ exclude_none=True)
62
+ # override the default output from pydantic by calling `to_dict()` of each value in values (dict)
63
+ _field_dict = {}
64
+ if self.values:
65
+ for _key in self.values:
66
+ if self.values[_key]:
67
+ _field_dict[_key] = self.values[_key].to_dict()
68
+ _dict['values'] = _field_dict
69
+ # override the default output from pydantic by calling `to_dict()` of each value in failed (dict)
70
+ _field_dict = {}
71
+ if self.failed:
72
+ for _key in self.failed:
73
+ if self.failed[_key]:
74
+ _field_dict[_key] = self.failed[_key].to_dict()
75
+ _dict['failed'] = _field_dict
76
+ # override the default output from pydantic by calling `to_dict()` of each value in metadata (dict of array)
77
+ _field_dict_of_array = {}
78
+ if self.metadata:
79
+ for _key in self.metadata:
80
+ if self.metadata[_key]:
81
+ _field_dict_of_array[_key] = [
82
+ _item.to_dict() for _item in self.metadata[_key]
83
+ ]
84
+ _dict['metadata'] = _field_dict_of_array
85
+ # override the default output from pydantic by calling `to_dict()` of each item in links (list)
86
+ _items = []
87
+ if self.links:
88
+ for _item in self.links:
89
+ if _item:
90
+ _items.append(_item.to_dict())
91
+ _dict['links'] = _items
92
+ # set to None if values (nullable) is None
93
+ # and __fields_set__ contains the field
94
+ if self.values is None and "values" in self.__fields_set__:
95
+ _dict['values'] = None
96
+
97
+ # set to None if failed (nullable) is None
98
+ # and __fields_set__ contains the field
99
+ if self.failed is None and "failed" in self.__fields_set__:
100
+ _dict['failed'] = None
101
+
102
+ # set to None if metadata (nullable) is None
103
+ # and __fields_set__ contains the field
104
+ if self.metadata is None and "metadata" in self.__fields_set__:
105
+ _dict['metadata'] = None
106
+
107
+ # set to None if links (nullable) is None
108
+ # and __fields_set__ contains the field
109
+ if self.links is None and "links" in self.__fields_set__:
110
+ _dict['links'] = None
111
+
112
+ return _dict
113
+
114
+ @classmethod
115
+ def from_dict(cls, obj: dict) -> BatchUpsertDatesForCalendarResponse:
116
+ """Create an instance of BatchUpsertDatesForCalendarResponse from a dict"""
117
+ if obj is None:
118
+ return None
119
+
120
+ if not isinstance(obj, dict):
121
+ return BatchUpsertDatesForCalendarResponse.parse_obj(obj)
122
+
123
+ _obj = BatchUpsertDatesForCalendarResponse.parse_obj({
124
+ "values": dict(
125
+ (_k, CalendarDate.from_dict(_v))
126
+ for _k, _v in obj.get("values").items()
127
+ )
128
+ if obj.get("values") is not None
129
+ else None,
130
+ "failed": dict(
131
+ (_k, ErrorDetail.from_dict(_v))
132
+ for _k, _v in obj.get("failed").items()
133
+ )
134
+ if obj.get("failed") is not None
135
+ else None,
136
+ "metadata": dict(
137
+ (_k,
138
+ [ResponseMetaData.from_dict(_item) for _item in _v]
139
+ if _v is not None
140
+ else None
141
+ )
142
+ for _k, _v in obj.get("metadata").items()
143
+ ),
144
+ "links": [Link.from_dict(_item) for _item in obj.get("links")] if obj.get("links") is not None else None
145
+ })
146
+ return _obj
@@ -26,12 +26,12 @@ class CdsCreditEvent(InstrumentEvent):
26
26
  """
27
27
  Definition of a credit event for credit default swap (CDS) instruments. # noqa: E501
28
28
  """
29
- default_date: datetime = Field(..., alias="defaultDate", description="The date of the credit default - i.e. date on which the debt issuer defaulted on its repayment obligation.")
29
+ effective_date: datetime = Field(..., alias="effectiveDate", description="The date of the credit default - i.e. date on which the debt issuer defaulted on its repayment obligation.")
30
30
  auction_date: Optional[datetime] = Field(None, alias="auctionDate", description="The date of the credit event auction - i.e. date on which the defaulted debt is sold via auction, and a recovery rate determined.")
31
31
  recovery_rate: Optional[Union[StrictFloat, StrictInt]] = Field(None, alias="recoveryRate", description="The fraction of the defaulted debt that can be recovered.")
32
32
  instrument_event_type: StrictStr = Field(..., alias="instrumentEventType", description="The Type of Event. The available values are: TransitionEvent, InformationalEvent, OpenEvent, CloseEvent, StockSplitEvent, BondDefaultEvent, CashDividendEvent, AmortisationEvent, CashFlowEvent, ExerciseEvent, ResetEvent, TriggerEvent, RawVendorEvent, InformationalErrorEvent, BondCouponEvent, DividendReinvestmentEvent, AccumulationEvent, BondPrincipalEvent, DividendOptionEvent, MaturityEvent, FxForwardSettlementEvent, ExpiryEvent, ScripDividendEvent, StockDividendEvent, ReverseStockSplitEvent, CapitalDistributionEvent, SpinOffEvent, MergerEvent, FutureExpiryEvent, SwapCashFlowEvent, SwapPrincipalEvent, CreditPremiumCashFlowEvent, CdsCreditEvent, CdxCreditEvent, MbsCouponEvent, MbsPrincipalEvent")
33
33
  additional_properties: Dict[str, Any] = {}
34
- __properties = ["instrumentEventType", "defaultDate", "auctionDate", "recoveryRate"]
34
+ __properties = ["instrumentEventType", "effectiveDate", "auctionDate", "recoveryRate"]
35
35
 
36
36
  @validator('instrument_event_type')
37
37
  def instrument_event_type_validate_enum(cls, value):
@@ -93,7 +93,7 @@ class CdsCreditEvent(InstrumentEvent):
93
93
 
94
94
  _obj = CdsCreditEvent.parse_obj({
95
95
  "instrument_event_type": obj.get("instrumentEventType"),
96
- "default_date": obj.get("defaultDate"),
96
+ "effective_date": obj.get("effectiveDate"),
97
97
  "auction_date": obj.get("auctionDate"),
98
98
  "recovery_rate": obj.get("recoveryRate")
99
99
  })
@@ -26,14 +26,14 @@ class CdxCreditEvent(InstrumentEvent):
26
26
  """
27
27
  Definition of a credit event for credit default swap index (CDX) instruments. # noqa: E501
28
28
  """
29
- default_date: datetime = Field(..., alias="defaultDate", description="The date of the credit default - i.e. date on which the debt issuer defaulted on its repayment obligation.")
29
+ effective_date: datetime = Field(..., alias="effectiveDate", description="The date of the credit default - i.e. date on which the debt issuer defaulted on its repayment obligation.")
30
30
  auction_date: Optional[datetime] = Field(None, alias="auctionDate", description="The date of the credit event auction - i.e. date on which the defaulted debt is sold via auction, and a recovery rate determined.")
31
31
  recovery_rate: Optional[Union[StrictFloat, StrictInt]] = Field(None, alias="recoveryRate", description="The fraction of the defaulted debt that can be recovered.")
32
32
  constituent_weight: Union[StrictFloat, StrictInt] = Field(..., alias="constituentWeight", description="The relative weight of the CDX constituent.")
33
33
  constituent_reference: Optional[StrictStr] = Field(None, alias="constituentReference", description="Reference value used to identify the CDX constituent.")
34
34
  instrument_event_type: StrictStr = Field(..., alias="instrumentEventType", description="The Type of Event. The available values are: TransitionEvent, InformationalEvent, OpenEvent, CloseEvent, StockSplitEvent, BondDefaultEvent, CashDividendEvent, AmortisationEvent, CashFlowEvent, ExerciseEvent, ResetEvent, TriggerEvent, RawVendorEvent, InformationalErrorEvent, BondCouponEvent, DividendReinvestmentEvent, AccumulationEvent, BondPrincipalEvent, DividendOptionEvent, MaturityEvent, FxForwardSettlementEvent, ExpiryEvent, ScripDividendEvent, StockDividendEvent, ReverseStockSplitEvent, CapitalDistributionEvent, SpinOffEvent, MergerEvent, FutureExpiryEvent, SwapCashFlowEvent, SwapPrincipalEvent, CreditPremiumCashFlowEvent, CdsCreditEvent, CdxCreditEvent, MbsCouponEvent, MbsPrincipalEvent")
35
35
  additional_properties: Dict[str, Any] = {}
36
- __properties = ["instrumentEventType", "defaultDate", "auctionDate", "recoveryRate", "constituentWeight", "constituentReference"]
36
+ __properties = ["instrumentEventType", "effectiveDate", "auctionDate", "recoveryRate", "constituentWeight", "constituentReference"]
37
37
 
38
38
  @validator('instrument_event_type')
39
39
  def instrument_event_type_validate_enum(cls, value):
@@ -100,7 +100,7 @@ class CdxCreditEvent(InstrumentEvent):
100
100
 
101
101
  _obj = CdxCreditEvent.parse_obj({
102
102
  "instrument_event_type": obj.get("instrumentEventType"),
103
- "default_date": obj.get("defaultDate"),
103
+ "effective_date": obj.get("effectiveDate"),
104
104
  "auction_date": obj.get("auctionDate"),
105
105
  "recovery_rate": obj.get("recoveryRate"),
106
106
  "constituent_weight": obj.get("constituentWeight"),
@@ -24,6 +24,7 @@ from lusid.models.custom_entity_field import CustomEntityField
24
24
  from lusid.models.custom_entity_id import CustomEntityId
25
25
  from lusid.models.link import Link
26
26
  from lusid.models.relationship import Relationship
27
+ from lusid.models.staged_modifications_info import StagedModificationsInfo
27
28
  from lusid.models.version import Version
28
29
 
29
30
  class CustomEntityResponse(BaseModel):
@@ -33,13 +34,14 @@ class CustomEntityResponse(BaseModel):
33
34
  href: Optional[StrictStr] = Field(None, description="The specific Uniform Resource Identifier (URI) for this resource at the requested effective and asAt datetime.")
34
35
  entity_type: constr(strict=True, min_length=1) = Field(..., alias="entityType", description="The type of custom entity this is.")
35
36
  version: Version = Field(...)
37
+ staged_modifications: Optional[StagedModificationsInfo] = Field(None, alias="stagedModifications")
36
38
  display_name: constr(strict=True, min_length=1) = Field(..., alias="displayName", description="A display label for the custom entity.")
37
39
  description: Optional[StrictStr] = Field(None, description="A description of the custom entity.")
38
40
  identifiers: conlist(CustomEntityId) = Field(..., description="The identifiers the custom entity will be upserted with.")
39
41
  fields: conlist(CustomEntityField) = Field(..., description="The fields that decorate the custom entity.")
40
42
  relationships: conlist(Relationship) = Field(..., description="A set of relationships associated to the custom entity.")
41
43
  links: Optional[conlist(Link)] = None
42
- __properties = ["href", "entityType", "version", "displayName", "description", "identifiers", "fields", "relationships", "links"]
44
+ __properties = ["href", "entityType", "version", "stagedModifications", "displayName", "description", "identifiers", "fields", "relationships", "links"]
43
45
 
44
46
  class Config:
45
47
  """Pydantic configuration"""
@@ -68,6 +70,9 @@ class CustomEntityResponse(BaseModel):
68
70
  # override the default output from pydantic by calling `to_dict()` of version
69
71
  if self.version:
70
72
  _dict['version'] = self.version.to_dict()
73
+ # override the default output from pydantic by calling `to_dict()` of staged_modifications
74
+ if self.staged_modifications:
75
+ _dict['stagedModifications'] = self.staged_modifications.to_dict()
71
76
  # override the default output from pydantic by calling `to_dict()` of each item in identifiers (list)
72
77
  _items = []
73
78
  if self.identifiers:
@@ -126,6 +131,7 @@ class CustomEntityResponse(BaseModel):
126
131
  "href": obj.get("href"),
127
132
  "entity_type": obj.get("entityType"),
128
133
  "version": Version.from_dict(obj.get("version")) if obj.get("version") is not None else None,
134
+ "staged_modifications": StagedModificationsInfo.from_dict(obj.get("stagedModifications")) if obj.get("stagedModifications") is not None else None,
129
135
  "display_name": obj.get("displayName"),
130
136
  "description": obj.get("description"),
131
137
  "identifiers": [CustomEntityId.from_dict(_item) for _item in obj.get("identifiers")] if obj.get("identifiers") is not None else None,
lusid/models/fee.py CHANGED
@@ -32,8 +32,8 @@ class Fee(BaseModel):
32
32
  """
33
33
  href: Optional[StrictStr] = Field(None, description="The specific Uniform Resource Identifier (URI) for this resource at the requested effective and asAt datetime.")
34
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.")
35
+ fee_type_id: ResourceId = Field(..., alias="feeTypeId")
36
+ display_name: constr(strict=True, max_length=50, min_length=0) = Field(..., alias="displayName", description="The name of the Fee.")
37
37
  description: Optional[constr(strict=True, max_length=1024, min_length=0)] = Field(None, description="A description for the Fee.")
38
38
  origin: Optional[constr(strict=True, max_length=512, min_length=1)] = Field(None, description="The origin or source of the Fee accrual.")
39
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. (TotalAnnualAccrualAmount and CalculationBase cannot both be present)")
@@ -50,7 +50,7 @@ class Fee(BaseModel):
50
50
  version: Optional[Version] = None
51
51
  portfolio_id: Optional[ResourceId] = Field(None, alias="portfolioId")
52
52
  links: Optional[conlist(Link)] = None
53
- __properties = ["href", "feeCode", "feeType", "name", "description", "origin", "calculationBase", "accrualCurrency", "treatment", "totalAnnualAccrualAmount", "feeRatePercentage", "payableFrequency", "businessDayConvention", "startDate", "endDate", "anchorDate", "properties", "version", "portfolioId", "links"]
53
+ __properties = ["href", "feeCode", "feeTypeId", "displayName", "description", "origin", "calculationBase", "accrualCurrency", "treatment", "totalAnnualAccrualAmount", "feeRatePercentage", "payableFrequency", "businessDayConvention", "startDate", "endDate", "anchorDate", "properties", "version", "portfolioId", "links"]
54
54
 
55
55
  @validator('fee_code')
56
56
  def fee_code_validate_regular_expression(cls, value):
@@ -96,9 +96,9 @@ class Fee(BaseModel):
96
96
  exclude={
97
97
  },
98
98
  exclude_none=True)
99
- # override the default output from pydantic by calling `to_dict()` of fee_type
100
- if self.fee_type:
101
- _dict['feeType'] = self.fee_type.to_dict()
99
+ # override the default output from pydantic by calling `to_dict()` of fee_type_id
100
+ if self.fee_type_id:
101
+ _dict['feeTypeId'] = self.fee_type_id.to_dict()
102
102
  # override the default output from pydantic by calling `to_dict()` of anchor_date
103
103
  if self.anchor_date:
104
104
  _dict['anchorDate'] = self.anchor_date.to_dict()
@@ -181,8 +181,8 @@ class Fee(BaseModel):
181
181
  _obj = Fee.parse_obj({
182
182
  "href": obj.get("href"),
183
183
  "fee_code": obj.get("feeCode"),
184
- "fee_type": ResourceId.from_dict(obj.get("feeType")) if obj.get("feeType") is not None else None,
185
- "name": obj.get("name"),
184
+ "fee_type_id": ResourceId.from_dict(obj.get("feeTypeId")) if obj.get("feeTypeId") is not None else None,
185
+ "display_name": obj.get("displayName"),
186
186
  "description": obj.get("description"),
187
187
  "origin": obj.get("origin"),
188
188
  "calculation_base": obj.get("calculationBase"),
@@ -29,8 +29,8 @@ class FeeRequest(BaseModel):
29
29
  FeeRequest
30
30
  """
31
31
  code: constr(strict=True, max_length=64, min_length=1) = Field(..., description="The code of the Fee.")
32
- fee_type: ResourceId = Field(..., alias="feeType")
33
- name: constr(strict=True, max_length=256, min_length=1) = Field(..., description="The name of the Fee.")
32
+ fee_type_id: ResourceId = Field(..., alias="feeTypeId")
33
+ display_name: constr(strict=True, max_length=256, min_length=1) = Field(..., alias="displayName", description="The name of the Fee.")
34
34
  description: Optional[constr(strict=True, max_length=1024, min_length=0)] = Field(None, description="A description for the Fee.")
35
35
  origin: Optional[constr(strict=True, max_length=512, min_length=1)] = Field(None, description="The origin or source of the Fee accrual.")
36
36
  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. (TotalAnnualAccrualAmount and CalculationBase cannot both be present)")
@@ -45,7 +45,7 @@ class FeeRequest(BaseModel):
45
45
  anchor_date: Optional[DayMonth] = Field(None, alias="anchorDate")
46
46
  properties: Optional[Dict[str, ModelProperty]] = Field(None, description="The Fee properties. These will be from the 'Fee' domain.")
47
47
  portfolio_id: Optional[ResourceId] = Field(None, alias="portfolioId")
48
- __properties = ["code", "feeType", "name", "description", "origin", "calculationBase", "accrualCurrency", "treatment", "totalAnnualAccrualAmount", "feeRatePercentage", "payableFrequency", "businessDayConvention", "startDate", "endDate", "anchorDate", "properties", "portfolioId"]
48
+ __properties = ["code", "feeTypeId", "displayName", "description", "origin", "calculationBase", "accrualCurrency", "treatment", "totalAnnualAccrualAmount", "feeRatePercentage", "payableFrequency", "businessDayConvention", "startDate", "endDate", "anchorDate", "properties", "portfolioId"]
49
49
 
50
50
  @validator('code')
51
51
  def code_validate_regular_expression(cls, value):
@@ -88,9 +88,9 @@ class FeeRequest(BaseModel):
88
88
  exclude={
89
89
  },
90
90
  exclude_none=True)
91
- # override the default output from pydantic by calling `to_dict()` of fee_type
92
- if self.fee_type:
93
- _dict['feeType'] = self.fee_type.to_dict()
91
+ # override the default output from pydantic by calling `to_dict()` of fee_type_id
92
+ if self.fee_type_id:
93
+ _dict['feeTypeId'] = self.fee_type_id.to_dict()
94
94
  # override the default output from pydantic by calling `to_dict()` of anchor_date
95
95
  if self.anchor_date:
96
96
  _dict['anchorDate'] = self.anchor_date.to_dict()
@@ -152,8 +152,8 @@ class FeeRequest(BaseModel):
152
152
 
153
153
  _obj = FeeRequest.parse_obj({
154
154
  "code": obj.get("code"),
155
- "fee_type": ResourceId.from_dict(obj.get("feeType")) if obj.get("feeType") is not None else None,
156
- "name": obj.get("name"),
155
+ "fee_type_id": ResourceId.from_dict(obj.get("feeTypeId")) if obj.get("feeTypeId") is not None else None,
156
+ "display_name": obj.get("displayName"),
157
157
  "description": obj.get("description"),
158
158
  "origin": obj.get("origin"),
159
159
  "calculation_base": obj.get("calculationBase"),
lusid/models/fee_type.py CHANGED
@@ -31,12 +31,12 @@ class FeeType(BaseModel):
31
31
  """
32
32
  href: Optional[StrictStr] = Field(None, description="The specific Uniform Resource Identifier (URI) for this resource at the requested effective and asAt datetime.")
33
33
  id: ResourceId = Field(...)
34
- name: constr(strict=True, min_length=1) = Field(..., description="The name of the fee type.")
34
+ display_name: constr(strict=True, min_length=1) = Field(..., alias="displayName", description="The name of the fee type.")
35
35
  description: constr(strict=True, min_length=1) = Field(..., description="The description of the fee type.")
36
- component_transactions: conlist(ComponentTransaction) = Field(..., alias="componentTransactions", description="A set of component transactions that relate to the fee type.")
36
+ component_transactions: conlist(ComponentTransaction) = Field(..., alias="componentTransactions", description="A set of component transactions that relate to the fee type to be created.")
37
37
  version: Optional[Version] = None
38
38
  links: Optional[conlist(Link)] = None
39
- __properties = ["href", "id", "name", "description", "componentTransactions", "version", "links"]
39
+ __properties = ["href", "id", "displayName", "description", "componentTransactions", "version", "links"]
40
40
 
41
41
  class Config:
42
42
  """Pydantic configuration"""
@@ -106,7 +106,7 @@ class FeeType(BaseModel):
106
106
  _obj = FeeType.parse_obj({
107
107
  "href": obj.get("href"),
108
108
  "id": ResourceId.from_dict(obj.get("id")) if obj.get("id") is not None else None,
109
- "name": obj.get("name"),
109
+ "display_name": obj.get("displayName"),
110
110
  "description": obj.get("description"),
111
111
  "component_transactions": [ComponentTransaction.from_dict(_item) for _item in obj.get("componentTransactions")] if obj.get("componentTransactions") is not None else None,
112
112
  "version": Version.from_dict(obj.get("version")) if obj.get("version") is not None else None,
@@ -27,10 +27,10 @@ class FeeTypeRequest(BaseModel):
27
27
  FeeTypeRequest
28
28
  """
29
29
  code: constr(strict=True, max_length=64, min_length=1) = Field(...)
30
- name: constr(strict=True, max_length=256, min_length=1) = Field(..., description="The name of the fee type.")
30
+ display_name: constr(strict=True, max_length=256, min_length=1) = Field(..., alias="displayName", description="The name of the fee type.")
31
31
  description: Optional[constr(strict=True, max_length=1024, min_length=0)] = Field(None, description="The description of the fee type.")
32
32
  component_transactions: conlist(ComponentTransaction, max_items=1000) = Field(..., alias="componentTransactions", description="A set of component transactions that relate to the fee type to be created.")
33
- __properties = ["code", "name", "description", "componentTransactions"]
33
+ __properties = ["code", "displayName", "description", "componentTransactions"]
34
34
 
35
35
  @validator('code')
36
36
  def code_validate_regular_expression(cls, value):
@@ -98,7 +98,7 @@ class FeeTypeRequest(BaseModel):
98
98
 
99
99
  _obj = FeeTypeRequest.parse_obj({
100
100
  "code": obj.get("code"),
101
- "name": obj.get("name"),
101
+ "display_name": obj.get("displayName"),
102
102
  "description": obj.get("description"),
103
103
  "component_transactions": [ComponentTransaction.from_dict(_item) for _item in obj.get("componentTransactions")] if obj.get("componentTransactions") is not None else None
104
104
  })
@@ -26,10 +26,10 @@ class UpdateFeeTypeRequest(BaseModel):
26
26
  """
27
27
  UpdateFeeTypeRequest
28
28
  """
29
- name: constr(strict=True, max_length=256, min_length=1) = Field(..., description="The name of the fee type.")
29
+ display_name: constr(strict=True, max_length=256, min_length=1) = Field(..., alias="displayName", description="The name of the fee type.")
30
30
  description: Optional[constr(strict=True, max_length=1024, min_length=0)] = Field(None, description="The description of the fee type.")
31
- component_transactions: conlist(ComponentTransaction, max_items=1000) = Field(..., alias="componentTransactions", description="A set of component transactions that relate to the fee type to be updated.")
32
- __properties = ["name", "description", "componentTransactions"]
31
+ component_transactions: conlist(ComponentTransaction, max_items=1000) = Field(..., alias="componentTransactions", description="A set of component transactions that relate to the fee type to be created.")
32
+ __properties = ["displayName", "description", "componentTransactions"]
33
33
 
34
34
  @validator('description')
35
35
  def description_validate_regular_expression(cls, value):
@@ -89,7 +89,7 @@ class UpdateFeeTypeRequest(BaseModel):
89
89
  return UpdateFeeTypeRequest.parse_obj(obj)
90
90
 
91
91
  _obj = UpdateFeeTypeRequest.parse_obj({
92
- "name": obj.get("name"),
92
+ "display_name": obj.get("displayName"),
93
93
  "description": obj.get("description"),
94
94
  "component_transactions": [ComponentTransaction.from_dict(_item) for _item in obj.get("componentTransactions")] if obj.get("componentTransactions") is not None else None
95
95
  })
@@ -0,0 +1,87 @@
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
22
+ from pydantic.v1 import BaseModel, Field, conlist
23
+ from lusid.models.field_definition import FieldDefinition
24
+ from lusid.models.field_value import FieldValue
25
+
26
+ class UpdateReferenceDataRequest(BaseModel):
27
+ """
28
+ UpdateReferenceDataRequest
29
+ """
30
+ request_definitions: conlist(FieldDefinition) = Field(..., alias="requestDefinitions", description="Definition of a reference data field.")
31
+ request_values: conlist(FieldValue) = Field(..., alias="requestValues", description="Reference data.")
32
+ __properties = ["requestDefinitions", "requestValues"]
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) -> UpdateReferenceDataRequest:
49
+ """Create an instance of UpdateReferenceDataRequest 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 each item in request_definitions (list)
59
+ _items = []
60
+ if self.request_definitions:
61
+ for _item in self.request_definitions:
62
+ if _item:
63
+ _items.append(_item.to_dict())
64
+ _dict['requestDefinitions'] = _items
65
+ # override the default output from pydantic by calling `to_dict()` of each item in request_values (list)
66
+ _items = []
67
+ if self.request_values:
68
+ for _item in self.request_values:
69
+ if _item:
70
+ _items.append(_item.to_dict())
71
+ _dict['requestValues'] = _items
72
+ return _dict
73
+
74
+ @classmethod
75
+ def from_dict(cls, obj: dict) -> UpdateReferenceDataRequest:
76
+ """Create an instance of UpdateReferenceDataRequest from a dict"""
77
+ if obj is None:
78
+ return None
79
+
80
+ if not isinstance(obj, dict):
81
+ return UpdateReferenceDataRequest.parse_obj(obj)
82
+
83
+ _obj = UpdateReferenceDataRequest.parse_obj({
84
+ "request_definitions": [FieldDefinition.from_dict(_item) for _item in obj.get("requestDefinitions")] if obj.get("requestDefinitions") is not None else None,
85
+ "request_values": [FieldValue.from_dict(_item) for _item in obj.get("requestValues")] if obj.get("requestValues") is not None else None
86
+ })
87
+ return _obj
@@ -30,9 +30,10 @@ class UpsertCustomEntitiesResponse(BaseModel):
30
30
  """
31
31
  href: Optional[StrictStr] = Field(None, description="The specific Uniform Resource Identifier (URI) for this resource at the requested effective and asAt datetime.")
32
32
  values: Optional[Dict[str, CustomEntityResponse]] = Field(None, description="The custom-entities which have been successfully updated or created.")
33
+ staged: Optional[Dict[str, CustomEntityResponse]] = Field(None, description="The custom-entities that have been staged for update or creation.")
33
34
  failed: Optional[Dict[str, ErrorDetail]] = Field(None, description="The custom-entities that could not be updated or created or were left unchanged without error along with a reason for their failure.")
34
35
  links: Optional[conlist(Link)] = None
35
- __properties = ["href", "values", "failed", "links"]
36
+ __properties = ["href", "values", "staged", "failed", "links"]
36
37
 
37
38
  class Config:
38
39
  """Pydantic configuration"""
@@ -65,6 +66,13 @@ class UpsertCustomEntitiesResponse(BaseModel):
65
66
  if self.values[_key]:
66
67
  _field_dict[_key] = self.values[_key].to_dict()
67
68
  _dict['values'] = _field_dict
69
+ # override the default output from pydantic by calling `to_dict()` of each value in staged (dict)
70
+ _field_dict = {}
71
+ if self.staged:
72
+ for _key in self.staged:
73
+ if self.staged[_key]:
74
+ _field_dict[_key] = self.staged[_key].to_dict()
75
+ _dict['staged'] = _field_dict
68
76
  # override the default output from pydantic by calling `to_dict()` of each value in failed (dict)
69
77
  _field_dict = {}
70
78
  if self.failed:
@@ -89,6 +97,11 @@ class UpsertCustomEntitiesResponse(BaseModel):
89
97
  if self.values is None and "values" in self.__fields_set__:
90
98
  _dict['values'] = None
91
99
 
100
+ # set to None if staged (nullable) is None
101
+ # and __fields_set__ contains the field
102
+ if self.staged is None and "staged" in self.__fields_set__:
103
+ _dict['staged'] = None
104
+
92
105
  # set to None if failed (nullable) is None
93
106
  # and __fields_set__ contains the field
94
107
  if self.failed is None and "failed" in self.__fields_set__:
@@ -118,6 +131,12 @@ class UpsertCustomEntitiesResponse(BaseModel):
118
131
  )
119
132
  if obj.get("values") is not None
120
133
  else None,
134
+ "staged": dict(
135
+ (_k, CustomEntityResponse.from_dict(_v))
136
+ for _k, _v in obj.get("staged").items()
137
+ )
138
+ if obj.get("staged") is not None
139
+ else None,
121
140
  "failed": dict(
122
141
  (_k, ErrorDetail.from_dict(_v))
123
142
  for _k, _v in obj.get("failed").items()