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
lusid/models/string_list.py
CHANGED
@@ -27,15 +27,15 @@ class StringList(ReferenceList):
|
|
27
27
|
StringList
|
28
28
|
"""
|
29
29
|
values: conlist(StrictStr, max_items=100, min_items=0) = Field(...)
|
30
|
-
reference_list_type: StrictStr = Field(..., alias="referenceListType", description="The reference list values. The available values are: PortfolioGroupIdList, PortfolioIdList, AddressKeyList, StringList, InstrumentList, DecimalList, PropertyList")
|
30
|
+
reference_list_type: StrictStr = Field(..., alias="referenceListType", description="The reference list values. The available values are: PortfolioGroupIdList, PortfolioIdList, AddressKeyList, StringList, InstrumentList, DecimalList, PropertyList, FundIdList")
|
31
31
|
additional_properties: Dict[str, Any] = {}
|
32
32
|
__properties = ["referenceListType", "values"]
|
33
33
|
|
34
34
|
@validator('reference_list_type')
|
35
35
|
def reference_list_type_validate_enum(cls, value):
|
36
36
|
"""Validates the enum"""
|
37
|
-
if value not in ('PortfolioGroupIdList', 'PortfolioIdList', 'AddressKeyList', 'StringList', 'InstrumentList', 'DecimalList', 'PropertyList'):
|
38
|
-
raise ValueError("must be one of enum values ('PortfolioGroupIdList', 'PortfolioIdList', 'AddressKeyList', 'StringList', 'InstrumentList', 'DecimalList', 'PropertyList')")
|
37
|
+
if value not in ('PortfolioGroupIdList', 'PortfolioIdList', 'AddressKeyList', 'StringList', 'InstrumentList', 'DecimalList', 'PropertyList', 'FundIdList'):
|
38
|
+
raise ValueError("must be one of enum values ('PortfolioGroupIdList', 'PortfolioIdList', 'AddressKeyList', 'StringList', 'InstrumentList', 'DecimalList', 'PropertyList', 'FundIdList')")
|
39
39
|
return value
|
40
40
|
|
41
41
|
class Config:
|
@@ -30,15 +30,15 @@ class SwapCashFlowEvent(InstrumentEvent):
|
|
30
30
|
payment_date: datetime = Field(..., alias="paymentDate", description="The payment date of the cashflow.")
|
31
31
|
currency: StrictStr = Field(..., description="The currency in which the cashflow is paid.")
|
32
32
|
cash_flow_per_unit: Optional[Union[StrictFloat, StrictInt]] = Field(None, alias="cashFlowPerUnit", description="The cashflow 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")
|
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, CallOnIntermediateSecuritiesEvent, IntermediateSecuritiesDistributionEvent, OptionExercisePhysicalEvent, OptionExerciseCashEvent, ProtectionPayoutCashFlowEvent")
|
34
34
|
additional_properties: Dict[str, Any] = {}
|
35
35
|
__properties = ["instrumentEventType", "exDate", "paymentDate", "currency", "cashFlowPerUnit"]
|
36
36
|
|
37
37
|
@validator('instrument_event_type')
|
38
38
|
def instrument_event_type_validate_enum(cls, value):
|
39
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'):
|
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')")
|
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', 'CallOnIntermediateSecuritiesEvent', 'IntermediateSecuritiesDistributionEvent', 'OptionExercisePhysicalEvent', 'OptionExerciseCashEvent', 'ProtectionPayoutCashFlowEvent'):
|
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', 'CallOnIntermediateSecuritiesEvent', 'IntermediateSecuritiesDistributionEvent', 'OptionExercisePhysicalEvent', 'OptionExerciseCashEvent', 'ProtectionPayoutCashFlowEvent')")
|
42
42
|
return value
|
43
43
|
|
44
44
|
class Config:
|
@@ -30,15 +30,15 @@ class SwapPrincipalEvent(InstrumentEvent):
|
|
30
30
|
payment_date: datetime = Field(..., alias="paymentDate", description="The payment date of the principal.")
|
31
31
|
currency: StrictStr = Field(..., description="The currency in which the principal is paid.")
|
32
32
|
principal_per_unit: Optional[Union[StrictFloat, StrictInt]] = Field(None, 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")
|
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, CallOnIntermediateSecuritiesEvent, IntermediateSecuritiesDistributionEvent, OptionExercisePhysicalEvent, OptionExerciseCashEvent, ProtectionPayoutCashFlowEvent")
|
34
34
|
additional_properties: Dict[str, Any] = {}
|
35
35
|
__properties = ["instrumentEventType", "exDate", "paymentDate", "currency", "principalPerUnit"]
|
36
36
|
|
37
37
|
@validator('instrument_event_type')
|
38
38
|
def instrument_event_type_validate_enum(cls, value):
|
39
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'):
|
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')")
|
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', 'CallOnIntermediateSecuritiesEvent', 'IntermediateSecuritiesDistributionEvent', 'OptionExercisePhysicalEvent', 'OptionExerciseCashEvent', 'ProtectionPayoutCashFlowEvent'):
|
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', 'CallOnIntermediateSecuritiesEvent', 'IntermediateSecuritiesDistributionEvent', 'OptionExercisePhysicalEvent', 'OptionExerciseCashEvent', 'ProtectionPayoutCashFlowEvent')")
|
42
42
|
return value
|
43
43
|
|
44
44
|
class Config:
|
lusid/models/target_tax_lot.py
CHANGED
@@ -32,7 +32,10 @@ class TargetTaxLot(BaseModel):
|
|
32
32
|
price: Optional[Union[StrictFloat, StrictInt]] = Field(None, description="The purchase price of each unit of the instrument held in this tax-lot. This forms part of the unique key required for multiple tax-lots.")
|
33
33
|
purchase_date: Optional[datetime] = Field(None, alias="purchaseDate", description="The purchase date of this tax-lot. This forms part of the unique key required for multiple tax-lots.")
|
34
34
|
settlement_date: Optional[datetime] = Field(None, alias="settlementDate", description="The settlement date of the tax-lot's opening transaction.")
|
35
|
-
|
35
|
+
notional_cost: Optional[Union[StrictFloat, StrictInt]] = Field(None, alias="notionalCost", description="The notional cost of the tax-lot's opening transaction.")
|
36
|
+
variation_margin: Optional[Union[StrictFloat, StrictInt]] = Field(None, alias="variationMargin", description="The variation margin of the tax-lot's opening transaction.")
|
37
|
+
variation_margin_portfolio_ccy: Optional[Union[StrictFloat, StrictInt]] = Field(None, alias="variationMarginPortfolioCcy", description="The variation margin in portfolio currency of the tax-lot's opening transaction.")
|
38
|
+
__properties = ["units", "cost", "portfolioCost", "price", "purchaseDate", "settlementDate", "notionalCost", "variationMargin", "variationMarginPortfolioCcy"]
|
36
39
|
|
37
40
|
class Config:
|
38
41
|
"""Pydantic configuration"""
|
@@ -81,6 +84,21 @@ class TargetTaxLot(BaseModel):
|
|
81
84
|
if self.settlement_date is None and "settlement_date" in self.__fields_set__:
|
82
85
|
_dict['settlementDate'] = None
|
83
86
|
|
87
|
+
# set to None if notional_cost (nullable) is None
|
88
|
+
# and __fields_set__ contains the field
|
89
|
+
if self.notional_cost is None and "notional_cost" in self.__fields_set__:
|
90
|
+
_dict['notionalCost'] = None
|
91
|
+
|
92
|
+
# set to None if variation_margin (nullable) is None
|
93
|
+
# and __fields_set__ contains the field
|
94
|
+
if self.variation_margin is None and "variation_margin" in self.__fields_set__:
|
95
|
+
_dict['variationMargin'] = None
|
96
|
+
|
97
|
+
# set to None if variation_margin_portfolio_ccy (nullable) is None
|
98
|
+
# and __fields_set__ contains the field
|
99
|
+
if self.variation_margin_portfolio_ccy is None and "variation_margin_portfolio_ccy" in self.__fields_set__:
|
100
|
+
_dict['variationMarginPortfolioCcy'] = None
|
101
|
+
|
84
102
|
return _dict
|
85
103
|
|
86
104
|
@classmethod
|
@@ -98,6 +116,9 @@ class TargetTaxLot(BaseModel):
|
|
98
116
|
"portfolio_cost": obj.get("portfolioCost"),
|
99
117
|
"price": obj.get("price"),
|
100
118
|
"purchase_date": obj.get("purchaseDate"),
|
101
|
-
"settlement_date": obj.get("settlementDate")
|
119
|
+
"settlement_date": obj.get("settlementDate"),
|
120
|
+
"notional_cost": obj.get("notionalCost"),
|
121
|
+
"variation_margin": obj.get("variationMargin"),
|
122
|
+
"variation_margin_portfolio_ccy": obj.get("variationMarginPortfolioCcy")
|
102
123
|
})
|
103
124
|
return _obj
|
@@ -32,7 +32,10 @@ class TargetTaxLotRequest(BaseModel):
|
|
32
32
|
price: Optional[Union[StrictFloat, StrictInt]] = Field(None, description="The purchase price of each unit of the instrument held in this tax-lot. This forms part of the unique key required for multiple tax-lots.")
|
33
33
|
purchase_date: Optional[datetime] = Field(None, alias="purchaseDate", description="The purchase date of this tax-lot. This forms part of the unique key required for multiple tax-lots.")
|
34
34
|
settlement_date: Optional[datetime] = Field(None, alias="settlementDate", description="The settlement date of the tax-lot's opening transaction.")
|
35
|
-
|
35
|
+
notional_cost: Optional[Union[StrictFloat, StrictInt]] = Field(None, alias="notionalCost", description="The notional cost of the tax-lot's opening transaction.")
|
36
|
+
variation_margin: Optional[Union[StrictFloat, StrictInt]] = Field(None, alias="variationMargin", description="The variation margin of the tax-lot's opening transaction.")
|
37
|
+
variation_margin_portfolio_ccy: Optional[Union[StrictFloat, StrictInt]] = Field(None, alias="variationMarginPortfolioCcy", description="The variation margin in portfolio currency of the tax-lot's opening transaction.")
|
38
|
+
__properties = ["units", "cost", "portfolioCost", "price", "purchaseDate", "settlementDate", "notionalCost", "variationMargin", "variationMarginPortfolioCcy"]
|
36
39
|
|
37
40
|
class Config:
|
38
41
|
"""Pydantic configuration"""
|
@@ -81,6 +84,21 @@ class TargetTaxLotRequest(BaseModel):
|
|
81
84
|
if self.settlement_date is None and "settlement_date" in self.__fields_set__:
|
82
85
|
_dict['settlementDate'] = None
|
83
86
|
|
87
|
+
# set to None if notional_cost (nullable) is None
|
88
|
+
# and __fields_set__ contains the field
|
89
|
+
if self.notional_cost is None and "notional_cost" in self.__fields_set__:
|
90
|
+
_dict['notionalCost'] = None
|
91
|
+
|
92
|
+
# set to None if variation_margin (nullable) is None
|
93
|
+
# and __fields_set__ contains the field
|
94
|
+
if self.variation_margin is None and "variation_margin" in self.__fields_set__:
|
95
|
+
_dict['variationMargin'] = None
|
96
|
+
|
97
|
+
# set to None if variation_margin_portfolio_ccy (nullable) is None
|
98
|
+
# and __fields_set__ contains the field
|
99
|
+
if self.variation_margin_portfolio_ccy is None and "variation_margin_portfolio_ccy" in self.__fields_set__:
|
100
|
+
_dict['variationMarginPortfolioCcy'] = None
|
101
|
+
|
84
102
|
return _dict
|
85
103
|
|
86
104
|
@classmethod
|
@@ -98,6 +116,9 @@ class TargetTaxLotRequest(BaseModel):
|
|
98
116
|
"portfolio_cost": obj.get("portfolioCost"),
|
99
117
|
"price": obj.get("price"),
|
100
118
|
"purchase_date": obj.get("purchaseDate"),
|
101
|
-
"settlement_date": obj.get("settlementDate")
|
119
|
+
"settlement_date": obj.get("settlementDate"),
|
120
|
+
"notional_cost": obj.get("notionalCost"),
|
121
|
+
"variation_margin": obj.get("variationMargin"),
|
122
|
+
"variation_margin_portfolio_ccy": obj.get("variationMarginPortfolioCcy")
|
102
123
|
})
|
103
124
|
return _obj
|
@@ -0,0 +1,172 @@
|
|
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, validator
|
23
|
+
from lusid.models.cash_and_security_offer_election import CashAndSecurityOfferElection
|
24
|
+
from lusid.models.cash_offer_election import CashOfferElection
|
25
|
+
from lusid.models.instrument_event import InstrumentEvent
|
26
|
+
from lusid.models.new_instrument import NewInstrument
|
27
|
+
from lusid.models.security_offer_election import SecurityOfferElection
|
28
|
+
|
29
|
+
class TenderEvent(InstrumentEvent):
|
30
|
+
"""
|
31
|
+
Tender Event (TEND). # noqa: E501
|
32
|
+
"""
|
33
|
+
announcement_date: Optional[datetime] = Field(None, alias="announcementDate", description="The date the tender is announced.")
|
34
|
+
ex_date: datetime = Field(..., alias="exDate", description="The ex date (entitlement date) of the event.")
|
35
|
+
record_date: Optional[datetime] = Field(None, alias="recordDate", description="Date you have to be the holder of record in order to participate in the tender.")
|
36
|
+
payment_date: datetime = Field(..., alias="paymentDate", description="The payment date of the event.")
|
37
|
+
new_instrument: NewInstrument = Field(..., alias="newInstrument")
|
38
|
+
fractional_units_cash_price: Optional[Union[StrictFloat, StrictInt]] = Field(None, alias="fractionalUnitsCashPrice", description="The cash price paid in lieu of fractionalUnits.")
|
39
|
+
fractional_units_cash_currency: Optional[StrictStr] = Field(None, alias="fractionalUnitsCashCurrency", description="The currency of the cash paid in lieu of fractionalUnits.")
|
40
|
+
security_offer_elections: Optional[conlist(SecurityOfferElection)] = Field(None, alias="securityOfferElections", description="List of possible SecurityOfferElections for this event.")
|
41
|
+
cash_and_security_offer_elections: Optional[conlist(CashAndSecurityOfferElection)] = Field(None, alias="cashAndSecurityOfferElections", description="List of possible CashAndSecurityOfferElections for this event.")
|
42
|
+
cash_offer_elections: Optional[conlist(CashOfferElection)] = Field(None, alias="cashOfferElections", description="List of possible CashOfferElections for this 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, CallOnIntermediateSecuritiesEvent, IntermediateSecuritiesDistributionEvent, OptionExercisePhysicalEvent, OptionExerciseCashEvent, ProtectionPayoutCashFlowEvent")
|
44
|
+
additional_properties: Dict[str, Any] = {}
|
45
|
+
__properties = ["instrumentEventType", "announcementDate", "exDate", "recordDate", "paymentDate", "newInstrument", "fractionalUnitsCashPrice", "fractionalUnitsCashCurrency", "securityOfferElections", "cashAndSecurityOfferElections", "cashOfferElections"]
|
46
|
+
|
47
|
+
@validator('instrument_event_type')
|
48
|
+
def instrument_event_type_validate_enum(cls, value):
|
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', 'CreditPremiumCashFlowEvent', 'CdsCreditEvent', 'CdxCreditEvent', 'MbsCouponEvent', 'MbsPrincipalEvent', 'BonusIssueEvent', 'MbsPrincipalWriteOffEvent', 'MbsInterestDeferralEvent', 'MbsInterestShortfallEvent', 'TenderEvent', 'CallOnIntermediateSecuritiesEvent', 'IntermediateSecuritiesDistributionEvent', 'OptionExercisePhysicalEvent', 'OptionExerciseCashEvent', 'ProtectionPayoutCashFlowEvent'):
|
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', 'CallOnIntermediateSecuritiesEvent', 'IntermediateSecuritiesDistributionEvent', 'OptionExercisePhysicalEvent', 'OptionExerciseCashEvent', 'ProtectionPayoutCashFlowEvent')")
|
52
|
+
return value
|
53
|
+
|
54
|
+
class Config:
|
55
|
+
"""Pydantic configuration"""
|
56
|
+
allow_population_by_field_name = True
|
57
|
+
validate_assignment = True
|
58
|
+
|
59
|
+
def to_str(self) -> str:
|
60
|
+
"""Returns the string representation of the model using alias"""
|
61
|
+
return pprint.pformat(self.dict(by_alias=True))
|
62
|
+
|
63
|
+
def to_json(self) -> str:
|
64
|
+
"""Returns the JSON representation of the model using alias"""
|
65
|
+
return json.dumps(self.to_dict())
|
66
|
+
|
67
|
+
@classmethod
|
68
|
+
def from_json(cls, json_str: str) -> TenderEvent:
|
69
|
+
"""Create an instance of TenderEvent from a JSON string"""
|
70
|
+
return cls.from_dict(json.loads(json_str))
|
71
|
+
|
72
|
+
def to_dict(self):
|
73
|
+
"""Returns the dictionary representation of the model using alias"""
|
74
|
+
_dict = self.dict(by_alias=True,
|
75
|
+
exclude={
|
76
|
+
"additional_properties"
|
77
|
+
},
|
78
|
+
exclude_none=True)
|
79
|
+
# override the default output from pydantic by calling `to_dict()` of new_instrument
|
80
|
+
if self.new_instrument:
|
81
|
+
_dict['newInstrument'] = self.new_instrument.to_dict()
|
82
|
+
# override the default output from pydantic by calling `to_dict()` of each item in security_offer_elections (list)
|
83
|
+
_items = []
|
84
|
+
if self.security_offer_elections:
|
85
|
+
for _item in self.security_offer_elections:
|
86
|
+
if _item:
|
87
|
+
_items.append(_item.to_dict())
|
88
|
+
_dict['securityOfferElections'] = _items
|
89
|
+
# override the default output from pydantic by calling `to_dict()` of each item in cash_and_security_offer_elections (list)
|
90
|
+
_items = []
|
91
|
+
if self.cash_and_security_offer_elections:
|
92
|
+
for _item in self.cash_and_security_offer_elections:
|
93
|
+
if _item:
|
94
|
+
_items.append(_item.to_dict())
|
95
|
+
_dict['cashAndSecurityOfferElections'] = _items
|
96
|
+
# override the default output from pydantic by calling `to_dict()` of each item in cash_offer_elections (list)
|
97
|
+
_items = []
|
98
|
+
if self.cash_offer_elections:
|
99
|
+
for _item in self.cash_offer_elections:
|
100
|
+
if _item:
|
101
|
+
_items.append(_item.to_dict())
|
102
|
+
_dict['cashOfferElections'] = _items
|
103
|
+
# puts key-value pairs in additional_properties in the top level
|
104
|
+
if self.additional_properties is not None:
|
105
|
+
for _key, _value in self.additional_properties.items():
|
106
|
+
_dict[_key] = _value
|
107
|
+
|
108
|
+
# set to None if announcement_date (nullable) is None
|
109
|
+
# and __fields_set__ contains the field
|
110
|
+
if self.announcement_date is None and "announcement_date" in self.__fields_set__:
|
111
|
+
_dict['announcementDate'] = None
|
112
|
+
|
113
|
+
# set to None if record_date (nullable) is None
|
114
|
+
# and __fields_set__ contains the field
|
115
|
+
if self.record_date is None and "record_date" in self.__fields_set__:
|
116
|
+
_dict['recordDate'] = None
|
117
|
+
|
118
|
+
# set to None if fractional_units_cash_price (nullable) is None
|
119
|
+
# and __fields_set__ contains the field
|
120
|
+
if self.fractional_units_cash_price is None and "fractional_units_cash_price" in self.__fields_set__:
|
121
|
+
_dict['fractionalUnitsCashPrice'] = None
|
122
|
+
|
123
|
+
# set to None if fractional_units_cash_currency (nullable) is None
|
124
|
+
# and __fields_set__ contains the field
|
125
|
+
if self.fractional_units_cash_currency is None and "fractional_units_cash_currency" in self.__fields_set__:
|
126
|
+
_dict['fractionalUnitsCashCurrency'] = None
|
127
|
+
|
128
|
+
# set to None if security_offer_elections (nullable) is None
|
129
|
+
# and __fields_set__ contains the field
|
130
|
+
if self.security_offer_elections is None and "security_offer_elections" in self.__fields_set__:
|
131
|
+
_dict['securityOfferElections'] = None
|
132
|
+
|
133
|
+
# set to None if cash_and_security_offer_elections (nullable) is None
|
134
|
+
# and __fields_set__ contains the field
|
135
|
+
if self.cash_and_security_offer_elections is None and "cash_and_security_offer_elections" in self.__fields_set__:
|
136
|
+
_dict['cashAndSecurityOfferElections'] = None
|
137
|
+
|
138
|
+
# set to None if cash_offer_elections (nullable) is None
|
139
|
+
# and __fields_set__ contains the field
|
140
|
+
if self.cash_offer_elections is None and "cash_offer_elections" in self.__fields_set__:
|
141
|
+
_dict['cashOfferElections'] = None
|
142
|
+
|
143
|
+
return _dict
|
144
|
+
|
145
|
+
@classmethod
|
146
|
+
def from_dict(cls, obj: dict) -> TenderEvent:
|
147
|
+
"""Create an instance of TenderEvent from a dict"""
|
148
|
+
if obj is None:
|
149
|
+
return None
|
150
|
+
|
151
|
+
if not isinstance(obj, dict):
|
152
|
+
return TenderEvent.parse_obj(obj)
|
153
|
+
|
154
|
+
_obj = TenderEvent.parse_obj({
|
155
|
+
"instrument_event_type": obj.get("instrumentEventType"),
|
156
|
+
"announcement_date": obj.get("announcementDate"),
|
157
|
+
"ex_date": obj.get("exDate"),
|
158
|
+
"record_date": obj.get("recordDate"),
|
159
|
+
"payment_date": obj.get("paymentDate"),
|
160
|
+
"new_instrument": NewInstrument.from_dict(obj.get("newInstrument")) if obj.get("newInstrument") is not None else None,
|
161
|
+
"fractional_units_cash_price": obj.get("fractionalUnitsCashPrice"),
|
162
|
+
"fractional_units_cash_currency": obj.get("fractionalUnitsCashCurrency"),
|
163
|
+
"security_offer_elections": [SecurityOfferElection.from_dict(_item) for _item in obj.get("securityOfferElections")] if obj.get("securityOfferElections") is not None else None,
|
164
|
+
"cash_and_security_offer_elections": [CashAndSecurityOfferElection.from_dict(_item) for _item in obj.get("cashAndSecurityOfferElections")] if obj.get("cashAndSecurityOfferElections") is not None else None,
|
165
|
+
"cash_offer_elections": [CashOfferElection.from_dict(_item) for _item in obj.get("cashOfferElections")] if obj.get("cashOfferElections") is not None else None
|
166
|
+
})
|
167
|
+
# store additional fields in additional_properties
|
168
|
+
for _key in obj.keys():
|
169
|
+
if _key not in cls.__properties:
|
170
|
+
_obj.additional_properties[_key] = obj.get(_key)
|
171
|
+
|
172
|
+
return _obj
|
lusid/models/term_deposit.py
CHANGED
@@ -33,15 +33,15 @@ class TermDeposit(LusidInstrument):
|
|
33
33
|
flow_convention: FlowConventions = Field(..., alias="flowConvention")
|
34
34
|
rate: Union[StrictFloat, StrictInt] = Field(..., description="The fixed rate for the term deposit. Specified as a decimal, e.g 0.03 is meant to be 3% interest")
|
35
35
|
dom_ccy: Optional[StrictStr] = Field(None, alias="domCcy", description="The domestic currency of the instrument. This should be the same as the Currency set on the FlowConventions. You do not need to populate this field for Term Deposits in LUSID as all functionality is driven by the Currency set on the FlowConventions. LUSID will not store values saved on this field.")
|
36
|
-
instrument_type: StrictStr = Field(..., alias="instrumentType", description="The available values are: QuotedSecurity, InterestRateSwap, FxForward, Future, ExoticInstrument, FxOption, CreditDefaultSwap, InterestRateSwaption, Bond, EquityOption, FixedLeg, FloatingLeg, BespokeCashFlowsLeg, Unknown, TermDeposit, ContractForDifference, EquitySwap, CashPerpetual, CapFloor, CashSettled, CdsIndex, Basket, FundingLeg, FxSwap, ForwardRateAgreement, SimpleInstrument, Repo, Equity, ExchangeTradedOption, ReferenceInstrument, ComplexBond, InflationLinkedBond, InflationSwap, SimpleCashFlowLoan, TotalReturnSwap, InflationLeg, FundShareClass, FlexibleLoan, UnsettledCash, Cash")
|
36
|
+
instrument_type: StrictStr = Field(..., alias="instrumentType", description="The available values are: QuotedSecurity, InterestRateSwap, FxForward, Future, ExoticInstrument, FxOption, CreditDefaultSwap, InterestRateSwaption, Bond, EquityOption, FixedLeg, FloatingLeg, BespokeCashFlowsLeg, Unknown, TermDeposit, ContractForDifference, EquitySwap, CashPerpetual, CapFloor, CashSettled, CdsIndex, Basket, FundingLeg, FxSwap, ForwardRateAgreement, SimpleInstrument, Repo, Equity, ExchangeTradedOption, ReferenceInstrument, ComplexBond, InflationLinkedBond, InflationSwap, SimpleCashFlowLoan, TotalReturnSwap, InflationLeg, FundShareClass, FlexibleLoan, UnsettledCash, Cash, MasteredInstrument, LoanFacility")
|
37
37
|
additional_properties: Dict[str, Any] = {}
|
38
38
|
__properties = ["instrumentType", "startDate", "maturityDate", "contractSize", "flowConvention", "rate", "domCcy"]
|
39
39
|
|
40
40
|
@validator('instrument_type')
|
41
41
|
def instrument_type_validate_enum(cls, value):
|
42
42
|
"""Validates the enum"""
|
43
|
-
if value not in ('QuotedSecurity', 'InterestRateSwap', 'FxForward', 'Future', 'ExoticInstrument', 'FxOption', 'CreditDefaultSwap', 'InterestRateSwaption', 'Bond', 'EquityOption', 'FixedLeg', 'FloatingLeg', 'BespokeCashFlowsLeg', 'Unknown', 'TermDeposit', 'ContractForDifference', 'EquitySwap', 'CashPerpetual', 'CapFloor', 'CashSettled', 'CdsIndex', 'Basket', 'FundingLeg', 'FxSwap', 'ForwardRateAgreement', 'SimpleInstrument', 'Repo', 'Equity', 'ExchangeTradedOption', 'ReferenceInstrument', 'ComplexBond', 'InflationLinkedBond', 'InflationSwap', 'SimpleCashFlowLoan', 'TotalReturnSwap', 'InflationLeg', 'FundShareClass', 'FlexibleLoan', 'UnsettledCash', 'Cash'):
|
44
|
-
raise ValueError("must be one of enum values ('QuotedSecurity', 'InterestRateSwap', 'FxForward', 'Future', 'ExoticInstrument', 'FxOption', 'CreditDefaultSwap', 'InterestRateSwaption', 'Bond', 'EquityOption', 'FixedLeg', 'FloatingLeg', 'BespokeCashFlowsLeg', 'Unknown', 'TermDeposit', 'ContractForDifference', 'EquitySwap', 'CashPerpetual', 'CapFloor', 'CashSettled', 'CdsIndex', 'Basket', 'FundingLeg', 'FxSwap', 'ForwardRateAgreement', 'SimpleInstrument', 'Repo', 'Equity', 'ExchangeTradedOption', 'ReferenceInstrument', 'ComplexBond', 'InflationLinkedBond', 'InflationSwap', 'SimpleCashFlowLoan', 'TotalReturnSwap', 'InflationLeg', 'FundShareClass', 'FlexibleLoan', 'UnsettledCash', 'Cash')")
|
43
|
+
if value not in ('QuotedSecurity', 'InterestRateSwap', 'FxForward', 'Future', 'ExoticInstrument', 'FxOption', 'CreditDefaultSwap', 'InterestRateSwaption', 'Bond', 'EquityOption', 'FixedLeg', 'FloatingLeg', 'BespokeCashFlowsLeg', 'Unknown', 'TermDeposit', 'ContractForDifference', 'EquitySwap', 'CashPerpetual', 'CapFloor', 'CashSettled', 'CdsIndex', 'Basket', 'FundingLeg', 'FxSwap', 'ForwardRateAgreement', 'SimpleInstrument', 'Repo', 'Equity', 'ExchangeTradedOption', 'ReferenceInstrument', 'ComplexBond', 'InflationLinkedBond', 'InflationSwap', 'SimpleCashFlowLoan', 'TotalReturnSwap', 'InflationLeg', 'FundShareClass', 'FlexibleLoan', 'UnsettledCash', 'Cash', 'MasteredInstrument', 'LoanFacility'):
|
44
|
+
raise ValueError("must be one of enum values ('QuotedSecurity', 'InterestRateSwap', 'FxForward', 'Future', 'ExoticInstrument', 'FxOption', 'CreditDefaultSwap', 'InterestRateSwaption', 'Bond', 'EquityOption', 'FixedLeg', 'FloatingLeg', 'BespokeCashFlowsLeg', 'Unknown', 'TermDeposit', 'ContractForDifference', 'EquitySwap', 'CashPerpetual', 'CapFloor', 'CashSettled', 'CdsIndex', 'Basket', 'FundingLeg', 'FxSwap', 'ForwardRateAgreement', 'SimpleInstrument', 'Repo', 'Equity', 'ExchangeTradedOption', 'ReferenceInstrument', 'ComplexBond', 'InflationLinkedBond', 'InflationSwap', 'SimpleCashFlowLoan', 'TotalReturnSwap', 'InflationLeg', 'FundShareClass', 'FlexibleLoan', 'UnsettledCash', 'Cash', 'MasteredInstrument', 'LoanFacility')")
|
45
45
|
return value
|
46
46
|
|
47
47
|
class Config:
|
@@ -26,21 +26,21 @@ from lusid.models.lusid_instrument import LusidInstrument
|
|
26
26
|
|
27
27
|
class TotalReturnSwap(LusidInstrument):
|
28
28
|
"""
|
29
|
-
A swap in which one party makes payments based on leg rates (fixed or floating) while the other party makes payments based on the return of an underlying instrument. The underlying instrument can be provided as an inline economic definition or as a reference instrument pointing to an already upserted instrument. A reference instrument in this case would consist of instrument scope, instrument id and instrument id type (ISIN, LUID etc.). This instrument has multiple legs, to see how legs are used in LUSID see [knowledge base article KA-02252](https://support.lusid.com/knowledgebase/article/KA-02252). | Leg Index | Leg Identifier | Description | | --------- | -------------- | ----------- | | 1 | AssetLeg | Cash flows relating to the returns generated by an underlying bond. | | 2 | FundingLeg | The funding leg of the swap. | # noqa: E501
|
29
|
+
A swap in which one party makes payments based on leg rates (fixed or floating) while the other party makes payments based on the return of an underlying instrument. The underlying instrument can be provided as an inline economic definition or as a reference instrument pointing to an already upserted instrument. A reference instrument in this case would consist of instrument scope, instrument id and instrument id type (ISIN, LUID etc.). Note that TRS currently only supports an asset of Bond or ComplexBond, no other instruments are allowed. Support for additional instrument types will be added in the future. This instrument has multiple legs, to see how legs are used in LUSID see [knowledge base article KA-02252](https://support.lusid.com/knowledgebase/article/KA-02252). | Leg Index | Leg Identifier | Description | | --------- | -------------- | ----------- | | 1 | AssetLeg | Cash flows relating to the returns generated by an underlying bond. | | 2 | FundingLeg | The funding leg of the swap. | # noqa: E501
|
30
30
|
"""
|
31
31
|
start_date: datetime = Field(..., alias="startDate", description="The start date of the instrument. This is normally synonymous with the trade-date.")
|
32
32
|
maturity_date: datetime = Field(..., alias="maturityDate", description="The final maturity date of the instrument. This means the last date on which the instruments makes a payment of any amount. For the avoidance of doubt, that is not necessarily prior to its last sensitivity date for the purposes of risk; e.g. instruments such as Constant Maturity Swaps (CMS) often have sensitivities to rates that may well be observed or set prior to the maturity date, but refer to a termination date beyond it.")
|
33
33
|
asset_leg: AssetLeg = Field(..., alias="assetLeg")
|
34
34
|
funding_leg: InstrumentLeg = Field(..., alias="fundingLeg")
|
35
|
-
instrument_type: StrictStr = Field(..., alias="instrumentType", description="The available values are: QuotedSecurity, InterestRateSwap, FxForward, Future, ExoticInstrument, FxOption, CreditDefaultSwap, InterestRateSwaption, Bond, EquityOption, FixedLeg, FloatingLeg, BespokeCashFlowsLeg, Unknown, TermDeposit, ContractForDifference, EquitySwap, CashPerpetual, CapFloor, CashSettled, CdsIndex, Basket, FundingLeg, FxSwap, ForwardRateAgreement, SimpleInstrument, Repo, Equity, ExchangeTradedOption, ReferenceInstrument, ComplexBond, InflationLinkedBond, InflationSwap, SimpleCashFlowLoan, TotalReturnSwap, InflationLeg, FundShareClass, FlexibleLoan, UnsettledCash, Cash")
|
35
|
+
instrument_type: StrictStr = Field(..., alias="instrumentType", description="The available values are: QuotedSecurity, InterestRateSwap, FxForward, Future, ExoticInstrument, FxOption, CreditDefaultSwap, InterestRateSwaption, Bond, EquityOption, FixedLeg, FloatingLeg, BespokeCashFlowsLeg, Unknown, TermDeposit, ContractForDifference, EquitySwap, CashPerpetual, CapFloor, CashSettled, CdsIndex, Basket, FundingLeg, FxSwap, ForwardRateAgreement, SimpleInstrument, Repo, Equity, ExchangeTradedOption, ReferenceInstrument, ComplexBond, InflationLinkedBond, InflationSwap, SimpleCashFlowLoan, TotalReturnSwap, InflationLeg, FundShareClass, FlexibleLoan, UnsettledCash, Cash, MasteredInstrument, LoanFacility")
|
36
36
|
additional_properties: Dict[str, Any] = {}
|
37
37
|
__properties = ["instrumentType", "startDate", "maturityDate", "assetLeg", "fundingLeg"]
|
38
38
|
|
39
39
|
@validator('instrument_type')
|
40
40
|
def instrument_type_validate_enum(cls, value):
|
41
41
|
"""Validates the enum"""
|
42
|
-
if value not in ('QuotedSecurity', 'InterestRateSwap', 'FxForward', 'Future', 'ExoticInstrument', 'FxOption', 'CreditDefaultSwap', 'InterestRateSwaption', 'Bond', 'EquityOption', 'FixedLeg', 'FloatingLeg', 'BespokeCashFlowsLeg', 'Unknown', 'TermDeposit', 'ContractForDifference', 'EquitySwap', 'CashPerpetual', 'CapFloor', 'CashSettled', 'CdsIndex', 'Basket', 'FundingLeg', 'FxSwap', 'ForwardRateAgreement', 'SimpleInstrument', 'Repo', 'Equity', 'ExchangeTradedOption', 'ReferenceInstrument', 'ComplexBond', 'InflationLinkedBond', 'InflationSwap', 'SimpleCashFlowLoan', 'TotalReturnSwap', 'InflationLeg', 'FundShareClass', 'FlexibleLoan', 'UnsettledCash', 'Cash'):
|
43
|
-
raise ValueError("must be one of enum values ('QuotedSecurity', 'InterestRateSwap', 'FxForward', 'Future', 'ExoticInstrument', 'FxOption', 'CreditDefaultSwap', 'InterestRateSwaption', 'Bond', 'EquityOption', 'FixedLeg', 'FloatingLeg', 'BespokeCashFlowsLeg', 'Unknown', 'TermDeposit', 'ContractForDifference', 'EquitySwap', 'CashPerpetual', 'CapFloor', 'CashSettled', 'CdsIndex', 'Basket', 'FundingLeg', 'FxSwap', 'ForwardRateAgreement', 'SimpleInstrument', 'Repo', 'Equity', 'ExchangeTradedOption', 'ReferenceInstrument', 'ComplexBond', 'InflationLinkedBond', 'InflationSwap', 'SimpleCashFlowLoan', 'TotalReturnSwap', 'InflationLeg', 'FundShareClass', 'FlexibleLoan', 'UnsettledCash', 'Cash')")
|
42
|
+
if value not in ('QuotedSecurity', 'InterestRateSwap', 'FxForward', 'Future', 'ExoticInstrument', 'FxOption', 'CreditDefaultSwap', 'InterestRateSwaption', 'Bond', 'EquityOption', 'FixedLeg', 'FloatingLeg', 'BespokeCashFlowsLeg', 'Unknown', 'TermDeposit', 'ContractForDifference', 'EquitySwap', 'CashPerpetual', 'CapFloor', 'CashSettled', 'CdsIndex', 'Basket', 'FundingLeg', 'FxSwap', 'ForwardRateAgreement', 'SimpleInstrument', 'Repo', 'Equity', 'ExchangeTradedOption', 'ReferenceInstrument', 'ComplexBond', 'InflationLinkedBond', 'InflationSwap', 'SimpleCashFlowLoan', 'TotalReturnSwap', 'InflationLeg', 'FundShareClass', 'FlexibleLoan', 'UnsettledCash', 'Cash', 'MasteredInstrument', 'LoanFacility'):
|
43
|
+
raise ValueError("must be one of enum values ('QuotedSecurity', 'InterestRateSwap', 'FxForward', 'Future', 'ExoticInstrument', 'FxOption', 'CreditDefaultSwap', 'InterestRateSwaption', 'Bond', 'EquityOption', 'FixedLeg', 'FloatingLeg', 'BespokeCashFlowsLeg', 'Unknown', 'TermDeposit', 'ContractForDifference', 'EquitySwap', 'CashPerpetual', 'CapFloor', 'CashSettled', 'CdsIndex', 'Basket', 'FundingLeg', 'FxSwap', 'ForwardRateAgreement', 'SimpleInstrument', 'Repo', 'Equity', 'ExchangeTradedOption', 'ReferenceInstrument', 'ComplexBond', 'InflationLinkedBond', 'InflationSwap', 'SimpleCashFlowLoan', 'TotalReturnSwap', 'InflationLeg', 'FundShareClass', 'FlexibleLoan', 'UnsettledCash', 'Cash', 'MasteredInstrument', 'LoanFacility')")
|
44
44
|
return value
|
45
45
|
|
46
46
|
class Config:
|
lusid/models/transaction.py
CHANGED
@@ -53,7 +53,8 @@ class Transaction(BaseModel):
|
|
53
53
|
order_id: Optional[ResourceId] = Field(None, alias="orderId")
|
54
54
|
allocation_id: Optional[ResourceId] = Field(None, alias="allocationId")
|
55
55
|
custodian_account: Optional[CustodianAccount] = Field(None, alias="custodianAccount")
|
56
|
-
|
56
|
+
transaction_group_id: Optional[StrictStr] = Field(None, alias="transactionGroupId", description="The identifier for grouping economic events across multiple transactions")
|
57
|
+
__properties = ["transactionId", "type", "instrumentIdentifiers", "instrumentScope", "instrumentUid", "transactionDate", "settlementDate", "units", "transactionPrice", "totalConsideration", "exchangeRate", "transactionCurrency", "properties", "counterpartyId", "source", "entryDateTime", "otcConfirmation", "transactionStatus", "cancelDateTime", "orderId", "allocationId", "custodianAccount", "transactionGroupId"]
|
57
58
|
|
58
59
|
@validator('transaction_status')
|
59
60
|
def transaction_status_validate_enum(cls, value):
|
@@ -154,6 +155,11 @@ class Transaction(BaseModel):
|
|
154
155
|
if self.cancel_date_time is None and "cancel_date_time" in self.__fields_set__:
|
155
156
|
_dict['cancelDateTime'] = None
|
156
157
|
|
158
|
+
# set to None if transaction_group_id (nullable) is None
|
159
|
+
# and __fields_set__ contains the field
|
160
|
+
if self.transaction_group_id is None and "transaction_group_id" in self.__fields_set__:
|
161
|
+
_dict['transactionGroupId'] = None
|
162
|
+
|
157
163
|
return _dict
|
158
164
|
|
159
165
|
@classmethod
|
@@ -192,6 +198,7 @@ class Transaction(BaseModel):
|
|
192
198
|
"cancel_date_time": obj.get("cancelDateTime"),
|
193
199
|
"order_id": ResourceId.from_dict(obj.get("orderId")) if obj.get("orderId") is not None else None,
|
194
200
|
"allocation_id": ResourceId.from_dict(obj.get("allocationId")) if obj.get("allocationId") is not None else None,
|
195
|
-
"custodian_account": CustodianAccount.from_dict(obj.get("custodianAccount")) if obj.get("custodianAccount") is not None else None
|
201
|
+
"custodian_account": CustodianAccount.from_dict(obj.get("custodianAccount")) if obj.get("custodianAccount") is not None else None,
|
202
|
+
"transaction_group_id": obj.get("transactionGroupId")
|
196
203
|
})
|
197
204
|
return _obj
|
@@ -0,0 +1,85 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
|
3
|
+
"""
|
4
|
+
LUSID API
|
5
|
+
|
6
|
+
FINBOURNE Technology # noqa: E501
|
7
|
+
|
8
|
+
Contact: info@finbourne.com
|
9
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
10
|
+
|
11
|
+
Do not edit the class manually.
|
12
|
+
"""
|
13
|
+
|
14
|
+
|
15
|
+
from __future__ import annotations
|
16
|
+
import pprint
|
17
|
+
import re # noqa: F401
|
18
|
+
import json
|
19
|
+
|
20
|
+
|
21
|
+
from typing import Any, Dict
|
22
|
+
from pydantic.v1 import BaseModel, Field, constr, validator
|
23
|
+
|
24
|
+
class TransactionDateWindows(BaseModel):
|
25
|
+
"""
|
26
|
+
TransactionDateWindows
|
27
|
+
"""
|
28
|
+
left: constr(strict=True, max_length=30, min_length=2) = Field(..., description="Transaction Date Window for the left side of a reconciliation")
|
29
|
+
right: constr(strict=True, max_length=30, min_length=2) = Field(..., description="Transaction Date Window for the right side of a reconciliation")
|
30
|
+
__properties = ["left", "right"]
|
31
|
+
|
32
|
+
@validator('left')
|
33
|
+
def left_validate_regular_expression(cls, value):
|
34
|
+
"""Validates the regular expression"""
|
35
|
+
if not re.match(r"^P(?!$)((\d+Y)|(\d+\.\d+Y$))?((\d+M)|(\d+\.\d+M$))?((\d+W)|(\d+\.\d+W$))?((\d+D)|(\d+\.\d+D$))?(T(?=\d)((\d+H)|(\d+\.\d+H$))?((\d+M)|(\d+\.\d+M$))?(\d+(\.\d+)?S)?)??$", value):
|
36
|
+
raise ValueError(r"must validate the regular expression /^P(?!$)((\d+Y)|(\d+\.\d+Y$))?((\d+M)|(\d+\.\d+M$))?((\d+W)|(\d+\.\d+W$))?((\d+D)|(\d+\.\d+D$))?(T(?=\d)((\d+H)|(\d+\.\d+H$))?((\d+M)|(\d+\.\d+M$))?(\d+(\.\d+)?S)?)??$/")
|
37
|
+
return value
|
38
|
+
|
39
|
+
@validator('right')
|
40
|
+
def right_validate_regular_expression(cls, value):
|
41
|
+
"""Validates the regular expression"""
|
42
|
+
if not re.match(r"^P(?!$)((\d+Y)|(\d+\.\d+Y$))?((\d+M)|(\d+\.\d+M$))?((\d+W)|(\d+\.\d+W$))?((\d+D)|(\d+\.\d+D$))?(T(?=\d)((\d+H)|(\d+\.\d+H$))?((\d+M)|(\d+\.\d+M$))?(\d+(\.\d+)?S)?)??$", value):
|
43
|
+
raise ValueError(r"must validate the regular expression /^P(?!$)((\d+Y)|(\d+\.\d+Y$))?((\d+M)|(\d+\.\d+M$))?((\d+W)|(\d+\.\d+W$))?((\d+D)|(\d+\.\d+D$))?(T(?=\d)((\d+H)|(\d+\.\d+H$))?((\d+M)|(\d+\.\d+M$))?(\d+(\.\d+)?S)?)??$/")
|
44
|
+
return value
|
45
|
+
|
46
|
+
class Config:
|
47
|
+
"""Pydantic configuration"""
|
48
|
+
allow_population_by_field_name = True
|
49
|
+
validate_assignment = True
|
50
|
+
|
51
|
+
def to_str(self) -> str:
|
52
|
+
"""Returns the string representation of the model using alias"""
|
53
|
+
return pprint.pformat(self.dict(by_alias=True))
|
54
|
+
|
55
|
+
def to_json(self) -> str:
|
56
|
+
"""Returns the JSON representation of the model using alias"""
|
57
|
+
return json.dumps(self.to_dict())
|
58
|
+
|
59
|
+
@classmethod
|
60
|
+
def from_json(cls, json_str: str) -> TransactionDateWindows:
|
61
|
+
"""Create an instance of TransactionDateWindows from a JSON string"""
|
62
|
+
return cls.from_dict(json.loads(json_str))
|
63
|
+
|
64
|
+
def to_dict(self):
|
65
|
+
"""Returns the dictionary representation of the model using alias"""
|
66
|
+
_dict = self.dict(by_alias=True,
|
67
|
+
exclude={
|
68
|
+
},
|
69
|
+
exclude_none=True)
|
70
|
+
return _dict
|
71
|
+
|
72
|
+
@classmethod
|
73
|
+
def from_dict(cls, obj: dict) -> TransactionDateWindows:
|
74
|
+
"""Create an instance of TransactionDateWindows from a dict"""
|
75
|
+
if obj is None:
|
76
|
+
return None
|
77
|
+
|
78
|
+
if not isinstance(obj, dict):
|
79
|
+
return TransactionDateWindows.parse_obj(obj)
|
80
|
+
|
81
|
+
_obj = TransactionDateWindows.parse_obj({
|
82
|
+
"left": obj.get("left"),
|
83
|
+
"right": obj.get("right")
|
84
|
+
})
|
85
|
+
return _obj
|
@@ -26,7 +26,7 @@ class TransactionPrice(BaseModel):
|
|
26
26
|
TransactionPrice
|
27
27
|
"""
|
28
28
|
price: Optional[Union[StrictFloat, StrictInt]] = None
|
29
|
-
type: Optional[StrictStr] = Field(None, description="The available values are: Price, Yield, Spread, CashFlowPerUnit")
|
29
|
+
type: Optional[StrictStr] = Field(None, description="The available values are: Price, Yield, Spread, CashFlowPerUnit, CleanPrice, DirtyPrice")
|
30
30
|
__properties = ["price", "type"]
|
31
31
|
|
32
32
|
@validator('type')
|
@@ -35,8 +35,8 @@ class TransactionPrice(BaseModel):
|
|
35
35
|
if value is None:
|
36
36
|
return value
|
37
37
|
|
38
|
-
if value not in ('Price', 'Yield', 'Spread', 'CashFlowPerUnit'):
|
39
|
-
raise ValueError("must be one of enum values ('Price', 'Yield', 'Spread', 'CashFlowPerUnit')")
|
38
|
+
if value not in ('Price', 'Yield', 'Spread', 'CashFlowPerUnit', 'CleanPrice', 'DirtyPrice'):
|
39
|
+
raise ValueError("must be one of enum values ('Price', 'Yield', 'Spread', 'CashFlowPerUnit', 'CleanPrice', 'DirtyPrice')")
|
40
40
|
return value
|
41
41
|
|
42
42
|
class Config:
|
@@ -47,7 +47,8 @@ class TransactionRequest(BaseModel):
|
|
47
47
|
order_id: Optional[ResourceId] = Field(None, alias="orderId")
|
48
48
|
allocation_id: Optional[ResourceId] = Field(None, alias="allocationId")
|
49
49
|
custodian_account_id: Optional[ResourceId] = Field(None, alias="custodianAccountId")
|
50
|
-
|
50
|
+
transaction_group_id: Optional[constr(strict=True, max_length=64, min_length=1)] = Field(None, alias="transactionGroupId", description="The identifier for grouping economic events across multiple transactions")
|
51
|
+
__properties = ["transactionId", "type", "instrumentIdentifiers", "transactionDate", "settlementDate", "units", "transactionPrice", "totalConsideration", "exchangeRate", "transactionCurrency", "properties", "counterpartyId", "source", "otcConfirmation", "orderId", "allocationId", "custodianAccountId", "transactionGroupId"]
|
51
52
|
|
52
53
|
class Config:
|
53
54
|
"""Pydantic configuration"""
|
@@ -123,6 +124,11 @@ class TransactionRequest(BaseModel):
|
|
123
124
|
if self.source is None and "source" in self.__fields_set__:
|
124
125
|
_dict['source'] = None
|
125
126
|
|
127
|
+
# set to None if transaction_group_id (nullable) is None
|
128
|
+
# and __fields_set__ contains the field
|
129
|
+
if self.transaction_group_id is None and "transaction_group_id" in self.__fields_set__:
|
130
|
+
_dict['transactionGroupId'] = None
|
131
|
+
|
126
132
|
return _dict
|
127
133
|
|
128
134
|
@classmethod
|
@@ -156,6 +162,7 @@ class TransactionRequest(BaseModel):
|
|
156
162
|
"otc_confirmation": OtcConfirmation.from_dict(obj.get("otcConfirmation")) if obj.get("otcConfirmation") is not None else None,
|
157
163
|
"order_id": ResourceId.from_dict(obj.get("orderId")) if obj.get("orderId") is not None else None,
|
158
164
|
"allocation_id": ResourceId.from_dict(obj.get("allocationId")) if obj.get("allocationId") is not None else None,
|
159
|
-
"custodian_account_id": ResourceId.from_dict(obj.get("custodianAccountId")) if obj.get("custodianAccountId") is not None else None
|
165
|
+
"custodian_account_id": ResourceId.from_dict(obj.get("custodianAccountId")) if obj.get("custodianAccountId") is not None else None,
|
166
|
+
"transaction_group_id": obj.get("transactionGroupId")
|
160
167
|
})
|
161
168
|
return _obj
|