lusid-sdk 2.1.231__py3-none-any.whl → 2.1.237__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/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.6665\n"\
376
+ "Version of the API: 0.11.6670\n"\
377
377
  "SDK Package Version: {package_version}".\
378
378
  format(env=sys.platform, pyversion=sys.version, package_version=package_version)
379
379
 
@@ -14,7 +14,7 @@ __all__ = [
14
14
  "ConfigurationLoader",
15
15
  "SecretsFileConfigurationLoader",
16
16
  "EnvironmentVariablesConfigurationLoader",
17
- "FileTokenConfigurationLoader"
17
+ "FileTokenConfigurationLoader",
18
18
  "ArgsConfigurationLoader",
19
19
  "SyncApiClient"
20
20
  ]
@@ -18,20 +18,30 @@ import re # noqa: F401
18
18
  import json
19
19
 
20
20
  from datetime import datetime
21
- from typing import Any, Dict, Optional, Union
22
- from pydantic.v1 import BaseModel, Field, StrictFloat, StrictInt, StrictStr
21
+ from typing import Any, Dict, List, Optional, Union
22
+ from pydantic.v1 import BaseModel, Field, StrictFloat, StrictInt, conlist, constr, validator
23
+ from lusid.models.link import Link
23
24
 
24
25
  class FeeAccrual(BaseModel):
25
26
  """
26
27
  FeeAccrual
27
28
  """
28
- effective_at: Optional[datetime] = Field(None, alias="effectiveAt")
29
- name: Optional[StrictStr] = None
30
- calculation_base: Optional[Union[StrictFloat, StrictInt]] = Field(None, alias="calculationBase")
31
- amount: Optional[Union[StrictFloat, StrictInt]] = None
32
- previous_accrual: Optional[Union[StrictFloat, StrictInt]] = Field(None, alias="previousAccrual")
33
- total_accrual: Optional[Union[StrictFloat, StrictInt]] = Field(None, alias="totalAccrual")
34
- __properties = ["effectiveAt", "name", "calculationBase", "amount", "previousAccrual", "totalAccrual"]
29
+ effective_at: datetime = Field(..., alias="effectiveAt", description="The effective date for which the fee accrual has been calculated.")
30
+ code: constr(strict=True, max_length=64, min_length=1) = Field(..., description="The code of the fee for which the accrual has been calculated.")
31
+ name: constr(strict=True, max_length=50, min_length=0) = Field(..., description="The name of the fee for which the accrual has been calculated.")
32
+ calculation_base: Optional[Union[StrictFloat, StrictInt]] = Field(None, alias="calculationBase", description="The result of the evaluating the fee's calculation base expression.")
33
+ amount: Optional[Union[StrictFloat, StrictInt]] = Field(None, description="The result of applying the fee to the calculation base, and scaled down to a day.")
34
+ previous_accrual: Optional[Union[StrictFloat, StrictInt]] = Field(None, alias="previousAccrual", description="The previous valuation point's total accrual.")
35
+ total_accrual: Optional[Union[StrictFloat, StrictInt]] = Field(None, alias="totalAccrual", description="The sum of the PreviousAccrual and Amount.")
36
+ links: Optional[conlist(Link)] = None
37
+ __properties = ["effectiveAt", "code", "name", "calculationBase", "amount", "previousAccrual", "totalAccrual", "links"]
38
+
39
+ @validator('code')
40
+ def code_validate_regular_expression(cls, value):
41
+ """Validates the regular expression"""
42
+ if not re.match(r"^[a-zA-Z0-9\-_]+$", value):
43
+ raise ValueError(r"must validate the regular expression /^[a-zA-Z0-9\-_]+$/")
44
+ return value
35
45
 
36
46
  class Config:
37
47
  """Pydantic configuration"""
@@ -55,13 +65,19 @@ class FeeAccrual(BaseModel):
55
65
  """Returns the dictionary representation of the model using alias"""
56
66
  _dict = self.dict(by_alias=True,
57
67
  exclude={
58
- "total_accrual",
59
68
  },
60
69
  exclude_none=True)
61
- # set to None if name (nullable) is None
70
+ # override the default output from pydantic by calling `to_dict()` of each item in links (list)
71
+ _items = []
72
+ if self.links:
73
+ for _item in self.links:
74
+ if _item:
75
+ _items.append(_item.to_dict())
76
+ _dict['links'] = _items
77
+ # set to None if links (nullable) is None
62
78
  # and __fields_set__ contains the field
63
- if self.name is None and "name" in self.__fields_set__:
64
- _dict['name'] = None
79
+ if self.links is None and "links" in self.__fields_set__:
80
+ _dict['links'] = None
65
81
 
66
82
  return _dict
67
83
 
@@ -76,10 +92,12 @@ class FeeAccrual(BaseModel):
76
92
 
77
93
  _obj = FeeAccrual.parse_obj({
78
94
  "effective_at": obj.get("effectiveAt"),
95
+ "code": obj.get("code"),
79
96
  "name": obj.get("name"),
80
97
  "calculation_base": obj.get("calculationBase"),
81
98
  "amount": obj.get("amount"),
82
99
  "previous_accrual": obj.get("previousAccrual"),
83
- "total_accrual": obj.get("totalAccrual")
100
+ "total_accrual": obj.get("totalAccrual"),
101
+ "links": [Link.from_dict(_item) for _item in obj.get("links")] if obj.get("links") is not None else None
84
102
  })
