lusid-sdk 2.0.50b0__py3-none-any.whl → 2.0.430__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of lusid-sdk might be problematic. Click here for more details.
- lusid/__init__.py +92 -13
- lusid/api/__init__.py +2 -0
- lusid/api/abor_api.py +513 -179
- lusid/api/abor_configuration_api.py +25 -24
- lusid/api/allocations_api.py +12 -20
- lusid/api/blocks_api.py +6 -6
- lusid/api/calendars_api.py +16 -24
- lusid/api/chart_of_accounts_api.py +1745 -441
- lusid/api/compliance_api.py +71 -62
- lusid/api/configuration_recipe_api.py +1198 -56
- lusid/api/corporate_action_sources_api.py +8 -8
- lusid/api/custom_entities_api.py +6 -6
- lusid/api/cut_label_definitions_api.py +9 -17
- lusid/api/data_types_api.py +16 -32
- lusid/api/executions_api.py +6 -6
- lusid/api/funds_api.py +944 -0
- lusid/api/instrument_event_types_api.py +1287 -0
- lusid/api/instruments_api.py +12 -20
- lusid/api/legacy_compliance_api.py +12 -12
- lusid/api/legal_entities_api.py +12 -12
- lusid/api/order_graph_api.py +12 -12
- lusid/api/order_instructions_api.py +6 -6
- lusid/api/order_management_api.py +495 -14
- lusid/api/orders_api.py +16 -24
- lusid/api/packages_api.py +6 -6
- lusid/api/persons_api.py +16 -24
- lusid/api/placements_api.py +12 -12
- lusid/api/portfolio_groups_api.py +6 -6
- lusid/api/portfolios_api.py +23 -39
- lusid/api/property_definitions_api.py +205 -0
- lusid/api/quotes_api.py +20 -36
- lusid/api/reconciliations_api.py +410 -1978
- lusid/api/schemas_api.py +7 -15
- lusid/api/scopes_api.py +151 -0
- lusid/api/scripted_translation_api.py +30 -28
- lusid/api/transaction_configuration_api.py +22 -22
- lusid/api/transaction_portfolios_api.py +282 -577
- lusid/api_client.py +5 -3
- lusid/configuration.py +1 -1
- lusid/extensions/__init__.py +1 -9
- lusid/extensions/api_client.py +3 -1
- lusid/extensions/api_client_factory.py +156 -45
- lusid/extensions/api_configuration.py +124 -15
- lusid/extensions/configuration_loaders.py +2 -4
- lusid/extensions/proxy_config.py +8 -5
- lusid/extensions/socket_keep_alive.py +14 -15
- lusid/extensions/tcp_keep_alive_connector.py +93 -46
- lusid/models/__init__.py +90 -13
- lusid/models/abor.py +9 -2
- lusid/models/abor_configuration.py +8 -8
- lusid/models/abor_configuration_request.py +9 -9
- lusid/models/abor_request.py +1 -1
- lusid/models/account.py +6 -1
- lusid/models/accumulation_event.py +104 -0
- lusid/models/address_key_compliance_parameter.py +5 -12
- lusid/models/address_key_list_compliance_parameter.py +3 -3
- lusid/models/address_key_option_definition.py +3 -1
- lusid/models/amortisation_event.py +4 -6
- lusid/models/{underlying_leg.py → asset_leg.py} +15 -15
- lusid/models/basket.py +3 -3
- lusid/models/block_and_order_id_request.py +78 -0
- lusid/models/block_and_orders.py +83 -0
- lusid/models/block_and_orders_create_request.py +77 -0
- lusid/models/block_and_orders_request.py +134 -0
- lusid/models/blocked_order_request.py +130 -0
- lusid/models/bond.py +13 -6
- lusid/models/bond_coupon_event.py +97 -0
- lusid/models/bond_default_event.py +8 -18
- lusid/models/bond_principal_event.py +97 -0
- lusid/models/book_transactions_request.py +97 -0
- lusid/models/bool_compliance_parameter.py +3 -3
- lusid/models/bool_list_compliance_parameter.py +3 -3
- lusid/models/branch_step.py +101 -0
- lusid/models/cap_floor.py +3 -3
- lusid/models/cash_dividend_event.py +32 -10
- lusid/models/cash_election.py +91 -0
- lusid/models/cash_flow_event.py +5 -7
- lusid/models/cash_perpetual.py +3 -3
- lusid/models/cds_flow_conventions.py +1 -1
- lusid/models/cds_index.py +4 -4
- lusid/models/check_step.py +110 -0
- lusid/models/cleardown_module_details.py +95 -0
- lusid/models/cleardown_module_request.py +117 -0
- lusid/models/cleardown_module_response.py +139 -0
- lusid/models/cleardown_module_rule.py +94 -0
- lusid/models/{reconciliation_run_break.py → cleardown_module_rules_updated_response.py} +30 -36
- lusid/models/close_event.py +3 -3
- lusid/models/close_period_diary_entry_request.py +149 -0
- lusid/models/complete_portfolio.py +8 -1
- lusid/models/complex_bond.py +4 -4
- lusid/models/complex_market_data.py +6 -5
- lusid/models/compliance_parameter.py +8 -5
- lusid/models/compliance_parameter_type.py +3 -0
- lusid/models/compliance_rule_breakdown.py +16 -8
- lusid/models/compliance_rule_breakdown_request.py +12 -4
- lusid/models/compliance_rule_result_v2.py +85 -0
- lusid/models/compliance_step.py +99 -0
- lusid/models/compliance_step_type.py +42 -0
- lusid/models/compliance_summary_rule_result.py +12 -15
- lusid/models/compliance_summary_rule_result_request.py +12 -15
- lusid/models/compliance_template_variation.py +12 -2
- lusid/models/component_transaction.py +92 -0
- lusid/models/composite_dispersion.py +30 -5
- lusid/models/compounding.py +4 -4
- lusid/models/configuration_recipe.py +10 -19
- lusid/models/constant_volatility_surface.py +102 -0
- lusid/models/contract_for_difference.py +3 -3
- lusid/models/create_derived_property_definition_request.py +3 -3
- lusid/models/create_derived_transaction_portfolio_request.py +10 -3
- lusid/models/create_property_definition_request.py +12 -5
- lusid/models/create_trade_tickets_response.py +87 -0
- lusid/models/create_transaction_portfolio_request.py +16 -3
- lusid/models/credit_default_swap.py +4 -4
- lusid/models/credit_spread_curve_data.py +4 -4
- lusid/models/custom_entity_definition.py +8 -2
- lusid/models/custom_entity_type.py +8 -2
- lusid/models/cut_label_definition.py +7 -1
- lusid/models/data_type.py +7 -1
- lusid/models/data_type_summary.py +8 -2
- lusid/models/date_time_compliance_parameter.py +3 -3
- lusid/models/date_time_list_compliance_parameter.py +3 -3
- lusid/models/{upsert_reconciliation_run_request.py → day_month.py} +15 -15
- lusid/models/decimal_compliance_parameter.py +3 -3
- lusid/models/decimal_list_compliance_parameter.py +3 -3
- lusid/models/dialect.py +9 -3
- lusid/models/diary_entry.py +1 -1
- lusid/models/diary_entry_request.py +1 -1
- lusid/models/discount_factor_curve_data.py +3 -3
- lusid/models/dividend_option_event.py +129 -0
- lusid/models/dividend_reinvestment_event.py +122 -0
- lusid/models/election_specification.py +73 -0
- lusid/models/eligibility_calculation.py +71 -0
- lusid/models/empty_model_options.py +3 -3
- lusid/models/equity.py +8 -6
- lusid/models/equity_curve_by_prices_data.py +3 -3
- lusid/models/equity_model_options.py +3 -3
- lusid/models/equity_option.py +3 -3
- lusid/models/equity_swap.py +4 -4
- lusid/models/equity_vol_surface_data.py +3 -3
- lusid/models/exchange_traded_option.py +3 -3
- lusid/models/exercise_event.py +5 -7
- lusid/models/exotic_instrument.py +3 -3
- lusid/models/filter_predicate_compliance_parameter.py +91 -0
- lusid/models/filter_step.py +101 -0
- lusid/models/fixed_leg.py +3 -3
- lusid/models/fixed_schedule.py +4 -9
- lusid/models/flexible_loan.py +105 -0
- lusid/models/float_schedule.py +20 -12
- lusid/models/floating_leg.py +3 -3
- lusid/models/flow_convention_name.py +1 -1
- lusid/models/flow_conventions.py +1 -1
- lusid/models/forward_rate_agreement.py +3 -3
- lusid/models/from_recipe.py +81 -0
- lusid/models/fund.py +182 -0
- lusid/models/fund_properties.py +115 -0
- lusid/models/fund_request.py +165 -0
- lusid/models/fund_share_class.py +99 -0
- lusid/models/funding_leg.py +3 -3
- lusid/models/funding_leg_options.py +3 -3
- lusid/models/future.py +3 -3
- lusid/models/fx_conventions.py +73 -0
- lusid/models/fx_forward.py +8 -6
- lusid/models/fx_forward_curve_by_quote_reference.py +4 -4
- lusid/models/fx_forward_curve_data.py +3 -3
- lusid/models/fx_forward_model_options.py +3 -3
- lusid/models/fx_forward_pips_curve_data.py +3 -3
- lusid/models/fx_forward_settlement_event.py +136 -0
- lusid/models/fx_forward_tenor_curve_data.py +4 -4
- lusid/models/fx_forward_tenor_pips_curve_data.py +4 -4
- lusid/models/fx_linked_notional_schedule.py +108 -0
- lusid/models/fx_option.py +3 -3
- lusid/models/fx_rate_schedule.py +3 -3
- lusid/models/fx_swap.py +4 -4
- lusid/models/fx_vol_surface_data.py +3 -3
- lusid/models/{reconciliation_run.py → get_recipe_composer_response.py} +15 -15
- lusid/models/group_by_selector_compliance_parameter.py +91 -0
- lusid/models/group_by_step.py +101 -0
- lusid/models/group_filter_predicate_compliance_parameter.py +91 -0
- lusid/models/group_filter_step.py +110 -0
- lusid/models/group_of_market_data_key_rules.py +79 -0
- lusid/models/index_convention.py +1 -1
- lusid/models/index_model_options.py +3 -3
- lusid/models/inflation_index_conventions.py +2 -2
- lusid/models/inflation_leg.py +3 -3
- lusid/models/inflation_linked_bond.py +3 -3
- lusid/models/inflation_swap.py +4 -4
- lusid/models/informational_error_event.py +3 -3
- lusid/models/informational_event.py +4 -6
- lusid/models/instrument_event.py +12 -5
- lusid/models/instrument_event_configuration.py +74 -0
- lusid/models/instrument_event_holder.py +12 -3
- lusid/models/instrument_event_type.py +7 -0
- lusid/models/instrument_leg.py +3 -3
- lusid/models/instrument_list_compliance_parameter.py +3 -3
- lusid/models/instrument_payment_diary_leg.py +5 -3
- lusid/models/instrument_resolution_detail.py +105 -0
- lusid/models/instrument_type.py +2 -0
- lusid/models/interest_rate_swap.py +4 -4
- lusid/models/interest_rate_swaption.py +3 -3
- lusid/models/intermediate_compliance_step.py +110 -0
- lusid/models/ir_vol_cube_data.py +3 -3
- lusid/models/journal_entry_line.py +34 -3
- lusid/models/journal_entry_lines_query_parameters.py +1 -1
- lusid/models/label_value_set.py +1 -1
- lusid/models/leg_definition.py +16 -3
- lusid/models/lineage_member.py +87 -0
- lusid/models/lock_period_diary_entry_request.py +91 -0
- lusid/models/lusid_instrument.py +7 -5
- lusid/models/lusid_trade_ticket.py +8 -1
- lusid/models/market_context.py +17 -2
- lusid/models/market_data_type.py +1 -0
- lusid/models/maturity_event.py +91 -0
- lusid/models/model_options.py +5 -6
- lusid/models/model_options_type.py +0 -1
- lusid/models/model_selection.py +3 -3
- lusid/models/move_orders_to_different_blocks_request.py +77 -0
- lusid/models/moved_order_to_different_block_response.py +85 -0
- lusid/models/movement_type.py +2 -0
- lusid/models/multi_currency_amounts.py +71 -0
- lusid/models/opaque_market_data.py +3 -3
- lusid/models/opaque_model_options.py +3 -3
- lusid/models/open_event.py +3 -3
- lusid/models/optionality_schedule.py +3 -3
- lusid/models/order_graph_block.py +4 -2
- lusid/models/order_graph_block_order_detail.py +16 -2
- lusid/models/paged_resource_list_of_cleardown_module_response.py +113 -0
- lusid/models/{paged_resource_list_of_reconciliation_run_break.py → paged_resource_list_of_cleardown_module_rule.py} +11 -11
- lusid/models/{paged_resource_list_of_reconciliation_run.py → paged_resource_list_of_fund.py} +11 -11
- lusid/models/paged_resource_list_of_property_definition.py +113 -0
- lusid/models/paged_resource_list_of_transaction_template.py +113 -0
- lusid/models/paged_resource_list_of_transaction_template_specification.py +113 -0
- lusid/models/participation_request.py +3 -9
- lusid/models/performance_returns_metric.py +1 -1
- lusid/models/period_diary_entries_reopened_response.py +104 -0
- lusid/models/place_blocks_request.py +77 -0
- lusid/models/portfolio.py +15 -2
- lusid/models/portfolio_details.py +15 -2
- lusid/models/portfolio_group_id_compliance_parameter.py +3 -3
- lusid/models/portfolio_group_id_list_compliance_parameter.py +3 -3
- lusid/models/portfolio_holding.py +27 -2
- lusid/models/portfolio_id_compliance_parameter.py +3 -3
- lusid/models/portfolio_id_list_compliance_parameter.py +3 -3
- lusid/models/posting_module_rule.py +29 -4
- lusid/models/pricing_model.py +2 -1
- lusid/models/property_definition.py +17 -4
- lusid/models/property_definition_search_result.py +3 -3
- lusid/models/property_domain.py +2 -0
- lusid/models/property_key_compliance_parameter.py +3 -3
- lusid/models/property_key_list_compliance_parameter.py +3 -3
- lusid/models/raw_vendor_event.py +5 -7
- lusid/models/re_open_period_diary_entry_request.py +84 -0
- lusid/models/recipe_block.py +87 -0
- lusid/models/recipe_composer.py +100 -0
- lusid/models/{reconciliation_break_id.py → recipe_value.py} +22 -23
- lusid/models/recombine_step.py +101 -0
- lusid/models/reference_instrument.py +3 -3
- lusid/models/relative_date_offset.py +71 -0
- lusid/models/repo.py +3 -3
- lusid/models/reset_event.py +4 -6
- lusid/models/resource_list_of_block_and_orders.py +113 -0
- lusid/models/resource_list_of_get_recipe_composer_response.py +113 -0
- lusid/models/resource_list_of_moved_order_to_different_block_response.py +113 -0
- lusid/models/schedule.py +6 -5
- lusid/models/schedule_type.py +1 -0
- lusid/models/script_map_reference.py +94 -0
- lusid/models/security_election.py +86 -0
- lusid/models/side_definition.py +1 -8
- lusid/models/sides_definition_request.py +1 -8
- lusid/models/simple_cash_flow_loan.py +3 -3
- lusid/models/simple_instrument.py +3 -3
- lusid/models/step_schedule.py +3 -3
- lusid/models/stock_split_event.py +3 -3
- lusid/models/string_compliance_parameter.py +3 -3
- lusid/models/string_list_compliance_parameter.py +3 -3
- lusid/models/template_field.py +77 -0
- lusid/models/term_deposit.py +3 -3
- lusid/models/total_return_swap.py +16 -16
- lusid/models/transaction_configuration_movement_data.py +3 -3
- lusid/models/transaction_configuration_movement_data_request.py +3 -3
- lusid/models/transaction_currency_and_amount.py +81 -0
- lusid/models/transaction_field_map.py +97 -0
- lusid/models/transaction_price.py +3 -3
- lusid/models/transaction_price_and_type.py +81 -0
- lusid/models/transaction_price_type.py +1 -0
- lusid/models/transaction_property_map.py +80 -0
- lusid/models/transaction_template.py +100 -0
- lusid/models/transaction_template_request.py +79 -0
- lusid/models/transaction_template_specification.py +99 -0
- lusid/models/transaction_type_alias.py +0 -7
- lusid/models/transaction_type_calculation.py +1 -1
- lusid/models/transition_event.py +3 -3
- lusid/models/translation_context.py +75 -0
- lusid/models/translation_script.py +9 -3
- lusid/models/trial_balance.py +46 -11
- lusid/models/trial_balance_query_parameters.py +15 -6
- lusid/models/trigger_event.py +3 -3
- lusid/models/units_ratio.py +71 -0
- lusid/models/{compliance_run_summary.py → upsert_compliance_run_summary_result.py} +8 -8
- lusid/models/upsert_dialect_request.py +79 -0
- lusid/models/upsert_instrument_event_request.py +12 -3
- lusid/models/upsert_quote_request.py +1 -1
- lusid/models/upsert_recipe_composer_request.py +73 -0
- lusid/models/upsert_recipe_request.py +3 -9
- lusid/models/upsert_translation_script_request.py +75 -0
- lusid/models/valuation_schedule.py +10 -3
- lusid/models/weighted_instrument.py +13 -2
- lusid/models/weighted_instrument_in_line_lookup_identifiers.py +89 -0
- lusid/models/yield_curve_data.py +3 -3
- {lusid_sdk-2.0.50b0.dist-info → lusid_sdk-2.0.430.dist-info}/METADATA +227 -48
- {lusid_sdk-2.0.50b0.dist-info → lusid_sdk-2.0.430.dist-info}/RECORD +311 -233
- {lusid_sdk-2.0.50b0.dist-info → lusid_sdk-2.0.430.dist-info}/WHEEL +1 -1
- lusid/extensions/api_client_builder.py +0 -138
- lusid/models/configuration_recipe_snippet.py +0 -139
- lusid/models/je_lines_query_parameters.py +0 -105
- lusid/models/look_up_pricing_model_options.py +0 -93
- lusid/models/reconciliation_run_id.py +0 -85
- lusid/models/upsert_reconciliation_break_request.py +0 -98
|
@@ -26,7 +26,7 @@ from lusid.models.lusid_instrument import LusidInstrument
|
|
|
26
26
|
|
|
27
27
|
class InterestRateSwap(LusidInstrument):
|
|
28
28
|
"""
|
|
29
|
-
LUSID representation of an Interest Rate Swap, including: * Vanilla (single currency fixed-float non-amortising) * CrossCurrency (>1 currency is used by the swap legs) * Basis (single currency, floating-floating legs of different tenors) * Amortising (the swap has 1+ leg with amortised notional) # noqa: E501
|
|
29
|
+
LUSID representation of an Interest Rate Swap, including: * Vanilla (single currency fixed-float non-amortising) * CrossCurrency (>1 currency is used by the swap legs) * Basis (single currency, floating-floating legs of different tenors) * Amortising (the swap has 1+ leg with amortised notional) 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 | Pay/Receive | Cash flows representing the pay/receive leg. | | 2 | Receive/Pay | Cash flows representing the receive/pay leg. | | 3 | AdditionalPayments | Cash flows relating to any additional payments (optional). | # 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.")
|
|
@@ -34,15 +34,15 @@ class InterestRateSwap(LusidInstrument):
|
|
|
34
34
|
legs: conlist(InstrumentLeg) = Field(..., description="The set of instrument legs that define the swap instrument, these should be FloatingLeg or FixedLeg.")
|
|
35
35
|
settlement_ccy: Optional[StrictStr] = Field(None, alias="settlementCcy", description="Settlement currency if IRS is non-deliverable.")
|
|
36
36
|
additional_payments: Optional[conlist(AdditionalPayment)] = Field(None, alias="additionalPayments", description="Optional additional payments at a given date e.g. to level off an uneven fixed-floating swap. The dates must be distinct and either all payments are Pay or all payments are receive")
|
|
37
|
-
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")
|
|
37
|
+
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")
|
|
38
38
|
additional_properties: Dict[str, Any] = {}
|
|
39
39
|
__properties = ["instrumentType", "startDate", "maturityDate", "isNonDeliverable", "legs", "settlementCcy", "additionalPayments"]
|
|
40
40
|
|
|
41
41
|
@validator('instrument_type')
|
|
42
42
|
def instrument_type_validate_enum(cls, value):
|
|
43
43
|
"""Validates the enum"""
|
|
44
|
-
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'):
|
|
45
|
-
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')")
|
|
44
|
+
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'):
|
|
45
|
+
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')")
|
|
46
46
|
return value
|
|
47
47
|
|
|
48
48
|
class Config:
|
|
@@ -33,15 +33,15 @@ class InterestRateSwaption(LusidInstrument):
|
|
|
33
33
|
premium: Optional[Premium] = None
|
|
34
34
|
delivery_method: constr(strict=True, min_length=1) = Field(..., alias="deliveryMethod", description="How does the option settle Supported string (enumeration) values are: [Cash, Physical].")
|
|
35
35
|
swap: InterestRateSwap = 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")
|
|
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")
|
|
37
37
|
additional_properties: Dict[str, Any] = {}
|
|
38
38
|
__properties = ["instrumentType", "startDate", "payOrReceiveFixed", "premium", "deliveryMethod", "swap"]
|
|
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'):
|
|
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')")
|
|
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'):
|
|
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')")
|
|
45
45
|
return value
|
|
46
46
|
|
|
47
47
|
class Config:
|
|
@@ -0,0 +1,110 @@
|
|
|
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
|
|
22
|
+
from pydantic import Field, StrictStr, conlist, constr, validator
|
|
23
|
+
from lusid.models.compliance_step import ComplianceStep
|
|
24
|
+
from lusid.models.compliance_template_parameter import ComplianceTemplateParameter
|
|
25
|
+
|
|
26
|
+
class IntermediateComplianceStep(ComplianceStep):
|
|
27
|
+
"""
|
|
28
|
+
IntermediateComplianceStep
|
|
29
|
+
"""
|
|
30
|
+
label: constr(strict=True, min_length=1) = Field(..., description="The label of the compliance step")
|
|
31
|
+
grouped_parameters: Dict[str, conlist(ComplianceTemplateParameter)] = Field(..., alias="groupedParameters", description="Parameters required for the step")
|
|
32
|
+
compliance_step_type: StrictStr = Field(..., alias="complianceStepType", description=". The available values are: FilterStep, GroupByStep, GroupFilterStep, BranchStep, RecombineStep, CheckStep")
|
|
33
|
+
additional_properties: Dict[str, Any] = {}
|
|
34
|
+
__properties = ["complianceStepType", "label", "groupedParameters"]
|
|
35
|
+
|
|
36
|
+
@validator('compliance_step_type')
|
|
37
|
+
def compliance_step_type_validate_enum(cls, value):
|
|
38
|
+
"""Validates the enum"""
|
|
39
|
+
if value not in ('FilterStep', 'GroupByStep', 'GroupFilterStep', 'BranchStep', 'RecombineStep', 'CheckStep'):
|
|
40
|
+
raise ValueError("must be one of enum values ('FilterStep', 'GroupByStep', 'GroupFilterStep', 'BranchStep', 'RecombineStep', 'CheckStep')")
|
|
41
|
+
return value
|
|
42
|
+
|
|
43
|
+
class Config:
|
|
44
|
+
"""Pydantic configuration"""
|
|
45
|
+
allow_population_by_field_name = True
|
|
46
|
+
validate_assignment = True
|
|
47
|
+
|
|
48
|
+
def to_str(self) -> str:
|
|
49
|
+
"""Returns the string representation of the model using alias"""
|
|
50
|
+
return pprint.pformat(self.dict(by_alias=True))
|
|
51
|
+
|
|
52
|
+
def to_json(self) -> str:
|
|
53
|
+
"""Returns the JSON representation of the model using alias"""
|
|
54
|
+
return json.dumps(self.to_dict())
|
|
55
|
+
|
|
56
|
+
@classmethod
|
|
57
|
+
def from_json(cls, json_str: str) -> IntermediateComplianceStep:
|
|
58
|
+
"""Create an instance of IntermediateComplianceStep from a JSON string"""
|
|
59
|
+
return cls.from_dict(json.loads(json_str))
|
|
60
|
+
|
|
61
|
+
def to_dict(self):
|
|
62
|
+
"""Returns the dictionary representation of the model using alias"""
|
|
63
|
+
_dict = self.dict(by_alias=True,
|
|
64
|
+
exclude={
|
|
65
|
+
"additional_properties"
|
|
66
|
+
},
|
|
67
|
+
exclude_none=True)
|
|
68
|
+
# override the default output from pydantic by calling `to_dict()` of each value in grouped_parameters (dict of array)
|
|
69
|
+
_field_dict_of_array = {}
|
|
70
|
+
if self.grouped_parameters:
|
|
71
|
+
for _key in self.grouped_parameters:
|
|
72
|
+
if self.grouped_parameters[_key]:
|
|
73
|
+
_field_dict_of_array[_key] = [
|
|
74
|
+
_item.to_dict() for _item in self.grouped_parameters[_key]
|
|
75
|
+
]
|
|
76
|
+
_dict['groupedParameters'] = _field_dict_of_array
|
|
77
|
+
# puts key-value pairs in additional_properties in the top level
|
|
78
|
+
if self.additional_properties is not None:
|
|
79
|
+
for _key, _value in self.additional_properties.items():
|
|
80
|
+
_dict[_key] = _value
|
|
81
|
+
|
|
82
|
+
return _dict
|
|
83
|
+
|
|
84
|
+
@classmethod
|
|
85
|
+
def from_dict(cls, obj: dict) -> IntermediateComplianceStep:
|
|
86
|
+
"""Create an instance of IntermediateComplianceStep from a dict"""
|
|
87
|
+
if obj is None:
|
|
88
|
+
return None
|
|
89
|
+
|
|
90
|
+
if not isinstance(obj, dict):
|
|
91
|
+
return IntermediateComplianceStep.parse_obj(obj)
|
|
92
|
+
|
|
93
|
+
_obj = IntermediateComplianceStep.parse_obj({
|
|
94
|
+
"compliance_step_type": obj.get("complianceStepType"),
|
|
95
|
+
"label": obj.get("label"),
|
|
96
|
+
"grouped_parameters": dict(
|
|
97
|
+
(_k,
|
|
98
|
+
[ComplianceTemplateParameter.from_dict(_item) for _item in _v]
|
|
99
|
+
if _v is not None
|
|
100
|
+
else None
|
|
101
|
+
)
|
|
102
|
+
for _k, _v in obj.get("groupedParameters").items()
|
|
103
|
+
)
|
|
104
|
+
})
|
|
105
|
+
# store additional fields in additional_properties
|
|
106
|
+
for _key in obj.keys():
|
|
107
|
+
if _key not in cls.__properties:
|
|
108
|
+
_obj.additional_properties[_key] = obj.get(_key)
|
|
109
|
+
|
|
110
|
+
return _obj
|
lusid/models/ir_vol_cube_data.py
CHANGED
|
@@ -32,15 +32,15 @@ class IrVolCubeData(ComplexMarketData):
|
|
|
32
32
|
instruments: conlist(LusidInstrument) = Field(..., description="Retrieve the set of instruments that define the cube.")
|
|
33
33
|
quotes: conlist(MarketQuote) = Field(..., description="Access the set of quotes that define the cube.")
|
|
34
34
|
lineage: Optional[constr(strict=True, max_length=1024, min_length=0)] = Field(None, description="Description of the complex market data's lineage e.g. 'FundAccountant_GreenQuality'.")
|
|
35
|
-
market_data_type: StrictStr = Field(..., alias="marketDataType", description="The available values are: DiscountFactorCurveData, EquityVolSurfaceData, FxVolSurfaceData, IrVolCubeData, OpaqueMarketData, YieldCurveData, FxForwardCurveData, FxForwardPipsCurveData, FxForwardTenorCurveData, FxForwardTenorPipsCurveData, FxForwardCurveByQuoteReference, CreditSpreadCurveData, EquityCurveByPricesData")
|
|
35
|
+
market_data_type: StrictStr = Field(..., alias="marketDataType", description="The available values are: DiscountFactorCurveData, EquityVolSurfaceData, FxVolSurfaceData, IrVolCubeData, OpaqueMarketData, YieldCurveData, FxForwardCurveData, FxForwardPipsCurveData, FxForwardTenorCurveData, FxForwardTenorPipsCurveData, FxForwardCurveByQuoteReference, CreditSpreadCurveData, EquityCurveByPricesData, ConstantVolatilitySurface")
|
|
36
36
|
additional_properties: Dict[str, Any] = {}
|
|
37
37
|
__properties = ["marketDataType", "baseDate", "instruments", "quotes", "lineage"]
|
|
38
38
|
|
|
39
39
|
@validator('market_data_type')
|
|
40
40
|
def market_data_type_validate_enum(cls, value):
|
|
41
41
|
"""Validates the enum"""
|
|
42
|
-
if value not in ('DiscountFactorCurveData', 'EquityVolSurfaceData', 'FxVolSurfaceData', 'IrVolCubeData', 'OpaqueMarketData', 'YieldCurveData', 'FxForwardCurveData', 'FxForwardPipsCurveData', 'FxForwardTenorCurveData', 'FxForwardTenorPipsCurveData', 'FxForwardCurveByQuoteReference', 'CreditSpreadCurveData', 'EquityCurveByPricesData'):
|
|
43
|
-
raise ValueError("must be one of enum values ('DiscountFactorCurveData', 'EquityVolSurfaceData', 'FxVolSurfaceData', 'IrVolCubeData', 'OpaqueMarketData', 'YieldCurveData', 'FxForwardCurveData', 'FxForwardPipsCurveData', 'FxForwardTenorCurveData', 'FxForwardTenorPipsCurveData', 'FxForwardCurveByQuoteReference', 'CreditSpreadCurveData', 'EquityCurveByPricesData')")
|
|
42
|
+
if value not in ('DiscountFactorCurveData', 'EquityVolSurfaceData', 'FxVolSurfaceData', 'IrVolCubeData', 'OpaqueMarketData', 'YieldCurveData', 'FxForwardCurveData', 'FxForwardPipsCurveData', 'FxForwardTenorCurveData', 'FxForwardTenorPipsCurveData', 'FxForwardCurveByQuoteReference', 'CreditSpreadCurveData', 'EquityCurveByPricesData', 'ConstantVolatilitySurface'):
|
|
43
|
+
raise ValueError("must be one of enum values ('DiscountFactorCurveData', 'EquityVolSurfaceData', 'FxVolSurfaceData', 'IrVolCubeData', 'OpaqueMarketData', 'YieldCurveData', 'FxForwardCurveData', 'FxForwardPipsCurveData', 'FxForwardTenorCurveData', 'FxForwardTenorPipsCurveData', 'FxForwardCurveByQuoteReference', 'CreditSpreadCurveData', 'EquityCurveByPricesData', 'ConstantVolatilitySurface')")
|
|
44
44
|
return value
|
|
45
45
|
|
|
46
46
|
class Config:
|
|
@@ -36,7 +36,7 @@ class JournalEntryLine(BaseModel):
|
|
|
36
36
|
instrument_id: constr(strict=True, min_length=1) = Field(..., alias="instrumentId", description="To indicate the instrument of the transaction that the Journal Entry Line posted for, if applicable.")
|
|
37
37
|
instrument_scope: constr(strict=True, min_length=1) = Field(..., alias="instrumentScope", description="The scope in which the Journal Entry Line instrument is in.")
|
|
38
38
|
sub_holding_keys: Optional[Dict[str, PerpetualProperty]] = Field(None, alias="subHoldingKeys", description="The sub-holding properties which are part of the AccountingKey.")
|
|
39
|
-
tax_lot_id:
|
|
39
|
+
tax_lot_id: Optional[StrictStr] = Field(None, alias="taxLotId", description="The tax lot Id that the Journal Entry Line is impacting.")
|
|
40
40
|
general_ledger_account_code: constr(strict=True, min_length=1) = Field(..., alias="generalLedgerAccountCode", description="The code of the account in the general ledger the Journal Entry was posted to.")
|
|
41
41
|
local: CurrencyAndAmount = Field(...)
|
|
42
42
|
base: CurrencyAndAmount = Field(...)
|
|
@@ -47,13 +47,16 @@ class JournalEntryLine(BaseModel):
|
|
|
47
47
|
source_type: constr(strict=True, min_length=1) = Field(..., alias="sourceType", description="So far are 4 types: LusidTxn, LusidValuation, Manual and External.")
|
|
48
48
|
source_id: constr(strict=True, min_length=1) = Field(..., alias="sourceId", description="For the Lusid Source Type this will be the txn Id. For the rest will be what the user populates.")
|
|
49
49
|
properties: Optional[Dict[str, ModelProperty]] = Field(None, description="A set of properties for the Abor.")
|
|
50
|
-
movement_name:
|
|
50
|
+
movement_name: Optional[StrictStr] = Field(None, alias="movementName", description="The name of the movement.")
|
|
51
51
|
holding_type: constr(strict=True, min_length=1) = Field(..., alias="holdingType", description="Defines the broad category holding within the portfolio.")
|
|
52
52
|
economic_bucket: constr(strict=True, min_length=1) = Field(..., alias="economicBucket", description="Raw Journal Entry Line details of the economic bucket for the Journal Entry Line.")
|
|
53
|
+
economic_bucket_component: Optional[StrictStr] = Field(None, alias="economicBucketComponent", description="Sub bucket of the economic bucket.")
|
|
53
54
|
levels: Optional[conlist(StrictStr)] = Field(None, description="Resolved data from the general ledger profile where the GeneralLedgerProfileCode is specified in the GetJournalEntryLines request body.")
|
|
54
55
|
source_levels: Optional[conlist(StrictStr)] = Field(None, alias="sourceLevels", description="Source data from the general ledger profile where the GeneralLedgerProfileCode is specified in the GetJournalEntryLines request body.")
|
|
56
|
+
movement_sign: Optional[StrictStr] = Field(None, alias="movementSign", description="Indicates if the Journal Entry Line corresponds to a Long or Short movement.")
|
|
57
|
+
holding_sign: Optional[StrictStr] = Field(None, alias="holdingSign", description="Indicates if the Journal Entry Line is operating against a Long or Short holding.")
|
|
55
58
|
links: Optional[conlist(Link)] = None
|
|
56
|
-
__properties = ["accountingDate", "activityDate", "portfolioId", "instrumentId", "instrumentScope", "subHoldingKeys", "taxLotId", "generalLedgerAccountCode", "local", "base", "postingModuleCode", "postingRule", "asAtDate", "activitiesDescription", "sourceType", "sourceId", "properties", "movementName", "holdingType", "economicBucket", "levels", "sourceLevels", "links"]
|
|
59
|
+
__properties = ["accountingDate", "activityDate", "portfolioId", "instrumentId", "instrumentScope", "subHoldingKeys", "taxLotId", "generalLedgerAccountCode", "local", "base", "postingModuleCode", "postingRule", "asAtDate", "activitiesDescription", "sourceType", "sourceId", "properties", "movementName", "holdingType", "economicBucket", "economicBucketComponent", "levels", "sourceLevels", "movementSign", "holdingSign", "links"]
|
|
57
60
|
|
|
58
61
|
class Config:
|
|
59
62
|
"""Pydantic configuration"""
|
|
@@ -114,6 +117,11 @@ class JournalEntryLine(BaseModel):
|
|
|
114
117
|
if self.sub_holding_keys is None and "sub_holding_keys" in self.__fields_set__:
|
|
115
118
|
_dict['subHoldingKeys'] = None
|
|
116
119
|
|
|
120
|
+
# set to None if tax_lot_id (nullable) is None
|
|
121
|
+
# and __fields_set__ contains the field
|
|
122
|
+
if self.tax_lot_id is None and "tax_lot_id" in self.__fields_set__:
|
|
123
|
+
_dict['taxLotId'] = None
|
|
124
|
+
|
|
117
125
|
# set to None if posting_module_code (nullable) is None
|
|
118
126
|
# and __fields_set__ contains the field
|
|
119
127
|
if self.posting_module_code is None and "posting_module_code" in self.__fields_set__:
|
|
@@ -129,6 +137,16 @@ class JournalEntryLine(BaseModel):
|
|
|
129
137
|
if self.properties is None and "properties" in self.__fields_set__:
|
|
130
138
|
_dict['properties'] = None
|
|
131
139
|
|
|
140
|
+
# set to None if movement_name (nullable) is None
|
|
141
|
+
# and __fields_set__ contains the field
|
|
142
|
+
if self.movement_name is None and "movement_name" in self.__fields_set__:
|
|
143
|
+
_dict['movementName'] = None
|
|
144
|
+
|
|
145
|
+
# set to None if economic_bucket_component (nullable) is None
|
|
146
|
+
# and __fields_set__ contains the field
|
|
147
|
+
if self.economic_bucket_component is None and "economic_bucket_component" in self.__fields_set__:
|
|
148
|
+
_dict['economicBucketComponent'] = None
|
|
149
|
+
|
|
132
150
|
# set to None if levels (nullable) is None
|
|
133
151
|
# and __fields_set__ contains the field
|
|
134
152
|
if self.levels is None and "levels" in self.__fields_set__:
|
|
@@ -139,6 +157,16 @@ class JournalEntryLine(BaseModel):
|
|
|
139
157
|
if self.source_levels is None and "source_levels" in self.__fields_set__:
|
|
140
158
|
_dict['sourceLevels'] = None
|
|
141
159
|
|
|
160
|
+
# set to None if movement_sign (nullable) is None
|
|
161
|
+
# and __fields_set__ contains the field
|
|
162
|
+
if self.movement_sign is None and "movement_sign" in self.__fields_set__:
|
|
163
|
+
_dict['movementSign'] = None
|
|
164
|
+
|
|
165
|
+
# set to None if holding_sign (nullable) is None
|
|
166
|
+
# and __fields_set__ contains the field
|
|
167
|
+
if self.holding_sign is None and "holding_sign" in self.__fields_set__:
|
|
168
|
+
_dict['holdingSign'] = None
|
|
169
|
+
|
|
142
170
|
# set to None if links (nullable) is None
|
|
143
171
|
# and __fields_set__ contains the field
|
|
144
172
|
if self.links is None and "links" in self.__fields_set__:
|
|
@@ -186,8 +214,11 @@ class JournalEntryLine(BaseModel):
|
|
|
186
214
|
"movement_name": obj.get("movementName"),
|
|
187
215
|
"holding_type": obj.get("holdingType"),
|
|
188
216
|
"economic_bucket": obj.get("economicBucket"),
|
|
217
|
+
"economic_bucket_component": obj.get("economicBucketComponent"),
|
|
189
218
|
"levels": obj.get("levels"),
|
|
190
219
|
"source_levels": obj.get("sourceLevels"),
|
|
220
|
+
"movement_sign": obj.get("movementSign"),
|
|
221
|
+
"holding_sign": obj.get("holdingSign"),
|
|
191
222
|
"links": [Link.from_dict(_item) for _item in obj.get("links")] if obj.get("links") is not None else None
|
|
192
223
|
})
|
|
193
224
|
return _obj
|
|
@@ -28,7 +28,7 @@ class JournalEntryLinesQueryParameters(BaseModel):
|
|
|
28
28
|
"""
|
|
29
29
|
start: Optional[DateOrDiaryEntry] = None
|
|
30
30
|
end: Optional[DateOrDiaryEntry] = None
|
|
31
|
-
date_mode: Optional[StrictStr] = Field(None, alias="dateMode", description="The mode of calculation of the journal entry lines.")
|
|
31
|
+
date_mode: Optional[StrictStr] = Field(None, alias="dateMode", description="The mode of calculation of the journal entry lines. The available values are: ActivityDate.")
|
|
32
32
|
general_ledger_profile_code: Optional[constr(strict=True, max_length=64, min_length=1)] = Field(None, alias="generalLedgerProfileCode", description="The optional code of a general ledger profile used to decorate journal entry lines with levels.")
|
|
33
33
|
property_keys: Optional[conlist(StrictStr)] = Field(None, alias="propertyKeys", description="A list of property keys from the 'Instrument', 'Transaction', 'Portfolio', 'Account', 'LegalEntity' or 'CustodianAccount' domain to decorate onto the journal entry lines.")
|
|
34
34
|
__properties = ["start", "end", "dateMode", "generalLedgerProfileCode", "propertyKeys"]
|
lusid/models/label_value_set.py
CHANGED
|
@@ -25,7 +25,7 @@ class LabelValueSet(BaseModel):
|
|
|
25
25
|
"""
|
|
26
26
|
The set of string labels in a multi-value property. # noqa: E501
|
|
27
27
|
"""
|
|
28
|
-
values: conlist(StrictStr, min_items=1
|
|
28
|
+
values: conlist(StrictStr, min_items=1) = Field(...)
|
|
29
29
|
__properties = ["values"]
|
|
30
30
|
|
|
31
31
|
class Config:
|
lusid/models/leg_definition.py
CHANGED
|
@@ -19,10 +19,11 @@ import json
|
|
|
19
19
|
|
|
20
20
|
from datetime import datetime
|
|
21
21
|
from typing import Any, Dict, Optional, Union
|
|
22
|
-
from pydantic import BaseModel, Field, StrictFloat, StrictInt, StrictStr, constr
|
|
22
|
+
from pydantic import BaseModel, Field, StrictBool, StrictFloat, StrictInt, StrictStr, constr
|
|
23
23
|
from lusid.models.compounding import Compounding
|
|
24
24
|
from lusid.models.flow_convention_name import FlowConventionName
|
|
25
25
|
from lusid.models.flow_conventions import FlowConventions
|
|
26
|
+
from lusid.models.fx_linked_notional_schedule import FxLinkedNotionalSchedule
|
|
26
27
|
from lusid.models.index_convention import IndexConvention
|
|
27
28
|
from lusid.models.step_schedule import StepSchedule
|
|
28
29
|
|
|
@@ -45,7 +46,9 @@ class LegDefinition(BaseModel):
|
|
|
45
46
|
first_coupon_type: Optional[StrictStr] = Field(None, alias="firstCouponType", description="Optional coupon type setting for the first coupon, can be used with Stub coupons. If set to \"ProRata\" (the default), the coupon year fraction is calculated as normal, however if set to \"Full\" the year fraction is overwritten with the standard year fraction for a regular ful\" coupon. Note this does not use the day count convention but rather is defined directly from the tenor (i.e. a quarterly leg will be set to 0.25). Supported string (enumeration) values are: [ProRata, Full].")
|
|
46
47
|
last_regular_payment_date: Optional[datetime] = Field(None, alias="lastRegularPaymentDate", description="Optional payment date of the last regular coupon. Must be less than the Maturity date. If set, the regular coupon schedule will be built up to this date and the final coupon will be a stub between this date and the Maturity date.")
|
|
47
48
|
last_coupon_type: Optional[StrictStr] = Field(None, alias="lastCouponType", description="Optional coupon type setting for the last coupon, can be used with Stub coupons. If set to \"ProRata\" (the default), the coupon year fraction is calculated as normal, however if set to \"Full\" the year fraction is overwritten with the standard year fraction for a regular ful\" coupon. Note this does not use the day count convention but rather is defined directly from the tenor (i.e. a quarterly leg will be set to 0.25). Supported string (enumeration) values are: [ProRata, Full].")
|
|
48
|
-
|
|
49
|
+
fx_linked_notional_schedule: Optional[FxLinkedNotionalSchedule] = Field(None, alias="fxLinkedNotionalSchedule")
|
|
50
|
+
intermediate_notional_exchange: Optional[StrictBool] = Field(None, alias="intermediateNotionalExchange", description="Indicates whether there are intermediate notional exchanges.")
|
|
51
|
+
__properties = ["conventionName", "conventions", "indexConvention", "indexConventionName", "notionalExchangeType", "payReceive", "rateOrSpread", "resetConvention", "stubType", "compounding", "amortisation", "firstRegularPaymentDate", "firstCouponType", "lastRegularPaymentDate", "lastCouponType", "fxLinkedNotionalSchedule", "intermediateNotionalExchange"]
|
|
49
52
|
|
|
50
53
|
class Config:
|
|
51
54
|
"""Pydantic configuration"""
|
|
@@ -89,6 +92,9 @@ class LegDefinition(BaseModel):
|
|
|
89
92
|
# override the default output from pydantic by calling `to_dict()` of amortisation
|
|
90
93
|
if self.amortisation:
|
|
91
94
|
_dict['amortisation'] = self.amortisation.to_dict()
|
|
95
|
+
# override the default output from pydantic by calling `to_dict()` of fx_linked_notional_schedule
|
|
96
|
+
if self.fx_linked_notional_schedule:
|
|
97
|
+
_dict['fxLinkedNotionalSchedule'] = self.fx_linked_notional_schedule.to_dict()
|
|
92
98
|
# set to None if reset_convention (nullable) is None
|
|
93
99
|
# and __fields_set__ contains the field
|
|
94
100
|
if self.reset_convention is None and "reset_convention" in self.__fields_set__:
|
|
@@ -114,6 +120,11 @@ class LegDefinition(BaseModel):
|
|
|
114
120
|
if self.last_coupon_type is None and "last_coupon_type" in self.__fields_set__:
|
|
115
121
|
_dict['lastCouponType'] = None
|
|
116
122
|
|
|
123
|
+
# set to None if intermediate_notional_exchange (nullable) is None
|
|
124
|
+
# and __fields_set__ contains the field
|
|
125
|
+
if self.intermediate_notional_exchange is None and "intermediate_notional_exchange" in self.__fields_set__:
|
|
126
|
+
_dict['intermediateNotionalExchange'] = None
|
|
127
|
+
|
|
117
128
|
return _dict
|
|
118
129
|
|
|
119
130
|
@classmethod
|
|
@@ -140,6 +151,8 @@ class LegDefinition(BaseModel):
|
|
|
140
151
|
"first_regular_payment_date": obj.get("firstRegularPaymentDate"),
|
|
141
152
|
"first_coupon_type": obj.get("firstCouponType"),
|
|
142
153
|
"last_regular_payment_date": obj.get("lastRegularPaymentDate"),
|
|
143
|
-
"last_coupon_type": obj.get("lastCouponType")
|
|
154
|
+
"last_coupon_type": obj.get("lastCouponType"),
|
|
155
|
+
"fx_linked_notional_schedule": FxLinkedNotionalSchedule.from_dict(obj.get("fxLinkedNotionalSchedule")) if obj.get("fxLinkedNotionalSchedule") is not None else None,
|
|
156
|
+
"intermediate_notional_exchange": obj.get("intermediateNotionalExchange")
|
|
144
157
|
})
|
|
145
158
|
return _obj
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
LUSID API
|
|
5
|
+
|
|
6
|
+
FINBOURNE Technology # noqa: E501
|
|
7
|
+
|
|
8
|
+
Contact: info@finbourne.com
|
|
9
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
10
|
+
|
|
11
|
+
Do not edit the class manually.
|
|
12
|
+
"""
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
from __future__ import annotations
|
|
16
|
+
import pprint
|
|
17
|
+
import re # noqa: F401
|
|
18
|
+
import json
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
from typing import Any, Dict, Optional
|
|
22
|
+
from pydantic import BaseModel, Field, StrictInt, constr
|
|
23
|
+
|
|
24
|
+
class LineageMember(BaseModel):
|
|
25
|
+
"""
|
|
26
|
+
LineageMember
|
|
27
|
+
"""
|
|
28
|
+
index: StrictInt = Field(..., description="Index to demonstrate position of lineage member in overall lineage")
|
|
29
|
+
label: constr(strict=True, max_length=6000, min_length=0) = Field(..., description="Label of the step corresponding to this lineage member")
|
|
30
|
+
sub_label: constr(strict=True, max_length=6000, min_length=0) = Field(..., alias="subLabel", description="SubLabel of the step corresponding to this lineage member")
|
|
31
|
+
info_type: Optional[constr(strict=True, max_length=6000, min_length=0)] = Field(None, alias="infoType", description="Optional. Type of Information")
|
|
32
|
+
information: Optional[constr(strict=True, max_length=6000, min_length=0)] = Field(None, description="Optional. Information for the step corresponding to this lineage member, of type InfoType")
|
|
33
|
+
__properties = ["index", "label", "subLabel", "infoType", "information"]
|
|
34
|
+
|
|
35
|
+
class Config:
|
|
36
|
+
"""Pydantic configuration"""
|
|
37
|
+
allow_population_by_field_name = True
|
|
38
|
+
validate_assignment = True
|
|
39
|
+
|
|
40
|
+
def to_str(self) -> str:
|
|
41
|
+
"""Returns the string representation of the model using alias"""
|
|
42
|
+
return pprint.pformat(self.dict(by_alias=True))
|
|
43
|
+
|
|
44
|
+
def to_json(self) -> str:
|
|
45
|
+
"""Returns the JSON representation of the model using alias"""
|
|
46
|
+
return json.dumps(self.to_dict())
|
|
47
|
+
|
|
48
|
+
@classmethod
|
|
49
|
+
def from_json(cls, json_str: str) -> LineageMember:
|
|
50
|
+
"""Create an instance of LineageMember from a JSON string"""
|
|
51
|
+
return cls.from_dict(json.loads(json_str))
|
|
52
|
+
|
|
53
|
+
def to_dict(self):
|
|
54
|
+
"""Returns the dictionary representation of the model using alias"""
|
|
55
|
+
_dict = self.dict(by_alias=True,
|
|
56
|
+
exclude={
|
|
57
|
+
},
|
|
58
|
+
exclude_none=True)
|
|
59
|
+
# set to None if info_type (nullable) is None
|
|
60
|
+
# and __fields_set__ contains the field
|
|
61
|
+
if self.info_type is None and "info_type" in self.__fields_set__:
|
|
62
|
+
_dict['infoType'] = None
|
|
63
|
+
|
|
64
|
+
# set to None if information (nullable) is None
|
|
65
|
+
# and __fields_set__ contains the field
|
|
66
|
+
if self.information is None and "information" in self.__fields_set__:
|
|
67
|
+
_dict['information'] = None
|
|
68
|
+
|
|
69
|
+
return _dict
|
|
70
|
+
|
|
71
|
+
@classmethod
|
|
72
|
+
def from_dict(cls, obj: dict) -> LineageMember:
|
|
73
|
+
"""Create an instance of LineageMember from a dict"""
|
|
74
|
+
if obj is None:
|
|
75
|
+
return None
|
|
76
|
+
|
|
77
|
+
if not isinstance(obj, dict):
|
|
78
|
+
return LineageMember.parse_obj(obj)
|
|
79
|
+
|
|
80
|
+
_obj = LineageMember.parse_obj({
|
|
81
|
+
"index": obj.get("index"),
|
|
82
|
+
"label": obj.get("label"),
|
|
83
|
+
"sub_label": obj.get("subLabel"),
|
|
84
|
+
"info_type": obj.get("infoType"),
|
|
85
|
+
"information": obj.get("information")
|
|
86
|
+
})
|
|
87
|
+
return _obj
|
|
@@ -0,0 +1,91 @@
|
|
|
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 import BaseModel, Field, StrictStr, conlist, constr, validator
|
|
23
|
+
|
|
24
|
+
class LockPeriodDiaryEntryRequest(BaseModel):
|
|
25
|
+
"""
|
|
26
|
+
A definition for the period you wish to lock # noqa: E501
|
|
27
|
+
"""
|
|
28
|
+
diary_entry_code: Optional[constr(strict=True, max_length=64, min_length=1)] = Field(None, alias="diaryEntryCode", description="Unique code assigned to a period. When left blank last closed period will be located.")
|
|
29
|
+
closing_options: Optional[conlist(StrictStr)] = Field(None, alias="closingOptions", description="The options which will be executed once a period is closed or locked.")
|
|
30
|
+
__properties = ["diaryEntryCode", "closingOptions"]
|
|
31
|
+
|
|
32
|
+
@validator('diary_entry_code')
|
|
33
|
+
def diary_entry_code_validate_regular_expression(cls, value):
|
|
34
|
+
"""Validates the regular expression"""
|
|
35
|
+
if value is None:
|
|
36
|
+
return value
|
|
37
|
+
|
|
38
|
+
if not re.match(r"^[a-zA-Z0-9\-_]+$", value):
|
|
39
|
+
raise ValueError(r"must validate the regular expression /^[a-zA-Z0-9\-_]+$/")
|
|
40
|
+
return value
|
|
41
|
+
|
|
42
|
+
class Config:
|
|
43
|
+
"""Pydantic configuration"""
|
|
44
|
+
allow_population_by_field_name = True
|
|
45
|
+
validate_assignment = True
|
|
46
|
+
|
|
47
|
+
def to_str(self) -> str:
|
|
48
|
+
"""Returns the string representation of the model using alias"""
|
|
49
|
+
return pprint.pformat(self.dict(by_alias=True))
|
|
50
|
+
|
|
51
|
+
def to_json(self) -> str:
|
|
52
|
+
"""Returns the JSON representation of the model using alias"""
|
|
53
|
+
return json.dumps(self.to_dict())
|
|
54
|
+
|
|
55
|
+
@classmethod
|
|
56
|
+
def from_json(cls, json_str: str) -> LockPeriodDiaryEntryRequest:
|
|
57
|
+
"""Create an instance of LockPeriodDiaryEntryRequest from a JSON string"""
|
|
58
|
+
return cls.from_dict(json.loads(json_str))
|
|
59
|
+
|
|
60
|
+
def to_dict(self):
|
|
61
|
+
"""Returns the dictionary representation of the model using alias"""
|
|
62
|
+
_dict = self.dict(by_alias=True,
|
|
63
|
+
exclude={
|
|
64
|
+
},
|
|
65
|
+
exclude_none=True)
|
|
66
|
+
# set to None if diary_entry_code (nullable) is None
|
|
67
|
+
# and __fields_set__ contains the field
|
|
68
|
+
if self.diary_entry_code is None and "diary_entry_code" in self.__fields_set__:
|
|
69
|
+
_dict['diaryEntryCode'] = None
|
|
70
|
+
|
|
71
|
+
# set to None if closing_options (nullable) is None
|
|
72
|
+
# and __fields_set__ contains the field
|
|
73
|
+
if self.closing_options is None and "closing_options" in self.__fields_set__:
|
|
74
|
+
_dict['closingOptions'] = None
|
|
75
|
+
|
|
76
|
+
return _dict
|
|
77
|
+
|
|
78
|
+
@classmethod
|
|
79
|
+
def from_dict(cls, obj: dict) -> LockPeriodDiaryEntryRequest:
|
|
80
|
+
"""Create an instance of LockPeriodDiaryEntryRequest from a dict"""
|
|
81
|
+
if obj is None:
|
|
82
|
+
return None
|
|
83
|
+
|
|
84
|
+
if not isinstance(obj, dict):
|
|
85
|
+
return LockPeriodDiaryEntryRequest.parse_obj(obj)
|
|
86
|
+
|
|
87
|
+
_obj = LockPeriodDiaryEntryRequest.parse_obj({
|
|
88
|
+
"diary_entry_code": obj.get("diaryEntryCode"),
|
|
89
|
+
"closing_options": obj.get("closingOptions")
|
|
90
|
+
})
|
|
91
|
+
return _obj
|
lusid/models/lusid_instrument.py
CHANGED
|
@@ -26,14 +26,14 @@ class LusidInstrument(BaseModel):
|
|
|
26
26
|
"""
|
|
27
27
|
Base class in the hierarchy for representing the full economic definition of instruments in LUSID. These definitions are used to provide instrument analytics such as PV, accrual, cash flows, and risk. This base class should not be directly instantiated; each supported InstrumentType has a corresponding inherited class. # noqa: E501
|
|
28
28
|
"""
|
|
29
|
-
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")
|
|
29
|
+
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")
|
|
30
30
|
__properties = ["instrumentType"]
|
|
31
31
|
|
|
32
32
|
@validator('instrument_type')
|
|
33
33
|
def instrument_type_validate_enum(cls, value):
|
|
34
34
|
"""Validates the enum"""
|
|
35
|
-
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'):
|
|
36
|
-
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')")
|
|
35
|
+
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'):
|
|
36
|
+
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')")
|
|
37
37
|
return value
|
|
38
38
|
|
|
39
39
|
class Config:
|
|
@@ -60,8 +60,10 @@ class LusidInstrument(BaseModel):
|
|
|
60
60
|
'ExchangeTradedOption': 'ExchangeTradedOption',
|
|
61
61
|
'ExoticInstrument': 'ExoticInstrument',
|
|
62
62
|
'FixedLeg': 'FixedLeg',
|
|
63
|
+
'FlexibleLoan': 'FlexibleLoan',
|
|
63
64
|
'FloatingLeg': 'FloatingLeg',
|
|
64
65
|
'ForwardRateAgreement': 'ForwardRateAgreement',
|
|
66
|
+
'FundShareClass': 'FundShareClass',
|
|
65
67
|
'FundingLeg': 'FundingLeg',
|
|
66
68
|
'Future': 'Future',
|
|
67
69
|
'FxForward': 'FxForward',
|
|
@@ -99,7 +101,7 @@ class LusidInstrument(BaseModel):
|
|
|
99
101
|
return json.dumps(self.to_dict())
|
|
100
102
|
|
|
101
103
|
@classmethod
|
|
102
|
-
def from_json(cls, json_str: str) -> Union(Basket, Bond, CapFloor, CashPerpetual, CdsIndex, ComplexBond, ContractForDifference, CreditDefaultSwap, Equity, EquityOption, EquitySwap, ExchangeTradedOption, ExoticInstrument, ForwardRateAgreement, Future, FxForward, FxOption, FxSwap, InflationLeg, InflationLinkedBond, InflationSwap, InstrumentLeg, InterestRateSwap, InterestRateSwaption, ReferenceInstrument, Repo, SimpleCashFlowLoan, SimpleInstrument, TermDeposit, TotalReturnSwap):
|
|
104
|
+
def from_json(cls, json_str: str) -> Union(Basket, Bond, CapFloor, CashPerpetual, CdsIndex, ComplexBond, ContractForDifference, CreditDefaultSwap, Equity, EquityOption, EquitySwap, ExchangeTradedOption, ExoticInstrument, FlexibleLoan, ForwardRateAgreement, FundShareClass, Future, FxForward, FxOption, FxSwap, InflationLeg, InflationLinkedBond, InflationSwap, InstrumentLeg, InterestRateSwap, InterestRateSwaption, ReferenceInstrument, Repo, SimpleCashFlowLoan, SimpleInstrument, TermDeposit, TotalReturnSwap):
|
|
103
105
|
"""Create an instance of LusidInstrument from a JSON string"""
|
|
104
106
|
return cls.from_dict(json.loads(json_str))
|
|
105
107
|
|
|
@@ -112,7 +114,7 @@ class LusidInstrument(BaseModel):
|
|
|
112
114
|
return _dict
|
|
113
115
|
|
|
114
116
|
@classmethod
|
|
115
|
-
def from_dict(cls, obj: dict) -> Union(Basket, Bond, CapFloor, CashPerpetual, CdsIndex, ComplexBond, ContractForDifference, CreditDefaultSwap, Equity, EquityOption, EquitySwap, ExchangeTradedOption, ExoticInstrument, ForwardRateAgreement, Future, FxForward, FxOption, FxSwap, InflationLeg, InflationLinkedBond, InflationSwap, InstrumentLeg, InterestRateSwap, InterestRateSwaption, ReferenceInstrument, Repo, SimpleCashFlowLoan, SimpleInstrument, TermDeposit, TotalReturnSwap):
|
|
117
|
+
def from_dict(cls, obj: dict) -> Union(Basket, Bond, CapFloor, CashPerpetual, CdsIndex, ComplexBond, ContractForDifference, CreditDefaultSwap, Equity, EquityOption, EquitySwap, ExchangeTradedOption, ExoticInstrument, FlexibleLoan, ForwardRateAgreement, FundShareClass, Future, FxForward, FxOption, FxSwap, InflationLeg, InflationLinkedBond, InflationSwap, InstrumentLeg, InterestRateSwap, InterestRateSwaption, ReferenceInstrument, Repo, SimpleCashFlowLoan, SimpleInstrument, TermDeposit, TotalReturnSwap):
|
|
116
118
|
"""Create an instance of LusidInstrument from a dict"""
|
|
117
119
|
# look up the object type based on discriminator mapping
|
|
118
120
|
object_type = cls.get_discriminator_value(obj)
|