lusid-sdk 2.0.50b0__py3-none-any.whl → 2.0.455__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.

Files changed (323) hide show
  1. lusid/__init__.py +1099 -14
  2. lusid/api/__init__.py +67 -0
  3. lusid/api/abor_api.py +513 -179
  4. lusid/api/abor_configuration_api.py +25 -24
  5. lusid/api/allocations_api.py +12 -20
  6. lusid/api/blocks_api.py +6 -6
  7. lusid/api/calendars_api.py +16 -24
  8. lusid/api/chart_of_accounts_api.py +1745 -441
  9. lusid/api/compliance_api.py +71 -62
  10. lusid/api/configuration_recipe_api.py +1198 -56
  11. lusid/api/corporate_action_sources_api.py +8 -8
  12. lusid/api/custom_entities_api.py +6 -6
  13. lusid/api/cut_label_definitions_api.py +9 -17
  14. lusid/api/data_types_api.py +16 -32
  15. lusid/api/executions_api.py +6 -6
  16. lusid/api/funds_api.py +944 -0
  17. lusid/api/instrument_event_types_api.py +1287 -0
  18. lusid/api/instruments_api.py +12 -20
  19. lusid/api/legacy_compliance_api.py +12 -12
  20. lusid/api/legal_entities_api.py +12 -12
  21. lusid/api/order_graph_api.py +12 -12
  22. lusid/api/order_instructions_api.py +6 -6
  23. lusid/api/order_management_api.py +495 -14
  24. lusid/api/orders_api.py +16 -24
  25. lusid/api/packages_api.py +6 -6
  26. lusid/api/persons_api.py +16 -24
  27. lusid/api/placements_api.py +12 -12
  28. lusid/api/portfolio_groups_api.py +6 -6
  29. lusid/api/portfolios_api.py +23 -39
  30. lusid/api/property_definitions_api.py +205 -0
  31. lusid/api/queryable_keys_api.py +211 -0
  32. lusid/api/quotes_api.py +20 -36
  33. lusid/api/reconciliations_api.py +410 -1978
  34. lusid/api/schemas_api.py +7 -15
  35. lusid/api/scopes_api.py +151 -0
  36. lusid/api/scripted_translation_api.py +30 -28
  37. lusid/api/transaction_configuration_api.py +22 -22
  38. lusid/api/transaction_portfolios_api.py +282 -577
  39. lusid/api_client.py +5 -3
  40. lusid/configuration.py +1 -1
  41. lusid/extensions/__init__.py +10 -7
  42. lusid/extensions/api_client.py +3 -1
  43. lusid/extensions/api_client_factory.py +156 -45
  44. lusid/extensions/api_configuration.py +124 -15
  45. lusid/extensions/configuration_loaders.py +2 -4
  46. lusid/extensions/proxy_config.py +8 -5
  47. lusid/extensions/socket_keep_alive.py +14 -15
  48. lusid/extensions/tcp_keep_alive_connector.py +93 -46
  49. lusid/models/__init__.py +1012 -13
  50. lusid/models/abor.py +9 -2
  51. lusid/models/abor_configuration.py +8 -8
  52. lusid/models/abor_configuration_request.py +9 -9
  53. lusid/models/abor_request.py +1 -1
  54. lusid/models/account.py +6 -1
  55. lusid/models/accumulation_event.py +104 -0
  56. lusid/models/address_key_compliance_parameter.py +5 -12
  57. lusid/models/address_key_list_compliance_parameter.py +3 -3
  58. lusid/models/address_key_option_definition.py +3 -1
  59. lusid/models/amortisation_event.py +4 -6
  60. lusid/models/{underlying_leg.py → asset_leg.py} +15 -15
  61. lusid/models/basket.py +3 -3
  62. lusid/models/block_and_order_id_request.py +78 -0
  63. lusid/models/block_and_orders.py +83 -0
  64. lusid/models/block_and_orders_create_request.py +77 -0
  65. lusid/models/block_and_orders_request.py +134 -0
  66. lusid/models/blocked_order_request.py +130 -0
  67. lusid/models/bond.py +13 -6
  68. lusid/models/bond_coupon_event.py +97 -0
  69. lusid/models/bond_default_event.py +8 -18
  70. lusid/models/bond_principal_event.py +97 -0
  71. lusid/models/book_transactions_request.py +97 -0
  72. lusid/models/bool_compliance_parameter.py +3 -3
  73. lusid/models/bool_list_compliance_parameter.py +3 -3
  74. lusid/models/branch_step.py +101 -0
  75. lusid/models/cap_floor.py +3 -3
  76. lusid/models/cash_dividend_event.py +32 -10
  77. lusid/models/cash_election.py +91 -0
  78. lusid/models/cash_flow_event.py +5 -7
  79. lusid/models/cash_perpetual.py +3 -3
  80. lusid/models/cds_flow_conventions.py +1 -1
  81. lusid/models/cds_index.py +4 -4
  82. lusid/models/check_step.py +110 -0
  83. lusid/models/cleardown_module_details.py +95 -0
  84. lusid/models/cleardown_module_request.py +117 -0
  85. lusid/models/cleardown_module_response.py +139 -0
  86. lusid/models/cleardown_module_rule.py +94 -0
  87. lusid/models/{reconciliation_run_break.py → cleardown_module_rules_updated_response.py} +30 -36
  88. lusid/models/close_event.py +3 -3
  89. lusid/models/close_period_diary_entry_request.py +149 -0
  90. lusid/models/complete_portfolio.py +8 -1
  91. lusid/models/complex_bond.py +4 -4
  92. lusid/models/complex_market_data.py +6 -5
  93. lusid/models/compliance_parameter.py +8 -5
  94. lusid/models/compliance_parameter_type.py +3 -0
  95. lusid/models/compliance_rule_breakdown.py +16 -8
  96. lusid/models/compliance_rule_breakdown_request.py +12 -4
  97. lusid/models/compliance_rule_result_v2.py +85 -0
  98. lusid/models/compliance_step.py +99 -0
  99. lusid/models/compliance_step_type.py +42 -0
  100. lusid/models/compliance_summary_rule_result.py +12 -15
  101. lusid/models/compliance_summary_rule_result_request.py +12 -15
  102. lusid/models/compliance_template_variation.py +12 -2
  103. lusid/models/component_transaction.py +92 -0
  104. lusid/models/composite_dispersion.py +30 -5
  105. lusid/models/compounding.py +4 -4
  106. lusid/models/configuration_recipe.py +10 -19
  107. lusid/models/constant_volatility_surface.py +102 -0
  108. lusid/models/contract_for_difference.py +3 -3
  109. lusid/models/create_derived_property_definition_request.py +3 -3
  110. lusid/models/create_derived_transaction_portfolio_request.py +10 -3
  111. lusid/models/create_property_definition_request.py +12 -5
  112. lusid/models/create_trade_tickets_response.py +87 -0
  113. lusid/models/create_transaction_portfolio_request.py +16 -3
  114. lusid/models/credit_default_swap.py +4 -4
  115. lusid/models/credit_spread_curve_data.py +4 -4
  116. lusid/models/custom_entity_definition.py +8 -2
  117. lusid/models/custom_entity_type.py +8 -2
  118. lusid/models/cut_label_definition.py +7 -1
  119. lusid/models/data_type.py +7 -1
  120. lusid/models/data_type_summary.py +8 -2
  121. lusid/models/date_time_compliance_parameter.py +3 -3
  122. lusid/models/date_time_list_compliance_parameter.py +3 -3
  123. lusid/models/{upsert_reconciliation_run_request.py → day_month.py} +15 -15
  124. lusid/models/decimal_compliance_parameter.py +3 -3
  125. lusid/models/decimal_list_compliance_parameter.py +3 -3
  126. lusid/models/dialect.py +9 -3
  127. lusid/models/diary_entry.py +1 -1
  128. lusid/models/diary_entry_request.py +1 -1
  129. lusid/models/discount_factor_curve_data.py +3 -3
  130. lusid/models/dividend_option_event.py +129 -0
  131. lusid/models/dividend_reinvestment_event.py +124 -0
  132. lusid/models/election_specification.py +73 -0
  133. lusid/models/eligibility_calculation.py +71 -0
  134. lusid/models/empty_model_options.py +3 -3
  135. lusid/models/equity.py +8 -6
  136. lusid/models/equity_curve_by_prices_data.py +3 -3
  137. lusid/models/equity_model_options.py +3 -3
  138. lusid/models/equity_option.py +3 -3
  139. lusid/models/equity_swap.py +4 -4
  140. lusid/models/equity_vol_surface_data.py +3 -3
  141. lusid/models/exchange_traded_option.py +3 -3
  142. lusid/models/exercise_event.py +5 -7
  143. lusid/models/exotic_instrument.py +3 -3
  144. lusid/models/expiry_event.py +91 -0
  145. lusid/models/filter_predicate_compliance_parameter.py +91 -0
  146. lusid/models/filter_step.py +101 -0
  147. lusid/models/fixed_leg.py +3 -3
  148. lusid/models/fixed_schedule.py +4 -9
  149. lusid/models/flexible_loan.py +105 -0
  150. lusid/models/float_schedule.py +20 -12
  151. lusid/models/floating_leg.py +3 -3
  152. lusid/models/flow_convention_name.py +1 -1
  153. lusid/models/flow_conventions.py +1 -1
  154. lusid/models/forward_rate_agreement.py +3 -3
  155. lusid/models/from_recipe.py +81 -0
  156. lusid/models/fund.py +182 -0
  157. lusid/models/fund_properties.py +115 -0
  158. lusid/models/fund_request.py +165 -0
  159. lusid/models/fund_share_class.py +99 -0
  160. lusid/models/funding_leg.py +3 -3
  161. lusid/models/funding_leg_options.py +3 -3
  162. lusid/models/future.py +3 -3
  163. lusid/models/fx_conventions.py +73 -0
  164. lusid/models/fx_forward.py +8 -6
  165. lusid/models/fx_forward_curve_by_quote_reference.py +4 -4
  166. lusid/models/fx_forward_curve_data.py +3 -3
  167. lusid/models/fx_forward_model_options.py +3 -3
  168. lusid/models/fx_forward_pips_curve_data.py +3 -3
  169. lusid/models/fx_forward_settlement_event.py +136 -0
  170. lusid/models/fx_forward_tenor_curve_data.py +4 -4
  171. lusid/models/fx_forward_tenor_pips_curve_data.py +4 -4
  172. lusid/models/fx_linked_notional_schedule.py +108 -0
  173. lusid/models/fx_option.py +3 -3
  174. lusid/models/fx_rate_schedule.py +3 -3
  175. lusid/models/fx_swap.py +4 -4
  176. lusid/models/fx_vol_surface_data.py +3 -3
  177. lusid/models/{reconciliation_run.py → get_recipe_composer_response.py} +15 -15
  178. lusid/models/group_by_selector_compliance_parameter.py +91 -0
  179. lusid/models/group_by_step.py +101 -0
  180. lusid/models/group_filter_predicate_compliance_parameter.py +91 -0
  181. lusid/models/group_filter_step.py +110 -0
  182. lusid/models/group_of_market_data_key_rules.py +79 -0
  183. lusid/models/index_convention.py +1 -1
  184. lusid/models/index_model_options.py +3 -3
  185. lusid/models/inflation_index_conventions.py +2 -2
  186. lusid/models/inflation_leg.py +3 -3
  187. lusid/models/inflation_linked_bond.py +3 -3
  188. lusid/models/inflation_swap.py +4 -4
  189. lusid/models/informational_error_event.py +3 -3
  190. lusid/models/informational_event.py +4 -6
  191. lusid/models/instrument_event.py +13 -5
  192. lusid/models/instrument_event_configuration.py +74 -0
  193. lusid/models/instrument_event_holder.py +12 -3
  194. lusid/models/instrument_event_type.py +8 -0
  195. lusid/models/instrument_leg.py +3 -3
  196. lusid/models/instrument_list_compliance_parameter.py +3 -3
  197. lusid/models/instrument_payment_diary_leg.py +5 -3
  198. lusid/models/instrument_resolution_detail.py +105 -0
  199. lusid/models/instrument_type.py +2 -0
  200. lusid/models/interest_rate_swap.py +4 -4
  201. lusid/models/interest_rate_swaption.py +3 -3
  202. lusid/models/intermediate_compliance_step.py +110 -0
  203. lusid/models/ir_vol_cube_data.py +3 -3
  204. lusid/models/journal_entry_line.py +34 -3
  205. lusid/models/journal_entry_lines_query_parameters.py +1 -1
  206. lusid/models/label_value_set.py +1 -1
  207. lusid/models/leg_definition.py +16 -3
  208. lusid/models/lineage_member.py +87 -0
  209. lusid/models/lock_period_diary_entry_request.py +91 -0
  210. lusid/models/lusid_instrument.py +7 -5
  211. lusid/models/lusid_trade_ticket.py +8 -1
  212. lusid/models/market_context.py +17 -2
  213. lusid/models/market_data_type.py +1 -0
  214. lusid/models/maturity_event.py +91 -0
  215. lusid/models/model_options.py +5 -6
  216. lusid/models/model_options_type.py +0 -1
  217. lusid/models/model_selection.py +3 -3
  218. lusid/models/move_orders_to_different_blocks_request.py +77 -0
  219. lusid/models/moved_order_to_different_block_response.py +85 -0
  220. lusid/models/movement_type.py +2 -0
  221. lusid/models/multi_currency_amounts.py +71 -0
  222. lusid/models/opaque_market_data.py +3 -3
  223. lusid/models/opaque_model_options.py +3 -3
  224. lusid/models/open_event.py +3 -3
  225. lusid/models/optionality_schedule.py +3 -3
  226. lusid/models/order_graph_block.py +4 -2
  227. lusid/models/order_graph_block_order_detail.py +16 -2
  228. lusid/models/output_transaction.py +9 -2
  229. lusid/models/paged_resource_list_of_cleardown_module_response.py +113 -0
  230. lusid/models/{paged_resource_list_of_reconciliation_run_break.py → paged_resource_list_of_cleardown_module_rule.py} +11 -11
  231. lusid/models/{paged_resource_list_of_reconciliation_run.py → paged_resource_list_of_fund.py} +11 -11
  232. lusid/models/paged_resource_list_of_property_definition.py +113 -0
  233. lusid/models/paged_resource_list_of_transaction_template.py +113 -0
  234. lusid/models/paged_resource_list_of_transaction_template_specification.py +113 -0
  235. lusid/models/participation_request.py +3 -9
  236. lusid/models/performance_returns_metric.py +1 -1
  237. lusid/models/period_diary_entries_reopened_response.py +104 -0
  238. lusid/models/place_blocks_request.py +77 -0
  239. lusid/models/portfolio.py +15 -2
  240. lusid/models/portfolio_details.py +15 -2
  241. lusid/models/portfolio_group_id_compliance_parameter.py +3 -3
  242. lusid/models/portfolio_group_id_list_compliance_parameter.py +3 -3
  243. lusid/models/portfolio_holding.py +27 -2
  244. lusid/models/portfolio_id_compliance_parameter.py +3 -3
  245. lusid/models/portfolio_id_list_compliance_parameter.py +3 -3
  246. lusid/models/posting_module_rule.py +29 -4
  247. lusid/models/pricing_model.py +2 -1
  248. lusid/models/property_definition.py +17 -4
  249. lusid/models/property_definition_search_result.py +3 -3
  250. lusid/models/property_domain.py +2 -0
  251. lusid/models/property_key_compliance_parameter.py +3 -3
  252. lusid/models/property_key_list_compliance_parameter.py +3 -3
  253. lusid/models/queryable_key.py +124 -0
  254. lusid/models/raw_vendor_event.py +5 -7
  255. lusid/models/re_open_period_diary_entry_request.py +84 -0
  256. lusid/models/recipe_block.py +87 -0
  257. lusid/models/recipe_composer.py +100 -0
  258. lusid/models/{reconciliation_break_id.py → recipe_value.py} +22 -23
  259. lusid/models/recombine_step.py +101 -0
  260. lusid/models/reference_instrument.py +3 -3
  261. lusid/models/relative_date_offset.py +71 -0
  262. lusid/models/repo.py +3 -3
  263. lusid/models/reset_event.py +4 -6
  264. lusid/models/resource_list_of_block_and_orders.py +113 -0
  265. lusid/models/resource_list_of_get_recipe_composer_response.py +113 -0
  266. lusid/models/resource_list_of_moved_order_to_different_block_response.py +113 -0
  267. lusid/models/resource_list_of_queryable_key.py +113 -0
  268. lusid/models/schedule.py +6 -5
  269. lusid/models/schedule_type.py +1 -0
  270. lusid/models/script_map_reference.py +94 -0
  271. lusid/models/security_election.py +86 -0
  272. lusid/models/side_definition.py +1 -8
  273. lusid/models/sides_definition_request.py +1 -8
  274. lusid/models/simple_cash_flow_loan.py +3 -3
  275. lusid/models/simple_instrument.py +3 -3
  276. lusid/models/step_schedule.py +3 -3
  277. lusid/models/stock_split_event.py +3 -3
  278. lusid/models/string_compliance_parameter.py +3 -3
  279. lusid/models/string_list_compliance_parameter.py +3 -3
  280. lusid/models/template_field.py +77 -0
  281. lusid/models/term_deposit.py +3 -3
  282. lusid/models/total_return_swap.py +16 -16
  283. lusid/models/transaction_configuration_movement_data.py +3 -3
  284. lusid/models/transaction_configuration_movement_data_request.py +3 -3
  285. lusid/models/transaction_currency_and_amount.py +81 -0
  286. lusid/models/transaction_field_map.py +97 -0
  287. lusid/models/transaction_price.py +3 -3
  288. lusid/models/transaction_price_and_type.py +81 -0
  289. lusid/models/transaction_price_type.py +1 -0
  290. lusid/models/transaction_property_map.py +80 -0
  291. lusid/models/transaction_template.py +100 -0
  292. lusid/models/transaction_template_request.py +79 -0
  293. lusid/models/transaction_template_specification.py +99 -0
  294. lusid/models/transaction_type_alias.py +0 -7
  295. lusid/models/transaction_type_calculation.py +1 -1
  296. lusid/models/transition_event.py +3 -3
  297. lusid/models/translation_context.py +75 -0
  298. lusid/models/translation_script.py +9 -3
  299. lusid/models/trial_balance.py +46 -11
  300. lusid/models/trial_balance_query_parameters.py +15 -6
  301. lusid/models/trigger_event.py +3 -3
  302. lusid/models/units_ratio.py +71 -0
  303. lusid/models/{compliance_run_summary.py → upsert_compliance_run_summary_result.py} +8 -8
  304. lusid/models/upsert_dialect_request.py +79 -0
  305. lusid/models/upsert_instrument_event_request.py +12 -3
  306. lusid/models/upsert_quote_request.py +1 -1
  307. lusid/models/upsert_recipe_composer_request.py +73 -0
  308. lusid/models/upsert_recipe_request.py +3 -9
  309. lusid/models/upsert_translation_script_request.py +75 -0
  310. lusid/models/valuation_schedule.py +10 -3
  311. lusid/models/weighted_instrument.py +13 -2
  312. lusid/models/weighted_instrument_in_line_lookup_identifiers.py +89 -0
  313. lusid/models/yield_curve_data.py +3 -3
  314. lusid/rest.py +1 -1
  315. {lusid_sdk-2.0.50b0.dist-info → lusid_sdk-2.0.455.dist-info}/METADATA +231 -48
  316. {lusid_sdk-2.0.50b0.dist-info → lusid_sdk-2.0.455.dist-info}/RECORD +317 -235
  317. {lusid_sdk-2.0.50b0.dist-info → lusid_sdk-2.0.455.dist-info}/WHEEL +1 -1
  318. lusid/extensions/api_client_builder.py +0 -138
  319. lusid/models/configuration_recipe_snippet.py +0 -139
  320. lusid/models/je_lines_query_parameters.py +0 -105
  321. lusid/models/look_up_pricing_model_options.py +0 -93
  322. lusid/models/reconciliation_run_id.py +0 -85
  323. lusid/models/upsert_reconciliation_break_request.py +0 -98
