lusid-sdk 2.1.390__py3-none-any.whl → 2.1.462__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (252) hide show
  1. lusid/__init__.py +98 -8
  2. lusid/api/__init__.py +2 -2
  3. lusid/api/abor_api.py +126 -133
  4. lusid/api/abor_configuration_api.py +46 -45
  5. lusid/api/address_key_definition_api.py +28 -27
  6. lusid/api/aggregation_api.py +37 -36
  7. lusid/api/allocations_api.py +39 -38
  8. lusid/api/amortisation_rule_sets_api.py +55 -54
  9. lusid/api/application_metadata_api.py +28 -27
  10. lusid/api/blocks_api.py +37 -36
  11. lusid/api/calendars_api.py +469 -111
  12. lusid/api/chart_of_accounts_api.py +454 -279
  13. lusid/api/complex_market_data_api.py +37 -36
  14. lusid/api/compliance_api.py +136 -135
  15. lusid/api/configuration_recipe_api.py +100 -99
  16. lusid/api/conventions_api.py +109 -108
  17. lusid/api/corporate_action_sources_api.py +82 -81
  18. lusid/api/counterparties_api.py +73 -72
  19. lusid/api/custom_entities_api.py +102 -101
  20. lusid/api/custom_entity_definitions_api.py +37 -36
  21. lusid/api/custom_entity_types_api.py +37 -36
  22. lusid/api/cut_label_definitions_api.py +46 -45
  23. lusid/api/data_types_api.py +248 -72
  24. lusid/api/derived_transaction_portfolios_api.py +19 -18
  25. lusid/api/entities_api.py +431 -46
  26. lusid/api/executions_api.py +37 -36
  27. lusid/api/fee_types_api.py +55 -54
  28. lusid/api/{fund_configurations_api.py → fund_configuration_api.py} +222 -46
  29. lusid/api/funds_api.py +337 -162
  30. lusid/api/group_reconciliations_api.py +1437 -45
  31. lusid/api/instrument_event_types_api.py +64 -63
  32. lusid/api/instrument_events_api.py +46 -45
  33. lusid/api/instruments_api.py +187 -186
  34. lusid/api/legacy_compliance_api.py +73 -72
  35. lusid/api/legal_entities_api.py +167 -166
  36. lusid/api/order_graph_api.py +32 -31
  37. lusid/api/order_instructions_api.py +37 -36
  38. lusid/api/order_management_api.py +276 -102
  39. lusid/api/orders_api.py +37 -36
  40. lusid/api/packages_api.py +37 -36
  41. lusid/api/participations_api.py +37 -36
  42. lusid/api/persons_api.py +167 -166
  43. lusid/api/placements_api.py +37 -36
  44. lusid/api/portfolio_groups_api.py +235 -234
  45. lusid/api/portfolios_api.py +449 -272
  46. lusid/api/property_definitions_api.py +100 -99
  47. lusid/api/queryable_keys_api.py +10 -9
  48. lusid/api/quotes_api.py +82 -81
  49. lusid/api/reconciliations_api.py +136 -135
  50. lusid/api/reference_lists_api.py +39 -38
  51. lusid/api/reference_portfolio_api.py +213 -36
  52. lusid/api/relation_definitions_api.py +28 -27
  53. lusid/api/relations_api.py +19 -18
  54. lusid/api/relationship_definitions_api.py +46 -45
  55. lusid/api/relationships_api.py +19 -18
  56. lusid/api/schemas_api.py +37 -36
  57. lusid/api/scopes_api.py +19 -18
  58. lusid/api/scripted_translation_api.py +73 -72
  59. lusid/api/search_api.py +37 -36
  60. lusid/api/sequences_api.py +37 -36
  61. lusid/api/staged_modifications_api.py +37 -36
  62. lusid/api/staging_rule_set_api.py +46 -45
  63. lusid/api/structured_result_data_api.py +82 -81
  64. lusid/api/system_configuration_api.py +64 -63
  65. lusid/api/tax_rule_sets_api.py +46 -45
  66. lusid/api/transaction_configuration_api.py +100 -99
  67. lusid/api/transaction_fees_api.py +46 -45
  68. lusid/api/transaction_portfolios_api.py +569 -326
  69. lusid/api/translation_api.py +19 -18
  70. lusid/api/workspace_api.py +181 -180
  71. lusid/api_client.py +26 -17
  72. lusid/configuration.py +87 -2
  73. lusid/extensions/api_client.py +25 -17
  74. lusid/extensions/api_client_factory.py +14 -5
  75. lusid/extensions/api_configuration.py +50 -1
  76. lusid/extensions/configuration_loaders.py +39 -11
  77. lusid/extensions/configuration_options.py +67 -0
  78. lusid/extensions/rest.py +78 -26
  79. lusid/extensions/retry.py +109 -37
  80. lusid/models/__init__.py +96 -6
  81. lusid/models/access_metadata_value.py +1 -1
  82. lusid/models/accounting_method.py +7 -0
  83. lusid/models/accumulation_event.py +3 -3
  84. lusid/models/address_key_list.py +3 -3
  85. lusid/models/amortisation_event.py +3 -3
  86. lusid/models/amount.py +69 -0
  87. lusid/models/basket.py +3 -3
  88. lusid/models/batch_upsert_dates_for_calendar_response.py +146 -0
  89. lusid/models/batch_upsert_portfolio_access_metadata_request.py +92 -0
  90. lusid/models/batch_upsert_portfolio_access_metadata_response.py +122 -0
  91. lusid/models/batch_upsert_portfolio_access_metadata_response_item.py +92 -0
  92. lusid/models/bond.py +3 -3
  93. lusid/models/bond_coupon_event.py +3 -3
  94. lusid/models/bond_default_event.py +3 -3
  95. lusid/models/bond_principal_event.py +3 -3
  96. lusid/models/bonus_issue_event.py +166 -0
  97. lusid/models/{component_rule.py → break_code_source.py} +17 -21
  98. lusid/models/cancel_order_and_move_remaining_result.py +84 -0
  99. lusid/models/cancel_orders_and_move_remaining_request.py +83 -0
  100. lusid/models/cancel_orders_and_move_remaining_response.py +153 -0
  101. lusid/models/cap_floor.py +3 -3
  102. lusid/models/capital_distribution_event.py +3 -3
  103. lusid/models/cash.py +3 -3
  104. lusid/models/cash_dividend_event.py +3 -3
  105. lusid/models/cash_flow_event.py +3 -3
  106. lusid/models/cash_perpetual.py +3 -3
  107. lusid/models/cds_credit_event.py +105 -0
  108. lusid/models/cds_index.py +3 -3
  109. lusid/models/cdx_credit_event.py +114 -0
  110. lusid/models/change_interval.py +123 -0
  111. lusid/models/change_interval_with_order_management_detail.py +137 -0
  112. lusid/models/close_event.py +3 -3
  113. lusid/models/complex_bond.py +3 -3
  114. lusid/models/contract_for_difference.py +3 -3
  115. lusid/models/create_derived_transaction_portfolio_request.py +3 -3
  116. lusid/models/create_group_reconciliation_definition_request.py +113 -0
  117. lusid/models/create_transaction_portfolio_request.py +3 -3
  118. lusid/models/credit_default_swap.py +3 -3
  119. lusid/models/credit_premium_cash_flow_event.py +102 -0
  120. lusid/models/custom_entity_entity.py +146 -0
  121. lusid/models/custom_entity_response.py +7 -1
  122. lusid/models/decimal_list.py +3 -3
  123. lusid/models/diary_entry_request.py +10 -1
  124. lusid/models/dividend_option_event.py +3 -3
  125. lusid/models/dividend_reinvestment_event.py +3 -3
  126. lusid/models/effective_range.py +71 -0
  127. lusid/models/equity.py +3 -3
  128. lusid/models/equity_option.py +3 -3
  129. lusid/models/equity_swap.py +3 -3
  130. lusid/models/exchange_traded_option.py +3 -3
  131. lusid/models/exercise_event.py +3 -3
  132. lusid/models/exotic_instrument.py +3 -3
  133. lusid/models/expiry_event.py +3 -3
  134. lusid/models/fee.py +8 -8
  135. lusid/models/fee_request.py +8 -8
  136. lusid/models/fee_type.py +4 -4
  137. lusid/models/fee_type_request.py +3 -3
  138. lusid/models/fixed_leg.py +3 -3
  139. lusid/models/fixed_schedule.py +3 -3
  140. lusid/models/flexible_loan.py +3 -3
  141. lusid/models/float_schedule.py +4 -4
  142. lusid/models/floating_leg.py +3 -3
  143. lusid/models/flow_conventions.py +7 -1
  144. lusid/models/forward_rate_agreement.py +3 -3
  145. lusid/models/fund_configuration.py +44 -17
  146. lusid/models/fund_configuration_request.py +31 -19
  147. lusid/models/fund_id_list.py +99 -0
  148. lusid/models/fund_share_class.py +23 -8
  149. lusid/models/funding_leg.py +3 -3
  150. lusid/models/future.py +3 -3
  151. lusid/models/future_expiry_event.py +3 -3
  152. lusid/models/fx_forward.py +3 -3
  153. lusid/models/fx_forward_settlement_event.py +13 -5
  154. lusid/models/fx_option.py +3 -3
  155. lusid/models/fx_swap.py +3 -3
  156. lusid/models/group_reconciliation_aggregate_attribute_rule.py +2 -2
  157. lusid/models/group_reconciliation_aggregate_comparison_rule_operand.py +1 -1
  158. lusid/models/group_reconciliation_core_comparison_rule_operand.py +1 -1
  159. lusid/models/group_reconciliation_definition.py +136 -0
  160. lusid/models/group_reconciliation_definition_comparison_ruleset_ids.py +83 -0
  161. lusid/models/group_reconciliation_definition_currencies.py +71 -0
  162. lusid/models/group_reconciliation_definition_portfolio_entity_ids.py +86 -0
  163. lusid/models/group_reconciliation_definition_recipe_ids.py +78 -0
  164. lusid/models/holding_contributor.py +11 -4
  165. lusid/models/holding_ids_request.py +69 -0
  166. lusid/models/holding_pricing_info.py +110 -0
  167. lusid/models/inflation_leg.py +3 -3
  168. lusid/models/inflation_linked_bond.py +3 -3
  169. lusid/models/inflation_swap.py +3 -3
  170. lusid/models/informational_error_event.py +3 -3
  171. lusid/models/informational_event.py +3 -3
  172. lusid/models/instrument.py +7 -1
  173. lusid/models/instrument_definition.py +8 -2
  174. lusid/models/instrument_event.py +15 -5
  175. lusid/models/instrument_event_holder.py +9 -1
  176. lusid/models/instrument_event_type.py +10 -0
  177. lusid/models/instrument_leg.py +3 -3
  178. lusid/models/instrument_list.py +3 -3
  179. lusid/models/instrument_type.py +2 -0
  180. lusid/models/interest_rate_swap.py +3 -3
  181. lusid/models/interest_rate_swaption.py +3 -3
  182. lusid/models/lapse_election.py +73 -0
  183. lusid/models/loan_facility.py +97 -0
  184. lusid/models/lusid_instrument.py +7 -5
  185. lusid/models/market_data_key_rule.py +5 -3
  186. lusid/models/market_data_specific_rule.py +5 -3
  187. lusid/models/mastered_instrument.py +139 -0
  188. lusid/models/maturity_event.py +3 -3
  189. lusid/models/mbs_coupon_event.py +97 -0
  190. lusid/models/mbs_interest_deferral_event.py +97 -0
  191. lusid/models/mbs_interest_shortfall_event.py +97 -0
  192. lusid/models/mbs_principal_event.py +97 -0
  193. lusid/models/mbs_principal_write_off_event.py +97 -0
  194. lusid/models/merger_event.py +22 -22
  195. lusid/models/open_event.py +3 -3
  196. lusid/models/output_transaction.py +9 -2
  197. lusid/models/paged_resource_list_of_group_reconciliation_comparison_ruleset.py +113 -0
  198. lusid/models/paged_resource_list_of_group_reconciliation_definition.py +113 -0
  199. lusid/models/portfolio.py +3 -3
  200. lusid/models/portfolio_details.py +3 -3
  201. lusid/models/portfolio_group_id_list.py +3 -3
  202. lusid/models/portfolio_id_list.py +3 -3
  203. lusid/models/portfolio_without_href.py +3 -3
  204. lusid/models/pricing_context.py +8 -2
  205. lusid/models/property_list.py +3 -3
  206. lusid/models/raw_vendor_event.py +3 -3
  207. lusid/models/reference_instrument.py +3 -3
  208. lusid/models/reference_list.py +6 -5
  209. lusid/models/reference_list_type.py +1 -0
  210. lusid/models/repo.py +3 -3
  211. lusid/models/reset_event.py +3 -3
  212. lusid/models/{resource_list_of_entity_change_item.py → resource_list_of_change_interval.py} +11 -11
  213. lusid/models/resource_list_of_change_interval_with_order_management_detail.py +113 -0
  214. lusid/models/reverse_stock_split_event.py +21 -7
  215. lusid/models/scrip_dividend_event.py +3 -3
  216. lusid/models/settlement_cycle.py +79 -0
  217. lusid/models/share_class_dealing_breakdown.py +3 -2
  218. lusid/models/share_class_details.py +18 -1
  219. lusid/models/simple_cash_flow_loan.py +3 -3
  220. lusid/models/simple_instrument.py +3 -3
  221. lusid/models/simple_rounding_convention.py +76 -0
  222. lusid/models/specific_holding_pricing_info.py +75 -0
  223. lusid/models/spin_off_event.py +3 -3
  224. lusid/models/staged_modification.py +8 -1
  225. lusid/models/staged_modification_effective_range.py +2 -2
  226. lusid/models/stock_dividend_event.py +20 -6
  227. lusid/models/stock_split_event.py +3 -3
  228. lusid/models/string_list.py +3 -3
  229. lusid/models/swap_cash_flow_event.py +3 -3
  230. lusid/models/swap_principal_event.py +3 -3
  231. lusid/models/tender_event.py +172 -0
  232. lusid/models/term_deposit.py +3 -3
  233. lusid/models/total_return_swap.py +3 -3
  234. lusid/models/transaction.py +9 -2
  235. lusid/models/transaction_date_windows.py +85 -0
  236. lusid/models/transaction_request.py +9 -2
  237. lusid/models/transition_event.py +3 -3
  238. lusid/models/trigger_event.py +3 -3
  239. lusid/models/update_fee_type_request.py +4 -4
  240. lusid/models/update_group_reconciliation_comparison_ruleset_request.py +91 -0
  241. lusid/models/update_group_reconciliation_definition_request.py +107 -0
  242. lusid/models/update_reference_data_request.py +87 -0
  243. lusid/models/upsert_custom_entities_response.py +20 -1
  244. lusid/models/upsert_reference_portfolio_constituent_properties_request.py +84 -0
  245. lusid/models/upsert_reference_portfolio_constituent_properties_response.py +115 -0
  246. lusid/models/valuation_point_data_query_parameters.py +3 -3
  247. lusid/models/valuation_point_data_response.py +8 -13
  248. lusid/rest.py +70 -20
  249. {lusid_sdk-2.1.390.dist-info → lusid_sdk-2.1.462.dist-info}/METADATA +90 -25
  250. {lusid_sdk-2.1.390.dist-info → lusid_sdk-2.1.462.dist-info}/RECORD +251 -205
  251. lusid/models/entity_change_item.py +0 -121
  252. {lusid_sdk-2.1.390.dist-info → lusid_sdk-2.1.462.dist-info}/WHEEL +0 -0
