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,117 @@
|
|
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 typing import Optional, Set
|
25
|
+
from typing_extensions import Self
|
26
|
+
|
27
|
+
class AcquirerAnticipation(BaseModel):
|
28
|
+
"""
|
29
|
+
Acquirer Anticipation product
|
30
|
+
""" # noqa: E501
|
31
|
+
id: StrictStr = Field(description="Primary identifier of the acquirer anticipation")
|
32
|
+
item_id: StrictStr = Field(description="Primary identifier of the item associated to the acquirer anticipation", alias="itemId")
|
33
|
+
description: StrictStr = Field(description="Clean description of the acquirer anticipation")
|
34
|
+
currency_code: StrictStr = Field(description="Currency ISO code", alias="currencyCode")
|
35
|
+
var_date: datetime = Field(description="Date when the acquirer anticipation was requested", alias="date")
|
36
|
+
gross_amount: Union[StrictFloat, StrictInt] = Field(description="Acquirer anticipation gross amount", alias="grossAmount")
|
37
|
+
status: Optional[StrictStr] = Field(default=None, description="Status of the payment anticipation")
|
38
|
+
net_amount: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Acquirer anticipation net amount", alias="netAmount")
|
39
|
+
fee: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Percentage of monthly fee (e.g 1.5 = 1.5%)")
|
40
|
+
fee_amount: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Fee amount", alias="feeAmount")
|
41
|
+
__properties: ClassVar[List[str]] = ["id", "itemId", "description", "currencyCode", "date", "grossAmount", "status", "netAmount", "fee", "feeAmount"]
|
42
|
+
|
43
|
+
@field_validator('status')
|
44
|
+
def status_validate_enum(cls, value):
|
45
|
+
"""Validates the enum"""
|
46
|
+
if value is None:
|
47
|
+
return value
|
48
|
+
|
49
|
+
if value not in set(['SIMULATED', 'REQUESTED', 'CANCELLED', 'IN_ANALYSIS', 'APPROVED']):
|
50
|
+
raise ValueError("must be one of enum values ('SIMULATED', 'REQUESTED', 'CANCELLED', 'IN_ANALYSIS', 'APPROVED')")
|
51
|
+
return value
|
52
|
+
|
53
|
+
model_config = ConfigDict(
|
54
|
+
populate_by_name=True,
|
55
|
+
validate_assignment=True,
|
56
|
+
protected_namespaces=(),
|
57
|
+
)
|
58
|
+
|
59
|
+
|
60
|
+
def to_str(self) -> str:
|
61
|
+
"""Returns the string representation of the model using alias"""
|
62
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
63
|
+
|
64
|
+
def to_json(self) -> str:
|
65
|
+
"""Returns the JSON representation of the model using alias"""
|
66
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
67
|
+
return json.dumps(self.to_dict())
|
68
|
+
|
69
|
+
@classmethod
|
70
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
71
|
+
"""Create an instance of AcquirerAnticipation from a JSON string"""
|
72
|
+
return cls.from_dict(json.loads(json_str))
|
73
|
+
|
74
|
+
def to_dict(self) -> Dict[str, Any]:
|
75
|
+
"""Return the dictionary representation of the model using alias.
|
76
|
+
|
77
|
+
This has the following differences from calling pydantic's
|
78
|
+
`self.model_dump(by_alias=True)`:
|
79
|
+
|
80
|
+
* `None` is only added to the output dict for nullable fields that
|
81
|
+
were set at model initialization. Other fields with value `None`
|
82
|
+
are ignored.
|
83
|
+
"""
|
84
|
+
excluded_fields: Set[str] = set([
|
85
|
+
])
|
86
|
+
|
87
|
+
_dict = self.model_dump(
|
88
|
+
by_alias=True,
|
89
|
+
exclude=excluded_fields,
|
90
|
+
exclude_none=True,
|
91
|
+
)
|
92
|
+
return _dict
|
93
|
+
|
94
|
+
@classmethod
|
95
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
96
|
+
"""Create an instance of AcquirerAnticipation from a dict"""
|
97
|
+
if obj is None:
|
98
|
+
return None
|
99
|
+
|
100
|
+
if not isinstance(obj, dict):
|
101
|
+
return cls.model_validate(obj)
|
102
|
+
|
103
|
+
_obj = cls.model_validate({
|
104
|
+
"id": obj.get("id"),
|
105
|
+
"itemId": obj.get("itemId"),
|
106
|
+
"description": obj.get("description"),
|
107
|
+
"currencyCode": obj.get("currencyCode"),
|
108
|
+
"date": obj.get("date"),
|
109
|
+
"grossAmount": obj.get("grossAmount"),
|
110
|
+
"status": obj.get("status"),
|
111
|
+
"netAmount": obj.get("netAmount"),
|
112
|
+
"fee": obj.get("fee"),
|
113
|
+
"feeAmount": obj.get("feeAmount")
|
114
|
+
})
|
115
|
+
return _obj
|
116
|
+
|
117
|
+
|
@@ -0,0 +1,101 @@
|
|
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, field_validator
|
22
|
+
from typing import Any, ClassVar, Dict, List, Union
|
23
|
+
from typing import Optional, Set
|
24
|
+
from typing_extensions import Self
|
25
|
+
|
26
|
+
class AcquirerAnticipationData(BaseModel):
|
27
|
+
"""
|
28
|
+
AcquirerAnticipationData
|
29
|
+
""" # noqa: E501
|
30
|
+
status: StrictStr
|
31
|
+
net_amount: Union[StrictFloat, StrictInt] = Field(description="Net amount of the anticipation", alias="netAmount")
|
32
|
+
fee: Union[StrictFloat, StrictInt] = Field(description="Percentage of monthly fee (e.g 1.5 = 1.5%)")
|
33
|
+
fee_amount: Union[StrictFloat, StrictInt] = Field(description="Fee amount", alias="feeAmount")
|
34
|
+
__properties: ClassVar[List[str]] = ["status", "netAmount", "fee", "feeAmount"]
|
35
|
+
|
36
|
+
@field_validator('status')
|
37
|
+
def status_validate_enum(cls, value):
|
38
|
+
"""Validates the enum"""
|
39
|
+
if value not in set(['SIMULATED', 'REQUESTED', 'APPROVED', 'CANCELLED', 'IN_ANALYSIS']):
|
40
|
+
raise ValueError("must be one of enum values ('SIMULATED', 'REQUESTED', 'APPROVED', 'CANCELLED', 'IN_ANALYSIS')")
|
41
|
+
return value
|
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 AcquirerAnticipationData 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 AcquirerAnticipationData 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
|
+
"status": obj.get("status"),
|
95
|
+
"netAmount": obj.get("netAmount"),
|
96
|
+
"fee": obj.get("fee"),
|
97
|
+
"feeAmount": obj.get("feeAmount")
|
98
|
+
})
|
99
|
+
return _obj
|
100
|
+
|
101
|
+
|
@@ -0,0 +1,113 @@
|
|
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, field_validator
|
22
|
+
from typing import Any, ClassVar, Dict, List, Optional
|
23
|
+
from pluggy_sdk.models.acquirer_anticipation_data import AcquirerAnticipationData
|
24
|
+
from pluggy_sdk.models.acquirer_receivable_data import AcquirerReceivableData
|
25
|
+
from pluggy_sdk.models.acquirer_sale_data import AcquirerSaleData
|
26
|
+
from typing import Optional, Set
|
27
|
+
from typing_extensions import Self
|
28
|
+
|
29
|
+
class AcquirerData(BaseModel):
|
30
|
+
"""
|
31
|
+
Data of a transaction specific to institutions of type PAYMENT_ACCOUNT (acquiring banks)
|
32
|
+
""" # noqa: E501
|
33
|
+
type: StrictStr = Field(description="The type of acquiring bank transaction")
|
34
|
+
sale_data: Optional[AcquirerSaleData] = Field(default=None, alias="saleData")
|
35
|
+
receivable_data: Optional[AcquirerReceivableData] = Field(default=None, alias="receivableData")
|
36
|
+
anticipation_data: Optional[AcquirerAnticipationData] = Field(default=None, alias="anticipationData")
|
37
|
+
__properties: ClassVar[List[str]] = ["type", "saleData", "receivableData", "anticipationData"]
|
38
|
+
|
39
|
+
@field_validator('type')
|
40
|
+
def type_validate_enum(cls, value):
|
41
|
+
"""Validates the enum"""
|
42
|
+
if value not in set(['SALE', 'RECEIVABLE', 'ANTICIPATION', 'CHARGEBACK']):
|
43
|
+
raise ValueError("must be one of enum values ('SALE', 'RECEIVABLE', 'ANTICIPATION', 'CHARGEBACK')")
|
44
|
+
return value
|
45
|
+
|
46
|
+
model_config = ConfigDict(
|
47
|
+
populate_by_name=True,
|
48
|
+
validate_assignment=True,
|
49
|
+
protected_namespaces=(),
|
50
|
+
)
|
51
|
+
|
52
|
+
|
53
|
+
def to_str(self) -> str:
|
54
|
+
"""Returns the string representation of the model using alias"""
|
55
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
56
|
+
|
57
|
+
def to_json(self) -> str:
|
58
|
+
"""Returns the JSON representation of the model using alias"""
|
59
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
60
|
+
return json.dumps(self.to_dict())
|
61
|
+
|
62
|
+
@classmethod
|
63
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
64
|
+
"""Create an instance of AcquirerData from a JSON string"""
|
65
|
+
return cls.from_dict(json.loads(json_str))
|
66
|
+
|
67
|
+
def to_dict(self) -> Dict[str, Any]:
|
68
|
+
"""Return the dictionary representation of the model using alias.
|
69
|
+
|
70
|
+
This has the following differences from calling pydantic's
|
71
|
+
`self.model_dump(by_alias=True)`:
|
72
|
+
|
73
|
+
* `None` is only added to the output dict for nullable fields that
|
74
|
+
were set at model initialization. Other fields with value `None`
|
75
|
+
are ignored.
|
76
|
+
"""
|
77
|
+
excluded_fields: Set[str] = set([
|
78
|
+
])
|
79
|
+
|
80
|
+
_dict = self.model_dump(
|
81
|
+
by_alias=True,
|
82
|
+
exclude=excluded_fields,
|
83
|
+
exclude_none=True,
|
84
|
+
)
|
85
|
+
# override the default output from pydantic by calling `to_dict()` of sale_data
|
86
|
+
if self.sale_data:
|
87
|
+
_dict['saleData'] = self.sale_data.to_dict()
|
88
|
+
# override the default output from pydantic by calling `to_dict()` of receivable_data
|
89
|
+
if self.receivable_data:
|
90
|
+
_dict['receivableData'] = self.receivable_data.to_dict()
|
91
|
+
# override the default output from pydantic by calling `to_dict()` of anticipation_data
|
92
|
+
if self.anticipation_data:
|
93
|
+
_dict['anticipationData'] = self.anticipation_data.to_dict()
|
94
|
+
return _dict
|
95
|
+
|
96
|
+
@classmethod
|
97
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
98
|
+
"""Create an instance of AcquirerData from a dict"""
|
99
|
+
if obj is None:
|
100
|
+
return None
|
101
|
+
|
102
|
+
if not isinstance(obj, dict):
|
103
|
+
return cls.model_validate(obj)
|
104
|
+
|
105
|
+
_obj = cls.model_validate({
|
106
|
+
"type": obj.get("type"),
|
107
|
+
"saleData": AcquirerSaleData.from_dict(obj["saleData"]) if obj.get("saleData") is not None else None,
|
108
|
+
"receivableData": AcquirerReceivableData.from_dict(obj["receivableData"]) if obj.get("receivableData") is not None else None,
|
109
|
+
"anticipationData": AcquirerAnticipationData.from_dict(obj["anticipationData"]) if obj.get("anticipationData") is not None else None
|
110
|
+
})
|
111
|
+
return _obj
|
112
|
+
|
113
|
+
|
@@ -0,0 +1,143 @@
|
|
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.acquirer_receivable_destination_account import AcquirerReceivableDestinationAccount
|
25
|
+
from pluggy_sdk.models.acquirer_receivable_related_sale import AcquirerReceivableRelatedSale
|
26
|
+
from typing import Optional, Set
|
27
|
+
from typing_extensions import Self
|
28
|
+
|
29
|
+
class AcquirerReceivable(BaseModel):
|
30
|
+
"""
|
31
|
+
Acquirer Receivable product
|
32
|
+
""" # noqa: E501
|
33
|
+
id: StrictStr = Field(description="Primary identifier of the acquirer receivable")
|
34
|
+
item_id: StrictStr = Field(description="Primary identifier of the item associated to the acquirer receivable", alias="itemId")
|
35
|
+
description: StrictStr = Field(description="Clean description of the acquirer receivable")
|
36
|
+
currency_code: StrictStr = Field(description="Currency ISO code", alias="currencyCode")
|
37
|
+
var_date: datetime = Field(description="Date when the acquirer receivable was received", alias="date")
|
38
|
+
gross_amount: Union[StrictFloat, StrictInt] = Field(description="Acquirer sale gross amount", alias="grossAmount")
|
39
|
+
payment_id: Optional[StrictStr] = Field(default=None, alias="paymentId")
|
40
|
+
settlement_status: Optional[StrictStr] = Field(default=None, description="Status of the payment", alias="settlementStatus")
|
41
|
+
card_flag: Optional[StrictStr] = Field(default=None, description="Flag of the card used", alias="cardFlag")
|
42
|
+
net_amount: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Acquirer receivable net amount", alias="netAmount")
|
43
|
+
destination_account: Optional[AcquirerReceivableDestinationAccount] = Field(default=None, alias="destinationAccount")
|
44
|
+
related_sales: Optional[List[AcquirerReceivableRelatedSale]] = Field(default=None, description="Sales related to the receivable", alias="relatedSales")
|
45
|
+
__properties: ClassVar[List[str]] = ["id", "itemId", "description", "currencyCode", "date", "grossAmount", "paymentId", "settlementStatus", "cardFlag", "netAmount", "destinationAccount", "relatedSales"]
|
46
|
+
|
47
|
+
@field_validator('settlement_status')
|
48
|
+
def settlement_status_validate_enum(cls, value):
|
49
|
+
"""Validates the enum"""
|
50
|
+
if value is None:
|
51
|
+
return value
|
52
|
+
|
53
|
+
if value not in set(['PAID', 'SENT', 'REJECTED', 'EXPECTED', 'OTHER']):
|
54
|
+
raise ValueError("must be one of enum values ('PAID', 'SENT', 'REJECTED', 'EXPECTED', 'OTHER')")
|
55
|
+
return value
|
56
|
+
|
57
|
+
@field_validator('card_flag')
|
58
|
+
def card_flag_validate_enum(cls, value):
|
59
|
+
"""Validates the enum"""
|
60
|
+
if value is None:
|
61
|
+
return value
|
62
|
+
|
63
|
+
if value not in set(['VISA', 'MASTERCARD', 'AMEX', 'ELO', 'CABAL', 'OTHER']):
|
64
|
+
raise ValueError("must be one of enum values ('VISA', 'MASTERCARD', 'AMEX', 'ELO', 'CABAL', 'OTHER')")
|
65
|
+
return value
|
66
|
+
|
67
|
+
model_config = ConfigDict(
|
68
|
+
populate_by_name=True,
|
69
|
+
validate_assignment=True,
|
70
|
+
protected_namespaces=(),
|
71
|
+
)
|
72
|
+
|
73
|
+
|
74
|
+
def to_str(self) -> str:
|
75
|
+
"""Returns the string representation of the model using alias"""
|
76
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
77
|
+
|
78
|
+
def to_json(self) -> str:
|
79
|
+
"""Returns the JSON representation of the model using alias"""
|
80
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
81
|
+
return json.dumps(self.to_dict())
|
82
|
+
|
83
|
+
@classmethod
|
84
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
85
|
+
"""Create an instance of AcquirerReceivable from a JSON string"""
|
86
|
+
return cls.from_dict(json.loads(json_str))
|
87
|
+
|
88
|
+
def to_dict(self) -> Dict[str, Any]:
|
89
|
+
"""Return the dictionary representation of the model using alias.
|
90
|
+
|
91
|
+
This has the following differences from calling pydantic's
|
92
|
+
`self.model_dump(by_alias=True)`:
|
93
|
+
|
94
|
+
* `None` is only added to the output dict for nullable fields that
|
95
|
+
were set at model initialization. Other fields with value `None`
|
96
|
+
are ignored.
|
97
|
+
"""
|
98
|
+
excluded_fields: Set[str] = set([
|
99
|
+
])
|
100
|
+
|
101
|
+
_dict = self.model_dump(
|
102
|
+
by_alias=True,
|
103
|
+
exclude=excluded_fields,
|
104
|
+
exclude_none=True,
|
105
|
+
)
|
106
|
+
# override the default output from pydantic by calling `to_dict()` of destination_account
|
107
|
+
if self.destination_account:
|
108
|
+
_dict['destinationAccount'] = self.destination_account.to_dict()
|
109
|
+
# override the default output from pydantic by calling `to_dict()` of each item in related_sales (list)
|
110
|
+
_items = []
|
111
|
+
if self.related_sales:
|
112
|
+
for _item_related_sales in self.related_sales:
|
113
|
+
if _item_related_sales:
|
114
|
+
_items.append(_item_related_sales.to_dict())
|
115
|
+
_dict['relatedSales'] = _items
|
116
|
+
return _dict
|
117
|
+
|
118
|
+
@classmethod
|
119
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
120
|
+
"""Create an instance of AcquirerReceivable from a dict"""
|
121
|
+
if obj is None:
|
122
|
+
return None
|
123
|
+
|
124
|
+
if not isinstance(obj, dict):
|
125
|
+
return cls.model_validate(obj)
|
126
|
+
|
127
|
+
_obj = cls.model_validate({
|
128
|
+
"id": obj.get("id"),
|
129
|
+
"itemId": obj.get("itemId"),
|
130
|
+
"description": obj.get("description"),
|
131
|
+
"currencyCode": obj.get("currencyCode"),
|
132
|
+
"date": obj.get("date"),
|
133
|
+
"grossAmount": obj.get("grossAmount"),
|
134
|
+
"paymentId": obj.get("paymentId"),
|
135
|
+
"settlementStatus": obj.get("settlementStatus"),
|
136
|
+
"cardFlag": obj.get("cardFlag"),
|
137
|
+
"netAmount": obj.get("netAmount"),
|
138
|
+
"destinationAccount": AcquirerReceivableDestinationAccount.from_dict(obj["destinationAccount"]) if obj.get("destinationAccount") is not None else None,
|
139
|
+
"relatedSales": [AcquirerReceivableRelatedSale.from_dict(_item) for _item in obj["relatedSales"]] if obj.get("relatedSales") is not None else None
|
140
|
+
})
|
141
|
+
return _obj
|
142
|
+
|
143
|
+
|
@@ -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, StrictStr, field_validator
|
22
|
+
from typing import Any, ClassVar, Dict, List, Optional, Union
|
23
|
+
from pluggy_sdk.models.acquirer_receivable_data_establishment import AcquirerReceivableDataEstablishment
|
24
|
+
from typing import Optional, Set
|
25
|
+
from typing_extensions import Self
|
26
|
+
|
27
|
+
class AcquirerReceivableData(BaseModel):
|
28
|
+
"""
|
29
|
+
AcquirerReceivableData
|
30
|
+
""" # noqa: E501
|
31
|
+
settlement_status: Optional[StrictStr] = Field(default=None, alias="settlementStatus")
|
32
|
+
card_flag: Optional[StrictStr] = Field(default=None, alias="cardFlag")
|
33
|
+
establishment: Optional[AcquirerReceivableDataEstablishment] = None
|
34
|
+
net_amount: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Net amount of the receivable", alias="netAmount")
|
35
|
+
__properties: ClassVar[List[str]] = ["settlementStatus", "cardFlag", "establishment", "netAmount"]
|
36
|
+
|
37
|
+
@field_validator('settlement_status')
|
38
|
+
def settlement_status_validate_enum(cls, value):
|
39
|
+
"""Validates the enum"""
|
40
|
+
if value is None:
|
41
|
+
return value
|
42
|
+
|
43
|
+
if value not in set(['SENT', 'PAID', 'REJECTED', 'EXPECTED', 'OTHER']):
|
44
|
+
raise ValueError("must be one of enum values ('SENT', 'PAID', 'REJECTED', 'EXPECTED', 'OTHER')")
|
45
|
+
return value
|
46
|
+
|
47
|
+
model_config = ConfigDict(
|
48
|
+
populate_by_name=True,
|
49
|
+
validate_assignment=True,
|
50
|
+
protected_namespaces=(),
|
51
|
+
)
|
52
|
+
|
53
|
+
|
54
|
+
def to_str(self) -> str:
|
55
|
+
"""Returns the string representation of the model using alias"""
|
56
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
57
|
+
|
58
|
+
def to_json(self) -> str:
|
59
|
+
"""Returns the JSON representation of the model using alias"""
|
60
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
61
|
+
return json.dumps(self.to_dict())
|
62
|
+
|
63
|
+
@classmethod
|
64
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
65
|
+
"""Create an instance of AcquirerReceivableData from a JSON string"""
|
66
|
+
return cls.from_dict(json.loads(json_str))
|
67
|
+
|
68
|
+
def to_dict(self) -> Dict[str, Any]:
|
69
|
+
"""Return the dictionary representation of the model using alias.
|
70
|
+
|
71
|
+
This has the following differences from calling pydantic's
|
72
|
+
`self.model_dump(by_alias=True)`:
|
73
|
+
|
74
|
+
* `None` is only added to the output dict for nullable fields that
|
75
|
+
were set at model initialization. Other fields with value `None`
|
76
|
+
are ignored.
|
77
|
+
"""
|
78
|
+
excluded_fields: Set[str] = set([
|
79
|
+
])
|
80
|
+
|
81
|
+
_dict = self.model_dump(
|
82
|
+
by_alias=True,
|
83
|
+
exclude=excluded_fields,
|
84
|
+
exclude_none=True,
|
85
|
+
)
|
86
|
+
# override the default output from pydantic by calling `to_dict()` of establishment
|
87
|
+
if self.establishment:
|
88
|
+
_dict['establishment'] = self.establishment.to_dict()
|
89
|
+
return _dict
|
90
|
+
|
91
|
+
@classmethod
|
92
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
93
|
+
"""Create an instance of AcquirerReceivableData from a dict"""
|
94
|
+
if obj is None:
|
95
|
+
return None
|
96
|
+
|
97
|
+
if not isinstance(obj, dict):
|
98
|
+
return cls.model_validate(obj)
|
99
|
+
|
100
|
+
_obj = cls.model_validate({
|
101
|
+
"settlementStatus": obj.get("settlementStatus"),
|
102
|
+
"cardFlag": obj.get("cardFlag"),
|
103
|
+
"establishment": AcquirerReceivableDataEstablishment.from_dict(obj["establishment"]) if obj.get("establishment") is not None else None,
|
104
|
+
"netAmount": obj.get("netAmount")
|
105
|
+
})
|
106
|
+
return _obj
|
107
|
+
|
108
|
+
|
@@ -0,0 +1,96 @@
|
|
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 typing import Optional, Set
|
24
|
+
from typing_extensions import Self
|
25
|
+
|
26
|
+
class AcquirerReceivableDataEstablishment(BaseModel):
|
27
|
+
"""
|
28
|
+
AcquirerReceivableDataEstablishment
|
29
|
+
""" # noqa: E501
|
30
|
+
company_code: Optional[StrictStr] = Field(default=None, description="CNPJ of the company that receives the payment", alias="companyCode")
|
31
|
+
company_name: Optional[StrictStr] = Field(default=None, description="Name of the company that receives the payment", alias="companyName")
|
32
|
+
receiving_bank: Optional[StrictStr] = Field(default=None, description="Bank of the receiving account", alias="receivingBank")
|
33
|
+
agency: Optional[StrictStr] = Field(default=None, description="Agency number of the receiving account")
|
34
|
+
account: Optional[StrictStr] = Field(default=None, description="Account number of the receiving account (with check digit)")
|
35
|
+
__properties: ClassVar[List[str]] = ["companyCode", "companyName", "receivingBank", "agency", "account"]
|
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 AcquirerReceivableDataEstablishment 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
|
+
return _dict
|
77
|
+
|
78
|
+
@classmethod
|
79
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
80
|
+
"""Create an instance of AcquirerReceivableDataEstablishment from a dict"""
|
81
|
+
if obj is None:
|
82
|
+
return None
|
83
|
+
|
84
|
+
if not isinstance(obj, dict):
|
85
|
+
return cls.model_validate(obj)
|
86
|
+
|
87
|
+
_obj = cls.model_validate({
|
88
|
+
"companyCode": obj.get("companyCode"),
|
89
|
+
"companyName": obj.get("companyName"),
|
90
|
+
"receivingBank": obj.get("receivingBank"),
|
91
|
+
"agency": obj.get("agency"),
|
92
|
+
"account": obj.get("account")
|
93
|
+
})
|
94
|
+
return _obj
|
95
|
+
|
96
|
+
|