lusid-sdk 2.1.405__py3-none-any.whl → 2.1.450__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 +66 -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 +163 -162
- lusid/api/group_reconciliations_api.py +1437 -45
- lusid/api/instrument_event_types_api.py +64 -63
- lusid/api/instrument_events_api.py +46 -45
- lusid/api/instruments_api.py +187 -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 +91 -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 +327 -326
- 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 +64 -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/basket.py +3 -3
- 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 +3 -3
- lusid/models/bond_default_event.py +3 -3
- lusid/models/bond_principal_event.py +3 -3
- lusid/models/bonus_issue_event.py +166 -0
- lusid/models/{component_rule.py → break_code_source.py} +17 -21
- 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/complex_bond.py +3 -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_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/custom_entity_entity.py +146 -0
- lusid/models/custom_entity_response.py +7 -1
- lusid/models/decimal_list.py +3 -3
- lusid/models/diary_entry_request.py +10 -1
- lusid/models/dividend_option_event.py +3 -3
- lusid/models/dividend_reinvestment_event.py +3 -3
- lusid/models/effective_range.py +71 -0
- lusid/models/equity.py +3 -3
- lusid/models/equity_option.py +3 -3
- lusid/models/equity_swap.py +3 -3
- lusid/models/exchange_traded_option.py +3 -3
- 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 +8 -8
- lusid/models/fee_request.py +8 -8
- 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_comparison_rule_operand.py +1 -1
- lusid/models/group_reconciliation_core_comparison_rule_operand.py +1 -1
- 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/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 +10 -5
- lusid/models/instrument_event_holder.py +9 -1
- lusid/models/instrument_event_type.py +5 -0
- lusid/models/instrument_leg.py +3 -3
- lusid/models/instrument_list.py +3 -3
- lusid/models/instrument_type.py +1 -0
- lusid/models/interest_rate_swap.py +3 -3
- lusid/models/interest_rate_swaption.py +3 -3
- lusid/models/lapse_election.py +73 -0
- lusid/models/lusid_instrument.py +6 -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 +97 -0
- lusid/models/mbs_interest_deferral_event.py +97 -0
- lusid/models/mbs_principal_event.py +97 -0
- lusid/models/mbs_principal_write_off_event.py +97 -0
- lusid/models/merger_event.py +22 -22
- lusid/models/open_event.py +3 -3
- lusid/models/output_transaction.py +9 -2
- 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/property_list.py +3 -3
- 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/reverse_stock_split_event.py +3 -3
- 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/term_deposit.py +3 -3
- lusid/models/total_return_swap.py +3 -3
- lusid/models/transaction.py +9 -2
- lusid/models/transaction_date_windows.py +85 -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/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.450.dist-info}/METADATA +69 -24
- {lusid_sdk-2.1.405.dist-info → lusid_sdk-2.1.450.dist-info}/RECORD +238 -208
- lusid/models/metadata_key_value_response.py +0 -86
- {lusid_sdk-2.1.405.dist-info → lusid_sdk-2.1.450.dist-info}/WHEEL +0 -0
lusid/models/fixed_leg.py
CHANGED
@@ -33,15 +33,15 @@ class FixedLeg(InstrumentLeg):
|
|
33
33
|
leg_definition: LegDefinition = Field(..., alias="legDefinition")
|
34
34
|
notional: Union[StrictFloat, StrictInt] = Field(...)
|
35
35
|
overrides: Optional[FixedLegAllOfOverrides] = None
|
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")
|
37
37
|
additional_properties: Dict[str, Any] = {}
|
38
38
|
__properties = ["instrumentType", "startDate", "maturityDate", "legDefinition", "notional", "overrides"]
|
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'):
|
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')")
|
45
45
|
return value
|
46
46
|
|
47
47
|
class Config:
|
lusid/models/fixed_schedule.py
CHANGED
@@ -29,15 +29,15 @@ class FixedSchedule(Schedule):
|
|
29
29
|
"""
|
30
30
|
Schedule for fixed coupon payments # noqa: E501
|
31
31
|
"""
|
32
|
-
start_date: datetime = Field(..., alias="startDate", description="Date
|
33
|
-
maturity_date: datetime = Field(..., alias="maturityDate", description="
|
32
|
+
start_date: datetime = Field(..., alias="startDate", description="Date from which LUSID starts generating the payment schedule.")
|
33
|
+
maturity_date: datetime = Field(..., alias="maturityDate", description="Last date of the payment generation schedule. May not necessarily be the maturity date of the underlying instrument (e.g. in case the instrument has multiple payment schedules).")
|
34
34
|
flow_conventions: Optional[FlowConventions] = Field(None, alias="flowConventions")
|
35
35
|
coupon_rate: Optional[Union[StrictFloat, StrictInt]] = Field(None, alias="couponRate", description="Coupon rate given as a fraction.")
|
36
36
|
convention_name: Optional[FlowConventionName] = Field(None, alias="conventionName")
|
37
37
|
ex_dividend_days: Optional[StrictInt] = Field(None, alias="exDividendDays", description="Optional. Number of calendar days in the ex-dividend period. If the settlement date falls in the ex-dividend period then the coupon paid is zero and the accrued interest is negative. If set, this must be a non-negative number. If not set, or set to 0, then there is no ex-dividend period. NOTE: This field is deprecated. If you wish to set the ExDividendDays on a bond, please use the ExDividendConfiguration.")
|
38
38
|
notional: Optional[Union[StrictFloat, StrictInt]] = Field(None, description="Scaling factor, the quantity outstanding on which the rate will be paid.")
|
39
39
|
payment_currency: StrictStr = Field(..., alias="paymentCurrency", description="Payment currency. This does not have to be the same as the nominal bond or observation/reset currency.")
|
40
|
-
stub_type: Optional[StrictStr] = Field(None, alias="stubType", description="
|
40
|
+
stub_type: Optional[StrictStr] = Field(None, alias="stubType", description="When a payment schedule doesn't have regular payment intervals just because of the first and/or last coupons of the schedule, we call those irregular coupons stubs. This configuration specifies what type of stub is used when building the schedule Supported values are: None = this is a regular payment schedule with no stubs. DO NOT use it with irregular schedules or you will get incorrect and unexpected behaviour. ShortFront = this is an irregular payment schedule where only the first coupon is irregular, and covers a payment period that is shorter than the regular payment period. ShortBack = this is an irregular payment schedule where only the last coupon is irregular, and covers a payment period that is shorter than the regular payment period. LongFront = this is an irregular payment schedule where only the first coupon is irregular, and covers a payment period that is longer than the regular payment period. LongBack = this is an irregular payment schedule where only the last coupon is irregular, and covers a payment period that is longer than the regular payment period. Both = this is an irregular payment schedule where both the first and the last coupons are irregular, and the length of these periods is calculated based on the first coupon payment date that should have been explicitly set.")
|
41
41
|
ex_dividend_configuration: Optional[ExDividendConfiguration] = Field(None, alias="exDividendConfiguration")
|
42
42
|
schedule_type: StrictStr = Field(..., alias="scheduleType", description="The available values are: FixedSchedule, FloatSchedule, OptionalitySchedule, StepSchedule, Exercise, FxRateSchedule, FxLinkedNotionalSchedule, BondConversionSchedule, Invalid")
|
43
43
|
additional_properties: Dict[str, Any] = {}
|
lusid/models/flexible_loan.py
CHANGED
@@ -31,15 +31,15 @@ class FlexibleLoan(LusidInstrument):
|
|
31
31
|
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.")
|
32
32
|
dom_ccy: StrictStr = Field(..., alias="domCcy", description="The domestic currency of the instrument.")
|
33
33
|
schedules: conlist(Schedule) = Field(..., description="Repayment schedules for the loan.")
|
34
|
-
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")
|
34
|
+
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")
|
35
35
|
additional_properties: Dict[str, Any] = {}
|
36
36
|
__properties = ["instrumentType", "startDate", "maturityDate", "domCcy", "schedules"]
|
37
37
|
|
38
38
|
@validator('instrument_type')
|
39
39
|
def instrument_type_validate_enum(cls, value):
|
40
40
|
"""Validates the enum"""
|
41
|
-
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'):
|
42
|
-
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')")
|
41
|
+
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'):
|
42
|
+
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')")
|
43
43
|
return value
|
44
44
|
|
45
45
|
class Config:
|
lusid/models/float_schedule.py
CHANGED
@@ -29,10 +29,10 @@ from lusid.models.schedule import Schedule
|
|
29
29
|
|
30
30
|
class FloatSchedule(Schedule):
|
31
31
|
"""
|
32
|
-
Schedule for
|
32
|
+
Schedule for floating rate coupon payments. # noqa: E501
|
33
33
|
"""
|
34
|
-
start_date: Optional[datetime] = Field(None, alias="startDate", description="Date
|
35
|
-
maturity_date: Optional[datetime] = Field(None, alias="maturityDate", description="
|
34
|
+
start_date: Optional[datetime] = Field(None, alias="startDate", description="Date from which LUSID starts generating the payment schedule.")
|
35
|
+
maturity_date: Optional[datetime] = Field(None, alias="maturityDate", description="Last date of the payment generation schedule. May not necessarily be the maturity date of the underlying instrument (e.g. in case the instrument has multiple payment schedules).")
|
36
36
|
flow_conventions: Optional[FlowConventions] = Field(None, alias="flowConventions")
|
37
37
|
convention_name: Optional[FlowConventionName] = Field(None, alias="conventionName")
|
38
38
|
ex_dividend_days: Optional[StrictInt] = Field(None, alias="exDividendDays", description="Optional. Number of calendar days in the ex-dividend period. If the settlement date falls in the ex-dividend period then the coupon paid is zero and the accrued interest is negative. If set, this must be a non-negative number. If not set, or set to 0, then there is no ex-dividend period. NOTE: This field is deprecated. If you wish to set the ExDividendDays on a bond, please use the ExDividendConfiguration.")
|
@@ -41,7 +41,7 @@ class FloatSchedule(Schedule):
|
|
41
41
|
notional: Optional[Union[StrictFloat, StrictInt]] = Field(None, description="Scaling factor, the quantity outstanding on which the rate will be paid.")
|
42
42
|
payment_currency: StrictStr = Field(..., alias="paymentCurrency", description="Payment currency. This does not have to be the same as the nominal bond or observation/reset currency.")
|
43
43
|
spread: Optional[Union[StrictFloat, StrictInt]] = Field(None, description="Spread over floating rate given as a fraction.")
|
44
|
-
stub_type: Optional[StrictStr] = Field(None, alias="stubType", description="
|
44
|
+
stub_type: Optional[StrictStr] = Field(None, alias="stubType", description="When a payment schedule doesn't have regular payment intervals just because of the first and/or last coupons of the schedule, we call those irregular coupons stubs. This configuration specifies what type of stub is used when building the schedule Supported values are: None = this is a regular payment schedule with no stubs. DO NOT use it with irregular schedules or you will get incorrect and unexpected behaviour. ShortFront = this is an irregular payment schedule where only the first coupon is irregular, and covers a payment period that is shorter than the regular payment period. ShortBack = this is an irregular payment schedule where only the last coupon is irregular, and covers a payment period that is shorter than the regular payment period. LongFront = this is an irregular payment schedule where only the first coupon is irregular, and covers a payment period that is longer than the regular payment period. LongBack = this is an irregular payment schedule where only the last coupon is irregular, and covers a payment period that is longer than the regular payment period. Both = this is an irregular payment schedule where both the first and the last coupons are irregular, and the length of these periods is calculated based on the first coupon payment date that should have been explicitly set.")
|
45
45
|
ex_dividend_configuration: Optional[ExDividendConfiguration] = Field(None, alias="exDividendConfiguration")
|
46
46
|
compounding: Optional[Compounding] = None
|
47
47
|
reset_convention: Optional[constr(strict=True, max_length=16, min_length=0)] = Field(None, alias="resetConvention", description="Control how resets are generated relative to payment convention(s). Supported string (enumeration) values are: [InAdvance, InArrears].")
|
lusid/models/floating_leg.py
CHANGED
@@ -35,15 +35,15 @@ class FloatingLeg(InstrumentLeg):
|
|
35
35
|
overrides: Optional[FixedLegAllOfOverrides] = None
|
36
36
|
cap_rate: Optional[Union[StrictFloat, StrictInt]] = Field(None, alias="capRate", description="The maximum floating rate which a cashflow can accrue.")
|
37
37
|
floor_rate: Optional[Union[StrictFloat, StrictInt]] = Field(None, alias="floorRate", description="The minimum floating rate which a cashflow can accrue.")
|
38
|
-
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")
|
38
|
+
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")
|
39
39
|
additional_properties: Dict[str, Any] = {}
|
40
40
|
__properties = ["instrumentType", "startDate", "maturityDate", "legDefinition", "notional", "overrides", "capRate", "floorRate"]
|
41
41
|
|
42
42
|
@validator('instrument_type')
|
43
43
|
def instrument_type_validate_enum(cls, value):
|
44
44
|
"""Validates the enum"""
|
45
|
-
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'):
|
46
|
-
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')")
|
45
|
+
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'):
|
46
|
+
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')")
|
47
47
|
return value
|
48
48
|
|
49
49
|
class Config:
|
lusid/models/flow_conventions.py
CHANGED
@@ -20,6 +20,7 @@ import json
|
|
20
20
|
|
21
21
|
from typing import Any, Dict, List, Optional
|
22
22
|
from pydantic.v1 import BaseModel, Field, StrictBool, StrictInt, StrictStr, conlist, constr, validator
|
23
|
+
from lusid.models.relative_date_offset import RelativeDateOffset
|
23
24
|
|
24
25
|
class FlowConventions(BaseModel):
|
25
26
|
"""
|
@@ -37,9 +38,10 @@ class FlowConventions(BaseModel):
|
|
37
38
|
accrual_date_adjustment: Optional[constr(strict=True, max_length=50, min_length=0)] = Field(None, alias="accrualDateAdjustment", description="Indicates if the accrual dates are adjusted using the business day convention. The default value is 'Adjusted'. Supported string (enumeration) values are: [Adjusted, Unadjusted].")
|
38
39
|
business_day_convention: Optional[StrictStr] = Field(None, alias="businessDayConvention", description="When generating a set of dates, what convention should be used for adjusting dates that coincide with a non-business day. Supported string (enumeration) values are: [NoAdjustment, None, Previous, P, Following, F, ModifiedPrevious, MP, ModifiedFollowing, MF, HalfMonthModifiedFollowing, Nearest].")
|
39
40
|
accrual_day_count_convention: Optional[constr(strict=True, max_length=50, min_length=0)] = Field(None, alias="accrualDayCountConvention", description="Optional, if not set the main DayCountConvention is used for all accrual calculations. This only needs to be set when accrual uses a different day count to the coupon calculation.")
|
41
|
+
coupon_payment_lag: Optional[RelativeDateOffset] = Field(None, alias="couponPaymentLag")
|
40
42
|
scope: Optional[constr(strict=True, max_length=256, min_length=1)] = Field(None, description="The scope used when updating or inserting the convention.")
|
41
43
|
code: Optional[constr(strict=True, max_length=256, min_length=1)] = Field(None, description="The code of the convention.")
|
42
|
-
__properties = ["currency", "paymentFrequency", "dayCountConvention", "rollConvention", "paymentCalendars", "resetCalendars", "settleDays", "resetDays", "leapDaysIncluded", "accrualDateAdjustment", "businessDayConvention", "accrualDayCountConvention", "scope", "code"]
|
44
|
+
__properties = ["currency", "paymentFrequency", "dayCountConvention", "rollConvention", "paymentCalendars", "resetCalendars", "settleDays", "resetDays", "leapDaysIncluded", "accrualDateAdjustment", "businessDayConvention", "accrualDayCountConvention", "couponPaymentLag", "scope", "code"]
|
43
45
|
|
44
46
|
@validator('scope')
|
45
47
|
def scope_validate_regular_expression(cls, value):
|
@@ -85,6 +87,9 @@ class FlowConventions(BaseModel):
|
|
85
87
|
exclude={
|
86
88
|
},
|
87
89
|
exclude_none=True)
|
90
|
+
# override the default output from pydantic by calling `to_dict()` of coupon_payment_lag
|
91
|
+
if self.coupon_payment_lag:
|
92
|
+
_dict['couponPaymentLag'] = self.coupon_payment_lag.to_dict()
|
88
93
|
# set to None if leap_days_included (nullable) is None
|
89
94
|
# and __fields_set__ contains the field
|
90
95
|
if self.leap_days_included is None and "leap_days_included" in self.__fields_set__:
|
@@ -139,6 +144,7 @@ class FlowConventions(BaseModel):
|
|
139
144
|
"accrual_date_adjustment": obj.get("accrualDateAdjustment"),
|
140
145
|
"business_day_convention": obj.get("businessDayConvention"),
|
141
146
|
"accrual_day_count_convention": obj.get("accrualDayCountConvention"),
|
147
|
+
"coupon_payment_lag": RelativeDateOffset.from_dict(obj.get("couponPaymentLag")) if obj.get("couponPaymentLag") is not None else None,
|
142
148
|
"scope": obj.get("scope"),
|
143
149
|
"code": obj.get("code")
|
144
150
|
})
|
@@ -34,15 +34,15 @@ class ForwardRateAgreement(LusidInstrument):
|
|
34
34
|
fra_rate: Union[StrictFloat, StrictInt] = Field(..., alias="fraRate", description="The rate at which the FRA is traded.")
|
35
35
|
notional: Union[StrictFloat, StrictInt] = Field(..., description="The amount for which the FRA is traded.")
|
36
36
|
index_convention: Optional[IndexConvention] = Field(None, alias="indexConvention")
|
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, UnsettledCash, Cash")
|
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, UnsettledCash, Cash, MasteredInstrument")
|
38
38
|
additional_properties: Dict[str, Any] = {}
|
39
39
|
__properties = ["instrumentType", "startDate", "maturityDate", "domCcy", "fixingDate", "fraRate", "notional", "indexConvention"]
|
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', 'FundShareClass', 'FlexibleLoan', 'UnsettledCash', 'Cash'):
|
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', 'UnsettledCash', 'Cash')")
|
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', 'UnsettledCash', 'Cash', 'MasteredInstrument'):
|
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', 'UnsettledCash', 'Cash', 'MasteredInstrument')")
|
46
46
|
return value
|
47
47
|
|
48
48
|
class Config:
|
@@ -20,7 +20,7 @@ import json
|
|
20
20
|
|
21
21
|
from typing import Any, Dict, List, Optional
|
22
22
|
from pydantic.v1 import BaseModel, Field, StrictStr, conlist
|
23
|
-
from lusid.models.
|
23
|
+
from lusid.models.component_filter import ComponentFilter
|
24
24
|
from lusid.models.link import Link
|
25
25
|
from lusid.models.model_property import ModelProperty
|
26
26
|
from lusid.models.resource_id import ResourceId
|
@@ -34,13 +34,13 @@ class FundConfiguration(BaseModel):
|
|
34
34
|
id: ResourceId = Field(...)
|
35
35
|
display_name: Optional[StrictStr] = Field(None, alias="displayName", description="The name of the FundConfiguration.")
|
36
36
|
description: Optional[StrictStr] = Field(None, description="A description for the FundConfiguration.")
|
37
|
-
|
38
|
-
|
39
|
-
|
37
|
+
dealing_filters: Optional[conlist(ComponentFilter)] = Field(None, alias="dealingFilters", description="The set of filters used to decide which JE lines are included in the dealing.")
|
38
|
+
pnl_filters: Optional[conlist(ComponentFilter)] = Field(None, alias="pnlFilters", description="The set of filters used to decide which JE lines are included in the PnL.")
|
39
|
+
back_out_filters: Optional[conlist(ComponentFilter)] = Field(None, alias="backOutFilters", description="The set of filters used to decide which JE lines are included in the back outs.")
|
40
40
|
properties: Optional[Dict[str, ModelProperty]] = Field(None, description="A set of properties for the Fund Configuration.")
|
41
41
|
version: Optional[Version] = None
|
42
42
|
links: Optional[conlist(Link)] = None
|
43
|
-
__properties = ["href", "id", "displayName", "description", "
|
43
|
+
__properties = ["href", "id", "displayName", "description", "dealingFilters", "pnlFilters", "backOutFilters", "properties", "version", "links"]
|
44
44
|
|
45
45
|
class Config:
|
46
46
|
"""Pydantic configuration"""
|
@@ -69,15 +69,27 @@ class FundConfiguration(BaseModel):
|
|
69
69
|
# override the default output from pydantic by calling `to_dict()` of id
|
70
70
|
if self.id:
|
71
71
|
_dict['id'] = self.id.to_dict()
|
72
|
-
# override the default output from pydantic by calling `to_dict()` of
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
72
|
+
# override the default output from pydantic by calling `to_dict()` of each item in dealing_filters (list)
|
73
|
+
_items = []
|
74
|
+
if self.dealing_filters:
|
75
|
+
for _item in self.dealing_filters:
|
76
|
+
if _item:
|
77
|
+
_items.append(_item.to_dict())
|
78
|
+
_dict['dealingFilters'] = _items
|
79
|
+
# override the default output from pydantic by calling `to_dict()` of each item in pnl_filters (list)
|
80
|
+
_items = []
|
81
|
+
if self.pnl_filters:
|
82
|
+
for _item in self.pnl_filters:
|
83
|
+
if _item:
|
84
|
+
_items.append(_item.to_dict())
|
85
|
+
_dict['pnlFilters'] = _items
|
86
|
+
# override the default output from pydantic by calling `to_dict()` of each item in back_out_filters (list)
|
87
|
+
_items = []
|
88
|
+
if self.back_out_filters:
|
89
|
+
for _item in self.back_out_filters:
|
90
|
+
if _item:
|
91
|
+
_items.append(_item.to_dict())
|
92
|
+
_dict['backOutFilters'] = _items
|
81
93
|
# override the default output from pydantic by calling `to_dict()` of each value in properties (dict)
|
82
94
|
_field_dict = {}
|
83
95
|
if self.properties:
|
@@ -110,6 +122,21 @@ class FundConfiguration(BaseModel):
|
|
110
122
|
if self.description is None and "description" in self.__fields_set__:
|
111
123
|
_dict['description'] = None
|
112
124
|
|
125
|
+
# set to None if dealing_filters (nullable) is None
|
126
|
+
# and __fields_set__ contains the field
|
127
|
+
if self.dealing_filters is None and "dealing_filters" in self.__fields_set__:
|
128
|
+
_dict['dealingFilters'] = None
|
129
|
+
|
130
|
+
# set to None if pnl_filters (nullable) is None
|
131
|
+
# and __fields_set__ contains the field
|
132
|
+
if self.pnl_filters is None and "pnl_filters" in self.__fields_set__:
|
133
|
+
_dict['pnlFilters'] = None
|
134
|
+
|
135
|
+
# set to None if back_out_filters (nullable) is None
|
136
|
+
# and __fields_set__ contains the field
|
137
|
+
if self.back_out_filters is None and "back_out_filters" in self.__fields_set__:
|
138
|
+
_dict['backOutFilters'] = None
|
139
|
+
|
113
140
|
# set to None if properties (nullable) is None
|
114
141
|
# and __fields_set__ contains the field
|
115
142
|
if self.properties is None and "properties" in self.__fields_set__:
|
@@ -136,9 +163,9 @@ class FundConfiguration(BaseModel):
|
|
136
163
|
"id": ResourceId.from_dict(obj.get("id")) if obj.get("id") is not None else None,
|
137
164
|
"display_name": obj.get("displayName"),
|
138
165
|
"description": obj.get("description"),
|
139
|
-
"
|
140
|
-
"
|
141
|
-
"
|
166
|
+
"dealing_filters": [ComponentFilter.from_dict(_item) for _item in obj.get("dealingFilters")] if obj.get("dealingFilters") is not None else None,
|
167
|
+
"pnl_filters": [ComponentFilter.from_dict(_item) for _item in obj.get("pnlFilters")] if obj.get("pnlFilters") is not None else None,
|
168
|
+
"back_out_filters": [ComponentFilter.from_dict(_item) for _item in obj.get("backOutFilters")] if obj.get("backOutFilters") is not None else None,
|
142
169
|
"properties": dict(
|
143
170
|
(_k, ModelProperty.from_dict(_v))
|
144
171
|
for _k, _v in obj.get("properties").items()
|
@@ -18,9 +18,9 @@ import re # noqa: F401
|
|
18
18
|
import json
|
19
19
|
|
20
20
|
|
21
|
-
from typing import Any, Dict, Optional
|
22
|
-
from pydantic.v1 import BaseModel, Field, constr, validator
|
23
|
-
from lusid.models.
|
21
|
+
from typing import Any, Dict, List, Optional
|
22
|
+
from pydantic.v1 import BaseModel, Field, conlist, constr, validator
|
23
|
+
from lusid.models.component_filter import ComponentFilter
|
24
24
|
from lusid.models.model_property import ModelProperty
|
25
25
|
|
26
26
|
class FundConfigurationRequest(BaseModel):
|
@@ -30,11 +30,11 @@ class FundConfigurationRequest(BaseModel):
|
|
30
30
|
code: constr(strict=True, max_length=64, min_length=1) = Field(...)
|
31
31
|
display_name: Optional[constr(strict=True, max_length=256, min_length=1)] = Field(None, alias="displayName", description="The name of the Fund.")
|
32
32
|
description: Optional[constr(strict=True, max_length=1024, min_length=0)] = Field(None, description="A description for the Fund.")
|
33
|
-
|
34
|
-
|
35
|
-
|
33
|
+
dealing_filters: conlist(ComponentFilter) = Field(..., alias="dealingFilters", description="The set of filters used to decide which JE lines are included in the dealing.")
|
34
|
+
pnl_filters: conlist(ComponentFilter) = Field(..., alias="pnlFilters", description="The set of filters used to decide which JE lines are included in the PnL.")
|
35
|
+
back_out_filters: conlist(ComponentFilter) = Field(..., alias="backOutFilters", description="The set of filters used to decide which JE lines are included in the back outs.")
|
36
36
|
properties: Optional[Dict[str, ModelProperty]] = Field(None, description="A set of properties for the Fund Configuration.")
|
37
|
-
__properties = ["code", "displayName", "description", "
|
37
|
+
__properties = ["code", "displayName", "description", "dealingFilters", "pnlFilters", "backOutFilters", "properties"]
|
38
38
|
|
39
39
|
@validator('code')
|
40
40
|
def code_validate_regular_expression(cls, value):
|
@@ -77,15 +77,27 @@ class FundConfigurationRequest(BaseModel):
|
|
77
77
|
exclude={
|
78
78
|
},
|
79
79
|
exclude_none=True)
|
80
|
-
# override the default output from pydantic by calling `to_dict()` of
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
80
|
+
# override the default output from pydantic by calling `to_dict()` of each item in dealing_filters (list)
|
81
|
+
_items = []
|
82
|
+
if self.dealing_filters:
|
83
|
+
for _item in self.dealing_filters:
|
84
|
+
if _item:
|
85
|
+
_items.append(_item.to_dict())
|
86
|
+
_dict['dealingFilters'] = _items
|
87
|
+
# override the default output from pydantic by calling `to_dict()` of each item in pnl_filters (list)
|
88
|
+
_items = []
|
89
|
+
if self.pnl_filters:
|
90
|
+
for _item in self.pnl_filters:
|
91
|
+
if _item:
|
92
|
+
_items.append(_item.to_dict())
|
93
|
+
_dict['pnlFilters'] = _items
|
94
|
+
# override the default output from pydantic by calling `to_dict()` of each item in back_out_filters (list)
|
95
|
+
_items = []
|
96
|
+
if self.back_out_filters:
|
97
|
+
for _item in self.back_out_filters:
|
98
|
+
if _item:
|
99
|
+
_items.append(_item.to_dict())
|
100
|
+
_dict['backOutFilters'] = _items
|
89
101
|
# override the default output from pydantic by calling `to_dict()` of each value in properties (dict)
|
90
102
|
_field_dict = {}
|
91
103
|
if self.properties:
|
@@ -123,9 +135,9 @@ class FundConfigurationRequest(BaseModel):
|
|
123
135
|
"code": obj.get("code"),
|
124
136
|
"display_name": obj.get("displayName"),
|
125
137
|
"description": obj.get("description"),
|
126
|
-
"
|
127
|
-
"
|
128
|
-
"
|
138
|
+
"dealing_filters": [ComponentFilter.from_dict(_item) for _item in obj.get("dealingFilters")] if obj.get("dealingFilters") is not None else None,
|
139
|
+
"pnl_filters": [ComponentFilter.from_dict(_item) for _item in obj.get("pnlFilters")] if obj.get("pnlFilters") is not None else None,
|
140
|
+
"back_out_filters": [ComponentFilter.from_dict(_item) for _item in obj.get("backOutFilters")] if obj.get("backOutFilters") is not None else None,
|
129
141
|
"properties": dict(
|
130
142
|
(_k, ModelProperty.from_dict(_v))
|
131
143
|
for _k, _v in obj.get("properties").items()
|
@@ -0,0 +1,99 @@
|
|
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.v1 import Field, StrictStr, conlist, validator
|
23
|
+
from lusid.models.reference_list import ReferenceList
|
24
|
+
from lusid.models.resource_id import ResourceId
|
25
|
+
|
26
|
+
class FundIdList(ReferenceList):
|
27
|
+
"""
|
28
|
+
FundIdList
|
29
|
+
"""
|
30
|
+
values: conlist(ResourceId, max_items=100) = Field(...)
|
31
|
+
reference_list_type: StrictStr = Field(..., alias="referenceListType", description="The reference list values. The available values are: PortfolioGroupIdList, PortfolioIdList, AddressKeyList, StringList, InstrumentList, DecimalList, PropertyList, FundIdList")
|
32
|
+
additional_properties: Dict[str, Any] = {}
|
33
|
+
__properties = ["referenceListType", "values"]
|
34
|
+
|
35
|
+
@validator('reference_list_type')
|
36
|
+
def reference_list_type_validate_enum(cls, value):
|
37
|
+
"""Validates the enum"""
|
38
|
+
if value not in ('PortfolioGroupIdList', 'PortfolioIdList', 'AddressKeyList', 'StringList', 'InstrumentList', 'DecimalList', 'PropertyList', 'FundIdList'):
|
39
|
+
raise ValueError("must be one of enum values ('PortfolioGroupIdList', 'PortfolioIdList', 'AddressKeyList', 'StringList', 'InstrumentList', 'DecimalList', 'PropertyList', 'FundIdList')")
|
40
|
+
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) -> FundIdList:
|
57
|
+
"""Create an instance of FundIdList 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
|
+
"additional_properties"
|
65
|
+
},
|
66
|
+
exclude_none=True)
|
67
|
+
# override the default output from pydantic by calling `to_dict()` of each item in values (list)
|
68
|
+
_items = []
|
69
|
+
if self.values:
|
70
|
+
for _item in self.values:
|
71
|
+
if _item:
|
72
|
+
_items.append(_item.to_dict())
|
73
|
+
_dict['values'] = _items
|
74
|
+
# puts key-value pairs in additional_properties in the top level
|
75
|
+
if self.additional_properties is not None:
|
76
|
+
for _key, _value in self.additional_properties.items():
|
77
|
+
_dict[_key] = _value
|
78
|
+
|
79
|
+
return _dict
|
80
|
+
|
81
|
+
@classmethod
|
82
|
+
def from_dict(cls, obj: dict) -> FundIdList:
|
83
|
+
"""Create an instance of FundIdList from a dict"""
|
84
|
+
if obj is None:
|
85
|
+
return None
|
86
|
+
|
87
|
+
if not isinstance(obj, dict):
|
88
|
+
return FundIdList.parse_obj(obj)
|
89
|
+
|
90
|
+
_obj = FundIdList.parse_obj({
|
91
|
+
"reference_list_type": obj.get("referenceListType"),
|
92
|
+
"values": [ResourceId.from_dict(_item) for _item in obj.get("values")] if obj.get("values") is not None else None
|
93
|
+
})
|
94
|
+
# store additional fields in additional_properties
|
95
|
+
for _key in obj.keys():
|
96
|
+
if _key not in cls.__properties:
|
97
|
+
_obj.additional_properties[_key] = obj.get(_key)
|
98
|
+
|
99
|
+
return _obj
|
lusid/models/fund_share_class.py
CHANGED
@@ -18,28 +18,30 @@ import re # noqa: F401
|
|
18
18
|
import json
|
19
19
|
|
20
20
|
|
21
|
-
from typing import Any, Dict
|
22
|
-
from pydantic.v1 import Field, StrictStr, constr, validator
|
21
|
+
from typing import Any, Dict, List, Optional
|
22
|
+
from pydantic.v1 import Field, StrictStr, conlist, constr, validator
|
23
23
|
from lusid.models.lusid_instrument import LusidInstrument
|
24
|
+
from lusid.models.simple_rounding_convention import SimpleRoundingConvention
|
24
25
|
|
25
26
|
class FundShareClass(LusidInstrument):
|
26
27
|
"""
|
27
|
-
LUSID representation of a FundShareClass. A ShareClass represents a pool of shares, held by investors, within a fund.
|
28
|
+
LUSID representation of a FundShareClass. A ShareClass represents a pool of shares, held by investors, within a fund. A ShareClass can represent a differing investment approach by either Fees, Income, Currency Risk and Investor type. # noqa: E501
|
28
29
|
"""
|
29
30
|
short_code: constr(strict=True, min_length=1) = Field(..., alias="shortCode", description="A short identifier, unique across a single fund, usually made up of the ShareClass components. Eg \"A Accumulation Euro Hedged Class\" could become \"A Acc H EUR\".")
|
30
31
|
fund_share_class_type: constr(strict=True, min_length=1) = Field(..., alias="fundShareClassType", description="The type of distribution that the ShareClass will calculate. Can be either 'Income' or 'Accumulation' - Income classes will pay out and Accumulation classes will retain their ShareClass attributable income. Supported string (enumeration) values are: [Income, Accumulation].")
|
31
32
|
distribution_payment_type: constr(strict=True, min_length=1) = Field(..., alias="distributionPaymentType", description="The tax treatment applied to any distributions calculated within the ShareClass. Can be either 'Net' (Distribution Calculated net of tax) or 'Gross' (Distribution calculated gross of tax). Supported string (enumeration) values are: [Gross, Net].")
|
32
33
|
hedging: constr(strict=True, min_length=1) = Field(..., description="A flag to indicate the ShareClass is operating currency hedging as a means to limit currency risk as part of it's investment strategy. Supported string (enumeration) values are: [Invalid, None, ApplyHedging].")
|
33
34
|
dom_ccy: StrictStr = Field(..., alias="domCcy", description="The domestic currency of the instrument.")
|
34
|
-
|
35
|
+
rounding_conventions: Optional[conlist(SimpleRoundingConvention)] = Field(None, alias="roundingConventions", description="Rounding Convention used for the FundShareClass quotes")
|
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")
|
35
37
|
additional_properties: Dict[str, Any] = {}
|
36
|
-
__properties = ["instrumentType", "shortCode", "fundShareClassType", "distributionPaymentType", "hedging", "domCcy"]
|
38
|
+
__properties = ["instrumentType", "shortCode", "fundShareClassType", "distributionPaymentType", "hedging", "domCcy", "roundingConventions"]
|
37
39
|
|
38
40
|
@validator('instrument_type')
|
39
41
|
def instrument_type_validate_enum(cls, value):
|
40
42
|
"""Validates the enum"""
|
41
|
-
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'):
|
42
|
-
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'):
|
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')")
|
43
45
|
return value
|
44
46
|
|
45
47
|
class Config:
|
@@ -67,11 +69,23 @@ class FundShareClass(LusidInstrument):
|
|
67
69
|
"additional_properties"
|
68
70
|
},
|
69
71
|
exclude_none=True)
|
72
|
+
# override the default output from pydantic by calling `to_dict()` of each item in rounding_conventions (list)
|
73
|
+
_items = []
|
74
|
+
if self.rounding_conventions:
|
75
|
+
for _item in self.rounding_conventions:
|
76
|
+
if _item:
|
77
|
+
_items.append(_item.to_dict())
|
78
|
+
_dict['roundingConventions'] = _items
|
70
79
|
# puts key-value pairs in additional_properties in the top level
|
71
80
|
if self.additional_properties is not None:
|
72
81
|
for _key, _value in self.additional_properties.items():
|
73
82
|
_dict[_key] = _value
|
74
83
|
|
84
|
+
# set to None if rounding_conventions (nullable) is None
|
85
|
+
# and __fields_set__ contains the field
|
86
|
+
if self.rounding_conventions is None and "rounding_conventions" in self.__fields_set__:
|
87
|
+
_dict['roundingConventions'] = None
|
88
|
+
|
75
89
|
return _dict
|
76
90
|
|
77
91
|
@classmethod
|
@@ -89,7 +103,8 @@ class FundShareClass(LusidInstrument):
|
|
89
103
|
"fund_share_class_type": obj.get("fundShareClassType"),
|
90
104
|
"distribution_payment_type": obj.get("distributionPaymentType"),
|
91
105
|
"hedging": obj.get("hedging"),
|
92
|
-
"dom_ccy": obj.get("domCcy")
|
106
|
+
"dom_ccy": obj.get("domCcy"),
|
107
|
+
"rounding_conventions": [SimpleRoundingConvention.from_dict(_item) for _item in obj.get("roundingConventions")] if obj.get("roundingConventions") is not None else None
|
93
108
|
})
|
94
109
|
# store additional fields in additional_properties
|
95
110
|
for _key in obj.keys():
|