@@ -0,0 +1,97 @@
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
+ from datetime import datetime
21
+ from typing import Any, Dict, Union
22
+ from pydantic.v1 import Field, StrictFloat, StrictInt, StrictStr, validator
23
+ from lusid.models.instrument_event import InstrumentEvent
24
+
25
+ class MbsPrincipalEvent(InstrumentEvent):
26
+ """
27
+ Definition of an MBS Principal Event This is an event that describes the occurence of a cashflow due to a mortgage-backed security principal payment. # noqa: E501
28
+ """
29
+ ex_date: datetime = Field(..., alias="exDate", description="The ex date (entitlement date) of the principal payment, usually several weeks prior to the payment date")
30
+ payment_date: datetime = Field(..., alias="paymentDate", description="The payment date of the principal")
31
+ currency: StrictStr = Field(..., description="The currency in which the principal is paid")
32
+ principal_per_unit: Union[StrictFloat, StrictInt] = Field(..., alias="principalPerUnit", description="The principal amount received for each unit of the instrument held on the ex date")
33
+ 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, BonusIssueEvent, MbsPrincipalWriteOffEvent, MbsInterestDeferralEvent, MbsInterestShortfallEvent, TenderEvent")
34
+ additional_properties: Dict[str, Any] = {}
35
+ __properties = ["instrumentEventType", "exDate", "paymentDate", "currency", "principalPerUnit"]
36
+
37
+ @validator('instrument_event_type')
38
+ def instrument_event_type_validate_enum(cls, value):
39
+ """Validates the enum"""
40
+ if value not in ('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', 'BonusIssueEvent', 'MbsPrincipalWriteOffEvent', 'MbsInterestDeferralEvent', 'MbsInterestShortfallEvent', 'TenderEvent'):
41
+ raise ValueError("must be one of enum values ('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', 'BonusIssueEvent', 'MbsPrincipalWriteOffEvent', 'MbsInterestDeferralEvent', 'MbsInterestShortfallEvent', 'TenderEvent')")
42
+ return value
43
+
44
+ class Config:
45
+ """Pydantic configuration"""
46
+ allow_population_by_field_name = True
47
+ validate_assignment = True
48
+
49
+ def to_str(self) -> str:
50
+ """Returns the string representation of the model using alias"""
51
+ return pprint.pformat(self.dict(by_alias=True))
52
+
53
+ def to_json(self) -> str:
54
+ """Returns the JSON representation of the model using alias"""
55
+ return json.dumps(self.to_dict())
56
+
57
+ @classmethod
58
+ def from_json(cls, json_str: str) -> MbsPrincipalEvent:
59
+ """Create an instance of MbsPrincipalEvent from a JSON string"""
60
+ return cls.from_dict(json.loads(json_str))
61
+
62
+ def to_dict(self):
63
+ """Returns the dictionary representation of the model using alias"""
64
+ _dict = self.dict(by_alias=True,
65
+ exclude={
66
+ "additional_properties"
67
+ },
68
+ exclude_none=True)
69
+ # puts key-value pairs in additional_properties in the top level
70
+ if self.additional_properties is not None:
71
+ for _key, _value in self.additional_properties.items():
72
+ _dict[_key] = _value
73
+
74
+ return _dict
75
+
76
+ @classmethod
77
+ def from_dict(cls, obj: dict) -> MbsPrincipalEvent:
78
+ """Create an instance of MbsPrincipalEvent from a dict"""
79
+ if obj is None:
80
+ return None
81
+
82
+ if not isinstance(obj, dict):
83
+ return MbsPrincipalEvent.parse_obj(obj)
84
+
85
+ _obj = MbsPrincipalEvent.parse_obj({
86
+ "instrument_event_type": obj.get("instrumentEventType"),
87
+ "ex_date": obj.get("exDate"),
88
+ "payment_date": obj.get("paymentDate"),
89
+ "currency": obj.get("currency"),
90
+ "principal_per_unit": obj.get("principalPerUnit")
91
+ })
92
+ # store additional fields in additional_properties
93
+ for _key in obj.keys():
94
+ if _key not in cls.__properties:
95
+ _obj.additional_properties[_key] = obj.get(_key)
96
+
97
+ return _obj
@@ -0,0 +1,97 @@
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
+ from datetime import datetime
21
+ from typing import Any, Dict, Union
22
+ from pydantic.v1 import Field, StrictFloat, StrictInt, StrictStr, validator
23
+ from lusid.models.instrument_event import InstrumentEvent
24
+
25
+ class MbsPrincipalWriteOffEvent(InstrumentEvent):
26
+ """
27
+ Definition of an MBS Principal Write Off Event This is an event that describes the occurence of a cashflow due to a mortgage-backed security principal write off. # noqa: E501
28
+ """
29
+ ex_date: datetime = Field(..., alias="exDate", description="The ex date (entitlement date) of the principal payment, usually several weeks prior to the payment date")
30
+ payment_date: datetime = Field(..., alias="paymentDate", description="The payment date of the principal that is written off")
31
+ currency: StrictStr = Field(..., description="The currency in which the principal write off is notated")
32
+ principal_per_unit: Union[StrictFloat, StrictInt] = Field(..., alias="principalPerUnit", description="The principal amount to be written off for each unit of the instrument held on the ex date")
33
+ 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, BonusIssueEvent, MbsPrincipalWriteOffEvent, MbsInterestDeferralEvent, MbsInterestShortfallEvent, TenderEvent")
34
+ additional_properties: Dict[str, Any] = {}
35
+ __properties = ["instrumentEventType", "exDate", "paymentDate", "currency", "principalPerUnit"]
36
+
37
+ @validator('instrument_event_type')
38
+ def instrument_event_type_validate_enum(cls, value):
39
+ """Validates the enum"""
40
+ if value not in ('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', 'BonusIssueEvent', 'MbsPrincipalWriteOffEvent', 'MbsInterestDeferralEvent', 'MbsInterestShortfallEvent', 'TenderEvent'):
41
+ raise ValueError("must be one of enum values ('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', 'BonusIssueEvent', 'MbsPrincipalWriteOffEvent', 'MbsInterestDeferralEvent', 'MbsInterestShortfallEvent', 'TenderEvent')")
42
+ return value
43
+
44
+ class Config:
45
+ """Pydantic configuration"""
46
+ allow_population_by_field_name = True
47
+ validate_assignment = True
48
+
49
+ def to_str(self) -> str:
50
+ """Returns the string representation of the model using alias"""
51
+ return pprint.pformat(self.dict(by_alias=True))
52
+
53
+ def to_json(self) -> str:
54
+ """Returns the JSON representation of the model using alias"""
55
+ return json.dumps(self.to_dict())
56
+
57
+ @classmethod
58
+ def from_json(cls, json_str: str) -> MbsPrincipalWriteOffEvent:
59
+ """Create an instance of MbsPrincipalWriteOffEvent from a JSON string"""
60
+ return cls.from_dict(json.loads(json_str))
61
+
62
+ def to_dict(self):
63
+ """Returns the dictionary representation of the model using alias"""
64
+ _dict = self.dict(by_alias=True,
65
+ exclude={
66
+ "additional_properties"
67
+ },
68
+ exclude_none=True)
69
+ # puts key-value pairs in additional_properties in the top level
70
+ if self.additional_properties is not None:
71
+ for _key, _value in self.additional_properties.items():
72
+ _dict[_key] = _value
73
+
74
+ return _dict
75
+
76
+ @classmethod
77
+ def from_dict(cls, obj: dict) -> MbsPrincipalWriteOffEvent:
78
+ """Create an instance of MbsPrincipalWriteOffEvent from a dict"""
79
+ if obj is None:
80
+ return None
81
+
82
+ if not isinstance(obj, dict):
83
+ return MbsPrincipalWriteOffEvent.parse_obj(obj)
84
+
85
+ _obj = MbsPrincipalWriteOffEvent.parse_obj({
86
+ "instrument_event_type": obj.get("instrumentEventType"),
87
+ "ex_date": obj.get("exDate"),
88
+ "payment_date": obj.get("paymentDate"),
89
+ "currency": obj.get("currency"),
90
+ "principal_per_unit": obj.get("principalPerUnit")
91
+ })
92
+ # store additional fields in additional_properties
93
+ for _key in obj.keys():
94
+ if _key not in cls.__properties:
95
+ _obj.additional_properties[_key] = obj.get(_key)
96
+
97
+ return _obj
@@ -32,23 +32,23 @@ class MergerEvent(InstrumentEvent):
32
32
  """
33
33
  announcement_date: Optional[datetime] = Field(None, alias="announcementDate", description="The date the merger is announced.")
34
34
  cash_and_security_offer_elections: Optional[conlist(CashAndSecurityOfferElection)] = Field(None, alias="cashAndSecurityOfferElections", description="List of possible CashAndSecurityOfferElections for this merger event")
35
- cash_elections: Optional[conlist(CashOfferElection)] = Field(None, alias="cashElections", description="List of possible CashOfferElections for this merger event")
35
+ cash_offer_elections: Optional[conlist(CashOfferElection)] = Field(None, alias="cashOfferElections", description="List of possible CashOfferElections for this merger event")
36
36
  ex_date: datetime = Field(..., alias="exDate", description="The first date on which the holder of record of the original shares has entitled ownership of the new shares.")
37
37
  fractional_units_cash_currency: Optional[StrictStr] = Field(None, alias="fractionalUnitsCashCurrency", description="Optional. Used in calculating cash-in-lieu of fractional shares.")
38
38
  fractional_units_cash_price: Optional[Union[StrictFloat, StrictInt]] = Field(None, alias="fractionalUnitsCashPrice", description="Optional. Used in calculating cash-in-lieu of fractional shares.")
39
39
  new_instrument: NewInstrument = Field(..., alias="newInstrument")
40
40
  payment_date: datetime = Field(..., alias="paymentDate", description="Date on which the merger takes place.")
41
41
  record_date: Optional[datetime] = Field(None, alias="recordDate", description="Optional. Date you have to be the holder of record of the original shares in order to receive the new shares.")
42
- security_elections: Optional[conlist(SecurityOfferElection)] = Field(None, alias="securityElections", description="List of possible SecurityOfferElections for this merger event")
43
- 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")
42
+ security_offer_elections: Optional[conlist(SecurityOfferElection)] = Field(None, alias="securityOfferElections", description="List of possible SecurityOfferElections for this merger event")
43
+ 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, BonusIssueEvent, MbsPrincipalWriteOffEvent, MbsInterestDeferralEvent, MbsInterestShortfallEvent, TenderEvent")
44
44
  additional_properties: Dict[str, Any] = {}
45
- __properties = ["instrumentEventType", "announcementDate", "cashAndSecurityOfferElections", "cashElections", "exDate", "fractionalUnitsCashCurrency", "fractionalUnitsCashPrice", "newInstrument", "paymentDate", "recordDate", "securityElections"]
45
+ __properties = ["instrumentEventType", "announcementDate", "cashAndSecurityOfferElections", "cashOfferElections", "exDate", "fractionalUnitsCashCurrency", "fractionalUnitsCashPrice", "newInstrument", "paymentDate", "recordDate", "securityOfferElections"]
46
46
 
47
47
  @validator('instrument_event_type')
48
48
  def instrument_event_type_validate_enum(cls, value):
49
49
  """Validates the enum"""
50
- if value not in ('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'):
51
- raise ValueError("must be one of enum values ('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')")
50
+ if value not in ('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', 'BonusIssueEvent', 'MbsPrincipalWriteOffEvent', 'MbsInterestDeferralEvent', 'MbsInterestShortfallEvent', 'TenderEvent'):
51
+ raise ValueError("must be one of enum values ('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', 'BonusIssueEvent', 'MbsPrincipalWriteOffEvent', 'MbsInterestDeferralEvent', 'MbsInterestShortfallEvent', 'TenderEvent')")
52
52
  return value
53
53
 
54
54
  class Config:
@@ -83,23 +83,23 @@ class MergerEvent(InstrumentEvent):
83
83
  if _item:
84
84
  _items.append(_item.to_dict())
85
85
  _dict['cashAndSecurityOfferElections'] = _items
86
- # override the default output from pydantic by calling `to_dict()` of each item in cash_elections (list)
86
+ # override the default output from pydantic by calling `to_dict()` of each item in cash_offer_elections (list)
87
87
  _items = []
88
- if self.cash_elections:
89
- for _item in self.cash_elections:
88
+ if self.cash_offer_elections:
89
+ for _item in self.cash_offer_elections:
90
90
  if _item:
91
91
  _items.append(_item.to_dict())
92
- _dict['cashElections'] = _items
92
+ _dict['cashOfferElections'] = _items
93
93
  # override the default output from pydantic by calling `to_dict()` of new_instrument
94
94
  if self.new_instrument:
95
95
  _dict['newInstrument'] = self.new_instrument.to_dict()
96
- # override the default output from pydantic by calling `to_dict()` of each item in security_elections (list)
96
+ # override the default output from pydantic by calling `to_dict()` of each item in security_offer_elections (list)
97
97
  _items = []
98
- if self.security_elections:
99
- for _item in self.security_elections:
98
+ if self.security_offer_elections:
99
+ for _item in self.security_offer_elections:
100
100
  if _item:
101
101
  _items.append(_item.to_dict())
102
- _dict['securityElections'] = _items
102
+ _dict['securityOfferElections'] = _items
103
103
  # puts key-value pairs in additional_properties in the top level
104
104
  if self.additional_properties is not None:
105
105
  for _key, _value in self.additional_properties.items():
@@ -115,10 +115,10 @@ class MergerEvent(InstrumentEvent):
115
115
  if self.cash_and_security_offer_elections is None and "cash_and_security_offer_elections" in self.__fields_set__:
116
116
  _dict['cashAndSecurityOfferElections'] = None
117
117
 
118
- # set to None if cash_elections (nullable) is None
118
+ # set to None if cash_offer_elections (nullable) is None
119
119
  # and __fields_set__ contains the field
120
- if self.cash_elections is None and "cash_elections" in self.__fields_set__:
121
- _dict['cashElections'] = None
120
+ if self.cash_offer_elections is None and "cash_offer_elections" in self.__fields_set__:
121
+ _dict['cashOfferElections'] = None
122
122
 
123
123
  # set to None if fractional_units_cash_currency (nullable) is None
124
124
  # and __fields_set__ contains the field
@@ -135,10 +135,10 @@ class MergerEvent(InstrumentEvent):
135
135
  if self.record_date is None and "record_date" in self.__fields_set__:
136
136
  _dict['recordDate'] = None
137
137
 
138
- # set to None if security_elections (nullable) is None
138
+ # set to None if security_offer_elections (nullable) is None
139
139
  # and __fields_set__ contains the field
140
- if self.security_elections is None and "security_elections" in self.__fields_set__:
141
- _dict['securityElections'] = None
140
+ if self.security_offer_elections is None and "security_offer_elections" in self.__fields_set__:
141
+ _dict['securityOfferElections'] = None
142
142
 
143
143
  return _dict
144
144
 
@@ -155,14 +155,14 @@ class MergerEvent(InstrumentEvent):
155
155
  "instrument_event_type": obj.get("instrumentEventType"),
156
156
  "announcement_date": obj.get("announcementDate"),
157
157
  "cash_and_security_offer_elections": [CashAndSecurityOfferElection.from_dict(_item) for _item in obj.get("cashAndSecurityOfferElections")] if obj.get("cashAndSecurityOfferElections") is not None else None,
158
- "cash_elections": [CashOfferElection.from_dict(_item) for _item in obj.get("cashElections")] if obj.get("cashElections") is not None else None,
158
+ "cash_offer_elections": [CashOfferElection.from_dict(_item) for _item in obj.get("cashOfferElections")] if obj.get("cashOfferElections") is not None else None,
159
159
  "ex_date": obj.get("exDate"),
160
160
  "fractional_units_cash_currency": obj.get("fractionalUnitsCashCurrency"),
161
161
  "fractional_units_cash_price": obj.get("fractionalUnitsCashPrice"),
162
162
  "new_instrument": NewInstrument.from_dict(obj.get("newInstrument")) if obj.get("newInstrument") is not None else None,
163
163
  "payment_date": obj.get("paymentDate"),
164
164
  "record_date": obj.get("recordDate"),
165
- "security_elections": [SecurityOfferElection.from_dict(_item) for _item in obj.get("securityElections")] if obj.get("securityElections") is not None else None
165
+ "security_offer_elections": [SecurityOfferElection.from_dict(_item) for _item in obj.get("securityOfferElections")] if obj.get("securityOfferElections") is not None else None
166
166
  })
167
167
  # store additional fields in additional_properties
168
168
  for _key in obj.keys():
@@ -27,15 +27,15 @@ class OpenEvent(InstrumentEvent):
27
27
  The opening of an instrument. # noqa: E501
28
28
  """