@@ -0,0 +1,71 @@
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, Union
22
+ from pydantic import BaseModel, Field, StrictFloat, StrictInt
23
+
24
+ class UnitsRatio(BaseModel):
25
+ """
26
+ The number of units you have after the event (output) for a given number of units you have prior to the event (input). # noqa: E501
27
+ """
28
+ input: Union[StrictFloat, StrictInt] = Field(..., description="Input amount. Denominator of the Ratio")
29
+ output: Union[StrictFloat, StrictInt] = Field(..., description="Output amount. Numerator of the Ratio")
30
+ __properties = ["input", "output"]
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) -> UnitsRatio:
47
+ """Create an instance of UnitsRatio 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
+ return _dict
57
+
58
+ @classmethod
59
+ def from_dict(cls, obj: dict) -> UnitsRatio:
60
+ """Create an instance of UnitsRatio from a dict"""
61
+ if obj is None:
62
+ return None
63
+
64
+ if not isinstance(obj, dict):
65
+ return UnitsRatio.parse_obj(obj)
66
+
67
+ _obj = UnitsRatio.parse_obj({
68
+ "input": obj.get("input"),
69
+ "output": obj.get("output")
70
+ })
71
+ return _obj
@@ -23,9 +23,9 @@ from pydantic import BaseModel, Field, conlist, constr
23
23
  from lusid.models.compliance_summary_rule_result import ComplianceSummaryRuleResult
24
24
  from lusid.models.resource_id import ResourceId
25
25
 
26
- class ComplianceRunSummary(BaseModel):
26
+ class UpsertComplianceRunSummaryResult(BaseModel):
27
27
  """