85
103
  return _obj
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: lusid-sdk
3
- Version: 2.1.231
3
+ Version: 2.1.237
4
4
  Summary: LUSID API
5
5
  Home-page: https://github.com/finbourne/lusid-sdk-python
6
6
  License: MIT
@@ -29,8 +29,8 @@ FINBOURNE Technology
29
29
 
30
30
  This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:
31
31
 
32
- - API version: 0.11.6665
33
- - Package version: 2.1.231
32
+ - API version: 0.11.6670
33
+ - Package version: 2.1.237
34
34
  - Build package: org.openapitools.codegen.languages.PythonClientCodegen
35
35
  For more information, please visit [https://www.finbourne.com](https://www.finbourne.com)
36
36
 
@@ -67,9 +67,9 @@ lusid/api/transaction_portfolios_api.py,sha256=7G5m6iTQXTKCc6ASdxnlVJjvFascHxEgD
67
67
  lusid/api/translation_api.py,sha256=xTAaKEW96JTDIZBXCjxSguCa7Gz4oVd5jdObUE2egwo,20092
68
68
  lusid/api_client.py,sha256=dF6l9RAsdxdQjf6Qn4ny6LB-QXlJmsscWiozCvyyBFA,30709
69
69
  lusid/api_response.py,sha256=6-gnhty6lu8MMAERt3_kTVD7UxQgWFfcjgpcq6iN5IU,855
70
- lusid/configuration.py,sha256=TLqV3SL9QotWcJbUY8TJTik2mSyX-uRu7x2vCWSev5c,14404
70
+ lusid/configuration.py,sha256=_CeKmidFmGKfQJ0Or0tPrbkjVwT_3UP28PQk9kQsakA,14404
71
71
  lusid/exceptions.py,sha256=HIQwgmQrszLlcVCLaqex8dO0laVuejUyOMz7U2ZWJ6s,5326
72
- lusid/extensions/__init__.py,sha256=L7EF4zKjcq1g2GodEumg1-C9xKs7YrQ0QHGPi8XbpO4,629
72
+ lusid/extensions/__init__.py,sha256=dzDHEzpn-9smd2-_UMWQzeyX6Ha4jGf6fnqx7qxKxNI,630
73
73
  lusid/extensions/api_client.py,sha256=Ob06urm4Em3MLzgP_geyeeGsPCkU225msW_1kpIeABM,30567
74
74
  lusid/extensions/api_client_factory.py,sha256=qPlqYe8AMzXUZrQPMbO5YJrKWLYy01rWNdNcKZVi1Xg,9772
75
75
  lusid/extensions/api_configuration.py,sha256=LbuhaM-PcrY0a4cZ-ff7GBP8UybSqI5Ys2WQOBcr_8I,8052
@@ -379,7 +379,7 @@ lusid/models/exotic_instrument.py,sha256=Nfv3cttH2eWGX_aeU6zxmLD5hsNnWC6yBSFeFS6
379
379
  lusid/models/expanded_group.py,sha256=e1fIiusdlI_VtjJlF4g5O_yg6A_5VDOg2LaW94CUyJU,5931
380
380
  lusid/models/expiry_event.py,sha256=o1jn1kCnF2zSL8WJ3TSuJ-E9t-s22esebwaJGrqUGKg,4686
381
381
  lusid/models/fee.py,sha256=oMJgUsrJ3IsvK6bZlEtsTA2LF_4yncnzecVgh4w9VpU,10618
382
- lusid/models/fee_accrual.py,sha256=A9DaaFrEY1JqMbym_7TIcMMQxSqnQFMxuVZzljnggIk,2862
382
+ lusid/models/fee_accrual.py,sha256=4u5DYJpuu0mwhpXafCRA1mHCdDhNMjwpuTMllxUiqkI,4319
383
383
  lusid/models/fee_properties.py,sha256=Q92whmRw6aIwyxsgLVF9vntTY5WLwtrDdJMw9sSNoEQ,4232
384
384
  lusid/models/fee_request.py,sha256=AhQo8pWjPJX2crZhfE-jrwqagNSaOGNkChxDJc2jEio,9076
385
385
  lusid/models/fee_rule.py,sha256=Ez0GUE-1FlzEO8VF1IbH3p2I6gjMaQ6arWzo3VCyi5Q,6070
@@ -1080,6 +1080,6 @@ lusid/models/weighted_instruments.py,sha256=1y_y_vw4-LPsbkQx4FOzWdZc5fJnzhVkf1D3
1080
1080
  lusid/models/yield_curve_data.py,sha256=SbxvdJ4-GWK9kpMdw4Fnxc7_kvIMwgsRsd_31UJn7nw,6330
1081
1081
  lusid/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
1082
1082
  lusid/rest.py,sha256=TNUzQ3yLNT2L053EdR7R0vNzQh2J3TlYD1T56Dye0W0,10138
1083
- lusid_sdk-2.1.231.dist-info/METADATA,sha256=IDzMB2jS2Bf-QXJ1OPF9sVtwzoxUhv9A7V-Edx1x-uM,189283
1084
- lusid_sdk-2.1.231.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
1085
- lusid_sdk-2.1.231.dist-info/RECORD,,
1083
+ lusid_sdk-2.1.237.dist-info/METADATA,sha256=di3gbdBEKsqeTXr1eW_2-PgSVO2ogVFpTJntpGgEqjg,189283
1084
+ lusid_sdk-2.1.237.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
1085
+ lusid_sdk-2.1.237.dist-info/RECORD,,