29
29
  anchor_date: Optional[datetime] = Field(None, alias="anchorDate", description="The date on the which the instrument was opened.")
30
- 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")
30
+ 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, BonusIssueEvent, MbsPrincipalWriteOffEvent, MbsInterestDeferralEvent, MbsInterestShortfallEvent, TenderEvent")
31
31
  additional_properties: Dict[str, Any] = {}
32
32
  __properties = ["instrumentEventType", "anchorDate"]
33
33
 
34
34
  @validator('instrument_event_type')
35
35
  def instrument_event_type_validate_enum(cls, value):
36
36
  """Validates the enum"""
37
- if value not in ('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'):
38
- raise ValueError("must be one of enum values ('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')")
37
+ if value not in ('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', 'BonusIssueEvent', 'MbsPrincipalWriteOffEvent', 'MbsInterestDeferralEvent', 'MbsInterestShortfallEvent', 'TenderEvent'):
38
+ raise ValueError("must be one of enum values ('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', 'BonusIssueEvent', 'MbsPrincipalWriteOffEvent', 'MbsInterestDeferralEvent', 'MbsInterestShortfallEvent', 'TenderEvent')")
39
39
  return value
40
40
 
41
41
  class Config:
@@ -54,7 +54,8 @@ class OutputTransaction(BaseModel):
54
54
  holding_ids: Optional[conlist(StrictInt)] = Field(None, alias="holdingIds", description="The collection of single identifiers for the holding within the portfolio. The holdingId is constructed from the LusidInstrumentId, sub-holding keys and currrency and is unique within the portfolio.")