28
- ComplianceRunSummary
28
+ UpsertComplianceRunSummaryResult
29
29
  """
30
30
  run_id: ResourceId = Field(..., alias="runId")
31
31
  instigated_at: datetime = Field(..., alias="instigatedAt")
@@ -48,8 +48,8 @@ class ComplianceRunSummary(BaseModel):
48
48
  return json.dumps(self.to_dict())
49
49
 
50
50
  @classmethod
51
- def from_json(cls, json_str: str) -> ComplianceRunSummary:
52
- """Create an instance of ComplianceRunSummary from a JSON string"""
51
+ def from_json(cls, json_str: str) -> UpsertComplianceRunSummaryResult:
52
+ """Create an instance of UpsertComplianceRunSummaryResult from a JSON string"""
53
53
  return cls.from_dict(json.loads(json_str))
54
54
 
55
55
  def to_dict(self):
@@ -71,15 +71,15 @@ class ComplianceRunSummary(BaseModel):
71
71
  return _dict
72
72
 
73
73
  @classmethod
74
- def from_dict(cls, obj: dict) -> ComplianceRunSummary:
75
- """Create an instance of ComplianceRunSummary from a dict"""
74
+ def from_dict(cls, obj: dict) -> UpsertComplianceRunSummaryResult:
75
+ """Create an instance of UpsertComplianceRunSummaryResult from a dict"""
76
76
  if obj is None:
77
77
  return None
78
78
 
79
79
  if not isinstance(obj, dict):
80
- return ComplianceRunSummary.parse_obj(obj)
80
+ return UpsertComplianceRunSummaryResult.parse_obj(obj)
81
81
 
82
- _obj = ComplianceRunSummary.parse_obj({
82
+ _obj = UpsertComplianceRunSummaryResult.parse_obj({
83
83
  "run_id": ResourceId.from_dict(obj.get("runId")) if obj.get("runId") is not None else None,
84
84
  "instigated_at": obj.get("instigatedAt"),
85
85
  "completed_at": obj.get("completedAt"),
@@ -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
22
+ from pydantic import BaseModel, Field
23
+ from lusid.models.dialect_id import DialectId
24
+ from lusid.models.dialect_schema import DialectSchema
25
+
26
+ class UpsertDialectRequest(BaseModel):
27
+ """
28
+ UpsertDialectRequest
29
+ """
30
+ id: DialectId = Field(...)
31
+ var_schema: DialectSchema = Field(..., alias="schema")
32
+ __properties = ["id", "schema"]
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) -> UpsertDialectRequest:
49
+ """Create an instance of UpsertDialectRequest 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 id
59
+ if self.id:
60
+ _dict['id'] = self.id.to_dict()
61
+ # override the default output from pydantic by calling `to_dict()` of var_schema
62
+ if self.var_schema:
63
+ _dict['schema'] = self.var_schema.to_dict()
64
+ return _dict
65
+
66
+ @classmethod
67
+ def from_dict(cls, obj: dict) -> UpsertDialectRequest:
68
+ """Create an instance of UpsertDialectRequest from a dict"""
69
+ if obj is None:
70
+ return None
71
+
72
+ if not isinstance(obj, dict):
73
+ return UpsertDialectRequest.parse_obj(obj)
74
+
75
+ _obj = UpsertDialectRequest.parse_obj({
76
+ "id": DialectId.from_dict(obj.get("id")) if obj.get("id") is not None else None,
77
+ "var_schema": DialectSchema.from_dict(obj.get("schema")) if obj.get("schema") is not None else None
78
+ })
79
+ return _obj
@@ -19,7 +19,7 @@ import json
19
19
 
