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,144 @@
|
|
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 json
|
18
|
+
import pprint
|
19
|
+
from pydantic import BaseModel, ConfigDict, Field, StrictStr, ValidationError, field_validator
|
20
|
+
from typing import Any, Dict, List, Optional
|
21
|
+
from pydantic import StrictStr, Field
|
22
|
+
from typing import Union, List, Set, Optional, Dict
|
23
|
+
from typing_extensions import Literal, Self
|
24
|
+
|
25
|
+
CREATEITEMPARAMETERS_ONE_OF_SCHEMAS = ["object", "str"]
|
26
|
+
|
27
|
+
class CreateItemParameters(BaseModel):
|
28
|
+
"""
|
29
|
+
Connector's credentials that are required to execute on a Key-Value object or a string if they are encrypted
|
30
|
+
"""
|
31
|
+
# data type: object
|
32
|
+
oneof_schema_1_validator: Optional[Dict[str, Any]] = None
|
33
|
+
# data type: str
|
34
|
+
oneof_schema_2_validator: Optional[StrictStr] = None
|
35
|
+
actual_instance: Optional[Union[object, str]] = None
|
36
|
+
one_of_schemas: Set[str] = { "object", "str" }
|
37
|
+
|
38
|
+
model_config = ConfigDict(
|
39
|
+
validate_assignment=True,
|
40
|
+
protected_namespaces=(),
|
41
|
+
)
|
42
|
+
|
43
|
+
|
44
|
+
def __init__(self, *args, **kwargs) -> None:
|
45
|
+
if args:
|
46
|
+
if len(args) > 1:
|
47
|
+
raise ValueError("If a position argument is used, only 1 is allowed to set `actual_instance`")
|
48
|
+
if kwargs:
|
49
|
+
raise ValueError("If a position argument is used, keyword arguments cannot be used.")
|
50
|
+
super().__init__(actual_instance=args[0])
|
51
|
+
else:
|
52
|
+
super().__init__(**kwargs)
|
53
|
+
|
54
|
+
@field_validator('actual_instance')
|
55
|
+
def actual_instance_must_validate_oneof(cls, v):
|
56
|
+
instance = CreateItemParameters.model_construct()
|
57
|
+
error_messages = []
|
58
|
+
match = 0
|
59
|
+
# validate data type: object
|
60
|
+
try:
|
61
|
+
instance.oneof_schema_1_validator = v
|
62
|
+
match += 1
|
63
|
+
except (ValidationError, ValueError) as e:
|
64
|
+
error_messages.append(str(e))
|
65
|
+
# validate data type: str
|
66
|
+
try:
|
67
|
+
instance.oneof_schema_2_validator = v
|
68
|
+
match += 1
|
69
|
+
except (ValidationError, ValueError) as e:
|
70
|
+
error_messages.append(str(e))
|
71
|
+
if match > 1:
|
72
|
+
# more than 1 match
|
73
|
+
raise ValueError("Multiple matches found when setting `actual_instance` in CreateItemParameters with oneOf schemas: object, str. Details: " + ", ".join(error_messages))
|
74
|
+
elif match == 0:
|
75
|
+
# no match
|
76
|
+
raise ValueError("No match found when setting `actual_instance` in CreateItemParameters with oneOf schemas: object, str. Details: " + ", ".join(error_messages))
|
77
|
+
else:
|
78
|
+
return v
|
79
|
+
|
80
|
+
@classmethod
|
81
|
+
def from_dict(cls, obj: Union[str, Dict[str, Any]]) -> Self:
|
82
|
+
return cls.from_json(json.dumps(obj))
|
83
|
+
|
84
|
+
@classmethod
|
85
|
+
def from_json(cls, json_str: str) -> Self:
|
86
|
+
"""Returns the object represented by the json string"""
|
87
|
+
instance = cls.model_construct()
|
88
|
+
error_messages = []
|
89
|
+
match = 0
|
90
|
+
|
91
|
+
# deserialize data into object
|
92
|
+
try:
|
93
|
+
# validation
|
94
|
+
instance.oneof_schema_1_validator = json.loads(json_str)
|
95
|
+
# assign value to actual_instance
|
96
|
+
instance.actual_instance = instance.oneof_schema_1_validator
|
97
|
+
match += 1
|
98
|
+
except (ValidationError, ValueError) as e:
|
99
|
+
error_messages.append(str(e))
|
100
|
+
# deserialize data into str
|
101
|
+
try:
|
102
|
+
# validation
|
103
|
+
instance.oneof_schema_2_validator = json.loads(json_str)
|
104
|
+
# assign value to actual_instance
|
105
|
+
instance.actual_instance = instance.oneof_schema_2_validator
|
106
|
+
match += 1
|
107
|
+
except (ValidationError, ValueError) as e:
|
108
|
+
error_messages.append(str(e))
|
109
|
+
|
110
|
+
if match > 1:
|
111
|
+
# more than 1 match
|
112
|
+
raise ValueError("Multiple matches found when deserializing the JSON string into CreateItemParameters with oneOf schemas: object, str. Details: " + ", ".join(error_messages))
|
113
|
+
elif match == 0:
|
114
|
+
# no match
|
115
|
+
raise ValueError("No match found when deserializing the JSON string into CreateItemParameters with oneOf schemas: object, str. Details: " + ", ".join(error_messages))
|
116
|
+
else:
|
117
|
+
return instance
|
118
|
+
|
119
|
+
def to_json(self) -> str:
|
120
|
+
"""Returns the JSON representation of the actual instance"""
|
121
|
+
if self.actual_instance is None:
|
122
|
+
return "null"
|
123
|
+
|
124
|
+
if hasattr(self.actual_instance, "to_json") and callable(self.actual_instance.to_json):
|
125
|
+
return self.actual_instance.to_json()
|
126
|
+
else:
|
127
|
+
return json.dumps(self.actual_instance)
|
128
|
+
|
129
|
+
def to_dict(self) -> Optional[Union[Dict[str, Any], object, str]]:
|
130
|
+
"""Returns the dict representation of the actual instance"""
|
131
|
+
if self.actual_instance is None:
|
132
|
+
return None
|
133
|
+
|
134
|
+
if hasattr(self.actual_instance, "to_dict") and callable(self.actual_instance.to_dict):
|
135
|
+
return self.actual_instance.to_dict()
|
136
|
+
else:
|
137
|
+
# primitive type
|
138
|
+
return self.actual_instance
|
139
|
+
|
140
|
+
def to_str(self) -> str:
|
141
|
+
"""Returns the string representation of the actual instance"""
|
142
|
+
return pprint.pformat(self.model_dump())
|
143
|
+
|
144
|
+
|
@@ -0,0 +1,105 @@
|
|
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 typing import Optional, Set
|
24
|
+
from typing_extensions import Self
|
25
|
+
|
26
|
+
class CreateOrUpdatePaymentCustomer(BaseModel):
|
27
|
+
"""
|
28
|
+
Response with information related to a payment customer
|
29
|
+
""" # noqa: E501
|
30
|
+
id: StrictStr = Field(description="Primary identifier")
|
31
|
+
type: StrictStr = Field(description="Customer type")
|
32
|
+
name: StrictStr = Field(description="Customer name")
|
33
|
+
email: StrictStr = Field(description="Customer email")
|
34
|
+
cpf: Optional[StrictStr] = Field(default=None, description="Customer CPF")
|
35
|
+
cnpj: Optional[StrictStr] = Field(default=None, description="Customer CNPJ, if type is `BUSINESS`")
|
36
|
+
__properties: ClassVar[List[str]] = ["id", "type", "name", "email", "cpf", "cnpj"]
|
37
|
+
|
38
|
+
@field_validator('type')
|
39
|
+
def type_validate_enum(cls, value):
|
40
|
+
"""Validates the enum"""
|
41
|
+
if value not in set(['INDIVIDUAL', 'BUSINESS']):
|
42
|
+
raise ValueError("must be one of enum values ('INDIVIDUAL', 'BUSINESS')")
|
43
|
+
return value
|
44
|
+
|
45
|
+
model_config = ConfigDict(
|
46
|
+
populate_by_name=True,
|
47
|
+
validate_assignment=True,
|
48
|
+
protected_namespaces=(),
|
49
|
+
)
|
50
|
+
|
51
|
+
|
52
|
+
def to_str(self) -> str:
|
53
|
+
"""Returns the string representation of the model using alias"""
|
54
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
55
|
+
|
56
|
+
def to_json(self) -> str:
|
57
|
+
"""Returns the JSON representation of the model using alias"""
|
58
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
59
|
+
return json.dumps(self.to_dict())
|
60
|
+
|
61
|
+
@classmethod
|
62
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
63
|
+
"""Create an instance of CreateOrUpdatePaymentCustomer from a JSON string"""
|
64
|
+
return cls.from_dict(json.loads(json_str))
|
65
|
+
|
66
|
+
def to_dict(self) -> Dict[str, Any]:
|
67
|
+
"""Return the dictionary representation of the model using alias.
|
68
|
+
|
69
|
+
This has the following differences from calling pydantic's
|
70
|
+
`self.model_dump(by_alias=True)`:
|
71
|
+
|
72
|
+
* `None` is only added to the output dict for nullable fields that
|
73
|
+
were set at model initialization. Other fields with value `None`
|
74
|
+
are ignored.
|
75
|
+
"""
|
76
|
+
excluded_fields: Set[str] = set([
|
77
|
+
])
|
78
|
+
|
79
|
+
_dict = self.model_dump(
|
80
|
+
by_alias=True,
|
81
|
+
exclude=excluded_fields,
|
82
|
+
exclude_none=True,
|
83
|
+
)
|
84
|
+
return _dict
|
85
|
+
|
86
|
+
@classmethod
|
87
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
88
|
+
"""Create an instance of CreateOrUpdatePaymentCustomer from a dict"""
|
89
|
+
if obj is None:
|
90
|
+
return None
|
91
|
+
|
92
|
+
if not isinstance(obj, dict):
|
93
|
+
return cls.model_validate(obj)
|
94
|
+
|
95
|
+
_obj = cls.model_validate({
|
96
|
+
"id": obj.get("id"),
|
97
|
+
"type": obj.get("type"),
|
98
|
+
"name": obj.get("name"),
|
99
|
+
"email": obj.get("email"),
|
100
|
+
"cpf": obj.get("cpf"),
|
101
|
+
"cnpj": obj.get("cnpj")
|
102
|
+
})
|
103
|
+
return _obj
|
104
|
+
|
105
|
+
|
@@ -0,0 +1,103 @@
|
|
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 typing import Optional, Set
|
24
|
+
from typing_extensions import Self
|
25
|
+
|
26
|
+
class CreatePaymentCustomerRequestBody(BaseModel):
|
27
|
+
"""
|
28
|
+
Response with information related to a payment customer
|
29
|
+
""" # noqa: E501
|
30
|
+
type: StrictStr = Field(description="Customer type")
|
31
|
+
name: StrictStr = Field(description="Customer name")
|
32
|
+
email: StrictStr = Field(description="Customer email")
|
33
|
+
cpf: Optional[StrictStr] = Field(default=None, description="Customer CPF")
|
34
|
+
cnpj: Optional[StrictStr] = Field(default=None, description="Customer CNPJ, if type is `BUSINESS`")
|
35
|
+
__properties: ClassVar[List[str]] = ["type", "name", "email", "cpf", "cnpj"]
|
36
|
+
|
37
|
+
@field_validator('type')
|
38
|
+
def type_validate_enum(cls, value):
|
39
|
+
"""Validates the enum"""
|
40
|
+
if value not in set(['INDIVIDUAL', 'BUSINESS']):
|
41
|
+
raise ValueError("must be one of enum values ('INDIVIDUAL', 'BUSINESS')")
|
42
|
+
return value
|
43
|
+
|
44
|
+
model_config = ConfigDict(
|
45
|
+
populate_by_name=True,
|
46
|
+
validate_assignment=True,
|
47
|
+
protected_namespaces=(),
|
48
|
+
)
|
49
|
+
|
50
|
+
|
51
|
+
def to_str(self) -> str:
|
52
|
+
"""Returns the string representation of the model using alias"""
|
53
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
54
|
+
|
55
|
+
def to_json(self) -> str:
|
56
|
+
"""Returns the JSON representation of the model using alias"""
|
57
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
58
|
+
return json.dumps(self.to_dict())
|
59
|
+
|
60
|
+
@classmethod
|
61
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
62
|
+
"""Create an instance of CreatePaymentCustomerRequestBody from a JSON string"""
|
63
|
+
return cls.from_dict(json.loads(json_str))
|
64
|
+
|
65
|
+
def to_dict(self) -> Dict[str, Any]:
|
66
|
+
"""Return the dictionary representation of the model using alias.
|
67
|
+
|
68
|
+
This has the following differences from calling pydantic's
|
69
|
+
`self.model_dump(by_alias=True)`:
|
70
|
+
|
71
|
+
* `None` is only added to the output dict for nullable fields that
|
72
|
+
were set at model initialization. Other fields with value `None`
|
73
|
+
are ignored.
|
74
|
+
"""
|
75
|
+
excluded_fields: Set[str] = set([
|
76
|
+
])
|
77
|
+
|
78
|
+
_dict = self.model_dump(
|
79
|
+
by_alias=True,
|
80
|
+
exclude=excluded_fields,
|
81
|
+
exclude_none=True,
|
82
|
+
)
|
83
|
+
return _dict
|
84
|
+
|
85
|
+
@classmethod
|
86
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
87
|
+
"""Create an instance of CreatePaymentCustomerRequestBody 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
|
+
"type": obj.get("type"),
|
96
|
+
"name": obj.get("name"),
|
97
|
+
"email": obj.get("email"),
|
98
|
+
"cpf": obj.get("cpf"),
|
99
|
+
"cnpj": obj.get("cnpj")
|
100
|
+
})
|
101
|
+
return _obj
|
102
|
+
|
103
|
+
|
@@ -0,0 +1,110 @@
|
|
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.payment_intent_parameter import PaymentIntentParameter
|
24
|
+
from typing import Optional, Set
|
25
|
+
from typing_extensions import Self
|
26
|
+
|
27
|
+
class CreatePaymentIntent(BaseModel):
|
28
|
+
"""
|
29
|
+
Request with information to create a payment intent
|
30
|
+
""" # noqa: E501
|
31
|
+
payment_request_id: Optional[StrictStr] = Field(default=None, description="Primary identifier of the payment request associated to the payment intent", alias="paymentRequestId")
|
32
|
+
bulk_payment_id: Optional[StrictStr] = Field(default=None, description="Primary identifier of the bulk payment associated to the payment intent", alias="bulkPaymentId")
|
33
|
+
parameters: Optional[PaymentIntentParameter] = None
|
34
|
+
connector_id: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Primary identifier of the connector associated to the payment intent", alias="connectorId")
|
35
|
+
payment_method: Optional[StrictStr] = Field(default=None, description="Payment method can be PIS (Payment Initiation) or PIX (PIX QR flow), if PIX selected `bulkPaymentId` or a `paymentRequest` with smartAccountId attached will be accepted", alias="paymentMethod")
|
36
|
+
__properties: ClassVar[List[str]] = ["paymentRequestId", "bulkPaymentId", "parameters", "connectorId", "paymentMethod"]
|
37
|
+
|
38
|
+
@field_validator('payment_method')
|
39
|
+
def payment_method_validate_enum(cls, value):
|
40
|
+
"""Validates the enum"""
|
41
|
+
if value is None:
|
42
|
+
return value
|
43
|
+
|
44
|
+
if value not in set(['PIS', 'PIX']):
|
45
|
+
raise ValueError("must be one of enum values ('PIS', 'PIX')")
|
46
|
+
return value
|
47
|
+
|
48
|
+
model_config = ConfigDict(
|
49
|
+
populate_by_name=True,
|
50
|
+
validate_assignment=True,
|
51
|
+
protected_namespaces=(),
|
52
|
+
)
|
53
|
+
|
54
|
+
|
55
|
+
def to_str(self) -> str:
|
56
|
+
"""Returns the string representation of the model using alias"""
|
57
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
58
|
+
|
59
|
+
def to_json(self) -> str:
|
60
|
+
"""Returns the JSON representation of the model using alias"""
|
61
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
62
|
+
return json.dumps(self.to_dict())
|
63
|
+
|
64
|
+
@classmethod
|
65
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
66
|
+
"""Create an instance of CreatePaymentIntent from a JSON string"""
|
67
|
+
return cls.from_dict(json.loads(json_str))
|
68
|
+
|
69
|
+
def to_dict(self) -> Dict[str, Any]:
|
70
|
+
"""Return the dictionary representation of the model using alias.
|
71
|
+
|
72
|
+
This has the following differences from calling pydantic's
|
73
|
+
`self.model_dump(by_alias=True)`:
|
74
|
+
|
75
|
+
* `None` is only added to the output dict for nullable fields that
|
76
|
+
were set at model initialization. Other fields with value `None`
|
77
|
+
are ignored.
|
78
|
+
"""
|
79
|
+
excluded_fields: Set[str] = set([
|
80
|
+
])
|
81
|
+
|
82
|
+
_dict = self.model_dump(
|
83
|
+
by_alias=True,
|
84
|
+
exclude=excluded_fields,
|
85
|
+
exclude_none=True,
|
86
|
+
)
|
87
|
+
# override the default output from pydantic by calling `to_dict()` of parameters
|
88
|
+
if self.parameters:
|
89
|
+
_dict['parameters'] = self.parameters.to_dict()
|
90
|
+
return _dict
|
91
|
+
|
92
|
+
@classmethod
|
93
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
94
|
+
"""Create an instance of CreatePaymentIntent from a dict"""
|
95
|
+
if obj is None:
|
96
|
+
return None
|
97
|
+
|
98
|
+
if not isinstance(obj, dict):
|
99
|
+
return cls.model_validate(obj)
|
100
|
+
|
101
|
+
_obj = cls.model_validate({
|
102
|
+
"paymentRequestId": obj.get("paymentRequestId"),
|
103
|
+
"bulkPaymentId": obj.get("bulkPaymentId"),
|
104
|
+
"parameters": PaymentIntentParameter.from_dict(obj["parameters"]) if obj.get("parameters") is not None else None,
|
105
|
+
"connectorId": obj.get("connectorId"),
|
106
|
+
"paymentMethod": obj.get("paymentMethod")
|
107
|
+
})
|
108
|
+
return _obj
|
109
|
+
|
110
|
+
|
@@ -0,0 +1,104 @@
|
|
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, StrictBool, StrictStr
|
22
|
+
from typing import Any, ClassVar, Dict, List, Optional
|
23
|
+
from pluggy_sdk.models.payment_recipient_account import PaymentRecipientAccount
|
24
|
+
from typing import Optional, Set
|
25
|
+
from typing_extensions import Self
|
26
|
+
|
27
|
+
class CreatePaymentRecipient(BaseModel):
|
28
|
+
"""
|
29
|
+
Request with information to create a payment recipient, there is two form to create a payment recipient, one with pixKey and other with taxNumber, name, paymentInstitutionId and account
|
30
|
+
""" # noqa: E501
|
31
|
+
tax_number: Optional[StrictStr] = Field(default=None, description="Account owner tax number. Can be CPF or CNPJ (only numbers). Send only when the pixKey is not sent.", alias="taxNumber")
|
32
|
+
name: Optional[StrictStr] = Field(default=None, description="Account owner name. Send only this when the pixKey is not sent.")
|
33
|
+
payment_institution_id: Optional[StrictStr] = Field(default=None, description="Primary identifier of the institution associated to the payment recipient. Send only when the pixKey is not sent.", alias="paymentInstitutionId")
|
34
|
+
account: Optional[PaymentRecipientAccount] = Field(default=None, description="Recipient's bank account destination. Send only if the pixKey is not sent.")
|
35
|
+
is_default: Optional[StrictBool] = Field(default=None, description="Indicates if the recipient is the default one", alias="isDefault")
|
36
|
+
pix_key: Optional[StrictStr] = Field(default=None, description="Pix key associated with the payment recipient", alias="pixKey")
|
37
|
+
smart_account_id: Optional[StrictStr] = Field(default=None, description="Smart account identifier associated to the payment recipient, used to be able to use PIX Qr method", alias="smartAccountId")
|
38
|
+
__properties: ClassVar[List[str]] = ["taxNumber", "name", "paymentInstitutionId", "account", "isDefault", "pixKey", "smartAccountId"]
|
39
|
+
|
40
|
+
model_config = ConfigDict(
|
41
|
+
populate_by_name=True,
|
42
|
+
validate_assignment=True,
|
43
|
+
protected_namespaces=(),
|
44
|
+
)
|
45
|
+
|
46
|
+
|
47
|
+
def to_str(self) -> str:
|
48
|
+
"""Returns the string representation of the model using alias"""
|
49
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
50
|
+
|
51
|
+
def to_json(self) -> str:
|
52
|
+
"""Returns the JSON representation of the model using alias"""
|
53
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
54
|
+
return json.dumps(self.to_dict())
|
55
|
+
|
56
|
+
@classmethod
|
57
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
58
|
+
"""Create an instance of CreatePaymentRecipient from a JSON string"""
|
59
|
+
return cls.from_dict(json.loads(json_str))
|
60
|
+
|
61
|
+
def to_dict(self) -> Dict[str, Any]:
|
62
|
+
"""Return the dictionary representation of the model using alias.
|
63
|
+
|
64
|
+
This has the following differences from calling pydantic's
|
65
|
+
`self.model_dump(by_alias=True)`:
|
66
|
+
|
67
|
+
* `None` is only added to the output dict for nullable fields that
|
68
|
+
were set at model initialization. Other fields with value `None`
|
69
|
+
are ignored.
|
70
|
+
"""
|
71
|
+
excluded_fields: Set[str] = set([
|
72
|
+
])
|
73
|
+
|
74
|
+
_dict = self.model_dump(
|
75
|
+
by_alias=True,
|
76
|
+
exclude=excluded_fields,
|
77
|
+
exclude_none=True,
|
78
|
+
)
|
79
|
+
# override the default output from pydantic by calling `to_dict()` of account
|
80
|
+
if self.account:
|
81
|
+
_dict['account'] = self.account.to_dict()
|
82
|
+
return _dict
|
83
|
+
|
84
|
+
@classmethod
|
85
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
86
|
+
"""Create an instance of CreatePaymentRecipient 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
|
+
"taxNumber": obj.get("taxNumber"),
|
95
|
+
"name": obj.get("name"),
|
96
|
+
"paymentInstitutionId": obj.get("paymentInstitutionId"),
|
97
|
+
"account": PaymentRecipientAccount.from_dict(obj["account"]) if obj.get("account") is not None else None,
|
98
|
+
"isDefault": obj.get("isDefault"),
|
99
|
+
"pixKey": obj.get("pixKey"),
|
100
|
+
"smartAccountId": obj.get("smartAccountId")
|
101
|
+
})
|
102
|
+
return _obj
|
103
|
+
|
104
|
+
|
@@ -0,0 +1,115 @@
|
|
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 pluggy_sdk.models.create_payment_request_schedule import CreatePaymentRequestSchedule
|
24
|
+
from pluggy_sdk.models.payment_request_callback_urls import PaymentRequestCallbackUrls
|
25
|
+
from typing import Optional, Set
|
26
|
+
from typing_extensions import Self
|
27
|
+
|
28
|
+
class CreatePaymentRequest(BaseModel):
|
29
|
+
"""
|
30
|
+
Request with information to create a payment request
|
31
|
+
""" # noqa: E501
|
32
|
+
amount: Union[StrictFloat, StrictInt] = Field(description="Requested amount")
|
33
|
+
description: Optional[StrictStr] = Field(default=None, description="Payment description")
|
34
|
+
callback_urls: Optional[PaymentRequestCallbackUrls] = Field(default=None, alias="callbackUrls")
|
35
|
+
recipient_id: Optional[StrictStr] = Field(default=None, description="Payment receiver identifier", alias="recipientId")
|
36
|
+
customer_id: Optional[StrictStr] = Field(default=None, description="Customer identifier associated to the payment", alias="customerId")
|
37
|
+
client_payment_id: Optional[StrictStr] = Field(default=None, description="Your payment identifier", alias="clientPaymentId")
|
38
|
+
smart_account_id: Optional[StrictStr] = Field(default=None, description="Smart account identifier associated to the payment, used to be able to use PIX Qr method", alias="smartAccountId")
|
39
|
+
schedule: Optional[CreatePaymentRequestSchedule] = None
|
40
|
+
__properties: ClassVar[List[str]] = ["amount", "description", "callbackUrls", "recipientId", "customerId", "clientPaymentId", "smartAccountId", "schedule"]
|
41
|
+
|
42
|
+
model_config = ConfigDict(
|
43
|
+
populate_by_name=True,
|
44
|
+
validate_assignment=True,
|
45
|
+
protected_namespaces=(),
|
46
|
+
)
|
47
|
+
|
48
|
+
|
49
|
+
def to_str(self) -> str:
|
50
|
+
"""Returns the string representation of the model using alias"""
|
51
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
52
|
+
|
53
|
+
def to_json(self) -> str:
|
54
|
+
"""Returns the JSON representation of the model using alias"""
|
55
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
56
|
+
return json.dumps(self.to_dict())
|
57
|
+
|
58
|
+
@classmethod
|
59
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
60
|
+
"""Create an instance of CreatePaymentRequest from a JSON string"""
|
61
|
+
return cls.from_dict(json.loads(json_str))
|
62
|
+
|
63
|
+
def to_dict(self) -> Dict[str, Any]:
|
64
|
+
"""Return the dictionary representation of the model using alias.
|
65
|
+
|
66
|
+
This has the following differences from calling pydantic's
|
67
|
+
`self.model_dump(by_alias=True)`:
|
68
|
+
|
69
|
+
* `None` is only added to the output dict for nullable fields that
|
70
|
+
were set at model initialization. Other fields with value `None`
|
71
|
+
are ignored.
|
72
|
+
"""
|
73
|
+
excluded_fields: Set[str] = set([
|
74
|
+
])
|
75
|
+
|
76
|
+
_dict = self.model_dump(
|
77
|
+
by_alias=True,
|
78
|
+
exclude=excluded_fields,
|
79
|
+
exclude_none=True,
|
80
|
+
)
|
81
|
+
# override the default output from pydantic by calling `to_dict()` of callback_urls
|
82
|
+
if self.callback_urls:
|
83
|
+
_dict['callbackUrls'] = self.callback_urls.to_dict()
|
84
|
+
# override the default output from pydantic by calling `to_dict()` of schedule
|
85
|
+
if self.schedule:
|
86
|
+
_dict['schedule'] = self.schedule.to_dict()
|
87
|
+
# set to None if schedule (nullable) is None
|
88
|
+
# and model_fields_set contains the field
|
89
|
+
if self.schedule is None and "schedule" in self.model_fields_set:
|
90
|
+
_dict['schedule'] = None
|
91
|
+
|
92
|
+
return _dict
|
93
|
+
|
94
|
+
@classmethod
|
95
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
96
|
+
"""Create an instance of CreatePaymentRequest 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
|
+
"amount": obj.get("amount"),
|
105
|
+
"description": obj.get("description"),
|
106
|
+
"callbackUrls": PaymentRequestCallbackUrls.from_dict(obj["callbackUrls"]) if obj.get("callbackUrls") is not None else None,
|
107
|
+
"recipientId": obj.get("recipientId"),
|
108
|
+
"customerId": obj.get("customerId"),
|
109
|
+
"clientPaymentId": obj.get("clientPaymentId"),
|
110
|
+
"smartAccountId": obj.get("smartAccountId"),
|
111
|
+
"schedule": CreatePaymentRequestSchedule.from_dict(obj["schedule"]) if obj.get("schedule") is not None else None
|
112
|
+
})
|
113
|
+
return _obj
|
114
|
+
|
115
|
+
|