55
55
  source_type: Optional[StrictStr] = Field(None, alias="sourceType", description="The type of source that the transaction originated from, eg: InputTransaction, InstrumentEvent, HoldingAdjustment")
56
56
  source_instrument_event_id: Optional[StrictStr] = Field(None, alias="sourceInstrumentEventId", description="The unique ID of the instrument event that the transaction is related to.")
57
- __properties = ["transactionId", "type", "description", "instrumentIdentifiers", "instrumentScope", "instrumentUid", "transactionDate", "settlementDate", "units", "transactionAmount", "transactionPrice", "totalConsideration", "exchangeRate", "transactionToPortfolioRate", "transactionCurrency", "properties", "counterpartyId", "source", "transactionStatus", "entryDateTime", "cancelDateTime", "realisedGainLoss", "holdingIds", "sourceType", "sourceInstrumentEventId"]
57
+ transaction_group_id: Optional[StrictStr] = Field(None, alias="transactionGroupId", description="The identifier for grouping economic events across multiple transactions")
58
+ __properties = ["transactionId", "type", "description", "instrumentIdentifiers", "instrumentScope", "instrumentUid", "transactionDate", "settlementDate", "units", "transactionAmount", "transactionPrice", "totalConsideration", "exchangeRate", "transactionToPortfolioRate", "transactionCurrency", "properties", "counterpartyId", "source", "transactionStatus", "entryDateTime", "cancelDateTime", "realisedGainLoss", "holdingIds", "sourceType", "sourceInstrumentEventId", "transactionGroupId"]
58
59
 