20
20
 
21
21
  from typing import Any, Dict, List, Optional
22
- from pydantic import BaseModel, Field, StrictStr, conlist, constr, validator
22
+ from pydantic import BaseModel, Field, StrictInt, StrictStr, conlist, constr, validator
23
23
  from lusid.models.instrument_event import InstrumentEvent
24
24
  from lusid.models.perpetual_property import PerpetualProperty
25
25
 
@@ -32,7 +32,9 @@ class UpsertInstrumentEventRequest(BaseModel):
32
32
  description: Optional[constr(strict=True, max_length=1024, min_length=0)] = Field(None, description="The description of the instrument event.")
33
33
  instrument_event: InstrumentEvent = Field(..., alias="instrumentEvent")
34
34
  properties: Optional[conlist(PerpetualProperty)] = Field(None, description="The properties attached to this instrument event.")
35
- __properties = ["instrumentEventId", "instrumentIdentifiers", "description", "instrumentEvent", "properties"]
35
+ sequence_number: Optional[StrictInt] = Field(None, alias="sequenceNumber", description="The order of the instrument event relative others on the same date (0 being processed first). Must be non negative.")
36
+ participation_type: Optional[StrictStr] = Field('Mandatory', alias="participationType", description="Is participation in this event Mandatory, MandatoryWithChoices, or Voluntary.")
37
+ __properties = ["instrumentEventId", "instrumentIdentifiers", "description", "instrumentEvent", "properties", "sequenceNumber", "participationType"]
36
38
 
