lusid-sdk 2.1.405__py3-none-any.whl → 2.1.537__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.
- lusid/__init__.py +142 -8
- lusid/api/__init__.py +2 -2
- lusid/api/abor_api.py +126 -133
- lusid/api/abor_configuration_api.py +46 -45
- lusid/api/address_key_definition_api.py +28 -27
- lusid/api/aggregation_api.py +37 -36
- lusid/api/allocations_api.py +39 -38
- lusid/api/amortisation_rule_sets_api.py +55 -54
- lusid/api/application_metadata_api.py +28 -27
- lusid/api/blocks_api.py +37 -36
- lusid/api/calendars_api.py +469 -111
- lusid/api/chart_of_accounts_api.py +454 -279
- lusid/api/complex_market_data_api.py +37 -36
- lusid/api/compliance_api.py +136 -135
- lusid/api/configuration_recipe_api.py +100 -99
- lusid/api/conventions_api.py +109 -108
- lusid/api/corporate_action_sources_api.py +82 -81
- lusid/api/counterparties_api.py +73 -72
- lusid/api/custom_entities_api.py +102 -101
- lusid/api/custom_entity_definitions_api.py +37 -36
- lusid/api/custom_entity_types_api.py +37 -36
- lusid/api/cut_label_definitions_api.py +46 -45
- lusid/api/data_types_api.py +248 -72
- lusid/api/derived_transaction_portfolios_api.py +19 -18
- lusid/api/entities_api.py +431 -46
- lusid/api/executions_api.py +37 -36
- lusid/api/fee_types_api.py +55 -54
- lusid/api/{fund_configurations_api.py → fund_configuration_api.py} +222 -46
- lusid/api/funds_api.py +337 -162
- lusid/api/group_reconciliations_api.py +2182 -63
- lusid/api/instrument_event_types_api.py +64 -63
- lusid/api/instrument_events_api.py +46 -45
- lusid/api/instruments_api.py +374 -186
- lusid/api/legacy_compliance_api.py +73 -72
- lusid/api/legal_entities_api.py +167 -166
- lusid/api/order_graph_api.py +32 -31
- lusid/api/order_instructions_api.py +37 -36
- lusid/api/order_management_api.py +251 -90
- lusid/api/orders_api.py +37 -36
- lusid/api/packages_api.py +37 -36
- lusid/api/participations_api.py +37 -36
- lusid/api/persons_api.py +163 -162
- lusid/api/placements_api.py +37 -36
- lusid/api/portfolio_groups_api.py +235 -234
- lusid/api/portfolios_api.py +307 -309
- lusid/api/property_definitions_api.py +100 -99
- lusid/api/queryable_keys_api.py +10 -9
- lusid/api/quotes_api.py +82 -81
- lusid/api/reconciliations_api.py +136 -135
- lusid/api/reference_lists_api.py +39 -38
- lusid/api/reference_portfolio_api.py +213 -36
- lusid/api/relation_definitions_api.py +28 -27
- lusid/api/relations_api.py +19 -18
- lusid/api/relationship_definitions_api.py +46 -45
- lusid/api/relationships_api.py +19 -18
- lusid/api/schemas_api.py +37 -36
- lusid/api/scopes_api.py +19 -18
- lusid/api/scripted_translation_api.py +73 -72
- lusid/api/search_api.py +37 -36
- lusid/api/sequences_api.py +37 -36
- lusid/api/staged_modifications_api.py +37 -36
- lusid/api/staging_rule_set_api.py +46 -45
- lusid/api/structured_result_data_api.py +82 -81
- lusid/api/system_configuration_api.py +64 -63
- lusid/api/tax_rule_sets_api.py +46 -45
- lusid/api/transaction_configuration_api.py +100 -99
- lusid/api/transaction_fees_api.py +46 -45
- lusid/api/transaction_portfolios_api.py +771 -328
- lusid/api/translation_api.py +19 -18
- lusid/api/workspace_api.py +181 -180
- lusid/api_client.py +26 -17
- lusid/configuration.py +87 -2
- lusid/extensions/api_client.py +25 -17
- lusid/extensions/api_client_factory.py +14 -5
- lusid/extensions/api_configuration.py +50 -1
- lusid/extensions/configuration_loaders.py +39 -11
- lusid/extensions/configuration_options.py +67 -0
- lusid/extensions/rest.py +78 -26
- lusid/extensions/retry.py +109 -37
- lusid/models/__init__.py +140 -6
- lusid/models/access_metadata_value.py +1 -1
- lusid/models/accounting_method.py +7 -0
- lusid/models/accumulation_event.py +3 -3
- lusid/models/address_key_list.py +3 -3
- lusid/models/amortisation_event.py +3 -3
- lusid/models/amount.py +69 -0
- lusid/models/applicable_instrument_event.py +7 -2
- lusid/models/asset_leg.py +1 -1
- lusid/models/basket.py +3 -3
- lusid/models/batch_update_user_review_for_comparison_result_request.py +81 -0
- lusid/models/batch_update_user_review_for_comparison_result_response.py +146 -0
- lusid/models/batch_upsert_dates_for_calendar_response.py +146 -0
- lusid/models/batch_upsert_portfolio_access_metadata_request.py +27 -17
- lusid/models/batch_upsert_portfolio_access_metadata_response.py +56 -16
- lusid/models/{metadata_key_value.py → batch_upsert_portfolio_access_metadata_response_item.py} +15 -9
- lusid/models/bond.py +3 -3
- lusid/models/bond_coupon_event.py +10 -5
- lusid/models/bond_default_event.py +3 -3
- lusid/models/bond_principal_event.py +10 -5
- lusid/models/bonus_issue_event.py +166 -0
- lusid/models/{component_rule.py → break_code_source.py} +17 -21
- lusid/models/call_on_intermediate_securities_event.py +139 -0
- lusid/models/cancel_order_and_move_remaining_result.py +84 -0
- lusid/models/cancel_orders_and_move_remaining_request.py +83 -0
- lusid/models/cancel_orders_and_move_remaining_response.py +153 -0
- lusid/models/cap_floor.py +3 -3
- lusid/models/capital_distribution_event.py +3 -3
- lusid/models/cash.py +3 -3
- lusid/models/cash_dividend_event.py +3 -3
- lusid/models/cash_flow_event.py +3 -3
- lusid/models/cash_perpetual.py +3 -3
- lusid/models/cds_credit_event.py +6 -6
- lusid/models/cds_index.py +3 -3
- lusid/models/cdx_credit_event.py +6 -6
- lusid/models/change_interval.py +123 -0
- lusid/models/change_interval_with_order_management_detail.py +3 -3
- lusid/models/close_event.py +3 -3
- lusid/models/comparison_attribute_value_pair.py +71 -0
- lusid/models/complex_bond.py +3 -3
- lusid/models/component_transaction.py +10 -3
- lusid/models/contract_for_difference.py +3 -3
- lusid/models/create_derived_transaction_portfolio_request.py +3 -3
- lusid/models/create_group_reconciliation_definition_request.py +113 -0
- lusid/models/create_staging_rule_set_request.py +1 -6
- lusid/models/create_transaction_portfolio_request.py +3 -3
- lusid/models/credit_default_swap.py +3 -3
- lusid/models/credit_premium_cash_flow_event.py +3 -3
- lusid/models/custodian_account_request.py +1 -1
- lusid/models/custom_entity_entity.py +146 -0
- lusid/models/custom_entity_response.py +7 -1
- lusid/models/decimal_list.py +3 -3
- lusid/models/delete_instrument_properties_response.py +7 -1
- lusid/models/delete_instrument_response.py +7 -1
- lusid/models/delete_instruments_response.py +22 -1
- lusid/models/deleted_entity_response.py +7 -1
- lusid/models/diary_entry_request.py +10 -1
- lusid/models/dividend_option_event.py +3 -3
- lusid/models/dividend_reinvestment_event.py +9 -4
- lusid/models/effective_range.py +71 -0
- lusid/models/equity.py +3 -3
- lusid/models/equity_option.py +22 -7
- lusid/models/equity_swap.py +3 -3
- lusid/models/exchange_traded_option.py +3 -3
- lusid/models/exchange_traded_option_contract_details.py +1 -1
- lusid/models/exercise_event.py +3 -3
- lusid/models/exotic_instrument.py +3 -3
- lusid/models/expiry_event.py +3 -3
- lusid/models/fee.py +17 -10
- lusid/models/fee_request.py +20 -13
- lusid/models/fee_type.py +4 -4
- lusid/models/fee_type_request.py +3 -3
- lusid/models/fixed_leg.py +3 -3
- lusid/models/fixed_schedule.py +3 -3
- lusid/models/flexible_loan.py +3 -3
- lusid/models/float_schedule.py +4 -4
- lusid/models/floating_leg.py +3 -3
- lusid/models/flow_conventions.py +7 -1
- lusid/models/forward_rate_agreement.py +3 -3
- lusid/models/fund_configuration.py +44 -17
- lusid/models/fund_configuration_request.py +31 -19
- lusid/models/fund_id_list.py +99 -0
- lusid/models/fund_share_class.py +23 -8
- lusid/models/funding_leg.py +3 -3
- lusid/models/future.py +3 -3
- lusid/models/future_expiry_event.py +3 -3
- lusid/models/fx_forward.py +3 -3
- lusid/models/fx_forward_settlement_event.py +3 -3
- lusid/models/fx_option.py +3 -3
- lusid/models/fx_swap.py +3 -3
- lusid/models/group_reconciliation_aggregate_attribute_rule.py +2 -2
- lusid/models/group_reconciliation_aggregate_attribute_values.py +86 -0
- lusid/models/group_reconciliation_aggregate_comparison_rule_operand.py +1 -1
- lusid/models/group_reconciliation_comparison_result.py +148 -0
- lusid/models/group_reconciliation_core_attribute_values.py +86 -0
- lusid/models/group_reconciliation_core_comparison_rule_operand.py +1 -1
- lusid/models/group_reconciliation_date_pair.py +81 -0
- lusid/models/group_reconciliation_dates.py +78 -0
- lusid/models/group_reconciliation_definition.py +136 -0
- lusid/models/group_reconciliation_definition_comparison_ruleset_ids.py +83 -0
- lusid/models/group_reconciliation_definition_currencies.py +71 -0
- lusid/models/group_reconciliation_definition_portfolio_entity_ids.py +86 -0
- lusid/models/group_reconciliation_definition_recipe_ids.py +78 -0
- lusid/models/group_reconciliation_instance_id.py +71 -0
- lusid/models/group_reconciliation_result_statuses.py +89 -0
- lusid/models/group_reconciliation_result_types.py +96 -0
- lusid/models/group_reconciliation_review_statuses.py +96 -0
- lusid/models/group_reconciliation_run_details.py +76 -0
- lusid/models/group_reconciliation_run_request.py +75 -0
- lusid/models/{metadata_key_value_response.py → group_reconciliation_run_response.py} +20 -29
- lusid/models/group_reconciliation_summary.py +121 -0
- lusid/models/group_reconciliation_user_review.py +112 -0
- lusid/models/group_reconciliation_user_review_add.py +88 -0
- lusid/models/group_reconciliation_user_review_break_code.py +80 -0
- lusid/models/group_reconciliation_user_review_comment.py +80 -0
- lusid/models/group_reconciliation_user_review_match_key.py +80 -0
- lusid/models/group_reconciliation_user_review_remove.py +88 -0
- lusid/models/holding_contributor.py +11 -4
- lusid/models/holding_ids_request.py +69 -0
- lusid/models/inflation_leg.py +3 -3
- lusid/models/inflation_linked_bond.py +3 -3
- lusid/models/inflation_swap.py +3 -3
- lusid/models/informational_error_event.py +3 -3
- lusid/models/informational_event.py +3 -3
- lusid/models/instrument.py +7 -1
- lusid/models/instrument_definition.py +8 -2
- lusid/models/instrument_event.py +17 -5
- lusid/models/instrument_event_holder.py +9 -1
- lusid/models/instrument_event_type.py +12 -0
- lusid/models/instrument_leg.py +3 -3
- lusid/models/instrument_list.py +3 -3
- lusid/models/instrument_type.py +2 -0
- lusid/models/interest_rate_swap.py +3 -3
- lusid/models/interest_rate_swaption.py +3 -3
- lusid/models/intermediate_securities_distribution_event.py +140 -0
- lusid/models/lapse_election.py +73 -0
- lusid/models/loan_facility.py +97 -0
- lusid/models/lusid_instrument.py +7 -5
- lusid/models/market_data_key_rule.py +5 -3
- lusid/models/market_data_specific_rule.py +5 -3
- lusid/models/mastered_instrument.py +139 -0
- lusid/models/maturity_event.py +3 -3
- lusid/models/mbs_coupon_event.py +102 -0
- lusid/models/mbs_interest_deferral_event.py +102 -0
- lusid/models/mbs_interest_shortfall_event.py +102 -0
- lusid/models/mbs_principal_event.py +102 -0
- lusid/models/mbs_principal_write_off_event.py +102 -0
- lusid/models/merger_event.py +22 -22
- lusid/models/new_instrument.py +1 -1
- lusid/models/open_event.py +3 -3
- lusid/models/option_exercise_cash_event.py +144 -0
- lusid/models/option_exercise_election.py +73 -0
- lusid/models/option_exercise_physical_event.py +149 -0
- lusid/models/output_transaction.py +9 -2
- lusid/models/paged_resource_list_of_group_reconciliation_comparison_result.py +113 -0
- lusid/models/paged_resource_list_of_group_reconciliation_comparison_ruleset.py +113 -0
- lusid/models/paged_resource_list_of_group_reconciliation_definition.py +113 -0
- lusid/models/portfolio.py +3 -3
- lusid/models/portfolio_details.py +3 -3
- lusid/models/portfolio_group_id_list.py +3 -3
- lusid/models/portfolio_id_list.py +3 -3
- lusid/models/portfolio_without_href.py +3 -3
- lusid/models/pricing_options.py +8 -2
- lusid/models/property_list.py +3 -3
- lusid/models/protection_payout_cash_flow_event.py +102 -0
- lusid/models/raw_vendor_event.py +3 -3
- lusid/models/reference_instrument.py +3 -3
- lusid/models/reference_list.py +6 -5
- lusid/models/reference_list_type.py +1 -0
- lusid/models/repo.py +3 -3
- lusid/models/reset_event.py +3 -3
- lusid/models/resource_list_of_change_interval.py +113 -0
- lusid/models/resource_list_of_output_transaction.py +113 -0
- lusid/models/return_zero_pv_options.py +69 -0
- lusid/models/reverse_stock_split_event.py +21 -7
- lusid/models/scrip_dividend_event.py +3 -3
- lusid/models/settlement_cycle.py +79 -0
- lusid/models/share_class_dealing_breakdown.py +3 -2
- lusid/models/share_class_details.py +18 -1
- lusid/models/simple_cash_flow_loan.py +3 -3
- lusid/models/simple_instrument.py +3 -3
- lusid/models/simple_rounding_convention.py +76 -0
- lusid/models/spin_off_event.py +3 -3
- lusid/models/staged_modification_effective_range.py +2 -2
- lusid/models/stock_dividend_event.py +20 -6
- lusid/models/stock_split_event.py +3 -3
- lusid/models/string_list.py +3 -3
- lusid/models/swap_cash_flow_event.py +3 -3
- lusid/models/swap_principal_event.py +3 -3
- lusid/models/target_tax_lot.py +23 -2
- lusid/models/target_tax_lot_request.py +23 -2
- lusid/models/tender_event.py +172 -0
- lusid/models/term_deposit.py +3 -3
- lusid/models/total_return_swap.py +4 -4
- lusid/models/transaction.py +9 -2
- lusid/models/transaction_date_windows.py +85 -0
- lusid/models/transaction_price.py +3 -3
- lusid/models/transaction_price_type.py +2 -0
- lusid/models/transaction_request.py +9 -2
- lusid/models/transition_event.py +3 -3
- lusid/models/trigger_event.py +3 -3
- lusid/models/update_fee_type_request.py +4 -4
- lusid/models/update_group_reconciliation_comparison_ruleset_request.py +91 -0
- lusid/models/update_group_reconciliation_definition_request.py +107 -0
- lusid/models/update_reference_data_request.py +87 -0
- lusid/models/update_staging_rule_set_request.py +1 -6
- lusid/models/upsert_custom_entities_response.py +20 -1
- lusid/models/upsert_reference_portfolio_constituent_properties_request.py +84 -0
- lusid/models/upsert_reference_portfolio_constituent_properties_response.py +115 -0
- lusid/models/valuation_point_data_query_parameters.py +3 -3
- lusid/models/valuation_point_data_response.py +8 -13
- lusid/rest.py +70 -20
- {lusid_sdk-2.1.405.dist-info → lusid_sdk-2.1.537.dist-info}/METADATA +118 -26
- {lusid_sdk-2.1.405.dist-info → lusid_sdk-2.1.537.dist-info}/RECORD +294 -226
- {lusid_sdk-2.1.405.dist-info → lusid_sdk-2.1.537.dist-info}/WHEEL +0 -0
@@ -0,0 +1,149 @@
|
|
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, List, Optional, Union
|
22
|
+
from pydantic.v1 import Field, StrictFloat, StrictInt, StrictStr, conlist, constr, validator
|
23
|
+
from lusid.models.instrument_event import InstrumentEvent
|
24
|
+
from lusid.models.new_instrument import NewInstrument
|
25
|
+
from lusid.models.option_exercise_election import OptionExerciseElection
|
26
|
+
from lusid.models.units_ratio import UnitsRatio
|
27
|
+
|
28
|
+
class OptionExercisePhysicalEvent(InstrumentEvent):
|
29
|
+
"""
|
30
|
+
Event for physical option exercises. # noqa: E501
|
31
|
+
"""
|
32
|
+
exercise_date: Optional[datetime] = Field(None, alias="exerciseDate", description="The exercise date of the option.")
|
33
|
+
exercise_type: constr(strict=True, min_length=1) = Field(..., alias="exerciseType", description="The optionality type of the underlying option e.g. American, European. Supported string (enumeration) values are: [European, Bermudan, American].")
|
34
|
+
maturity_date: datetime = Field(..., alias="maturityDate", description="The maturity date of the option.")
|
35
|
+
moneyness: Optional[StrictStr] = Field(None, description="The moneyness of the option e.g. InTheMoney, OutOfTheMoney. Supported string (enumeration) values are: [InTheMoney, OutOfTheMoney, AtTheMoney].")
|
36
|
+
new_instrument: NewInstrument = Field(..., alias="newInstrument")
|
37
|
+
option_exercise_elections: Optional[conlist(OptionExerciseElection)] = Field(None, alias="optionExerciseElections", description="Option exercise election for this OptionExercisePhysicalEvent.")
|
38
|
+
option_type: constr(strict=True, min_length=1) = Field(..., alias="optionType", description="Type of optionality that is present e.g. call, put. Supported string (enumeration) values are: [Call, Put].")
|
39
|
+
start_date: datetime = Field(..., alias="startDate", description="The trade date of the option.")
|
40
|
+
strike_currency: StrictStr = Field(..., alias="strikeCurrency", description="The strike currency of the equity option.")
|
41
|
+
strike_per_unit: Union[StrictFloat, StrictInt] = Field(..., alias="strikePerUnit", description="The strike of the equity option times the number of shares to exchange if exercised.")
|
42
|
+
underlying_value_per_unit: Optional[Union[StrictFloat, StrictInt]] = Field(None, alias="underlyingValuePerUnit", description="The underlying price times the number of shares to exchange if exercised.")
|
43
|
+
units_ratio: UnitsRatio = Field(..., alias="unitsRatio")
|
44
|
+
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, CallOnIntermediateSecuritiesEvent, IntermediateSecuritiesDistributionEvent, OptionExercisePhysicalEvent, OptionExerciseCashEvent, ProtectionPayoutCashFlowEvent")
|
45
|
+
additional_properties: Dict[str, Any] = {}
|
46
|
+
__properties = ["instrumentEventType", "exerciseDate", "exerciseType", "maturityDate", "moneyness", "newInstrument", "optionExerciseElections", "optionType", "startDate", "strikeCurrency", "strikePerUnit", "underlyingValuePerUnit", "unitsRatio"]
|
47
|
+
|
48
|
+
@validator('instrument_event_type')
|
49
|
+
def instrument_event_type_validate_enum(cls, value):
|
50
|
+
"""Validates the enum"""
|
51
|
+
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', 'CallOnIntermediateSecuritiesEvent', 'IntermediateSecuritiesDistributionEvent', 'OptionExercisePhysicalEvent', 'OptionExerciseCashEvent', 'ProtectionPayoutCashFlowEvent'):
|
52
|
+
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', 'CallOnIntermediateSecuritiesEvent', 'IntermediateSecuritiesDistributionEvent', 'OptionExercisePhysicalEvent', 'OptionExerciseCashEvent', 'ProtectionPayoutCashFlowEvent')")
|
53
|
+
return value
|
54
|
+
|
55
|
+
class Config:
|
56
|
+
"""Pydantic configuration"""
|
57
|
+
allow_population_by_field_name = True
|
58
|
+
validate_assignment = True
|
59
|
+
|
60
|
+
def to_str(self) -> str:
|
61
|
+
"""Returns the string representation of the model using alias"""
|
62
|
+
return pprint.pformat(self.dict(by_alias=True))
|
63
|
+
|
64
|
+
def to_json(self) -> str:
|
65
|
+
"""Returns the JSON representation of the model using alias"""
|
66
|
+
return json.dumps(self.to_dict())
|
67
|
+
|
68
|
+
@classmethod
|
69
|
+
def from_json(cls, json_str: str) -> OptionExercisePhysicalEvent:
|
70
|
+
"""Create an instance of OptionExercisePhysicalEvent from a JSON string"""
|
71
|
+
return cls.from_dict(json.loads(json_str))
|
72
|
+
|
73
|
+
def to_dict(self):
|
74
|
+
"""Returns the dictionary representation of the model using alias"""
|
75
|
+
_dict = self.dict(by_alias=True,
|
76
|
+
exclude={
|
77
|
+
"additional_properties"
|
78
|
+
},
|
79
|
+
exclude_none=True)
|
80
|
+
# override the default output from pydantic by calling `to_dict()` of new_instrument
|
81
|
+
if self.new_instrument:
|
82
|
+
_dict['newInstrument'] = self.new_instrument.to_dict()
|
83
|
+
# override the default output from pydantic by calling `to_dict()` of each item in option_exercise_elections (list)
|
84
|
+
_items = []
|
85
|
+
if self.option_exercise_elections:
|
86
|
+
for _item in self.option_exercise_elections:
|
87
|
+
if _item:
|
88
|
+
_items.append(_item.to_dict())
|
89
|
+
_dict['optionExerciseElections'] = _items
|
90
|
+
# override the default output from pydantic by calling `to_dict()` of units_ratio
|
91
|
+
if self.units_ratio:
|
92
|
+
_dict['unitsRatio'] = self.units_ratio.to_dict()
|
93
|
+
# puts key-value pairs in additional_properties in the top level
|
94
|
+
if self.additional_properties is not None:
|
95
|
+
for _key, _value in self.additional_properties.items():
|
96
|
+
_dict[_key] = _value
|
97
|
+
|
98
|
+
# set to None if exercise_date (nullable) is None
|
99
|
+
# and __fields_set__ contains the field
|
100
|
+
if self.exercise_date is None and "exercise_date" in self.__fields_set__:
|
101
|
+
_dict['exerciseDate'] = None
|
102
|
+
|
103
|
+
# set to None if moneyness (nullable) is None
|
104
|
+
# and __fields_set__ contains the field
|
105
|
+
if self.moneyness is None and "moneyness" in self.__fields_set__:
|
106
|
+
_dict['moneyness'] = None
|
107
|
+
|
108
|
+
# set to None if option_exercise_elections (nullable) is None
|
109
|
+
# and __fields_set__ contains the field
|
110
|
+
if self.option_exercise_elections is None and "option_exercise_elections" in self.__fields_set__:
|
111
|
+
_dict['optionExerciseElections'] = None
|
112
|
+
|
113
|
+
# set to None if underlying_value_per_unit (nullable) is None
|
114
|
+
# and __fields_set__ contains the field
|
115
|
+
if self.underlying_value_per_unit is None and "underlying_value_per_unit" in self.__fields_set__:
|
116
|
+
_dict['underlyingValuePerUnit'] = None
|
117
|
+
|
118
|
+
return _dict
|
119
|
+
|
120
|
+
@classmethod
|
121
|
+
def from_dict(cls, obj: dict) -> OptionExercisePhysicalEvent:
|
122
|
+
"""Create an instance of OptionExercisePhysicalEvent from a dict"""
|
123
|
+
if obj is None:
|
124
|
+
return None
|
125
|
+
|
126
|
+
if not isinstance(obj, dict):
|
127
|
+
return OptionExercisePhysicalEvent.parse_obj(obj)
|
128
|
+
|
129
|
+
_obj = OptionExercisePhysicalEvent.parse_obj({
|
130
|
+
"instrument_event_type": obj.get("instrumentEventType"),
|
131
|
+
"exercise_date": obj.get("exerciseDate"),
|
132
|
+
"exercise_type": obj.get("exerciseType"),
|
133
|
+
"maturity_date": obj.get("maturityDate"),
|
134
|
+
"moneyness": obj.get("moneyness"),
|
135
|
+
"new_instrument": NewInstrument.from_dict(obj.get("newInstrument")) if obj.get("newInstrument") is not None else None,
|
136
|
+
"option_exercise_elections": [OptionExerciseElection.from_dict(_item) for _item in obj.get("optionExerciseElections")] if obj.get("optionExerciseElections") is not None else None,
|
137
|
+
"option_type": obj.get("optionType"),
|
138
|
+
"start_date": obj.get("startDate"),
|
139
|
+
"strike_currency": obj.get("strikeCurrency"),
|
140
|
+
"strike_per_unit": obj.get("strikePerUnit"),
|
141
|
+
"underlying_value_per_unit": obj.get("underlyingValuePerUnit"),
|
142
|
+
"units_ratio": UnitsRatio.from_dict(obj.get("unitsRatio")) if obj.get("unitsRatio") is not None else None
|
143
|
+
})
|
144
|
+
# store additional fields in additional_properties
|
145
|
+
for _key in obj.keys():
|
146
|
+
if _key not in cls.__properties:
|
147
|
+
_obj.additional_properties[_key] = obj.get(_key)
|
148
|
+
|
149
|
+
return _obj
|
@@ -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
|
-
|
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_result import GroupReconciliationComparisonResult
|
24
|
+
from lusid.models.link import Link
|
25
|
+
|
26
|
+
class PagedResourceListOfGroupReconciliationComparisonResult(BaseModel):
|
27
|
+
"""
|
28
|
+
PagedResourceListOfGroupReconciliationComparisonResult
|
29
|
+
"""
|
30
|
+
next_page: Optional[StrictStr] = Field(None, alias="nextPage")
|
31
|
+
previous_page: Optional[StrictStr] = Field(None, alias="previousPage")
|
32
|
+
values: conlist(GroupReconciliationComparisonResult) = 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) -> PagedResourceListOfGroupReconciliationComparisonResult:
|
52
|
+
"""Create an instance of PagedResourceListOfGroupReconciliationComparisonResult 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) -> PagedResourceListOfGroupReconciliationComparisonResult:
|
99
|
+
"""Create an instance of PagedResourceListOfGroupReconciliationComparisonResult from a dict"""
|
100
|
+
if obj is None:
|
101
|
+
return None
|
102
|
+
|
103
|
+
if not isinstance(obj, dict):
|
104
|
+
return PagedResourceListOfGroupReconciliationComparisonResult.parse_obj(obj)
|
105
|
+
|
106
|
+
_obj = PagedResourceListOfGroupReconciliationComparisonResult.parse_obj({
|
107
|
+
"next_page": obj.get("nextPage"),
|
108
|
+
"previous_page": obj.get("previousPage"),
|
109
|
+
"values": [GroupReconciliationComparisonResult.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_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:
|
@@ -37,7 +37,7 @@ class PortfolioDetails(BaseModel):
|
|
37
37
|
corporate_action_source_id: Optional[ResourceId] = Field(None, alias="corporateActionSourceId")
|
38
38
|
sub_holding_keys: Optional[conlist(StrictStr)] = Field(None, alias="subHoldingKeys")
|
39
39
|
instrument_scopes: Optional[conlist(StrictStr)] = Field(None, alias="instrumentScopes", description="The resolution strategy used to resolve instruments of transactions/holdings upserted to the transaction portfolio.")
|
40
|
-
accounting_method: Optional[StrictStr] = Field(None, alias="accountingMethod", description=". The available values are: Default, AverageCost, FirstInFirstOut, LastInFirstOut, HighestCostFirst, LowestCostFirst, ProRateByUnits, ProRateByCost, ProRateByCostPortfolioCurrency")
|
40
|
+
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")
|
41
41
|
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")
|
42
42
|
transaction_type_scope: Optional[StrictStr] = Field(None, alias="transactionTypeScope", description="The scope of the transaction types.")
|
43
43
|
cash_gain_loss_calculation_date: Optional[StrictStr] = Field(None, alias="cashGainLossCalculationDate", description="The option when the Cash Gain Loss to be calulated, TransactionDate/SettlementDate. Defaults to SettlementDate.")
|
@@ -53,8 +53,8 @@ class PortfolioDetails(BaseModel):
|
|
53
53
|
if value is None:
|
54
54
|
return value
|
55
55
|
|
56
|
-
if value not in ('Default', 'AverageCost', 'FirstInFirstOut', 'LastInFirstOut', 'HighestCostFirst', 'LowestCostFirst', 'ProRateByUnits', 'ProRateByCost', 'ProRateByCostPortfolioCurrency'):
|
57
|
-
raise ValueError("must be one of enum values ('Default', 'AverageCost', 'FirstInFirstOut', 'LastInFirstOut', 'HighestCostFirst', 'LowestCostFirst', 'ProRateByUnits', 'ProRateByCost', 'ProRateByCostPortfolioCurrency')")
|
56
|
+
if value not in ('Default', 'AverageCost', 'FirstInFirstOut', 'LastInFirstOut', 'HighestCostFirst', 'LowestCostFirst', 'ProRateByUnits', 'ProRateByCost', 'ProRateByCostPortfolioCurrency', 'IntraDayThenFirstInFirstOut', 'LongTermHighestCostFirst', 'LongTermHighestCostFirstPortfolioCurrency', 'HighestCostFirstPortfolioCurrency', 'LowestCostFirstPortfolioCurrency', 'MaximumLossMinimumGain', 'MaximumLossMinimumGainPortfolioCurrency'):
|
57
|
+
raise ValueError("must be one of enum values ('Default', 'AverageCost', 'FirstInFirstOut', 'LastInFirstOut', 'HighestCostFirst', 'LowestCostFirst', 'ProRateByUnits', 'ProRateByCost', 'ProRateByCostPortfolioCurrency', 'IntraDayThenFirstInFirstOut', 'LongTermHighestCostFirst', 'LongTermHighestCostFirstPortfolioCurrency', 'HighestCostFirstPortfolioCurrency', 'LowestCostFirstPortfolioCurrency', 'MaximumLossMinimumGain', 'MaximumLossMinimumGainPortfolioCurrency')")
|
58
58
|
return value
|
59
59
|
|
60
60
|
class Config:
|
@@ -28,15 +28,15 @@ class PortfolioGroupIdList(ReferenceList):
|
|
28
28
|
PortfolioGroupIdList
|
29
29
|
"""
|
30
30
|
values: conlist(ResourceId, max_items=100) = Field(...)
|
31
|
-
reference_list_type: StrictStr = Field(..., alias="referenceListType", description="The reference list values. The available values are: PortfolioGroupIdList, PortfolioIdList, AddressKeyList, StringList, InstrumentList, DecimalList, PropertyList")
|
31
|
+
reference_list_type: StrictStr = Field(..., alias="referenceListType", description="The reference list values. The available values are: PortfolioGroupIdList, PortfolioIdList, AddressKeyList, StringList, InstrumentList, DecimalList, PropertyList, FundIdList")
|
32
32
|
additional_properties: Dict[str, Any] = {}
|
33
33
|
__properties = ["referenceListType", "values"]
|
34
34
|
|
35
35
|
@validator('reference_list_type')
|
36
36
|
def reference_list_type_validate_enum(cls, value):
|
37
37
|
"""Validates the enum"""
|
38
|
-
if value not in ('PortfolioGroupIdList', 'PortfolioIdList', 'AddressKeyList', 'StringList', 'InstrumentList', 'DecimalList', 'PropertyList'):
|
39
|
-
raise ValueError("must be one of enum values ('PortfolioGroupIdList', 'PortfolioIdList', 'AddressKeyList', 'StringList', 'InstrumentList', 'DecimalList', 'PropertyList')")
|
38
|
+
if value not in ('PortfolioGroupIdList', 'PortfolioIdList', 'AddressKeyList', 'StringList', 'InstrumentList', 'DecimalList', 'PropertyList', 'FundIdList'):
|
39
|
+
raise ValueError("must be one of enum values ('PortfolioGroupIdList', 'PortfolioIdList', 'AddressKeyList', 'StringList', 'InstrumentList', 'DecimalList', 'PropertyList', 'FundIdList')")
|
40
40
|
return value
|
41
41
|
|
42
42
|
class Config:
|
@@ -28,15 +28,15 @@ class PortfolioIdList(ReferenceList):
|
|
28
28
|
PortfolioIdList
|
29
29
|
"""
|
30
30
|
values: conlist(ResourceId, max_items=100) = Field(...)
|
31
|
-
reference_list_type: StrictStr = Field(..., alias="referenceListType", description="The reference list values. The available values are: PortfolioGroupIdList, PortfolioIdList, AddressKeyList, StringList, InstrumentList, DecimalList, PropertyList")
|
31
|
+
reference_list_type: StrictStr = Field(..., alias="referenceListType", description="The reference list values. The available values are: PortfolioGroupIdList, PortfolioIdList, AddressKeyList, StringList, InstrumentList, DecimalList, PropertyList, FundIdList")
|
32
32
|
additional_properties: Dict[str, Any] = {}
|
33
33
|
__properties = ["referenceListType", "values"]
|
34
34
|
|
35
35
|
@validator('reference_list_type')
|
36
36
|
def reference_list_type_validate_enum(cls, value):
|
37
37
|
"""Validates the enum"""
|
38
|
-
if value not in ('PortfolioGroupIdList', 'PortfolioIdList', 'AddressKeyList', 'StringList', 'InstrumentList', 'DecimalList', 'PropertyList'):
|
39
|
-
raise ValueError("must be one of enum values ('PortfolioGroupIdList', 'PortfolioIdList', 'AddressKeyList', 'StringList', 'InstrumentList', 'DecimalList', 'PropertyList')")
|
38
|
+
if value not in ('PortfolioGroupIdList', 'PortfolioIdList', 'AddressKeyList', 'StringList', 'InstrumentList', 'DecimalList', 'PropertyList', 'FundIdList'):
|
39
|
+
raise ValueError("must be one of enum values ('PortfolioGroupIdList', 'PortfolioIdList', 'AddressKeyList', 'StringList', 'InstrumentList', 'DecimalList', 'PropertyList', 'FundIdList')")
|
40
40
|
return value
|
41
41
|
|
42
42
|
class Config:
|
@@ -45,7 +45,7 @@ class PortfolioWithoutHref(BaseModel):
|
|
45
45
|
properties: Optional[Dict[str, ModelProperty]] = Field(None, description="The requested portfolio properties. These will be from the 'Portfolio' domain.")
|
46
46
|
relationships: Optional[conlist(Relationship)] = Field(None, description="A set of relationships associated to the portfolio.")
|
47
47
|
instrument_scopes: Optional[conlist(StrictStr)] = Field(None, alias="instrumentScopes", description="The instrument scope resolution strategy of this portfolio.")
|
48
|
-
accounting_method: Optional[StrictStr] = Field(None, alias="accountingMethod", description=". The available values are: Default, AverageCost, FirstInFirstOut, LastInFirstOut, HighestCostFirst, LowestCostFirst, ProRateByUnits, ProRateByCost, ProRateByCostPortfolioCurrency")
|
48
|
+
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")
|
49
49
|
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")
|
50
50
|
transaction_type_scope: Optional[StrictStr] = Field(None, alias="transactionTypeScope", description="The scope of the transaction types.")
|
51
51
|
cash_gain_loss_calculation_date: Optional[StrictStr] = Field(None, alias="cashGainLossCalculationDate", description="The scope of the transaction types.")
|
@@ -67,8 +67,8 @@ class PortfolioWithoutHref(BaseModel):
|
|
67
67
|
if value is None:
|
68
68
|
return value
|
69
69
|
|
70
|
-
if value not in ('Default', 'AverageCost', 'FirstInFirstOut', 'LastInFirstOut', 'HighestCostFirst', 'LowestCostFirst', 'ProRateByUnits', 'ProRateByCost', 'ProRateByCostPortfolioCurrency'):
|
71
|
-
raise ValueError("must be one of enum values ('Default', 'AverageCost', 'FirstInFirstOut', 'LastInFirstOut', 'HighestCostFirst', 'LowestCostFirst', 'ProRateByUnits', 'ProRateByCost', 'ProRateByCostPortfolioCurrency')")
|
70
|
+
if value not in ('Default', 'AverageCost', 'FirstInFirstOut', 'LastInFirstOut', 'HighestCostFirst', 'LowestCostFirst', 'ProRateByUnits', 'ProRateByCost', 'ProRateByCostPortfolioCurrency', 'IntraDayThenFirstInFirstOut', 'LongTermHighestCostFirst', 'LongTermHighestCostFirstPortfolioCurrency', 'HighestCostFirstPortfolioCurrency', 'LowestCostFirstPortfolioCurrency', 'MaximumLossMinimumGain', 'MaximumLossMinimumGainPortfolioCurrency'):
|
71
|
+
raise ValueError("must be one of enum values ('Default', 'AverageCost', 'FirstInFirstOut', 'LastInFirstOut', 'HighestCostFirst', 'LowestCostFirst', 'ProRateByUnits', 'ProRateByCost', 'ProRateByCostPortfolioCurrency', 'IntraDayThenFirstInFirstOut', 'LongTermHighestCostFirst', 'LongTermHighestCostFirstPortfolioCurrency', 'HighestCostFirstPortfolioCurrency', 'LowestCostFirstPortfolioCurrency', 'MaximumLossMinimumGain', 'MaximumLossMinimumGainPortfolioCurrency')")
|
72
72
|
return value
|
73
73
|
|
74
74
|
class Config:
|