59
60
  @validator('transaction_status')
60
61
  def transaction_status_validate_enum(cls, value):
@@ -175,6 +176,11 @@ class OutputTransaction(BaseModel):
175
176
  if self.source_instrument_event_id is None and "source_instrument_event_id" in self.__fields_set__:
176
177
  _dict['sourceInstrumentEventId'] = None
177
178
 
179
+ # set to None if transaction_group_id (nullable) is None
180
+ # and __fields_set__ contains the field
181
+ if self.transaction_group_id is None and "transaction_group_id" in self.__fields_set__:
182
+ _dict['transactionGroupId'] = None
183
+
178
184
  return _dict
179
185
 
180
186
  @classmethod
@@ -216,6 +222,7 @@ class OutputTransaction(BaseModel):
216
222
  "realised_gain_loss": [RealisedGainLoss.from_dict(_item) for _item in obj.get("realisedGainLoss")] if obj.get("realisedGainLoss") is not None else None,
217
223
  "holding_ids": obj.get("holdingIds"),
218
224
  "source_type": obj.get("sourceType"),
219
- "source_instrument_event_id": obj.get("sourceInstrumentEventId")
225
+ "source_instrument_event_id": obj.get("sourceInstrumentEventId"),
226
+ "transaction_group_id": obj.get("transactionGroupId")
220
227
  })