37
39
  @validator('instrument_event_id')
38
40
  def instrument_event_id_validate_regular_expression(cls, value):
@@ -95,6 +97,11 @@ class UpsertInstrumentEventRequest(BaseModel):
95
97
  if self.properties is None and "properties" in self.__fields_set__:
96
98
  _dict['properties'] = None
97
99
 
100
+ # set to None if participation_type (nullable) is None
101
+ # and __fields_set__ contains the field
102
+ if self.participation_type is None and "participation_type" in self.__fields_set__:
103
+ _dict['participationType'] = None
104
+
98
105
  return _dict
99
106
 
100
107
  @classmethod
@@ -111,6 +118,8 @@ class UpsertInstrumentEventRequest(BaseModel):
111
118
  "instrument_identifiers": obj.get("instrumentIdentifiers"),
112
119
  "description": obj.get("description"),
113
120
  "instrument_event": InstrumentEvent.from_dict(obj.get("instrumentEvent")) if obj.get("instrumentEvent") is not None else None,
114
- "properties": [PerpetualProperty.from_dict(_item) for _item in obj.get("properties")] if obj.get("properties") is not None else None
121
+ "properties": [PerpetualProperty.from_dict(_item) for _item in obj.get("properties")] if obj.get("properties") is not None else None,
122
+ "sequence_number": obj.get("sequenceNumber"),
123
+ "participation_type": obj.get("participationType") if obj.get("participationType") is not None else 'Mandatory'
115
124
  })
116
125
  return _obj
@@ -25,7 +25,7 @@ from lusid.models.quote_id import QuoteId
25
25
 
26
26
  class UpsertQuoteRequest(BaseModel):
27
27
  """
28
- The details of the quote including its unique identifier, value and lineage. # noqa: E501
28
+ The details of the quote including its unique identifier, value and lineage. Please note the Unit field on MetricValue is nullable on the upsert but there is validation within the quote store to make sure this field is populated. In the absence of a real unit then we recommend putting something in line with the data in QuoteId.QuoteSeriesId.quoteType e.g. InterestRate. # noqa: E501
29
29
  """
30
30
  quote_id: QuoteId = Field(..., alias="quoteId")
31
31
  metric_value: Optional[MetricValue] = Field(None, alias="metricValue")
@@ -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 import BaseModel, Field
23
+ from lusid.models.recipe_composer import RecipeComposer
24
+
25
+ class UpsertRecipeComposerRequest(BaseModel):
26
+ """
27
+ A recipe composer that is to be stored in the recipe composer data store or used for inline resolving. # noqa: E501
28
+ """
29
+ recipe_composer: Optional[RecipeComposer] = Field(None, alias="recipeComposer")
30
+ __properties = ["recipeComposer"]
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) -> UpsertRecipeComposerRequest:
47
+ """Create an instance of UpsertRecipeComposerRequest 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 recipe_composer
57
+ if self.recipe_composer:
58
+ _dict['recipeComposer'] = self.recipe_composer.to_dict()
59
+ return _dict
60
+
61
+ @classmethod
62
+ def from_dict(cls, obj: dict) -> UpsertRecipeComposerRequest:
63
+ """Create an instance of UpsertRecipeComposerRequest from a dict"""
64
+ if obj is None:
65
+ return None
66
+
67
+ if not isinstance(obj, dict):
68
+ return UpsertRecipeComposerRequest.parse_obj(obj)
69
+
70
+ _obj = UpsertRecipeComposerRequest.parse_obj({
71
+ "recipe_composer": RecipeComposer.from_dict(obj.get("recipeComposer")) if obj.get("recipeComposer") is not None else None
72
+ })
73
+ return _obj
@@ -21,15 +21,13 @@ import json
21
21
  from typing import Any, Dict, Optional
22
22
  from pydantic import BaseModel, Field
23
23
  from lusid.models.configuration_recipe import ConfigurationRecipe
24
- from lusid.models.configuration_recipe_snippet import ConfigurationRecipeSnippet
25
24
 
26
25
  class UpsertRecipeRequest(BaseModel):
27
26
  """
