lusid-sdk 2.0.50b0__py3-none-any.whl → 2.0.470__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 +1117 -14
- lusid/api/__init__.py +69 -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 +1119 -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/queryable_keys_api.py +211 -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/staging_rule_set_api.py +885 -0
- 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 +10 -7
- 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 +1028 -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_staging_rule_set_request.py +91 -0
- 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 +124 -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/expiry_event.py +91 -0
- 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 +13 -5
- lusid/models/instrument_event_configuration.py +74 -0
- lusid/models/instrument_event_holder.py +12 -3
- lusid/models/instrument_event_type.py +8 -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/output_transaction.py +9 -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_staging_rule_set.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 +3 -0
- lusid/models/property_key_compliance_parameter.py +3 -3
- lusid/models/property_key_list_compliance_parameter.py +3 -3
- lusid/models/queryable_key.py +124 -0
- 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/resource_list_of_queryable_key.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/set_share_class_instruments_request.py +79 -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/staging_rule.py +90 -0
- lusid/models/staging_rule_approval_criteria.py +81 -0
- lusid/models/staging_rule_match_criteria.py +95 -0
- lusid/models/staging_rule_set.py +103 -0
- 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/update_staging_rule_set_request.py +91 -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/rest.py +1 -1
- {lusid_sdk-2.0.50b0.dist-info → lusid_sdk-2.0.470.dist-info}/METADATA +245 -48
- {lusid_sdk-2.0.50b0.dist-info → lusid_sdk-2.0.470.dist-info}/RECORD +326 -235
- {lusid_sdk-2.0.50b0.dist-info → lusid_sdk-2.0.470.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
lusid/models/abor.py
CHANGED
|
@@ -34,12 +34,13 @@ class Abor(BaseModel):
|
|
|
34
34
|
id: ResourceId = Field(...)
|
|
35
35
|
display_name: Optional[StrictStr] = Field(None, alias="displayName", description="The name of the Abor.")
|
|
36
36
|
description: Optional[StrictStr] = Field(None, description="The description for the Abor.")
|
|
37
|
-
portfolio_ids: conlist(PortfolioEntityId) = Field(..., alias="portfolioIds", description="The list with the portfolio ids which are part of the Abor.")
|
|
37
|
+
portfolio_ids: conlist(PortfolioEntityId) = Field(..., alias="portfolioIds", description="The list with the portfolio ids which are part of the Abor. Note: These must all have the same base currency.")
|
|
38
38
|
abor_configuration_id: Optional[ResourceId] = Field(None, alias="aborConfigurationId")
|
|
39
39
|
properties: Optional[Dict[str, ModelProperty]] = Field(None, description="A set of properties for the Abor.")
|
|
40
40
|
version: Optional[Version] = None
|
|
41
|
+
base_currency: Optional[StrictStr] = Field(None, alias="baseCurrency", description="The base currency of the abor based on contained portfolio base currencies.")
|
|
41
42
|
links: Optional[conlist(Link)] = None
|
|
42
|
-
__properties = ["href", "id", "displayName", "description", "portfolioIds", "aborConfigurationId", "properties", "version", "links"]
|
|
43
|
+
__properties = ["href", "id", "displayName", "description", "portfolioIds", "aborConfigurationId", "properties", "version", "baseCurrency", "links"]
|
|
43
44
|
|
|
44
45
|
class Config:
|
|
45
46
|
"""Pydantic configuration"""
|
|
@@ -115,6 +116,11 @@ class Abor(BaseModel):
|
|
|
115
116
|
if self.properties is None and "properties" in self.__fields_set__:
|
|
116
117
|
_dict['properties'] = None
|
|
117
118
|
|
|
119
|
+
# set to None if base_currency (nullable) is None
|
|
120
|
+
# and __fields_set__ contains the field
|
|
121
|
+
if self.base_currency is None and "base_currency" in self.__fields_set__:
|
|
122
|
+
_dict['baseCurrency'] = None
|
|
123
|
+
|
|
118
124
|
# set to None if links (nullable) is None
|
|
119
125
|
# and __fields_set__ contains the field
|
|
120
126
|
if self.links is None and "links" in self.__fields_set__:
|
|
@@ -145,6 +151,7 @@ class Abor(BaseModel):
|
|
|
145
151
|
if obj.get("properties") is not None
|
|
146
152
|
else None,
|
|
147
153
|
"version": Version.from_dict(obj.get("version")) if obj.get("version") is not None else None,
|
|
154
|
+
"base_currency": obj.get("baseCurrency"),
|
|
148
155
|
"links": [Link.from_dict(_item) for _item in obj.get("links")] if obj.get("links") is not None else None
|
|
149
156
|
})
|
|
150
157
|
return _obj
|
|
@@ -36,11 +36,11 @@ class AborConfiguration(BaseModel):
|
|
|
36
36
|
recipe_id: Optional[ResourceId] = Field(None, alias="recipeId")
|
|
37
37
|
chart_of_accounts_id: ResourceId = Field(..., alias="chartOfAccountsId")
|
|
38
38
|
posting_module_codes: Optional[conlist(StrictStr)] = Field(None, alias="postingModuleCodes", description="The Posting Module Codes from which the rules to be applied are retrieved.")
|
|
39
|
+
cleardown_module_codes: Optional[conlist(StrictStr)] = Field(None, alias="cleardownModuleCodes", description="The Cleardown Module Codes from which the rules to be applied are retrieved.")
|
|
39
40
|
properties: Optional[Dict[str, ModelProperty]] = Field(None, description="A set of properties for the Abor Configuration.")
|
|
40
41
|
version: Optional[Version] = None
|
|
41
|
-
cleardown_module_codes: Optional[conlist(StrictStr)] = Field(None, alias="cleardownModuleCodes", description="The Cleardown Module Codes from which the rules to be applied are retrieved.")
|
|
42
42
|
links: Optional[conlist(Link)] = None
|
|
43
|
-
__properties = ["href", "id", "displayName", "description", "recipeId", "chartOfAccountsId", "postingModuleCodes", "
|
|
43
|
+
__properties = ["href", "id", "displayName", "description", "recipeId", "chartOfAccountsId", "postingModuleCodes", "cleardownModuleCodes", "properties", "version", "links"]
|
|
44
44
|
|
|
45
45
|
class Config:
|
|
46
46
|
"""Pydantic configuration"""
|
|
@@ -112,16 +112,16 @@ class AborConfiguration(BaseModel):
|
|
|
112
112
|
if self.posting_module_codes is None and "posting_module_codes" in self.__fields_set__:
|
|
113
113
|
_dict['postingModuleCodes'] = None
|
|
114
114
|
|
|
115
|
-
# set to None if properties (nullable) is None
|
|
116
|
-
# and __fields_set__ contains the field
|
|
117
|
-
if self.properties is None and "properties" in self.__fields_set__:
|
|
118
|
-
_dict['properties'] = None
|
|
119
|
-
|
|
120
115
|
# set to None if cleardown_module_codes (nullable) is None
|
|
121
116
|
# and __fields_set__ contains the field
|
|
122
117
|
if self.cleardown_module_codes is None and "cleardown_module_codes" in self.__fields_set__:
|
|
123
118
|
_dict['cleardownModuleCodes'] = None
|
|
124
119
|
|
|
120
|
+
# set to None if properties (nullable) is None
|
|
121
|
+
# and __fields_set__ contains the field
|
|
122
|
+
if self.properties is None and "properties" in self.__fields_set__:
|
|
123
|
+
_dict['properties'] = None
|
|
124
|
+
|
|
125
125
|
# set to None if links (nullable) is None
|
|
126
126
|
# and __fields_set__ contains the field
|
|
127
127
|
if self.links is None and "links" in self.__fields_set__:
|
|
@@ -146,6 +146,7 @@ class AborConfiguration(BaseModel):
|
|
|
146
146
|
"recipe_id": ResourceId.from_dict(obj.get("recipeId")) if obj.get("recipeId") is not None else None,
|
|
147
147
|
"chart_of_accounts_id": ResourceId.from_dict(obj.get("chartOfAccountsId")) if obj.get("chartOfAccountsId") is not None else None,
|
|
148
148
|
"posting_module_codes": obj.get("postingModuleCodes"),
|
|
149
|
+
"cleardown_module_codes": obj.get("cleardownModuleCodes"),
|
|
149
150
|
"properties": dict(
|
|
150
151
|
(_k, ModelProperty.from_dict(_v))
|
|
151
152
|
for _k, _v in obj.get("properties").items()
|
|
@@ -153,7 +154,6 @@ class AborConfiguration(BaseModel):
|
|
|
153
154
|
if obj.get("properties") is not None
|
|
154
155
|
else None,
|
|
155
156
|
"version": Version.from_dict(obj.get("version")) if obj.get("version") is not None else None,
|
|
156
|
-
"cleardown_module_codes": obj.get("cleardownModuleCodes"),
|
|
157
157
|
"links": [Link.from_dict(_item) for _item in obj.get("links")] if obj.get("links") is not None else None
|
|
158
158
|
})
|
|
159
159
|
return _obj
|
|
@@ -33,9 +33,9 @@ class AborConfigurationRequest(BaseModel):
|
|
|
33
33
|
recipe_id: ResourceId = Field(..., alias="recipeId")
|
|
34
34
|
chart_of_accounts_id: ResourceId = Field(..., alias="chartOfAccountsId")
|
|
35
35
|
posting_module_codes: Optional[conlist(StrictStr)] = Field(None, alias="postingModuleCodes", description="The Posting Module Codes from which the rules to be applied are retrieved.")
|
|
36
|
-
properties: Optional[Dict[str, ModelProperty]] = Field(None, description="A set of properties for the Abor Configuration.")
|
|
37
36
|
cleardown_module_codes: Optional[conlist(StrictStr)] = Field(None, alias="cleardownModuleCodes", description="The Cleardown Module Codes from which the rules to be applied are retrieved.")
|
|
38
|
-
|
|
37
|
+
properties: Optional[Dict[str, ModelProperty]] = Field(None, description="A set of properties for the Abor Configuration.")
|
|
38
|
+
__properties = ["code", "displayName", "description", "recipeId", "chartOfAccountsId", "postingModuleCodes", "cleardownModuleCodes", "properties"]
|
|
39
39
|
|
|
40
40
|
@validator('code')
|
|
41
41
|
def code_validate_regular_expression(cls, value):
|
|
@@ -106,16 +106,16 @@ class AborConfigurationRequest(BaseModel):
|
|
|
106
106
|
if self.posting_module_codes is None and "posting_module_codes" in self.__fields_set__:
|
|
107
107
|
_dict['postingModuleCodes'] = None
|
|
108
108
|
|
|
109
|
-
# set to None if properties (nullable) is None
|
|
110
|
-
# and __fields_set__ contains the field
|
|
111
|
-
if self.properties is None and "properties" in self.__fields_set__:
|
|
112
|
-
_dict['properties'] = None
|
|
113
|
-
|
|
114
109
|
# set to None if cleardown_module_codes (nullable) is None
|
|
115
110
|
# and __fields_set__ contains the field
|
|
116
111
|
if self.cleardown_module_codes is None and "cleardown_module_codes" in self.__fields_set__:
|
|
117
112
|
_dict['cleardownModuleCodes'] = None
|
|
118
113
|
|
|
114
|
+
# set to None if properties (nullable) is None
|
|
115
|
+
# and __fields_set__ contains the field
|
|
116
|
+
if self.properties is None and "properties" in self.__fields_set__:
|
|
117
|
+
_dict['properties'] = None
|
|
118
|
+
|
|
119
119
|
return _dict
|
|
120
120
|
|
|
121
121
|
@classmethod
|
|
@@ -134,12 +134,12 @@ class AborConfigurationRequest(BaseModel):
|
|
|
134
134
|
"recipe_id": ResourceId.from_dict(obj.get("recipeId")) if obj.get("recipeId") is not None else None,
|
|
135
135
|
"chart_of_accounts_id": ResourceId.from_dict(obj.get("chartOfAccountsId")) if obj.get("chartOfAccountsId") is not None else None,
|
|
136
136
|
"posting_module_codes": obj.get("postingModuleCodes"),
|
|
137
|
+
"cleardown_module_codes": obj.get("cleardownModuleCodes"),
|
|
137
138
|
"properties": dict(
|
|
138
139
|
(_k, ModelProperty.from_dict(_v))
|
|
139
140
|
for _k, _v in obj.get("properties").items()
|
|
140
141
|
)
|
|
141
142
|
if obj.get("properties") is not None
|
|
142
|
-
else None
|
|
143
|
-
"cleardown_module_codes": obj.get("cleardownModuleCodes")
|
|
143
|
+
else None
|
|
144
144
|
})
|
|
145
145
|
return _obj
|
lusid/models/abor_request.py
CHANGED
|
@@ -31,7 +31,7 @@ class AborRequest(BaseModel):
|
|
|
31
31
|
code: constr(strict=True, max_length=64, min_length=1) = Field(..., description="The code given for the Abor.")
|
|
32
32
|
display_name: constr(strict=True, max_length=256, min_length=1) = Field(..., alias="displayName", description="The name of the Abor.")
|
|
33
33
|
description: Optional[constr(strict=True, max_length=1024, min_length=0)] = Field(None, description="The description for the Abor.")
|
|
34
|
-
portfolio_ids: conlist(PortfolioEntityId) = Field(..., alias="portfolioIds", description="The list with the portfolio ids which are part of the Abor.")
|
|
34
|
+
portfolio_ids: conlist(PortfolioEntityId) = Field(..., alias="portfolioIds", description="The list with the portfolio ids which are part of the Abor. Note: These must all have the same base currency.")
|
|
35
35
|
abor_configuration_id: ResourceId = Field(..., alias="aborConfigurationId")
|
|
36
36
|
properties: Optional[Dict[str, ModelProperty]] = Field(None, description="A set of properties for the Abor.")
|
|
37
37
|
__properties = ["code", "displayName", "description", "portfolioIds", "aborConfigurationId", "properties"]
|
lusid/models/account.py
CHANGED
|
@@ -30,7 +30,7 @@ class Account(BaseModel):
|
|
|
30
30
|
description: Optional[constr(strict=True, max_length=1024, min_length=0)] = Field(None, description="A description for the Account.")
|
|
31
31
|
type: constr(strict=True, min_length=1) = Field(..., description="The Account type. Can have the values: Asset/Liabilities/Income/Expense/Capital/Revenue.")
|
|
32
32
|
status: StrictStr = Field(..., description="The Account status. Can be Active, Inactive or Deleted. Defaults to Active. The available values are: Active, Inactive, Deleted")
|
|
33
|
-
control:
|
|
33
|
+
control: Optional[StrictStr] = Field(None, description="This allows users to specify whether this a protected Account that prevents direct manual journal adjustment. Can have the values: System/ManualIt will default to “Manual”.")
|
|
34
34
|
properties: Optional[Dict[str, ModelProperty]] = Field(None, description="A set of properties for the Account.")
|
|
35
35
|
__properties = ["code", "description", "type", "status", "control", "properties"]
|
|
36
36
|
|
|
@@ -94,6 +94,11 @@ class Account(BaseModel):
|
|
|
94
94
|
if self.description is None and "description" in self.__fields_set__:
|
|
95
95
|
_dict['description'] = None
|
|
96
96
|
|
|
97
|
+
# set to None if control (nullable) is None
|
|
98
|
+
# and __fields_set__ contains the field
|
|
99
|
+
if self.control is None and "control" in self.__fields_set__:
|
|
100
|
+
_dict['control'] = None
|
|
101
|
+
|
|
97
102
|
# set to None if properties (nullable) is None
|
|
98
103
|
# and __fields_set__ contains the field
|
|
99
104
|
if self.properties is None and "properties" in self.__fields_set__:
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
LUSID API
|
|
5
|
+
|
|
6
|
+
FINBOURNE Technology # noqa: E501
|
|
7
|
+
|
|
8
|
+
Contact: info@finbourne.com
|
|
9
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
10
|
+
|
|
11
|
+
Do not edit the class manually.
|
|
12
|
+
"""
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
from __future__ import annotations
|
|
16
|
+
import pprint
|
|
17
|
+
import re # noqa: F401
|
|
18
|
+
import json
|
|
19
|
+
|
|
20
|
+
from datetime import datetime
|
|
21
|
+
from typing import Any, Dict, Optional, Union
|
|
22
|
+
from pydantic import Field, StrictFloat, StrictInt, StrictStr, validator
|
|
23
|
+
from lusid.models.instrument_event import InstrumentEvent
|
|
24
|
+
|
|
25
|
+
class AccumulationEvent(InstrumentEvent):
|
|
26
|
+
"""
|
|
27
|
+
Accumulation dividend # noqa: E501
|
|
28
|
+
"""
|
|
29
|
+
announcement_date: Optional[datetime] = Field(None, alias="announcementDate", description="Date on which the dividend was announced / declared.")
|
|
30
|
+
dividend_currency: StrictStr = Field(..., alias="dividendCurrency", description="Payment currency")
|
|
31
|
+
dividend_rate: Union[StrictFloat, StrictInt] = Field(..., alias="dividendRate", description="Dividend rate or payment rate as a percentage. i.e. 5% is written as 0.05")
|
|
32
|
+
ex_date: datetime = Field(..., alias="exDate", description="The first business day on which the dividend is not owed to the buying party. Typically this is T-1 from the RecordDate.")
|
|
33
|
+
payment_date: datetime = Field(..., alias="paymentDate", description="The date the company pays out dividends to shareholders.")
|
|
34
|
+
instrument_event_type: StrictStr = Field(..., alias="instrumentEventType", description="The Type of Event. The available values are: TransitionEvent, InformationalEvent, OpenEvent, CloseEvent, StockSplitEvent, BondDefaultEvent, CashDividendEvent, AmortisationEvent, CashFlowEvent, ExerciseEvent, ResetEvent, TriggerEvent, RawVendorEvent, InformationalErrorEvent, BondCouponEvent, DividendReinvestmentEvent, AccumulationEvent, BondPrincipalEvent, DividendOptionEvent, MaturityEvent, FxForwardSettlementEvent, ExpiryEvent")
|
|
35
|
+
additional_properties: Dict[str, Any] = {}
|
|
36
|
+
__properties = ["instrumentEventType", "announcementDate", "dividendCurrency", "dividendRate", "exDate", "paymentDate"]
|
|
37
|
+
|
|
38
|
+
@validator('instrument_event_type')
|
|
39
|
+
def instrument_event_type_validate_enum(cls, value):
|
|
40
|
+
"""Validates the enum"""
|
|
41
|
+
if value not in ('TransitionEvent', 'InformationalEvent', 'OpenEvent', 'CloseEvent', 'StockSplitEvent', 'BondDefaultEvent', 'CashDividendEvent', 'AmortisationEvent', 'CashFlowEvent', 'ExerciseEvent', 'ResetEvent', 'TriggerEvent', 'RawVendorEvent', 'InformationalErrorEvent', 'BondCouponEvent', 'DividendReinvestmentEvent', 'AccumulationEvent', 'BondPrincipalEvent', 'DividendOptionEvent', 'MaturityEvent', 'FxForwardSettlementEvent', 'ExpiryEvent'):
|
|
42
|
+
raise ValueError("must be one of enum values ('TransitionEvent', 'InformationalEvent', 'OpenEvent', 'CloseEvent', 'StockSplitEvent', 'BondDefaultEvent', 'CashDividendEvent', 'AmortisationEvent', 'CashFlowEvent', 'ExerciseEvent', 'ResetEvent', 'TriggerEvent', 'RawVendorEvent', 'InformationalErrorEvent', 'BondCouponEvent', 'DividendReinvestmentEvent', 'AccumulationEvent', 'BondPrincipalEvent', 'DividendOptionEvent', 'MaturityEvent', 'FxForwardSettlementEvent', 'ExpiryEvent')")
|
|
43
|
+
return value
|
|
44
|
+
|
|
45
|
+
class Config:
|
|
46
|
+
"""Pydantic configuration"""
|
|
47
|
+
allow_population_by_field_name = True
|
|
48
|
+
validate_assignment = True
|
|
49
|
+
|
|
50
|
+
def to_str(self) -> str:
|
|
51
|
+
"""Returns the string representation of the model using alias"""
|
|
52
|
+
return pprint.pformat(self.dict(by_alias=True))
|
|
53
|
+
|
|
54
|
+
def to_json(self) -> str:
|
|
55
|
+
"""Returns the JSON representation of the model using alias"""
|
|
56
|
+
return json.dumps(self.to_dict())
|
|
57
|
+
|
|
58
|
+
@classmethod
|
|
59
|
+
def from_json(cls, json_str: str) -> AccumulationEvent:
|
|
60
|
+
"""Create an instance of AccumulationEvent from a JSON string"""
|
|
61
|
+
return cls.from_dict(json.loads(json_str))
|
|
62
|
+
|
|
63
|
+
def to_dict(self):
|
|
64
|
+
"""Returns the dictionary representation of the model using alias"""
|
|
65
|
+
_dict = self.dict(by_alias=True,
|
|
66
|
+
exclude={
|
|
67
|
+
"additional_properties"
|
|
68
|
+
},
|
|
69
|
+
exclude_none=True)
|
|
70
|
+
# puts key-value pairs in additional_properties in the top level
|
|
71
|
+
if self.additional_properties is not None:
|
|
72
|
+
for _key, _value in self.additional_properties.items():
|
|
73
|
+
_dict[_key] = _value
|
|
74
|
+
|
|
75
|
+
# set to None if announcement_date (nullable) is None
|
|
76
|
+
# and __fields_set__ contains the field
|
|
77
|
+
if self.announcement_date is None and "announcement_date" in self.__fields_set__:
|
|
78
|
+
_dict['announcementDate'] = None
|
|
79
|
+
|
|
80
|
+
return _dict
|
|
81
|
+
|
|
82
|
+
@classmethod
|
|
83
|
+
def from_dict(cls, obj: dict) -> AccumulationEvent:
|
|
84
|
+
"""Create an instance of AccumulationEvent from a dict"""
|
|
85
|
+
if obj is None:
|
|
86
|
+
return None
|
|
87
|
+
|
|
88
|
+
if not isinstance(obj, dict):
|
|
89
|
+
return AccumulationEvent.parse_obj(obj)
|
|
90
|
+
|
|
91
|
+
_obj = AccumulationEvent.parse_obj({
|
|
92
|
+
"instrument_event_type": obj.get("instrumentEventType"),
|
|
93
|
+
"announcement_date": obj.get("announcementDate"),
|
|
94
|
+
"dividend_currency": obj.get("dividendCurrency"),
|
|
95
|
+
"dividend_rate": obj.get("dividendRate"),
|
|
96
|
+
"ex_date": obj.get("exDate"),
|
|
97
|
+
"payment_date": obj.get("paymentDate")
|
|
98
|
+
})
|
|
99
|
+
# store additional fields in additional_properties
|
|
100
|
+
for _key in obj.keys():
|
|
101
|
+
if _key not in cls.__properties:
|
|
102
|
+
_obj.additional_properties[_key] = obj.get(_key)
|
|
103
|
+
|
|
104
|
+
return _obj
|
|
@@ -19,30 +19,23 @@ import json
|
|
|
19
19
|
|
|
20
20
|
|
|
21
21
|
from typing import Any, Dict
|
|
22
|
-
from pydantic import Field, StrictStr,
|
|
22
|
+
from pydantic import Field, StrictStr, validator
|
|
23
23
|
from lusid.models.compliance_parameter import ComplianceParameter
|
|
24
24
|
|
|
25
25
|
class AddressKeyComplianceParameter(ComplianceParameter):
|
|
26
26
|
"""
|
|
27
27
|
AddressKeyComplianceParameter
|
|
28
28
|
"""
|
|
29
|
-
value:
|
|
30
|
-
compliance_parameter_type: StrictStr = Field(..., alias="complianceParameterType", description="The parameter type. The available values are: BoolComplianceParameter, StringComplianceParameter, DecimalComplianceParameter, DateTimeComplianceParameter, PropertyKeyComplianceParameter, AddressKeyComplianceParameter, PortfolioIdComplianceParameter, PortfolioGroupIdComplianceParameter, StringListComplianceParameter, BoolListComplianceParameter, DateTimeListComplianceParameter, DecimalListComplianceParameter, PropertyKeyListComplianceParameter, AddressKeyListComplianceParameter, PortfolioIdListComplianceParameter, PortfolioGroupIdListComplianceParameter, InstrumentListComplianceParameter")
|
|
29
|
+
value: StrictStr = Field(..., description="The key that uniquely identifies a queryable address in Lusid.")
|
|
30
|
+
compliance_parameter_type: StrictStr = Field(..., alias="complianceParameterType", description="The parameter type. The available values are: BoolComplianceParameter, StringComplianceParameter, DecimalComplianceParameter, DateTimeComplianceParameter, PropertyKeyComplianceParameter, AddressKeyComplianceParameter, PortfolioIdComplianceParameter, PortfolioGroupIdComplianceParameter, StringListComplianceParameter, BoolListComplianceParameter, DateTimeListComplianceParameter, DecimalListComplianceParameter, PropertyKeyListComplianceParameter, AddressKeyListComplianceParameter, PortfolioIdListComplianceParameter, PortfolioGroupIdListComplianceParameter, InstrumentListComplianceParameter, FilterPredicateComplianceParameter, GroupFilterPredicateComplianceParameter, GroupBySelectorComplianceParameter")
|
|
31
31
|
additional_properties: Dict[str, Any] = {}
|
|
32
32
|
__properties = ["complianceParameterType", "value"]
|
|
33
33
|
|
|
34
|
-
@validator('value')
|
|
35
|
-
def value_validate_regular_expression(cls, value):
|
|
36
|
-
"""Validates the regular expression"""
|
|
37
|
-
if not re.match(r"^[a-zA-Z0-9\-_]+$", value):
|
|
38
|
-
raise ValueError(r"must validate the regular expression /^[a-zA-Z0-9\-_]+$/")
|
|
39
|
-
return value
|
|
40
|
-
|
|
41
34
|
@validator('compliance_parameter_type')
|
|
42
35
|
def compliance_parameter_type_validate_enum(cls, value):
|
|
43
36
|
"""Validates the enum"""
|
|
44
|
-
if value not in ('BoolComplianceParameter', 'StringComplianceParameter', 'DecimalComplianceParameter', 'DateTimeComplianceParameter', 'PropertyKeyComplianceParameter', 'AddressKeyComplianceParameter', 'PortfolioIdComplianceParameter', 'PortfolioGroupIdComplianceParameter', 'StringListComplianceParameter', 'BoolListComplianceParameter', 'DateTimeListComplianceParameter', 'DecimalListComplianceParameter', 'PropertyKeyListComplianceParameter', 'AddressKeyListComplianceParameter', 'PortfolioIdListComplianceParameter', 'PortfolioGroupIdListComplianceParameter', 'InstrumentListComplianceParameter'):
|
|
45
|
-
raise ValueError("must be one of enum values ('BoolComplianceParameter', 'StringComplianceParameter', 'DecimalComplianceParameter', 'DateTimeComplianceParameter', 'PropertyKeyComplianceParameter', 'AddressKeyComplianceParameter', 'PortfolioIdComplianceParameter', 'PortfolioGroupIdComplianceParameter', 'StringListComplianceParameter', 'BoolListComplianceParameter', 'DateTimeListComplianceParameter', 'DecimalListComplianceParameter', 'PropertyKeyListComplianceParameter', 'AddressKeyListComplianceParameter', 'PortfolioIdListComplianceParameter', 'PortfolioGroupIdListComplianceParameter', 'InstrumentListComplianceParameter')")
|
|
37
|
+
if value not in ('BoolComplianceParameter', 'StringComplianceParameter', 'DecimalComplianceParameter', 'DateTimeComplianceParameter', 'PropertyKeyComplianceParameter', 'AddressKeyComplianceParameter', 'PortfolioIdComplianceParameter', 'PortfolioGroupIdComplianceParameter', 'StringListComplianceParameter', 'BoolListComplianceParameter', 'DateTimeListComplianceParameter', 'DecimalListComplianceParameter', 'PropertyKeyListComplianceParameter', 'AddressKeyListComplianceParameter', 'PortfolioIdListComplianceParameter', 'PortfolioGroupIdListComplianceParameter', 'InstrumentListComplianceParameter', 'FilterPredicateComplianceParameter', 'GroupFilterPredicateComplianceParameter', 'GroupBySelectorComplianceParameter'):
|
|
38
|
+
raise ValueError("must be one of enum values ('BoolComplianceParameter', 'StringComplianceParameter', 'DecimalComplianceParameter', 'DateTimeComplianceParameter', 'PropertyKeyComplianceParameter', 'AddressKeyComplianceParameter', 'PortfolioIdComplianceParameter', 'PortfolioGroupIdComplianceParameter', 'StringListComplianceParameter', 'BoolListComplianceParameter', 'DateTimeListComplianceParameter', 'DecimalListComplianceParameter', 'PropertyKeyListComplianceParameter', 'AddressKeyListComplianceParameter', 'PortfolioIdListComplianceParameter', 'PortfolioGroupIdListComplianceParameter', 'InstrumentListComplianceParameter', 'FilterPredicateComplianceParameter', 'GroupFilterPredicateComplianceParameter', 'GroupBySelectorComplianceParameter')")
|
|
46
39
|
return value
|
|
47
40
|
|
|
48
41
|
class Config:
|
|
@@ -28,15 +28,15 @@ class AddressKeyListComplianceParameter(ComplianceParameter):
|
|
|
28
28
|
AddressKeyListComplianceParameter
|
|
29
29
|
"""
|
|
30
30
|
value: ResourceId = Field(...)
|
|
31
|
-
compliance_parameter_type: StrictStr = Field(..., alias="complianceParameterType", description="The parameter type. The available values are: BoolComplianceParameter, StringComplianceParameter, DecimalComplianceParameter, DateTimeComplianceParameter, PropertyKeyComplianceParameter, AddressKeyComplianceParameter, PortfolioIdComplianceParameter, PortfolioGroupIdComplianceParameter, StringListComplianceParameter, BoolListComplianceParameter, DateTimeListComplianceParameter, DecimalListComplianceParameter, PropertyKeyListComplianceParameter, AddressKeyListComplianceParameter, PortfolioIdListComplianceParameter, PortfolioGroupIdListComplianceParameter, InstrumentListComplianceParameter")
|
|
31
|
+
compliance_parameter_type: StrictStr = Field(..., alias="complianceParameterType", description="The parameter type. The available values are: BoolComplianceParameter, StringComplianceParameter, DecimalComplianceParameter, DateTimeComplianceParameter, PropertyKeyComplianceParameter, AddressKeyComplianceParameter, PortfolioIdComplianceParameter, PortfolioGroupIdComplianceParameter, StringListComplianceParameter, BoolListComplianceParameter, DateTimeListComplianceParameter, DecimalListComplianceParameter, PropertyKeyListComplianceParameter, AddressKeyListComplianceParameter, PortfolioIdListComplianceParameter, PortfolioGroupIdListComplianceParameter, InstrumentListComplianceParameter, FilterPredicateComplianceParameter, GroupFilterPredicateComplianceParameter, GroupBySelectorComplianceParameter")
|
|
32
32
|
additional_properties: Dict[str, Any] = {}
|
|
33
33
|
__properties = ["complianceParameterType", "value"]
|
|
34
34
|
|
|
35
35
|
@validator('compliance_parameter_type')
|
|
36
36
|
def compliance_parameter_type_validate_enum(cls, value):
|
|
37
37
|
"""Validates the enum"""
|
|
38
|
-
if value not in ('BoolComplianceParameter', 'StringComplianceParameter', 'DecimalComplianceParameter', 'DateTimeComplianceParameter', 'PropertyKeyComplianceParameter', 'AddressKeyComplianceParameter', 'PortfolioIdComplianceParameter', 'PortfolioGroupIdComplianceParameter', 'StringListComplianceParameter', 'BoolListComplianceParameter', 'DateTimeListComplianceParameter', 'DecimalListComplianceParameter', 'PropertyKeyListComplianceParameter', 'AddressKeyListComplianceParameter', 'PortfolioIdListComplianceParameter', 'PortfolioGroupIdListComplianceParameter', 'InstrumentListComplianceParameter'):
|
|
39
|
-
raise ValueError("must be one of enum values ('BoolComplianceParameter', 'StringComplianceParameter', 'DecimalComplianceParameter', 'DateTimeComplianceParameter', 'PropertyKeyComplianceParameter', 'AddressKeyComplianceParameter', 'PortfolioIdComplianceParameter', 'PortfolioGroupIdComplianceParameter', 'StringListComplianceParameter', 'BoolListComplianceParameter', 'DateTimeListComplianceParameter', 'DecimalListComplianceParameter', 'PropertyKeyListComplianceParameter', 'AddressKeyListComplianceParameter', 'PortfolioIdListComplianceParameter', 'PortfolioGroupIdListComplianceParameter', 'InstrumentListComplianceParameter')")
|
|
38
|
+
if value not in ('BoolComplianceParameter', 'StringComplianceParameter', 'DecimalComplianceParameter', 'DateTimeComplianceParameter', 'PropertyKeyComplianceParameter', 'AddressKeyComplianceParameter', 'PortfolioIdComplianceParameter', 'PortfolioGroupIdComplianceParameter', 'StringListComplianceParameter', 'BoolListComplianceParameter', 'DateTimeListComplianceParameter', 'DecimalListComplianceParameter', 'PropertyKeyListComplianceParameter', 'AddressKeyListComplianceParameter', 'PortfolioIdListComplianceParameter', 'PortfolioGroupIdListComplianceParameter', 'InstrumentListComplianceParameter', 'FilterPredicateComplianceParameter', 'GroupFilterPredicateComplianceParameter', 'GroupBySelectorComplianceParameter'):
|
|
39
|
+
raise ValueError("must be one of enum values ('BoolComplianceParameter', 'StringComplianceParameter', 'DecimalComplianceParameter', 'DateTimeComplianceParameter', 'PropertyKeyComplianceParameter', 'AddressKeyComplianceParameter', 'PortfolioIdComplianceParameter', 'PortfolioGroupIdComplianceParameter', 'StringListComplianceParameter', 'BoolListComplianceParameter', 'DateTimeListComplianceParameter', 'DecimalListComplianceParameter', 'PropertyKeyListComplianceParameter', 'AddressKeyListComplianceParameter', 'PortfolioIdListComplianceParameter', 'PortfolioGroupIdListComplianceParameter', 'InstrumentListComplianceParameter', 'FilterPredicateComplianceParameter', 'GroupFilterPredicateComplianceParameter', 'GroupBySelectorComplianceParameter')")
|
|
40
40
|
return value
|
|
41
41
|
|
|
42
42
|
class Config:
|
|
@@ -27,10 +27,11 @@ class AddressKeyOptionDefinition(BaseModel):
|
|
|
27
27
|
"""
|
|
28
28
|
name: constr(strict=True, min_length=1) = Field(..., description="The name of the option")
|
|
29
29
|
type: constr(strict=True, min_length=1) = Field(..., description="The type of the option")
|
|
30
|
+
description: constr(strict=True, min_length=1) = Field(..., description="The description of the option")
|
|
30
31
|
optional: StrictBool = Field(..., description="Is this option required or optional?")
|
|
31
32
|
allowed_value_set: Optional[conlist(StrictStr)] = Field(None, alias="allowedValueSet", description="If the option is a string or enum, the allowed set of values it can take.")
|
|
32
33
|
default_value: Optional[StrictStr] = Field(None, alias="defaultValue", description="If the option is not required, what is the default value?")
|
|
33
|
-
__properties = ["name", "type", "optional", "allowedValueSet", "defaultValue"]
|
|
34
|
+
__properties = ["name", "type", "description", "optional", "allowedValueSet", "defaultValue"]
|
|
34
35
|
|
|
35
36
|
class Config:
|
|
36
37
|
"""Pydantic configuration"""
|
|
@@ -80,6 +81,7 @@ class AddressKeyOptionDefinition(BaseModel):
|
|
|
80
81
|
_obj = AddressKeyOptionDefinition.parse_obj({
|
|
81
82
|
"name": obj.get("name"),
|
|
82
83
|
"type": obj.get("type"),
|
|
84
|
+
"description": obj.get("description"),
|
|
83
85
|
"optional": obj.get("optional"),
|
|
84
86
|
"allowed_value_set": obj.get("allowedValueSet"),
|
|
85
87
|
"default_value": obj.get("defaultValue")
|
|
@@ -29,17 +29,16 @@ class AmortisationEvent(InstrumentEvent):
|
|
|
29
29
|
amount_reduced: Union[StrictFloat, StrictInt] = Field(..., alias="amountReduced", description="The amount reduced in this amortisation event. That is, the difference between the previous notional amount and the current notional amount as set in this event.")
|
|
30
30
|
dom_ccy: StrictStr = Field(..., alias="domCcy", description="Domestic currency of the originating instrument")
|
|
31
31
|
pay_receive: constr(strict=True, min_length=1) = Field(..., alias="payReceive", description="Is this event in relation to the Pay or Receive leg")
|
|
32
|
-
event_status: constr(strict=True, min_length=1) = Field(..., alias="eventStatus", description="What is the event status, is it a known (ie historic) or unknown (ie projected) event?")
|
|
33
32
|
payment_date: datetime = Field(..., alias="paymentDate", description="The date the principal payment is to be made.")
|
|
34
|
-
instrument_event_type: StrictStr = Field(..., alias="instrumentEventType", description="The Type of Event. The available values are: TransitionEvent, InformationalEvent, OpenEvent, CloseEvent, StockSplitEvent, BondDefaultEvent, CashDividendEvent, AmortisationEvent, CashFlowEvent, ExerciseEvent, ResetEvent, TriggerEvent, RawVendorEvent, InformationalErrorEvent")
|
|
33
|
+
instrument_event_type: StrictStr = Field(..., alias="instrumentEventType", description="The Type of Event. The available values are: TransitionEvent, InformationalEvent, OpenEvent, CloseEvent, StockSplitEvent, BondDefaultEvent, CashDividendEvent, AmortisationEvent, CashFlowEvent, ExerciseEvent, ResetEvent, TriggerEvent, RawVendorEvent, InformationalErrorEvent, BondCouponEvent, DividendReinvestmentEvent, AccumulationEvent, BondPrincipalEvent, DividendOptionEvent, MaturityEvent, FxForwardSettlementEvent, ExpiryEvent")
|
|
35
34
|
additional_properties: Dict[str, Any] = {}
|
|
36
|
-
__properties = ["instrumentEventType", "amountReduced", "domCcy", "payReceive", "
|
|
35
|
+
__properties = ["instrumentEventType", "amountReduced", "domCcy", "payReceive", "paymentDate"]
|
|
37
36
|
|
|
38
37
|
@validator('instrument_event_type')
|
|
39
38
|
def instrument_event_type_validate_enum(cls, value):
|
|
40
39
|
"""Validates the enum"""
|
|
41
|
-
if value not in ('TransitionEvent', 'InformationalEvent', 'OpenEvent', 'CloseEvent', 'StockSplitEvent', 'BondDefaultEvent', 'CashDividendEvent', 'AmortisationEvent', 'CashFlowEvent', 'ExerciseEvent', 'ResetEvent', 'TriggerEvent', 'RawVendorEvent', 'InformationalErrorEvent'):
|
|
42
|
-
raise ValueError("must be one of enum values ('TransitionEvent', 'InformationalEvent', 'OpenEvent', 'CloseEvent', 'StockSplitEvent', 'BondDefaultEvent', 'CashDividendEvent', 'AmortisationEvent', 'CashFlowEvent', 'ExerciseEvent', 'ResetEvent', 'TriggerEvent', 'RawVendorEvent', 'InformationalErrorEvent')")
|
|
40
|
+
if value not in ('TransitionEvent', 'InformationalEvent', 'OpenEvent', 'CloseEvent', 'StockSplitEvent', 'BondDefaultEvent', 'CashDividendEvent', 'AmortisationEvent', 'CashFlowEvent', 'ExerciseEvent', 'ResetEvent', 'TriggerEvent', 'RawVendorEvent', 'InformationalErrorEvent', 'BondCouponEvent', 'DividendReinvestmentEvent', 'AccumulationEvent', 'BondPrincipalEvent', 'DividendOptionEvent', 'MaturityEvent', 'FxForwardSettlementEvent', 'ExpiryEvent'):
|
|
41
|
+
raise ValueError("must be one of enum values ('TransitionEvent', 'InformationalEvent', 'OpenEvent', 'CloseEvent', 'StockSplitEvent', 'BondDefaultEvent', 'CashDividendEvent', 'AmortisationEvent', 'CashFlowEvent', 'ExerciseEvent', 'ResetEvent', 'TriggerEvent', 'RawVendorEvent', 'InformationalErrorEvent', 'BondCouponEvent', 'DividendReinvestmentEvent', 'AccumulationEvent', 'BondPrincipalEvent', 'DividendOptionEvent', 'MaturityEvent', 'FxForwardSettlementEvent', 'ExpiryEvent')")
|
|
43
42
|
return value
|
|
44
43
|
|
|
45
44
|
class Config:
|
|
@@ -88,7 +87,6 @@ class AmortisationEvent(InstrumentEvent):
|
|
|
88
87
|
"amount_reduced": obj.get("amountReduced"),
|
|
89
88
|
"dom_ccy": obj.get("domCcy"),
|
|
90
89
|
"pay_receive": obj.get("payReceive"),
|
|
91
|
-
"event_status": obj.get("eventStatus"),
|
|
92
90
|
"payment_date": obj.get("paymentDate")
|
|
93
91
|
})
|
|
94
92
|
# store additional fields in additional_properties
|
|
@@ -22,13 +22,13 @@ from typing import Any, Dict
|
|
|
22
22
|
from pydantic import BaseModel, Field, constr
|
|
23
23
|
from lusid.models.lusid_instrument import LusidInstrument
|
|
24
24
|
|
|
25
|
-
class
|
|
25
|
+
class AssetLeg(BaseModel):
|
|
26
26
|
"""
|
|
27
27
|
The underlying instrument representing one side of the TRS and its pay-receive direction. # noqa: E501
|
|
28
28
|
"""
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
__properties = ["
|
|
29
|
+
asset: LusidInstrument = Field(...)
|
|
30
|
+
pay_receive: constr(strict=True, min_length=1) = Field(..., alias="payReceive", description="Either Pay or Receive stating direction of the asset in the swap. Supported string (enumeration) values are: [Pay, Receive].")
|
|
31
|
+
__properties = ["asset", "payReceive"]
|
|
32
32
|
|
|
33
33
|
class Config:
|
|
34
34
|
"""Pydantic configuration"""
|
|
@@ -44,8 +44,8 @@ class UnderlyingLeg(BaseModel):
|
|
|
44
44
|
return json.dumps(self.to_dict())
|
|
45
45
|
|
|
46
46
|
@classmethod
|
|
47
|
-
def from_json(cls, json_str: str) ->
|
|
48
|
-
"""Create an instance of
|
|
47
|
+
def from_json(cls, json_str: str) -> AssetLeg:
|
|
48
|
+
"""Create an instance of AssetLeg from a JSON string"""
|
|
49
49
|
return cls.from_dict(json.loads(json_str))
|
|
50
50
|
|
|
51
51
|
def to_dict(self):
|
|
@@ -54,22 +54,22 @@ class UnderlyingLeg(BaseModel):
|
|
|
54
54
|
exclude={
|
|
55
55
|
},
|
|
56
56
|
exclude_none=True)
|
|
57
|
-
# override the default output from pydantic by calling `to_dict()` of
|
|
58
|
-
if self.
|
|
59
|
-
_dict['
|
|
57
|
+
# override the default output from pydantic by calling `to_dict()` of asset
|
|
58
|
+
if self.asset:
|
|
59
|
+
_dict['asset'] = self.asset.to_dict()
|
|
60
60
|
return _dict
|
|
61
61
|
|
|
62
62
|
@classmethod
|
|
63
|
-
def from_dict(cls, obj: dict) ->
|
|
64
|
-
"""Create an instance of
|
|
63
|
+
def from_dict(cls, obj: dict) -> AssetLeg:
|
|
64
|
+
"""Create an instance of AssetLeg from a dict"""
|
|
65
65
|
if obj is None:
|
|
66
66
|
return None
|
|
67
67
|
|
|
68
68
|
if not isinstance(obj, dict):
|
|
69
|
-
return
|
|
69
|
+
return AssetLeg.parse_obj(obj)
|
|
70
70
|
|
|
71
|
-
_obj =
|
|
72
|
-
"
|
|
73
|
-
"
|
|
71
|
+
_obj = AssetLeg.parse_obj({
|
|
72
|
+
"asset": LusidInstrument.from_dict(obj.get("asset")) if obj.get("asset") is not None else None,
|
|
73
|
+
"pay_receive": obj.get("payReceive")
|
|
74
74
|
})
|
|
75
75
|
return _obj
|
lusid/models/basket.py
CHANGED
|
@@ -31,15 +31,15 @@ class Basket(LusidInstrument):
|
|
|
31
31
|
basket_name: BasketIdentifier = Field(..., alias="basketName")
|
|
32
32
|
basket_type: constr(strict=True, min_length=1) = Field(..., alias="basketType", description="What contents does the basket have. The validation will check that the instrument types contained match those expected. Supported string (enumeration) values are: [Bonds, Credits, Equities, EquitySwap].")
|
|
33
33
|
weighted_instruments: WeightedInstruments = Field(..., alias="weightedInstruments")
|
|
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")
|
|
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")
|
|
35
35
|
additional_properties: Dict[str, Any] = {}
|
|
36
36
|
__properties = ["instrumentType", "basketName", "basketType", "weightedInstruments"]
|
|
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'):
|
|
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')")
|
|
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'):
|
|
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')")
|
|
43
43
|
return value
|
|
44
44
|
|
|
45
45
|
class Config:
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
LUSID API
|
|
5
|
+
|
|
6
|
+
FINBOURNE Technology # noqa: E501
|
|
7
|
+
|
|
8
|
+
Contact: info@finbourne.com
|
|
9
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
10
|
+
|
|
11
|
+
Do not edit the class manually.
|
|
12
|
+
"""
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
from __future__ import annotations
|
|
16
|
+
import pprint
|
|
17
|
+
import re # noqa: F401
|
|
18
|
+
import json
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
from typing import Any, Dict
|
|
22
|
+
from pydantic import BaseModel, Field
|
|
23
|
+
from lusid.models.resource_id import ResourceId
|
|
24
|
+
|
|
25
|
+
class BlockAndOrderIdRequest(BaseModel):
|
|
26
|
+
"""
|
|
27
|
+
BlockAndOrderIdRequest
|
|
28
|
+
"""
|
|
29
|
+
destination_block_id: ResourceId = Field(..., alias="destinationBlockId")
|
|
30
|
+
order_id: ResourceId = Field(..., alias="orderId")
|
|
31
|
+
__properties = ["destinationBlockId", "orderId"]
|
|
32
|
+
|
|
33
|
+
class Config:
|
|
34
|
+
"""Pydantic configuration"""
|
|
35
|
+
allow_population_by_field_name = True
|
|
36
|
+
validate_assignment = True
|
|
37
|
+
|
|
38
|
+
def to_str(self) -> str:
|
|
39
|
+
"""Returns the string representation of the model using alias"""
|
|
40
|
+
return pprint.pformat(self.dict(by_alias=True))
|
|
41
|
+
|
|
42
|
+
def to_json(self) -> str:
|
|
43
|
+
"""Returns the JSON representation of the model using alias"""
|
|
44
|
+
return json.dumps(self.to_dict())
|
|
45
|
+
|
|
46
|
+
@classmethod
|
|
47
|
+
def from_json(cls, json_str: str) -> BlockAndOrderIdRequest:
|
|
48
|
+
"""Create an instance of BlockAndOrderIdRequest from a JSON string"""
|
|
49
|
+
return cls.from_dict(json.loads(json_str))
|
|
50
|
+
|
|
51
|
+
def to_dict(self):
|
|
52
|
+
"""Returns the dictionary representation of the model using alias"""
|
|
53
|
+
_dict = self.dict(by_alias=True,
|
|
54
|
+
exclude={
|
|
55
|
+
},
|
|
56
|
+
exclude_none=True)
|
|
57
|
+
# override the default output from pydantic by calling `to_dict()` of destination_block_id
|
|
58
|
+
if self.destination_block_id:
|
|
59
|
+
_dict['destinationBlockId'] = self.destination_block_id.to_dict()
|
|
60
|
+
# override the default output from pydantic by calling `to_dict()` of order_id
|
|
61
|
+
if self.order_id:
|
|
62
|
+
_dict['orderId'] = self.order_id.to_dict()
|
|
63
|
+
return _dict
|
|
64
|
+
|
|
65
|
+
@classmethod
|
|
66
|
+
def from_dict(cls, obj: dict) -> BlockAndOrderIdRequest:
|
|
67
|
+
"""Create an instance of BlockAndOrderIdRequest from a dict"""
|
|
68
|
+
if obj is None:
|
|
69
|
+
return None
|
|
70
|
+
|
|
71
|
+
if not isinstance(obj, dict):
|
|
72
|
+
return BlockAndOrderIdRequest.parse_obj(obj)
|
|
73
|
+
|
|
74
|
+
_obj = BlockAndOrderIdRequest.parse_obj({
|
|
75
|
+
"destination_block_id": ResourceId.from_dict(obj.get("destinationBlockId")) if obj.get("destinationBlockId") is not None else None,
|
|
76
|
+
"order_id": ResourceId.from_dict(obj.get("orderId")) if obj.get("orderId") is not None else None
|
|
77
|
+
})
|
|
78
|
+
return _obj
|