221
228
  return _obj
@@ -0,0 +1,113 @@
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, StrictStr, conlist
23
+ from lusid.models.group_reconciliation_comparison_ruleset import GroupReconciliationComparisonRuleset
24
+ from lusid.models.link import Link
25
+
26
+ class PagedResourceListOfGroupReconciliationComparisonRuleset(BaseModel):
27
+ """
28
+ PagedResourceListOfGroupReconciliationComparisonRuleset
29
+ """
30
+ next_page: Optional[StrictStr] = Field(None, alias="nextPage")
31
+ previous_page: Optional[StrictStr] = Field(None, alias="previousPage")
32
+ values: conlist(GroupReconciliationComparisonRuleset) = Field(...)
33
+ href: Optional[StrictStr] = None
34
+ links: Optional[conlist(Link)] = None
35
+ __properties = ["nextPage", "previousPage", "values", "href", "links"]
36
+
37
+ class Config:
38
+ """Pydantic configuration"""
39
+ allow_population_by_field_name = True
40
+ validate_assignment = True
41
+
42
+ def to_str(self) -> str:
43
+ """Returns the string representation of the model using alias"""
44
+ return pprint.pformat(self.dict(by_alias=True))
45
+
46
+ def to_json(self) -> str:
47
+ """Returns the JSON representation of the model using alias"""
48
+ return json.dumps(self.to_dict())
49
+
50
+ @classmethod
51
+ def from_json(cls, json_str: str) -> PagedResourceListOfGroupReconciliationComparisonRuleset:
52
+ """Create an instance of PagedResourceListOfGroupReconciliationComparisonRuleset from a JSON string"""
53
+ return cls.from_dict(json.loads(json_str))
54
+
55
+ def to_dict(self):
56
+ """Returns the dictionary representation of the model using alias"""
57
+ _dict = self.dict(by_alias=True,
58
+ exclude={
59
+ },
60
+ exclude_none=True)
61
+ # override the default output from pydantic by calling `to_dict()` of each item in values (list)
62
+ _items = []
63
+ if self.values:
64
+ for _item in self.values:
65
+ if _item:
66
+ _items.append(_item.to_dict())
67
+ _dict['values'] = _items
68
+ # override the default output from pydantic by calling `to_dict()` of each item in links (list)
69
+ _items = []
70
+ if self.links:
71
+ for _item in self.links:
72
+ if _item:
73
+ _items.append(_item.to_dict())
74
+ _dict['links'] = _items
75
+ # set to None if next_page (nullable) is None
76
+ # and __fields_set__ contains the field
77
+ if self.next_page is None and "next_page" in self.__fields_set__:
78
+ _dict['nextPage'] = None
79
+
80
+ # set to None if previous_page (nullable) is None
81
+ # and __fields_set__ contains the field
82
+ if self.previous_page is None and "previous_page" in self.__fields_set__:
83
+ _dict['previousPage'] = None
84
+
85
+ # set to None if href (nullable) is None
86
+ # and __fields_set__ contains the field
87
+ if self.href is None and "href" in self.__fields_set__:
88
+ _dict['href'] = None
89
+
90
+ # set to None if links (nullable) is None
91
+ # and __fields_set__ contains the field
92
+ if self.links is None and "links" in self.__fields_set__:
93
+ _dict['links'] = None
94
+
95
+ return _dict
96
+
97
+ @classmethod
98
+ def from_dict(cls, obj: dict) -> PagedResourceListOfGroupReconciliationComparisonRuleset:
99
+ """Create an instance of PagedResourceListOfGroupReconciliationComparisonRuleset from a dict"""
100
+ if obj is None:
101
+ return None
102
+
103
+ if not isinstance(obj, dict):
104
+ return PagedResourceListOfGroupReconciliationComparisonRuleset.parse_obj(obj)
105
+
106
+ _obj = PagedResourceListOfGroupReconciliationComparisonRuleset.parse_obj({
107
+ "next_page": obj.get("nextPage"),
108
+ "previous_page": obj.get("previousPage"),
109
+ "values": [GroupReconciliationComparisonRuleset.from_dict(_item) for _item in obj.get("values")] if obj.get("values") is not None else None,
110
+ "href": obj.get("href"),
111
+ "links": [Link.from_dict(_item) for _item in obj.get("links")] if obj.get("links") is not None else None
112
+ })
113
+ return _obj
@@ -0,0 +1,113 @@
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, StrictStr, conlist
23
+ from lusid.models.group_reconciliation_definition import GroupReconciliationDefinition
24
+ from lusid.models.link import Link
25
+
26
+ class PagedResourceListOfGroupReconciliationDefinition(BaseModel):
27
+ """
28
+ PagedResourceListOfGroupReconciliationDefinition
29
+ """
30
+ next_page: Optional[StrictStr] = Field(None, alias="nextPage")
31
+ previous_page: Optional[StrictStr] = Field(None, alias="previousPage")
32
+ values: conlist(GroupReconciliationDefinition) = Field(...)
33
+ href: Optional[StrictStr] = None
34
+ links: Optional[conlist(Link)] = None
35
+ __properties = ["nextPage", "previousPage", "values", "href", "links"]
36
+
37
+ class Config:
38
+ """Pydantic configuration"""
39
+ allow_population_by_field_name = True
40
+ validate_assignment = True
41
+
42
+ def to_str(self) -> str:
43
+ """Returns the string representation of the model using alias"""
44
+ return pprint.pformat(self.dict(by_alias=True))
45
+
46
+ def to_json(self) -> str:
47
+ """Returns the JSON representation of the model using alias"""
48
+ return json.dumps(self.to_dict())
49
+
50
+ @classmethod
51
+ def from_json(cls, json_str: str) -> PagedResourceListOfGroupReconciliationDefinition:
52
+ """Create an instance of PagedResourceListOfGroupReconciliationDefinition from a JSON string"""
53
+ return cls.from_dict(json.loads(json_str))
54
+
55
+ def to_dict(self):
56
+ """Returns the dictionary representation of the model using alias"""
57
+ _dict = self.dict(by_alias=True,
58
+ exclude={
59
+ },
60
+ exclude_none=True)
61
+ # override the default output from pydantic by calling `to_dict()` of each item in values (list)
62
+ _items = []
63
+ if self.values:
64
+ for _item in self.values:
65
+ if _item:
66
+ _items.append(_item.to_dict())
67
+ _dict['values'] = _items
68
+ # override the default output from pydantic by calling `to_dict()` of each item in links (list)
69
+ _items = []
70
+ if self.links:
71
+ for _item in self.links:
72
+ if _item:
73
+ _items.append(_item.to_dict())
74
+ _dict['links'] = _items
75
+ # set to None if next_page (nullable) is None
76
+ # and __fields_set__ contains the field
77
+ if self.next_page is None and "next_page" in self.__fields_set__:
78
+ _dict['nextPage'] = None
79
+
80
+ # set to None if previous_page (nullable) is None
81
+ # and __fields_set__ contains the field
82
+ if self.previous_page is None and "previous_page" in self.__fields_set__:
83
+ _dict['previousPage'] = None
84
+
85
+ # set to None if href (nullable) is None
86
+ # and __fields_set__ contains the field
87
+ if self.href is None and "href" in self.__fields_set__:
88
+ _dict['href'] = None
89
+
90
+ # set to None if links (nullable) is None
91
+ # and __fields_set__ contains the field
92
+ if self.links is None and "links" in self.__fields_set__:
93
+ _dict['links'] = None
94
+
95
+ return _dict
96
+
97
+ @classmethod
98
+ def from_dict(cls, obj: dict) -> PagedResourceListOfGroupReconciliationDefinition:
99
+ """Create an instance of PagedResourceListOfGroupReconciliationDefinition from a dict"""
100
+ if obj is None:
101
+ return None
102
+
103
+ if not isinstance(obj, dict):
104
+ return PagedResourceListOfGroupReconciliationDefinition.parse_obj(obj)
105
+
106
+ _obj = PagedResourceListOfGroupReconciliationDefinition.parse_obj({
107
+ "next_page": obj.get("nextPage"),
108
+ "previous_page": obj.get("previousPage"),
109
+ "values": [GroupReconciliationDefinition.from_dict(_item) for _item in obj.get("values")] if obj.get("values") is not None else None,
110
+ "href": obj.get("href"),
111
+ "links": [Link.from_dict(_item) for _item in obj.get("links")] if obj.get("links") is not None else None
112
+ })
113
+ return _obj
lusid/models/portfolio.py CHANGED
@@ -46,7 +46,7 @@ class Portfolio(BaseModel):
46
46
  properties: Optional[Dict[str, ModelProperty]] = Field(None, description="The requested portfolio properties. These will be from the 'Portfolio' domain.")