28
- A recipe or recipe snippet that is to be stored in the recipe structured data store. Only one of these must be present. # noqa: E501
27
+ A recipe that is to be stored in the recipe structured data store. Only one of these must be present. # noqa: E501
29
28
  """
30
29
  configuration_recipe: Optional[ConfigurationRecipe] = Field(None, alias="configurationRecipe")
31
- configuration_recipe_snippet: Optional[ConfigurationRecipeSnippet] = Field(None, alias="configurationRecipeSnippet")
32
- __properties = ["configurationRecipe", "configurationRecipeSnippet"]
30
+ __properties = ["configurationRecipe"]
33
31
 
34
32
  class Config:
35
33
  """Pydantic configuration"""
@@ -58,9 +56,6 @@ class UpsertRecipeRequest(BaseModel):
58
56
  # override the default output from pydantic by calling `to_dict()` of configuration_recipe
59
57
  if self.configuration_recipe:
60
58
  _dict['configurationRecipe'] = self.configuration_recipe.to_dict()
61
- # override the default output from pydantic by calling `to_dict()` of configuration_recipe_snippet
62
- if self.configuration_recipe_snippet:
63
- _dict['configurationRecipeSnippet'] = self.configuration_recipe_snippet.to_dict()
64
59
  return _dict
65
60
 
66
61
  @classmethod
@@ -73,7 +68,6 @@ class UpsertRecipeRequest(BaseModel):
73
68
  return UpsertRecipeRequest.parse_obj(obj)
74
69
 
75
70
  _obj = UpsertRecipeRequest.parse_obj({
76
- "configuration_recipe": ConfigurationRecipe.from_dict(obj.get("configurationRecipe")) if obj.get("configurationRecipe") is not None else None,
77
- "configuration_recipe_snippet": ConfigurationRecipeSnippet.from_dict(obj.get("configurationRecipeSnippet")) if obj.get("configurationRecipeSnippet") is not None else None
71
+ "configuration_recipe": ConfigurationRecipe.from_dict(obj.get("configurationRecipe")) if obj.get("configurationRecipe") is not None else None
78
72
  })
79
73
  return _obj
@@ -0,0 +1,75 @@
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 import BaseModel, Field, constr
23
+ from lusid.models.translation_script_id import TranslationScriptId
24
+
25
+ class UpsertTranslationScriptRequest(BaseModel):
26
+ """
27
+ UpsertTranslationScriptRequest
28
+ """
29
+ id: TranslationScriptId = Field(...)
30
+ body: constr(strict=True, max_length=500000, min_length=0) = Field(..., description="Body of the translation script, i.e. the actual translation code.")
31
+ __properties = ["id", "body"]
32
+
33
+ class Config:
34
+ """Pydantic configuration"""
35
+ allow_population_by_field_name = True
36
+ validate_assignment = True
37
+
38
+ def to_str(self) -> str:
39
+ """Returns the string representation of the model using alias"""
40
+ return pprint.pformat(self.dict(by_alias=True))
41
+
42
+ def to_json(self) -> str:
43
+ """Returns the JSON representation of the model using alias"""
44
+ return json.dumps(self.to_dict())
45
+
46
+ @classmethod
47
+ def from_json(cls, json_str: str) -> UpsertTranslationScriptRequest:
48
+ """Create an instance of UpsertTranslationScriptRequest from a JSON string"""
49
+ return cls.from_dict(json.loads(json_str))
50
+
51
+ def to_dict(self):
52
+ """Returns the dictionary representation of the model using alias"""
53
+ _dict = self.dict(by_alias=True,
54
+ exclude={
55
+ },
56
+ exclude_none=True)
57
+ # override the default output from pydantic by calling `to_dict()` of id
58
+ if self.id:
59
+ _dict['id'] = self.id.to_dict()
60
+ return _dict
61
+
62
+ @classmethod
63
+ def from_dict(cls, obj: dict) -> UpsertTranslationScriptRequest:
64
+ """Create an instance of UpsertTranslationScriptRequest from a dict"""
65
+ if obj is None:
66
+ return None
67
+
68
+ if not isinstance(obj, dict):
69
+ return UpsertTranslationScriptRequest.parse_obj(obj)
70
+
71
+ _obj = UpsertTranslationScriptRequest.parse_obj({
72
+ "id": TranslationScriptId.from_dict(obj.get("id")) if obj.get("id") is not None else None,
73
+ "body": obj.get("body")
74
+ })
75
+ return _obj
@@ -28,10 +28,11 @@ class ValuationSchedule(BaseModel):
28
28
  effective_from: Optional[StrictStr] = Field(None, alias="effectiveFrom", description="If present, the EffectiveFrom and EffectiveAt dates are interpreted as a range of dates for which to perform a valuation. In this case, valuation is calculated for the portfolio(s) for each business day in the given range.")
29
29
  effective_at: constr(strict=True, min_length=1) = Field(..., alias="effectiveAt", description="The market data time, i.e. the time to run the valuation request effective of.")
30
30
  tenor: Optional[constr(strict=True, max_length=16, min_length=0)] = Field(None, description="Tenor, e.g \"1D\", \"1M\" to be used in generating the date schedule when effectiveFrom and effectiveAt are both given and are not the same.")
31
- roll_convention: Optional[constr(strict=True, max_length=50, min_length=0)] = Field(None, alias="rollConvention", description="When Tenor is given and is not equal to \"1D\", there may be cases where \"date + tenor\" land on non-business days around month end. In that case, the RollConvention, e.g. modified following \"MF\" would be applied to determine the next GBD.")
31
+ roll_convention: Optional[constr(strict=True, max_length=50, min_length=0)] = Field(None, alias="rollConvention", description="When Tenor is given and is \"1M\" or longer, this specifies the rule which should be used to generate the date schedule. For example, \"EndOfMonth\" to generate end of month dates, or \"1\" to specify the first day of the applicable month.")
32
32
  holiday_calendars: Optional[conlist(StrictStr)] = Field(None, alias="holidayCalendars", description="The holiday calendar(s) that should be used in determining the date schedule. Holiday calendar(s) are supplied by their names, for example, \"CoppClark\". Note that when the calendars are not available (e.g. when the user has insufficient permissions), a recipe setting will be used to determine whether the whole batch should then fail or whether the calendar not being available should simply be ignored.")
33
33
  valuation_date_times: Optional[conlist(StrictStr)] = Field(None, alias="valuationDateTimes", description="If given, this is the exact set of dates on which to perform a valuation. This will replace/override all other specified values if given.")
34
- __properties = ["effectiveFrom", "effectiveAt", "tenor", "rollConvention", "holidayCalendars", "valuationDateTimes"]
34
+ business_day_convention: Optional[constr(strict=True, max_length=50, min_length=0)] = Field(None, alias="businessDayConvention", description="When Tenor is given and is not equal to \"1D\", there may be cases where \"date + tenor\" land on non-business days around month end. In that case, the BusinessDayConvention, e.g. modified following \"MF\" would be applied to determine the next GBD.")
35
+ __properties = ["effectiveFrom", "effectiveAt", "tenor", "rollConvention", "holidayCalendars", "valuationDateTimes", "businessDayConvention"]
35
36
 
36
37
  class Config:
37
38
  """Pydantic configuration"""
@@ -82,6 +83,11 @@ class ValuationSchedule(BaseModel):
82
83
  if self.valuation_date_times is None and "valuation_date_times" in self.__fields_set__:
83
84
  _dict['valuationDateTimes'] = None
84
85
 
86
+ # set to None if business_day_convention (nullable) is None
87
+ # and __fields_set__ contains the field
88
+ if self.business_day_convention is None and "business_day_convention" in self.__fields_set__:
89
+ _dict['businessDayConvention'] = None
90
+
85
91
  return _dict
86
92
 
87
93
  @classmethod
@@ -99,6 +105,7 @@ class ValuationSchedule(BaseModel):
99
105
  "tenor": obj.get("tenor"),
100
106
  "roll_convention": obj.get("rollConvention"),
101
107
  "holiday_calendars": obj.get("holidayCalendars"),
102
- "valuation_date_times": obj.get("valuationDateTimes")
108
+ "valuation_date_times": obj.get("valuationDateTimes"),
109
+ "business_day_convention": obj.get("businessDayConvention")
103
110
  })
104
111
  return _obj
@@ -21,6 +21,7 @@ import json
21
21
  from typing import Any, Dict, Optional, Union
22
22
  from pydantic import BaseModel, Field, StrictFloat, StrictInt, constr
23
23
  from lusid.models.lusid_instrument import LusidInstrument
24
+ from lusid.models.weighted_instrument_in_line_lookup_identifiers import WeightedInstrumentInLineLookupIdentifiers
24
25
 
25
26
  class WeightedInstrument(BaseModel):
26
27
  """
