pluggy-sdk 1.0.0.post34__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.
- pluggy_sdk/__init__.py +200 -0
- pluggy_sdk/api/__init__.py +25 -0
- pluggy_sdk/api/account_api.py +588 -0
- pluggy_sdk/api/acquirer_anticipation_api.py +664 -0
- pluggy_sdk/api/acquirer_receivable_api.py +664 -0
- pluggy_sdk/api/acquirer_sale_api.py +664 -0
- pluggy_sdk/api/auth_api.py +605 -0
- pluggy_sdk/api/benefit_api.py +567 -0
- pluggy_sdk/api/bill_api.py +567 -0
- pluggy_sdk/api/bulk_payment_api.py +1127 -0
- pluggy_sdk/api/category_api.py +1096 -0
- pluggy_sdk/api/connector_api.py +979 -0
- pluggy_sdk/api/consent_api.py +576 -0
- pluggy_sdk/api/identity_api.py +581 -0
- pluggy_sdk/api/income_report_api.py +311 -0
- pluggy_sdk/api/investment_api.py +918 -0
- pluggy_sdk/api/items_api.py +1456 -0
- pluggy_sdk/api/loan_api.py +567 -0
- pluggy_sdk/api/payment_customer_api.py +1414 -0
- pluggy_sdk/api/payment_intent_api.py +842 -0
- pluggy_sdk/api/payment_receipts_api.py +842 -0
- pluggy_sdk/api/payment_recipient_api.py +1997 -0
- pluggy_sdk/api/payment_request_api.py +2739 -0
- pluggy_sdk/api/payment_schedule_api.py +823 -0
- pluggy_sdk/api/payroll_loan_api.py +561 -0
- pluggy_sdk/api/portfolio_yield_api.py +580 -0
- pluggy_sdk/api/smart_account_api.py +1704 -0
- pluggy_sdk/api/smart_account_transfer_api.py +610 -0
- pluggy_sdk/api/smart_transfer_api.py +1406 -0
- pluggy_sdk/api/transaction_api.py +963 -0
- pluggy_sdk/api/webhook_api.py +1406 -0
- pluggy_sdk/api_client.py +798 -0
- pluggy_sdk/api_response.py +21 -0
- pluggy_sdk/configuration.py +596 -0
- pluggy_sdk/exceptions.py +217 -0
- pluggy_sdk/models/__init__.py +163 -0
- pluggy_sdk/models/account.py +134 -0
- pluggy_sdk/models/accounts_list200_response.py +102 -0
- pluggy_sdk/models/acquirer_anticipation.py +117 -0
- pluggy_sdk/models/acquirer_anticipation_data.py +101 -0
- pluggy_sdk/models/acquirer_data.py +113 -0
- pluggy_sdk/models/acquirer_receivable.py +143 -0
- pluggy_sdk/models/acquirer_receivable_data.py +108 -0
- pluggy_sdk/models/acquirer_receivable_data_establishment.py +96 -0
- pluggy_sdk/models/acquirer_receivable_destination_account.py +92 -0
- pluggy_sdk/models/acquirer_receivable_related_sale.py +99 -0
- pluggy_sdk/models/acquirer_sale.py +171 -0
- pluggy_sdk/models/acquirer_sale_data.py +150 -0
- pluggy_sdk/models/acquirer_sale_installment.py +93 -0
- pluggy_sdk/models/acquirer_sale_installment_data.py +95 -0
- pluggy_sdk/models/address.py +110 -0
- pluggy_sdk/models/aggregated_portfolio.py +120 -0
- pluggy_sdk/models/aggregated_portfolio_response.py +102 -0
- pluggy_sdk/models/asset_distribution.py +88 -0
- pluggy_sdk/models/auth_request.py +90 -0
- pluggy_sdk/models/auth_response.py +88 -0
- pluggy_sdk/models/bank_data.py +92 -0
- pluggy_sdk/models/benefit_loan.py +121 -0
- pluggy_sdk/models/benefit_loan_client.py +102 -0
- pluggy_sdk/models/benefit_response.py +118 -0
- pluggy_sdk/models/benefit_response_paying_institution.py +94 -0
- pluggy_sdk/models/benefits_list200_response.py +102 -0
- pluggy_sdk/models/bill.py +109 -0
- pluggy_sdk/models/bill_finance_charge.py +103 -0
- pluggy_sdk/models/bills_list200_response.py +102 -0
- pluggy_sdk/models/boleto.py +121 -0
- pluggy_sdk/models/boleto_payer.py +90 -0
- pluggy_sdk/models/boleto_recipient.py +90 -0
- pluggy_sdk/models/bulk_payment.py +128 -0
- pluggy_sdk/models/bulk_payments_list200_response.py +102 -0
- pluggy_sdk/models/category.py +96 -0
- pluggy_sdk/models/client_category_rule.py +98 -0
- pluggy_sdk/models/company.py +90 -0
- pluggy_sdk/models/connect_token_request.py +94 -0
- pluggy_sdk/models/connect_token_response.py +88 -0
- pluggy_sdk/models/connector.py +145 -0
- pluggy_sdk/models/connector_credential.py +121 -0
- pluggy_sdk/models/connector_health.py +96 -0
- pluggy_sdk/models/connector_health_details.py +90 -0
- pluggy_sdk/models/connector_list_response.py +102 -0
- pluggy_sdk/models/connector_user_action.py +93 -0
- pluggy_sdk/models/consent.py +120 -0
- pluggy_sdk/models/create_boleto_payment_request.py +98 -0
- pluggy_sdk/models/create_bulk_payment.py +96 -0
- pluggy_sdk/models/create_client_category_rule.py +96 -0
- pluggy_sdk/models/create_item.py +115 -0
- pluggy_sdk/models/create_item_parameters.py +144 -0
- pluggy_sdk/models/create_or_update_payment_customer.py +105 -0
- pluggy_sdk/models/create_payment_customer_request_body.py +103 -0
- pluggy_sdk/models/create_payment_intent.py +110 -0
- pluggy_sdk/models/create_payment_recipient.py +104 -0
- pluggy_sdk/models/create_payment_request.py +115 -0
- pluggy_sdk/models/create_payment_request_schedule.py +189 -0
- pluggy_sdk/models/create_pix_qr_payment_request.py +96 -0
- pluggy_sdk/models/create_smart_account_request.py +104 -0
- pluggy_sdk/models/create_smart_account_transfer_request.py +92 -0
- pluggy_sdk/models/create_smart_transfer_payment.py +96 -0
- pluggy_sdk/models/create_smart_transfer_preauthorization.py +104 -0
- pluggy_sdk/models/create_webhook.py +99 -0
- pluggy_sdk/models/credential_select_option.py +90 -0
- pluggy_sdk/models/credit_card_metadata.py +101 -0
- pluggy_sdk/models/credit_data.py +127 -0
- pluggy_sdk/models/custom.py +100 -0
- pluggy_sdk/models/daily.py +101 -0
- pluggy_sdk/models/document.py +100 -0
- pluggy_sdk/models/email.py +100 -0
- pluggy_sdk/models/global_error_response.py +94 -0
- pluggy_sdk/models/i_count_response.py +88 -0
- pluggy_sdk/models/identity_relation.py +102 -0
- pluggy_sdk/models/identity_response.py +173 -0
- pluggy_sdk/models/identity_response_financial_relationships.py +111 -0
- pluggy_sdk/models/identity_response_financial_relationships_accounts_inner.py +98 -0
- pluggy_sdk/models/identity_response_financial_relationships_procurators_inner.py +101 -0
- pluggy_sdk/models/identity_response_qualifications.py +112 -0
- pluggy_sdk/models/identity_response_qualifications_informed_income.py +100 -0
- pluggy_sdk/models/identity_response_qualifications_informed_patrimony.py +90 -0
- pluggy_sdk/models/income_report.py +90 -0
- pluggy_sdk/models/income_reports_response.py +102 -0
- pluggy_sdk/models/investment.py +192 -0
- pluggy_sdk/models/investment_expenses.py +108 -0
- pluggy_sdk/models/investment_metadata.py +100 -0
- pluggy_sdk/models/investment_transaction.py +124 -0
- pluggy_sdk/models/investments_list200_response.py +102 -0
- pluggy_sdk/models/item.py +150 -0
- pluggy_sdk/models/item_creation_error_response.py +102 -0
- pluggy_sdk/models/item_error.py +94 -0
- pluggy_sdk/models/item_options.py +94 -0
- pluggy_sdk/models/loan.py +199 -0
- pluggy_sdk/models/loan_contracted_fee.py +118 -0
- pluggy_sdk/models/loan_contracted_finance_charge.py +92 -0
- pluggy_sdk/models/loan_installment_balloon_payment.py +95 -0
- pluggy_sdk/models/loan_installment_balloon_payment_amount.py +90 -0
- pluggy_sdk/models/loan_installments.py +130 -0
- pluggy_sdk/models/loan_interest_rate.py +136 -0
- pluggy_sdk/models/loan_payment_release.py +103 -0
- pluggy_sdk/models/loan_payment_release_over_parcel.py +106 -0
- pluggy_sdk/models/loan_payment_release_over_parcel_charge.py +92 -0
- pluggy_sdk/models/loan_payment_release_over_parcel_fee.py +92 -0
- pluggy_sdk/models/loan_payments.py +98 -0
- pluggy_sdk/models/loan_warranty.py +94 -0
- pluggy_sdk/models/loans_list200_response.py +102 -0
- pluggy_sdk/models/merchant.py +96 -0
- pluggy_sdk/models/monthly.py +103 -0
- pluggy_sdk/models/monthly_portfolio.py +100 -0
- pluggy_sdk/models/monthly_portfolio_response.py +102 -0
- pluggy_sdk/models/not_authenticated_response.py +90 -0
- pluggy_sdk/models/page_response_acquirer_anticipations.py +102 -0
- pluggy_sdk/models/page_response_acquirer_receivables.py +102 -0
- pluggy_sdk/models/page_response_acquirer_sales.py +102 -0
- pluggy_sdk/models/page_response_category_rules.py +102 -0
- pluggy_sdk/models/page_response_consents.py +102 -0
- pluggy_sdk/models/page_response_investment_transactions.py +102 -0
- pluggy_sdk/models/page_response_transactions.py +102 -0
- pluggy_sdk/models/parameter_validation_error.py +92 -0
- pluggy_sdk/models/parameter_validation_response.py +98 -0
- pluggy_sdk/models/payment_customer.py +105 -0
- pluggy_sdk/models/payment_customers_list200_response.py +102 -0
- pluggy_sdk/models/payment_data.py +111 -0
- pluggy_sdk/models/payment_data_boleto_metadata.py +98 -0
- pluggy_sdk/models/payment_data_participant.py +102 -0
- pluggy_sdk/models/payment_institution.py +101 -0
- pluggy_sdk/models/payment_intent.py +145 -0
- pluggy_sdk/models/payment_intent_parameter.py +90 -0
- pluggy_sdk/models/payment_intents_list200_response.py +102 -0
- pluggy_sdk/models/payment_receipt.py +120 -0
- pluggy_sdk/models/payment_receipt_bank_account.py +92 -0
- pluggy_sdk/models/payment_receipt_person.py +96 -0
- pluggy_sdk/models/payment_recipient.py +110 -0
- pluggy_sdk/models/payment_recipient_account.py +92 -0
- pluggy_sdk/models/payment_recipients_institution_list200_response.py +102 -0
- pluggy_sdk/models/payment_recipients_list200_response.py +102 -0
- pluggy_sdk/models/payment_request.py +132 -0
- pluggy_sdk/models/payment_request_callback_urls.py +92 -0
- pluggy_sdk/models/payment_request_receipt_list200_response.py +102 -0
- pluggy_sdk/models/payment_request_schedule.py +183 -0
- pluggy_sdk/models/payment_requests_list200_response.py +102 -0
- pluggy_sdk/models/payment_schedules_list200_response.py +102 -0
- pluggy_sdk/models/payroll_loan.py +121 -0
- pluggy_sdk/models/payroll_loan_client.py +102 -0
- pluggy_sdk/models/payroll_loan_response.py +125 -0
- pluggy_sdk/models/payroll_loan_response_client.py +102 -0
- pluggy_sdk/models/payroll_loans_list200_response.py +102 -0
- pluggy_sdk/models/percentage_over_index.py +90 -0
- pluggy_sdk/models/phone_number.py +100 -0
- pluggy_sdk/models/pix_data.py +90 -0
- pluggy_sdk/models/schedule_payment.py +102 -0
- pluggy_sdk/models/schedule_type_custom.py +100 -0
- pluggy_sdk/models/schedule_type_daily.py +101 -0
- pluggy_sdk/models/schedule_type_monthly.py +103 -0
- pluggy_sdk/models/schedule_type_single.py +98 -0
- pluggy_sdk/models/schedule_type_weekly.py +110 -0
- pluggy_sdk/models/single.py +98 -0
- pluggy_sdk/models/smart_account.py +107 -0
- pluggy_sdk/models/smart_account_address.py +112 -0
- pluggy_sdk/models/smart_account_balance.py +95 -0
- pluggy_sdk/models/smart_account_transfer.py +123 -0
- pluggy_sdk/models/smart_accounts_list200_response.py +102 -0
- pluggy_sdk/models/smart_tranfers_preauthorizations_list200_response.py +102 -0
- pluggy_sdk/models/smart_transfer_callback_urls.py +90 -0
- pluggy_sdk/models/smart_transfer_payment.py +116 -0
- pluggy_sdk/models/smart_transfer_preauthorization.py +128 -0
- pluggy_sdk/models/smart_transfer_preauthorization_parameter.py +90 -0
- pluggy_sdk/models/status_detail.py +127 -0
- pluggy_sdk/models/status_detail_product.py +101 -0
- pluggy_sdk/models/status_detail_product_warning.py +92 -0
- pluggy_sdk/models/transaction.py +141 -0
- pluggy_sdk/models/update_item.py +109 -0
- pluggy_sdk/models/update_item_parameters.py +144 -0
- pluggy_sdk/models/update_payment_recipient.py +102 -0
- pluggy_sdk/models/update_payment_request.py +102 -0
- pluggy_sdk/models/update_transaction.py +88 -0
- pluggy_sdk/models/webhook.py +106 -0
- pluggy_sdk/models/webhook_creation_error_response.py +90 -0
- pluggy_sdk/models/webhooks_list200_response.py +102 -0
- pluggy_sdk/models/weekly.py +110 -0
- pluggy_sdk/py.typed +0 -0
- pluggy_sdk/rest.py +258 -0
- pluggy_sdk-1.0.0.post34.dist-info/METADATA +373 -0
- pluggy_sdk-1.0.0.post34.dist-info/RECORD +221 -0
- pluggy_sdk-1.0.0.post34.dist-info/WHEEL +5 -0
- pluggy_sdk-1.0.0.post34.dist-info/top_level.txt +1 -0
@@ -0,0 +1,90 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
|
3
|
+
"""
|
4
|
+
Pluggy API
|
5
|
+
|
6
|
+
Pluggy's main API to review data and execute connectors
|
7
|
+
|
8
|
+
The version of the OpenAPI document: 1.0.0
|
9
|
+
Contact: hello@pluggy.ai
|
10
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
11
|
+
|
12
|
+
Do not edit the class manually.
|
13
|
+
""" # noqa: E501
|
14
|
+
|
15
|
+
|
16
|
+
from __future__ import annotations
|
17
|
+
import pprint
|
18
|
+
import re # noqa: F401
|
19
|
+
import json
|
20
|
+
|
21
|
+
from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt, StrictStr
|
22
|
+
from typing import Any, ClassVar, Dict, List, Optional, Union
|
23
|
+
from typing import Optional, Set
|
24
|
+
from typing_extensions import Self
|
25
|
+
|
26
|
+
class IncomeReport(BaseModel):
|
27
|
+
"""
|
28
|
+
Income report entity
|
29
|
+
""" # noqa: E501
|
30
|
+
url: Optional[StrictStr] = Field(default=None, description="URL of the income report file available to be downloaded from Amazon S3")
|
31
|
+
year: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Year to which the income report belongs")
|
32
|
+
__properties: ClassVar[List[str]] = ["url", "year"]
|
33
|
+
|
34
|
+
model_config = ConfigDict(
|
35
|
+
populate_by_name=True,
|
36
|
+
validate_assignment=True,
|
37
|
+
protected_namespaces=(),
|
38
|
+
)
|
39
|
+
|
40
|
+
|
41
|
+
def to_str(self) -> str:
|
42
|
+
"""Returns the string representation of the model using alias"""
|
43
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
44
|
+
|
45
|
+
def to_json(self) -> str:
|
46
|
+
"""Returns the JSON representation of the model using alias"""
|
47
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
48
|
+
return json.dumps(self.to_dict())
|
49
|
+
|
50
|
+
@classmethod
|
51
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
52
|
+
"""Create an instance of IncomeReport from a JSON string"""
|
53
|
+
return cls.from_dict(json.loads(json_str))
|
54
|
+
|
55
|
+
def to_dict(self) -> Dict[str, Any]:
|
56
|
+
"""Return the dictionary representation of the model using alias.
|
57
|
+
|
58
|
+
This has the following differences from calling pydantic's
|
59
|
+
`self.model_dump(by_alias=True)`:
|
60
|
+
|
61
|
+
* `None` is only added to the output dict for nullable fields that
|
62
|
+
were set at model initialization. Other fields with value `None`
|
63
|
+
are ignored.
|
64
|
+
"""
|
65
|
+
excluded_fields: Set[str] = set([
|
66
|
+
])
|
67
|
+
|
68
|
+
_dict = self.model_dump(
|
69
|
+
by_alias=True,
|
70
|
+
exclude=excluded_fields,
|
71
|
+
exclude_none=True,
|
72
|
+
)
|
73
|
+
return _dict
|
74
|
+
|
75
|
+
@classmethod
|
76
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
77
|
+
"""Create an instance of IncomeReport from a dict"""
|
78
|
+
if obj is None:
|
79
|
+
return None
|
80
|
+
|
81
|
+
if not isinstance(obj, dict):
|
82
|
+
return cls.model_validate(obj)
|
83
|
+
|
84
|
+
_obj = cls.model_validate({
|
85
|
+
"url": obj.get("url"),
|
86
|
+
"year": obj.get("year")
|
87
|
+
})
|
88
|
+
return _obj
|
89
|
+
|
90
|
+
|
@@ -0,0 +1,102 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
|
3
|
+
"""
|
4
|
+
Pluggy API
|
5
|
+
|
6
|
+
Pluggy's main API to review data and execute connectors
|
7
|
+
|
8
|
+
The version of the OpenAPI document: 1.0.0
|
9
|
+
Contact: hello@pluggy.ai
|
10
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
11
|
+
|
12
|
+
Do not edit the class manually.
|
13
|
+
""" # noqa: E501
|
14
|
+
|
15
|
+
|
16
|
+
from __future__ import annotations
|
17
|
+
import pprint
|
18
|
+
import re # noqa: F401
|
19
|
+
import json
|
20
|
+
|
21
|
+
from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt
|
22
|
+
from typing import Any, ClassVar, Dict, List, Optional, Union
|
23
|
+
from pluggy_sdk.models.income_report import IncomeReport
|
24
|
+
from typing import Optional, Set
|
25
|
+
from typing_extensions import Self
|
26
|
+
|
27
|
+
class IncomeReportsResponse(BaseModel):
|
28
|
+
"""
|
29
|
+
Response with the pages of metadata of the income reports files uploaded to Amazon S3
|
30
|
+
""" # noqa: E501
|
31
|
+
page: Optional[Union[StrictFloat, StrictInt]] = None
|
32
|
+
total: Optional[Union[StrictFloat, StrictInt]] = None
|
33
|
+
total_pages: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, alias="totalPages")
|
34
|
+
results: Optional[List[IncomeReport]] = Field(default=None, description="Array with the metadata of every income report")
|
35
|
+
__properties: ClassVar[List[str]] = ["page", "total", "totalPages", "results"]
|
36
|
+
|
37
|
+
model_config = ConfigDict(
|
38
|
+
populate_by_name=True,
|
39
|
+
validate_assignment=True,
|
40
|
+
protected_namespaces=(),
|
41
|
+
)
|
42
|
+
|
43
|
+
|
44
|
+
def to_str(self) -> str:
|
45
|
+
"""Returns the string representation of the model using alias"""
|
46
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
47
|
+
|
48
|
+
def to_json(self) -> str:
|
49
|
+
"""Returns the JSON representation of the model using alias"""
|
50
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
51
|
+
return json.dumps(self.to_dict())
|
52
|
+
|
53
|
+
@classmethod
|
54
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
55
|
+
"""Create an instance of IncomeReportsResponse from a JSON string"""
|
56
|
+
return cls.from_dict(json.loads(json_str))
|
57
|
+
|
58
|
+
def to_dict(self) -> Dict[str, Any]:
|
59
|
+
"""Return the dictionary representation of the model using alias.
|
60
|
+
|
61
|
+
This has the following differences from calling pydantic's
|
62
|
+
`self.model_dump(by_alias=True)`:
|
63
|
+
|
64
|
+
* `None` is only added to the output dict for nullable fields that
|
65
|
+
were set at model initialization. Other fields with value `None`
|
66
|
+
are ignored.
|
67
|
+
"""
|
68
|
+
excluded_fields: Set[str] = set([
|
69
|
+
])
|
70
|
+
|
71
|
+
_dict = self.model_dump(
|
72
|
+
by_alias=True,
|
73
|
+
exclude=excluded_fields,
|
74
|
+
exclude_none=True,
|
75
|
+
)
|
76
|
+
# override the default output from pydantic by calling `to_dict()` of each item in results (list)
|
77
|
+
_items = []
|
78
|
+
if self.results:
|
79
|
+
for _item_results in self.results:
|
80
|
+
if _item_results:
|
81
|
+
_items.append(_item_results.to_dict())
|
82
|
+
_dict['results'] = _items
|
83
|
+
return _dict
|
84
|
+
|
85
|
+
@classmethod
|
86
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
87
|
+
"""Create an instance of IncomeReportsResponse from a dict"""
|
88
|
+
if obj is None:
|
89
|
+
return None
|
90
|
+
|
91
|
+
if not isinstance(obj, dict):
|
92
|
+
return cls.model_validate(obj)
|
93
|
+
|
94
|
+
_obj = cls.model_validate({
|
95
|
+
"page": obj.get("page"),
|
96
|
+
"total": obj.get("total"),
|
97
|
+
"totalPages": obj.get("totalPages"),
|
98
|
+
"results": [IncomeReport.from_dict(_item) for _item in obj["results"]] if obj.get("results") is not None else None
|
99
|
+
})
|
100
|
+
return _obj
|
101
|
+
|
102
|
+
|
@@ -0,0 +1,192 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
|
3
|
+
"""
|
4
|
+
Pluggy API
|
5
|
+
|
6
|
+
Pluggy's main API to review data and execute connectors
|
7
|
+
|
8
|
+
The version of the OpenAPI document: 1.0.0
|
9
|
+
Contact: hello@pluggy.ai
|
10
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
11
|
+
|
12
|
+
Do not edit the class manually.
|
13
|
+
""" # noqa: E501
|
14
|
+
|
15
|
+
|
16
|
+
from __future__ import annotations
|
17
|
+
import pprint
|
18
|
+
import re # noqa: F401
|
19
|
+
import json
|
20
|
+
|
21
|
+
from datetime import datetime
|
22
|
+
from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt, StrictStr, field_validator
|
23
|
+
from typing import Any, ClassVar, Dict, List, Optional, Union
|
24
|
+
from pluggy_sdk.models.investment_metadata import InvestmentMetadata
|
25
|
+
from pluggy_sdk.models.investment_transaction import InvestmentTransaction
|
26
|
+
from typing import Optional, Set
|
27
|
+
from typing_extensions import Self
|
28
|
+
|
29
|
+
class Investment(BaseModel):
|
30
|
+
"""
|
31
|
+
Investment representing a specific asset
|
32
|
+
""" # noqa: E501
|
33
|
+
id: StrictStr = Field(description="Primary identifier")
|
34
|
+
item_id: StrictStr = Field(description="Identifier of the item linked to the investment", alias="itemId")
|
35
|
+
type: StrictStr = Field(description="Investment Asset type")
|
36
|
+
subtype: Optional[StrictStr] = Field(default=None, description="Investment subtype, depends on the type")
|
37
|
+
number: Optional[StrictStr] = Field(default=None, description="Reference number for this holder's asset")
|
38
|
+
balance: Union[StrictFloat, StrictInt] = Field(description="The current net balance amount of the investment")
|
39
|
+
name: StrictStr = Field(description="Name on the provider")
|
40
|
+
last_month_rate: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="The performance rate of the investment in the last month", alias="lastMonthRate")
|
41
|
+
last_twelve_months_rate: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="The performance rate of the investment in the last 12 months", alias="lastTwelveMonthsRate")
|
42
|
+
annual_rate: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="The performance rate of the investment in the last year", alias="annualRate")
|
43
|
+
currency_code: StrictStr = Field(description="Currency ISO code for the amounts", alias="currencyCode")
|
44
|
+
code: Optional[StrictStr] = Field(default=None, description="Associated Code for the investment. For example, the code for a mutual fund is the CNPJ")
|
45
|
+
isin: Optional[StrictStr] = Field(default=None, description="12-character ISIN, a globally unique identifier")
|
46
|
+
value: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Quota's current value at \"date\"")
|
47
|
+
quantity: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Quantity of quota at disposal")
|
48
|
+
amount: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Gross amount of the investment")
|
49
|
+
taxes: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Income taxes applied to the investment")
|
50
|
+
taxes2: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Financial taxes applied to the investment")
|
51
|
+
var_date: datetime = Field(description="Value's quota date", alias="date")
|
52
|
+
owner: Optional[StrictStr] = Field(default=None, description="Owner/beneficiary associated with the investment")
|
53
|
+
amount_profit: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Profit/Loss to date over the investment", alias="amountProfit")
|
54
|
+
amount_withdrawal: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="The amount available to withdraw", alias="amountWithdrawal")
|
55
|
+
amount_original: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Amount originally invested", alias="amountOriginal")
|
56
|
+
metadata: Optional[InvestmentMetadata] = Field(default=None, description="Security Portability details")
|
57
|
+
transactions: Optional[List[InvestmentTransaction]] = Field(default=None, description="(DEPRECATED: this field will be removed for new applications created from 21st March 2023 onward. Use the paginated `GET /investment/{id}/transactions` endpoint instead.) Transactions made on the investment (Buy, Sell, Transfer, Tax)")
|
58
|
+
due_date: Optional[datetime] = Field(default=None, description="Expiration Date", alias="dueDate")
|
59
|
+
issuer: Optional[StrictStr] = Field(default=None, description="The entity that issued the investment")
|
60
|
+
issuer_cnpj: Optional[StrictStr] = Field(default=None, description="The entity CNPJ that issued the investment", alias="issuerCNPJ")
|
61
|
+
issue_date: Optional[datetime] = Field(default=None, description="The date that the investment was issued", alias="issueDate")
|
62
|
+
rate: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Fixed rate percentage applied to the investment")
|
63
|
+
rate_type: Optional[StrictStr] = Field(default=None, description="Type of fixed-rate", alias="rateType")
|
64
|
+
fixed_annual_rate: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Fixed income annual rate", alias="fixedAnnualRate")
|
65
|
+
status: Optional[StrictStr] = Field(default=None, description="Current status of the investment enum value")
|
66
|
+
__properties: ClassVar[List[str]] = ["id", "itemId", "type", "subtype", "number", "balance", "name", "lastMonthRate", "lastTwelveMonthsRate", "annualRate", "currencyCode", "code", "isin", "value", "quantity", "amount", "taxes", "taxes2", "date", "owner", "amountProfit", "amountWithdrawal", "amountOriginal", "metadata", "transactions", "dueDate", "issuer", "issuerCNPJ", "issueDate", "rate", "rateType", "fixedAnnualRate", "status"]
|
67
|
+
|
68
|
+
@field_validator('type')
|
69
|
+
def type_validate_enum(cls, value):
|
70
|
+
"""Validates the enum"""
|
71
|
+
if value not in set(['COE', 'EQUITY', 'ETF', 'FIXED_INCOME', 'MUTUAL_FUND', 'SECURITY', 'OTHER']):
|
72
|
+
raise ValueError("must be one of enum values ('COE', 'EQUITY', 'ETF', 'FIXED_INCOME', 'MUTUAL_FUND', 'SECURITY', 'OTHER')")
|
73
|
+
return value
|
74
|
+
|
75
|
+
@field_validator('subtype')
|
76
|
+
def subtype_validate_enum(cls, value):
|
77
|
+
"""Validates the enum"""
|
78
|
+
if value is None:
|
79
|
+
return value
|
80
|
+
|
81
|
+
if value not in set(['STRUCTURED_NOTE', 'STOCK', 'ETF', 'REAL_ESTATE_FUND', 'BDR', 'DERIVATIVES', 'OPTION', 'TREASURY', 'LCI', 'LCA', 'LF', 'CDB', 'CRI', 'CRA', 'CORPORATE_DEBT', 'LC', 'DEBENTURES', 'INVESTMENT_FUND', 'MULTIMARKET_FUND', 'FIXED_INCOME_FUND', 'STOCK_FUND', 'ETF_FUND', 'OFFSHORE_FUND', 'FIP_FUND', 'EXCHANGE_FUND', 'RETIREMENT', 'OTHER']):
|
82
|
+
raise ValueError("must be one of enum values ('STRUCTURED_NOTE', 'STOCK', 'ETF', 'REAL_ESTATE_FUND', 'BDR', 'DERIVATIVES', 'OPTION', 'TREASURY', 'LCI', 'LCA', 'LF', 'CDB', 'CRI', 'CRA', 'CORPORATE_DEBT', 'LC', 'DEBENTURES', 'INVESTMENT_FUND', 'MULTIMARKET_FUND', 'FIXED_INCOME_FUND', 'STOCK_FUND', 'ETF_FUND', 'OFFSHORE_FUND', 'FIP_FUND', 'EXCHANGE_FUND', 'RETIREMENT', 'OTHER')")
|
83
|
+
return value
|
84
|
+
|
85
|
+
@field_validator('status')
|
86
|
+
def status_validate_enum(cls, value):
|
87
|
+
"""Validates the enum"""
|
88
|
+
if value is None:
|
89
|
+
return value
|
90
|
+
|
91
|
+
if value not in set(['ACTIVE', 'PENDING', 'TOTAL_WITHDRAWAL']):
|
92
|
+
raise ValueError("must be one of enum values ('ACTIVE', 'PENDING', 'TOTAL_WITHDRAWAL')")
|
93
|
+
return value
|
94
|
+
|
95
|
+
model_config = ConfigDict(
|
96
|
+
populate_by_name=True,
|
97
|
+
validate_assignment=True,
|
98
|
+
protected_namespaces=(),
|
99
|
+
)
|
100
|
+
|
101
|
+
|
102
|
+
def to_str(self) -> str:
|
103
|
+
"""Returns the string representation of the model using alias"""
|
104
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
105
|
+
|
106
|
+
def to_json(self) -> str:
|
107
|
+
"""Returns the JSON representation of the model using alias"""
|
108
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
109
|
+
return json.dumps(self.to_dict())
|
110
|
+
|
111
|
+
@classmethod
|
112
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
113
|
+
"""Create an instance of Investment from a JSON string"""
|
114
|
+
return cls.from_dict(json.loads(json_str))
|
115
|
+
|
116
|
+
def to_dict(self) -> Dict[str, Any]:
|
117
|
+
"""Return the dictionary representation of the model using alias.
|
118
|
+
|
119
|
+
This has the following differences from calling pydantic's
|
120
|
+
`self.model_dump(by_alias=True)`:
|
121
|
+
|
122
|
+
* `None` is only added to the output dict for nullable fields that
|
123
|
+
were set at model initialization. Other fields with value `None`
|
124
|
+
are ignored.
|
125
|
+
"""
|
126
|
+
excluded_fields: Set[str] = set([
|
127
|
+
])
|
128
|
+
|
129
|
+
_dict = self.model_dump(
|
130
|
+
by_alias=True,
|
131
|
+
exclude=excluded_fields,
|
132
|
+
exclude_none=True,
|
133
|
+
)
|
134
|
+
# override the default output from pydantic by calling `to_dict()` of metadata
|
135
|
+
if self.metadata:
|
136
|
+
_dict['metadata'] = self.metadata.to_dict()
|
137
|
+
# override the default output from pydantic by calling `to_dict()` of each item in transactions (list)
|
138
|
+
_items = []
|
139
|
+
if self.transactions:
|
140
|
+
for _item_transactions in self.transactions:
|
141
|
+
if _item_transactions:
|
142
|
+
_items.append(_item_transactions.to_dict())
|
143
|
+
_dict['transactions'] = _items
|
144
|
+
return _dict
|
145
|
+
|
146
|
+
@classmethod
|
147
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
148
|
+
"""Create an instance of Investment from a dict"""
|
149
|
+
if obj is None:
|
150
|
+
return None
|
151
|
+
|
152
|
+
if not isinstance(obj, dict):
|
153
|
+
return cls.model_validate(obj)
|
154
|
+
|
155
|
+
_obj = cls.model_validate({
|
156
|
+
"id": obj.get("id"),
|
157
|
+
"itemId": obj.get("itemId"),
|
158
|
+
"type": obj.get("type"),
|
159
|
+
"subtype": obj.get("subtype"),
|
160
|
+
"number": obj.get("number"),
|
161
|
+
"balance": obj.get("balance"),
|
162
|
+
"name": obj.get("name"),
|
163
|
+
"lastMonthRate": obj.get("lastMonthRate"),
|
164
|
+
"lastTwelveMonthsRate": obj.get("lastTwelveMonthsRate"),
|
165
|
+
"annualRate": obj.get("annualRate"),
|
166
|
+
"currencyCode": obj.get("currencyCode"),
|
167
|
+
"code": obj.get("code"),
|
168
|
+
"isin": obj.get("isin"),
|
169
|
+
"value": obj.get("value"),
|
170
|
+
"quantity": obj.get("quantity"),
|
171
|
+
"amount": obj.get("amount"),
|
172
|
+
"taxes": obj.get("taxes"),
|
173
|
+
"taxes2": obj.get("taxes2"),
|
174
|
+
"date": obj.get("date"),
|
175
|
+
"owner": obj.get("owner"),
|
176
|
+
"amountProfit": obj.get("amountProfit"),
|
177
|
+
"amountWithdrawal": obj.get("amountWithdrawal"),
|
178
|
+
"amountOriginal": obj.get("amountOriginal"),
|
179
|
+
"metadata": InvestmentMetadata.from_dict(obj["metadata"]) if obj.get("metadata") is not None else None,
|
180
|
+
"transactions": [InvestmentTransaction.from_dict(_item) for _item in obj["transactions"]] if obj.get("transactions") is not None else None,
|
181
|
+
"dueDate": obj.get("dueDate"),
|
182
|
+
"issuer": obj.get("issuer"),
|
183
|
+
"issuerCNPJ": obj.get("issuerCNPJ"),
|
184
|
+
"issueDate": obj.get("issueDate"),
|
185
|
+
"rate": obj.get("rate"),
|
186
|
+
"rateType": obj.get("rateType"),
|
187
|
+
"fixedAnnualRate": obj.get("fixedAnnualRate"),
|
188
|
+
"status": obj.get("status")
|
189
|
+
})
|
190
|
+
return _obj
|
191
|
+
|
192
|
+
|
@@ -0,0 +1,108 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
|
3
|
+
"""
|
4
|
+
Pluggy API
|
5
|
+
|
6
|
+
Pluggy's main API to review data and execute connectors
|
7
|
+
|
8
|
+
The version of the OpenAPI document: 1.0.0
|
9
|
+
Contact: hello@pluggy.ai
|
10
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
11
|
+
|
12
|
+
Do not edit the class manually.
|
13
|
+
""" # noqa: E501
|
14
|
+
|
15
|
+
|
16
|
+
from __future__ import annotations
|
17
|
+
import pprint
|
18
|
+
import re # noqa: F401
|
19
|
+
import json
|
20
|
+
|
21
|
+
from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt
|
22
|
+
from typing import Any, ClassVar, Dict, List, Optional, Union
|
23
|
+
from typing import Optional, Set
|
24
|
+
from typing_extensions import Self
|
25
|
+
|
26
|
+
class InvestmentExpenses(BaseModel):
|
27
|
+
"""
|
28
|
+
Taxes and fees that applied to the transaction
|
29
|
+
""" # noqa: E501
|
30
|
+
service_tax: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="(ISS) Service tax that varies according to state", alias="serviceTax")
|
31
|
+
brokerage_fee: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Commission charged by the brokerage for carrying out transactions on the stock market", alias="brokerageFee")
|
32
|
+
income_tax: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="(IRRF) Income Tax Withholding, amount paid to the Internal Revenue Service", alias="incomeTax")
|
33
|
+
trading_assets_notice_fee: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="(ANA) Fee of Notice of Trading in Assets", alias="tradingAssetsNoticeFee")
|
34
|
+
maintenance_fee: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="(termo/opções) Fees charged by BM&F Bovespa in negotiations", alias="maintenanceFee")
|
35
|
+
settlement_fee: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Liquidation fee for the settlement of a position on the expiration date or the financial settlement of physical delivery", alias="settlementFee")
|
36
|
+
clearing_fee: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Registration fee", alias="clearingFee")
|
37
|
+
stock_exchange_fee: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="(Emolumentos) Fees charged by BM&F Bovespa as a source of operating income", alias="stockExchangeFee")
|
38
|
+
custody_fee: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Fee by brokers to keep recordsin their home broker systems or on the trading desk", alias="custodyFee")
|
39
|
+
operating_fee: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Amount paid to the Operator for the intermediation service", alias="operatingFee")
|
40
|
+
other: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Sum of other not defined expenses")
|
41
|
+
__properties: ClassVar[List[str]] = ["serviceTax", "brokerageFee", "incomeTax", "tradingAssetsNoticeFee", "maintenanceFee", "settlementFee", "clearingFee", "stockExchangeFee", "custodyFee", "operatingFee", "other"]
|
42
|
+
|
43
|
+
model_config = ConfigDict(
|
44
|
+
populate_by_name=True,
|
45
|
+
validate_assignment=True,
|
46
|
+
protected_namespaces=(),
|
47
|
+
)
|
48
|
+
|
49
|
+
|
50
|
+
def to_str(self) -> str:
|
51
|
+
"""Returns the string representation of the model using alias"""
|
52
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
53
|
+
|
54
|
+
def to_json(self) -> str:
|
55
|
+
"""Returns the JSON representation of the model using alias"""
|
56
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
57
|
+
return json.dumps(self.to_dict())
|
58
|
+
|
59
|
+
@classmethod
|
60
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
61
|
+
"""Create an instance of InvestmentExpenses from a JSON string"""
|
62
|
+
return cls.from_dict(json.loads(json_str))
|
63
|
+
|
64
|
+
def to_dict(self) -> Dict[str, Any]:
|
65
|
+
"""Return the dictionary representation of the model using alias.
|
66
|
+
|
67
|
+
This has the following differences from calling pydantic's
|
68
|
+
`self.model_dump(by_alias=True)`:
|
69
|
+
|
70
|
+
* `None` is only added to the output dict for nullable fields that
|
71
|
+
were set at model initialization. Other fields with value `None`
|
72
|
+
are ignored.
|
73
|
+
"""
|
74
|
+
excluded_fields: Set[str] = set([
|
75
|
+
])
|
76
|
+
|
77
|
+
_dict = self.model_dump(
|
78
|
+
by_alias=True,
|
79
|
+
exclude=excluded_fields,
|
80
|
+
exclude_none=True,
|
81
|
+
)
|
82
|
+
return _dict
|
83
|
+
|
84
|
+
@classmethod
|
85
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
86
|
+
"""Create an instance of InvestmentExpenses from a dict"""
|
87
|
+
if obj is None:
|
88
|
+
return None
|
89
|
+
|
90
|
+
if not isinstance(obj, dict):
|
91
|
+
return cls.model_validate(obj)
|
92
|
+
|
93
|
+
_obj = cls.model_validate({
|
94
|
+
"serviceTax": obj.get("serviceTax"),
|
95
|
+
"brokerageFee": obj.get("brokerageFee"),
|
96
|
+
"incomeTax": obj.get("incomeTax"),
|
97
|
+
"tradingAssetsNoticeFee": obj.get("tradingAssetsNoticeFee"),
|
98
|
+
"maintenanceFee": obj.get("maintenanceFee"),
|
99
|
+
"settlementFee": obj.get("settlementFee"),
|
100
|
+
"clearingFee": obj.get("clearingFee"),
|
101
|
+
"stockExchangeFee": obj.get("stockExchangeFee"),
|
102
|
+
"custodyFee": obj.get("custodyFee"),
|
103
|
+
"operatingFee": obj.get("operatingFee"),
|
104
|
+
"other": obj.get("other")
|
105
|
+
})
|
106
|
+
return _obj
|
107
|
+
|
108
|
+
|
@@ -0,0 +1,100 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
|
3
|
+
"""
|
4
|
+
Pluggy API
|
5
|
+
|
6
|
+
Pluggy's main API to review data and execute connectors
|
7
|
+
|
8
|
+
The version of the OpenAPI document: 1.0.0
|
9
|
+
Contact: hello@pluggy.ai
|
10
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
11
|
+
|
12
|
+
Do not edit the class manually.
|
13
|
+
""" # noqa: E501
|
14
|
+
|
15
|
+
|
16
|
+
from __future__ import annotations
|
17
|
+
import pprint
|
18
|
+
import re # noqa: F401
|
19
|
+
import json
|
20
|
+
|
21
|
+
from pydantic import BaseModel, ConfigDict, Field, StrictStr
|
22
|
+
from typing import Any, ClassVar, Dict, List, Optional
|
23
|
+
from pluggy_sdk.models.company import Company
|
24
|
+
from typing import Optional, Set
|
25
|
+
from typing_extensions import Self
|
26
|
+
|
27
|
+
class InvestmentMetadata(BaseModel):
|
28
|
+
"""
|
29
|
+
Investment metadata for Previdencia migrations
|
30
|
+
""" # noqa: E501
|
31
|
+
tax_regime: Optional[StrictStr] = Field(default=None, description="Description of the type of tax applied to previdencia", alias="taxRegime")
|
32
|
+
proposal_number: Optional[StrictStr] = Field(default=None, description="Previdencial proposal number", alias="proposalNumber")
|
33
|
+
process_number: Optional[StrictStr] = Field(default=None, description="Number of the process of a previdencia", alias="processNumber")
|
34
|
+
fund_name: Optional[StrictStr] = Field(default=None, description="Name of the fund associated with the previdencia.", alias="fundName")
|
35
|
+
insurer: Optional[Company] = Field(default=None, description="Insurer of the Security Investment")
|
36
|
+
__properties: ClassVar[List[str]] = ["taxRegime", "proposalNumber", "processNumber", "fundName", "insurer"]
|
37
|
+
|
38
|
+
model_config = ConfigDict(
|
39
|
+
populate_by_name=True,
|
40
|
+
validate_assignment=True,
|
41
|
+
protected_namespaces=(),
|
42
|
+
)
|
43
|
+
|
44
|
+
|
45
|
+
def to_str(self) -> str:
|
46
|
+
"""Returns the string representation of the model using alias"""
|
47
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
48
|
+
|
49
|
+
def to_json(self) -> str:
|
50
|
+
"""Returns the JSON representation of the model using alias"""
|
51
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
52
|
+
return json.dumps(self.to_dict())
|
53
|
+
|
54
|
+
@classmethod
|
55
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
56
|
+
"""Create an instance of InvestmentMetadata from a JSON string"""
|
57
|
+
return cls.from_dict(json.loads(json_str))
|
58
|
+
|
59
|
+
def to_dict(self) -> Dict[str, Any]:
|
60
|
+
"""Return the dictionary representation of the model using alias.
|
61
|
+
|
62
|
+
This has the following differences from calling pydantic's
|
63
|
+
`self.model_dump(by_alias=True)`:
|
64
|
+
|
65
|
+
* `None` is only added to the output dict for nullable fields that
|
66
|
+
were set at model initialization. Other fields with value `None`
|
67
|
+
are ignored.
|
68
|
+
"""
|
69
|
+
excluded_fields: Set[str] = set([
|
70
|
+
])
|
71
|
+
|
72
|
+
_dict = self.model_dump(
|
73
|
+
by_alias=True,
|
74
|
+
exclude=excluded_fields,
|
75
|
+
exclude_none=True,
|
76
|
+
)
|
77
|
+
# override the default output from pydantic by calling `to_dict()` of insurer
|
78
|
+
if self.insurer:
|
79
|
+
_dict['insurer'] = self.insurer.to_dict()
|
80
|
+
return _dict
|
81
|
+
|
82
|
+
@classmethod
|
83
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
84
|
+
"""Create an instance of InvestmentMetadata from a dict"""
|
85
|
+
if obj is None:
|
86
|
+
return None
|
87
|
+
|
88
|
+
if not isinstance(obj, dict):
|
89
|
+
return cls.model_validate(obj)
|
90
|
+
|
91
|
+
_obj = cls.model_validate({
|
92
|
+
"taxRegime": obj.get("taxRegime"),
|
93
|
+
"proposalNumber": obj.get("proposalNumber"),
|
94
|
+
"processNumber": obj.get("processNumber"),
|
95
|
+
"fundName": obj.get("fundName"),
|
96
|
+
"insurer": Company.from_dict(obj["insurer"]) if obj.get("insurer") is not None else None
|
97
|
+
})
|
98
|
+
return _obj
|
99
|
+
|
100
|
+
|