47
47
  relationships: Optional[conlist(Relationship)] = Field(None, description="A set of relationships associated to the portfolio.")
48
48
  instrument_scopes: Optional[conlist(StrictStr)] = Field(None, alias="instrumentScopes", description="The instrument scope resolution strategy of this portfolio.")
49
- accounting_method: Optional[StrictStr] = Field(None, alias="accountingMethod", description=". The available values are: Default, AverageCost, FirstInFirstOut, LastInFirstOut, HighestCostFirst, LowestCostFirst, ProRateByUnits, ProRateByCost, ProRateByCostPortfolioCurrency")
49
+ accounting_method: Optional[StrictStr] = Field(None, alias="accountingMethod", description=". The available values are: Default, AverageCost, FirstInFirstOut, LastInFirstOut, HighestCostFirst, LowestCostFirst, ProRateByUnits, ProRateByCost, ProRateByCostPortfolioCurrency, IntraDayThenFirstInFirstOut, LongTermHighestCostFirst, LongTermHighestCostFirstPortfolioCurrency, HighestCostFirstPortfolioCurrency, LowestCostFirstPortfolioCurrency, MaximumLossMinimumGain, MaximumLossMinimumGainPortfolioCurrency")
50
50
  amortisation_method: Optional[StrictStr] = Field(None, alias="amortisationMethod", description="The amortisation method used by the portfolio for the calculation. The available values are: NoAmortisation, StraightLine, EffectiveYield, StraightLineSettlementDate, EffectiveYieldSettlementDate")