@@ -29,7 +30,8 @@ class WeightedInstrument(BaseModel):
29
30
  quantity: Optional[Union[StrictFloat, StrictInt]] = Field(None, description="The quantity of the instrument that is owned.")
30
31
  holding_identifier: Optional[constr(strict=True, max_length=256, min_length=0)] = Field(None, alias="holdingIdentifier", description="Identifier for the instrument. For a single, unique trade or transaction this can be thought of as equivalent to the transaction identifier, or a composite of the sub-holding keys for a regular sub-holding. When there are multiple transactions sharing the same underlying instrument such as purchase of shares on multiple dates where tax implications are different this would not be the case. In an inlined aggregation request if this is wanted to identify a line item, it can be specified in the set of aggregation keys given on the aggregation request that accompanies the set of weighted instruments.")
31
32
  instrument: Optional[LusidInstrument] = None
32
- __properties = ["quantity", "holdingIdentifier", "instrument"]
33
+ in_line_lookup_identifiers: Optional[WeightedInstrumentInLineLookupIdentifiers] = Field(None, alias="inLineLookupIdentifiers")
34
+ __properties = ["quantity", "holdingIdentifier", "instrument", "inLineLookupIdentifiers"]
33
35
 
34
36
  class Config:
35
37
  """Pydantic configuration"""
@@ -58,11 +60,19 @@ class WeightedInstrument(BaseModel):
58
60
  # override the default output from pydantic by calling `to_dict()` of instrument
59
61
  if self.instrument:
60
62
  _dict['instrument'] = self.instrument.to_dict()
63
+ # override the default output from pydantic by calling `to_dict()` of in_line_lookup_identifiers
64
+ if self.in_line_lookup_identifiers:
65
+ _dict['inLineLookupIdentifiers'] = self.in_line_lookup_identifiers.to_dict()
61
66
  # set to None if holding_identifier (nullable) is None
62
67
  # and __fields_set__ contains the field
63
68
  if self.holding_identifier is None and "holding_identifier" in self.__fields_set__:
64
69
  _dict['holdingIdentifier'] = None
65
70
 
71
+ # set to None if in_line_lookup_identifiers (nullable) is None
72
+ # and __fields_set__ contains the field
73
+ if self.in_line_lookup_identifiers is None and "in_line_lookup_identifiers" in self.__fields_set__:
74
+ _dict['inLineLookupIdentifiers'] = None
75
+
66
76
  return _dict
67
77
 
68
78
  @classmethod
@@ -77,6 +87,7 @@ class WeightedInstrument(BaseModel):
77
87
  _obj = WeightedInstrument.parse_obj({
78
88
  "quantity": obj.get("quantity"),
79
89
  "holding_identifier": obj.get("holdingIdentifier"),
80
- "instrument": LusidInstrument.from_dict(obj.get("instrument")) if obj.get("instrument") is not None else None
90
+ "instrument": LusidInstrument.from_dict(obj.get("instrument")) if obj.get("instrument") is not None else None,
91
+ "in_line_lookup_identifiers": WeightedInstrumentInLineLookupIdentifiers.from_dict(obj.get("inLineLookupIdentifiers")) if obj.get("inLineLookupIdentifiers") is not None else None
81
92
  })
82
93
  return _obj
@@ -0,0 +1,89 @@
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 import BaseModel, Field, StrictStr
23
+
24
+ class WeightedInstrumentInLineLookupIdentifiers(BaseModel):
25
+ """
26
+ External market codes and identifiers for the equity, e.g. IBM. Required for valuation via SimpleStatic (look-up pricing). Valuation will not succeed without a matching quote. # noqa: E501
27
+ """
28
+ lusid_instrument_id: Optional[StrictStr] = Field(None, alias="LusidInstrumentId")
29
+ isin: Optional[StrictStr] = Field(None, alias="Isin")
30
+ sedol: Optional[StrictStr] = Field(None, alias="Sedol")
31
+ cusip: Optional[StrictStr] = Field(None, alias="Cusip")
32
+ client_internal: Optional[StrictStr] = Field(None, alias="ClientInternal")
33
+ figi: Optional[StrictStr] = Field(None, alias="Figi")
34
+ ric: Optional[StrictStr] = Field(None, alias="RIC")
35
+ quote_perm_id: Optional[StrictStr] = Field(None, alias="QuotePermId")
36
+ red_code: Optional[StrictStr] = Field(None, alias="REDCode")
37
+ bbgid: Optional[StrictStr] = Field(None, alias="BBGId")
38
+ ice_code: Optional[StrictStr] = Field(None, alias="ICECode")
39
+ __properties = ["LusidInstrumentId", "Isin", "Sedol", "Cusip", "ClientInternal", "Figi", "RIC", "QuotePermId", "REDCode", "BBGId", "ICECode"]
40
+
41
+ class Config:
42
+ """Pydantic configuration"""
43
+ allow_population_by_field_name = True
44
+ validate_assignment = True
45
+
46
+ def to_str(self) -> str:
47
+ """Returns the string representation of the model using alias"""
48
+ return pprint.pformat(self.dict(by_alias=True))
49
+
50
+ def to_json(self) -> str:
51
+ """Returns the JSON representation of the model using alias"""
52
+ return json.dumps(self.to_dict())
53
+
54
+ @classmethod
55
+ def from_json(cls, json_str: str) -> WeightedInstrumentInLineLookupIdentifiers:
56
+ """Create an instance of WeightedInstrumentInLineLookupIdentifiers from a JSON string"""
57
+ return cls.from_dict(json.loads(json_str))
58
+
59
+ def to_dict(self):
60
+ """Returns the dictionary representation of the model using alias"""
61
+ _dict = self.dict(by_alias=True,
62
+ exclude={
63
+ },
64
+ exclude_none=True)
65
+ return _dict
66
+
67
+ @classmethod
68
+ def from_dict(cls, obj: dict) -> WeightedInstrumentInLineLookupIdentifiers:
69
+ """Create an instance of WeightedInstrumentInLineLookupIdentifiers from a dict"""
70
+ if obj is None:
71
+ return None
72
+
73
+ if not isinstance(obj, dict):
74
+ return WeightedInstrumentInLineLookupIdentifiers.parse_obj(obj)
75
+
76
+ _obj = WeightedInstrumentInLineLookupIdentifiers.parse_obj({
77
+ "lusid_instrument_id": obj.get("LusidInstrumentId"),
78
+ "isin": obj.get("Isin"),
79
+ "sedol": obj.get("Sedol"),
80
+ "cusip": obj.get("Cusip"),
81
+ "client_internal": obj.get("ClientInternal"),
82
+ "figi": obj.get("Figi"),
83
+ "ric": obj.get("RIC"),
84
+ "quote_perm_id": obj.get("QuotePermId"),
85
+ "red_code": obj.get("REDCode"),
86
+ "bbgid": obj.get("BBGId"),
87
+ "ice_code": obj.get("ICECode")
88
+ })
89
+ return _obj
@@ -34,15 +34,15 @@ class YieldCurveData(ComplexMarketData):
34
34
  quotes: conlist(MarketQuote) = Field(..., description="The market quotes corresponding to the the instruments used to define the curve")
35
35
  lineage: Optional[constr(strict=True, max_length=1024, min_length=0)] = Field(None, description="Description of the complex market data's lineage e.g. 'FundAccountant_GreenQuality'.")
36
36
  market_data_options: Optional[MarketDataOptions] = Field(None, alias="marketDataOptions")
37
- market_data_type: StrictStr = Field(..., alias="marketDataType", description="The available values are: DiscountFactorCurveData, EquityVolSurfaceData, FxVolSurfaceData, IrVolCubeData, OpaqueMarketData, YieldCurveData, FxForwardCurveData, FxForwardPipsCurveData, FxForwardTenorCurveData, FxForwardTenorPipsCurveData, FxForwardCurveByQuoteReference, CreditSpreadCurveData, EquityCurveByPricesData")
37
+ market_data_type: StrictStr = Field(..., alias="marketDataType", description="The available values are: DiscountFactorCurveData, EquityVolSurfaceData, FxVolSurfaceData, IrVolCubeData, OpaqueMarketData, YieldCurveData, FxForwardCurveData, FxForwardPipsCurveData, FxForwardTenorCurveData, FxForwardTenorPipsCurveData, FxForwardCurveByQuoteReference, CreditSpreadCurveData, EquityCurveByPricesData, ConstantVolatilitySurface")
38
38
  additional_properties: Dict[str, Any] = {}
39
39
  __properties = ["marketDataType", "baseDate", "instruments", "quotes", "lineage", "marketDataOptions"]
40
40
 
41
41
  @validator('market_data_type')
42
42
  def market_data_type_validate_enum(cls, value):
43
43
  """Validates the enum"""
44
- if value not in ('DiscountFactorCurveData', 'EquityVolSurfaceData', 'FxVolSurfaceData', 'IrVolCubeData', 'OpaqueMarketData', 'YieldCurveData', 'FxForwardCurveData', 'FxForwardPipsCurveData', 'FxForwardTenorCurveData', 'FxForwardTenorPipsCurveData', 'FxForwardCurveByQuoteReference', 'CreditSpreadCurveData', 'EquityCurveByPricesData'):
45
- raise ValueError("must be one of enum values ('DiscountFactorCurveData', 'EquityVolSurfaceData', 'FxVolSurfaceData', 'IrVolCubeData', 'OpaqueMarketData', 'YieldCurveData', 'FxForwardCurveData', 'FxForwardPipsCurveData', 'FxForwardTenorCurveData', 'FxForwardTenorPipsCurveData', 'FxForwardCurveByQuoteReference', 'CreditSpreadCurveData', 'EquityCurveByPricesData')")
44
+ if value not in ('DiscountFactorCurveData', 'EquityVolSurfaceData', 'FxVolSurfaceData', 'IrVolCubeData', 'OpaqueMarketData', 'YieldCurveData', 'FxForwardCurveData', 'FxForwardPipsCurveData', 'FxForwardTenorCurveData', 'FxForwardTenorPipsCurveData', 'FxForwardCurveByQuoteReference', 'CreditSpreadCurveData', 'EquityCurveByPricesData', 'ConstantVolatilitySurface'):
45
+ raise ValueError("must be one of enum values ('DiscountFactorCurveData', 'EquityVolSurfaceData', 'FxVolSurfaceData', 'IrVolCubeData', 'OpaqueMarketData', 'YieldCurveData', 'FxForwardCurveData', 'FxForwardPipsCurveData', 'FxForwardTenorCurveData', 'FxForwardTenorPipsCurveData', 'FxForwardCurveByQuoteReference', 'CreditSpreadCurveData', 'EquityCurveByPricesData', 'ConstantVolatilitySurface')")
46
46
  return value
47
47
 
48
48
  class Config:
lusid/rest.py CHANGED
@@ -159,7 +159,7 @@ class RESTClientObject:
159
159
  # Pass a `bytes` parameter directly in the body to support
160
160
  # other content types than Json when `body` argument is provided
161
161
  # in serialized form
162
- elif isinstance(body, bytes):
162
+ elif isinstance(body, str) or isinstance(body, bytes):
163
163
  args["data"] = body
164
164
  else:
165
165
  # Cannot generate the request from given parameters