51
51
  transaction_type_scope: Optional[StrictStr] = Field(None, alias="transactionTypeScope", description="The scope of the transaction types.")
52
52
  cash_gain_loss_calculation_date: Optional[StrictStr] = Field(None, alias="cashGainLossCalculationDate", description="The scope of the transaction types.")
@@ -68,8 +68,8 @@ class Portfolio(BaseModel):
68
68
  if value is None:
69
69
  return value
70
70
 
71
- if value not in ('Default', 'AverageCost', 'FirstInFirstOut', 'LastInFirstOut', 'HighestCostFirst', 'LowestCostFirst', 'ProRateByUnits', 'ProRateByCost', 'ProRateByCostPortfolioCurrency'):
72
- raise ValueError("must be one of enum values ('Default', 'AverageCost', 'FirstInFirstOut', 'LastInFirstOut', 'HighestCostFirst', 'LowestCostFirst', 'ProRateByUnits', 'ProRateByCost', 'ProRateByCostPortfolioCurrency')")
71
+ if value not in ('Default', 'AverageCost', 'FirstInFirstOut', 'LastInFirstOut', 'HighestCostFirst', 'LowestCostFirst', 'ProRateByUnits', 'ProRateByCost', 'ProRateByCostPortfolioCurrency', 'IntraDayThenFirstInFirstOut', 'LongTermHighestCostFirst', 'LongTermHighestCostFirstPortfolioCurrency', 'HighestCostFirstPortfolioCurrency', 'LowestCostFirstPortfolioCurrency', 'MaximumLossMinimumGain', 'MaximumLossMinimumGainPortfolioCurrency'):
72
+ raise ValueError("must be one of enum values ('Default', 'AverageCost', 'FirstInFirstOut', 'LastInFirstOut', 'HighestCostFirst', 'LowestCostFirst', 'ProRateByUnits', 'ProRateByCost', 'ProRateByCostPortfolioCurrency', 'IntraDayThenFirstInFirstOut', 'LongTermHighestCostFirst', 'LongTermHighestCostFirstPortfolioCurrency', 'HighestCostFirstPortfolioCurrency', 'LowestCostFirstPortfolioCurrency', 'MaximumLossMinimumGain', 'MaximumLossMinimumGainPortfolioCurrency')")
73
73
  return value
74
74
 
75
75
  class Config: