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,183 @@
|
|
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, List, Optional
|
21
|
+
from pluggy_sdk.models.custom import CUSTOM
|
22
|
+
from pluggy_sdk.models.daily import DAILY
|
23
|
+
from pluggy_sdk.models.monthly import MONTHLY
|
24
|
+
from pluggy_sdk.models.single import SINGLE
|
25
|
+
from pluggy_sdk.models.weekly import WEEKLY
|
26
|
+
from pydantic import StrictStr, Field
|
27
|
+
from typing import Union, List, Set, Optional, Dict
|
28
|
+
from typing_extensions import Literal, Self
|
29
|
+
|
30
|
+
PAYMENTREQUESTSCHEDULE_ONE_OF_SCHEMAS = ["CUSTOM", "DAILY", "MONTHLY", "SINGLE", "WEEKLY"]
|
31
|
+
|
32
|
+
class PaymentRequestSchedule(BaseModel):
|
33
|
+
"""
|
34
|
+
PaymentRequestSchedule
|
35
|
+
"""
|
36
|
+
# data type: SINGLE
|
37
|
+
oneof_schema_1_validator: Optional[SINGLE] = None
|
38
|
+
# data type: DAILY
|
39
|
+
oneof_schema_2_validator: Optional[DAILY] = None
|
40
|
+
# data type: WEEKLY
|
41
|
+
oneof_schema_3_validator: Optional[WEEKLY] = None
|
42
|
+
# data type: MONTHLY
|
43
|
+
oneof_schema_4_validator: Optional[MONTHLY] = None
|
44
|
+
# data type: CUSTOM
|
45
|
+
oneof_schema_5_validator: Optional[CUSTOM] = None
|
46
|
+
actual_instance: Optional[Union[CUSTOM, DAILY, MONTHLY, SINGLE, WEEKLY]] = None
|
47
|
+
one_of_schemas: Set[str] = { "CUSTOM", "DAILY", "MONTHLY", "SINGLE", "WEEKLY" }
|
48
|
+
|
49
|
+
model_config = ConfigDict(
|
50
|
+
validate_assignment=True,
|
51
|
+
protected_namespaces=(),
|
52
|
+
)
|
53
|
+
|
54
|
+
|
55
|
+
discriminator_value_class_map: Dict[str, str] = {
|
56
|
+
}
|
57
|
+
|
58
|
+
def __init__(self, *args, **kwargs) -> None:
|
59
|
+
if args:
|
60
|
+
if len(args) > 1:
|
61
|
+
raise ValueError("If a position argument is used, only 1 is allowed to set `actual_instance`")
|
62
|
+
if kwargs:
|
63
|
+
raise ValueError("If a position argument is used, keyword arguments cannot be used.")
|
64
|
+
super().__init__(actual_instance=args[0])
|
65
|
+
else:
|
66
|
+
super().__init__(**kwargs)
|
67
|
+
|
68
|
+
@field_validator('actual_instance')
|
69
|
+
def actual_instance_must_validate_oneof(cls, v):
|
70
|
+
instance = PaymentRequestSchedule.model_construct()
|
71
|
+
error_messages = []
|
72
|
+
match = 0
|
73
|
+
# validate data type: SINGLE
|
74
|
+
if not isinstance(v, SINGLE):
|
75
|
+
error_messages.append(f"Error! Input type `{type(v)}` is not `SINGLE`")
|
76
|
+
else:
|
77
|
+
match += 1
|
78
|
+
# validate data type: DAILY
|
79
|
+
if not isinstance(v, DAILY):
|
80
|
+
error_messages.append(f"Error! Input type `{type(v)}` is not `DAILY`")
|
81
|
+
else:
|
82
|
+
match += 1
|
83
|
+
# validate data type: WEEKLY
|
84
|
+
if not isinstance(v, WEEKLY):
|
85
|
+
error_messages.append(f"Error! Input type `{type(v)}` is not `WEEKLY`")
|
86
|
+
else:
|
87
|
+
match += 1
|
88
|
+
# validate data type: MONTHLY
|
89
|
+
if not isinstance(v, MONTHLY):
|
90
|
+
error_messages.append(f"Error! Input type `{type(v)}` is not `MONTHLY`")
|
91
|
+
else:
|
92
|
+
match += 1
|
93
|
+
# validate data type: CUSTOM
|
94
|
+
if not isinstance(v, CUSTOM):
|
95
|
+
error_messages.append(f"Error! Input type `{type(v)}` is not `CUSTOM`")
|
96
|
+
else:
|
97
|
+
match += 1
|
98
|
+
if match > 1:
|
99
|
+
# more than 1 match
|
100
|
+
raise ValueError("Multiple matches found when setting `actual_instance` in PaymentRequestSchedule with oneOf schemas: CUSTOM, DAILY, MONTHLY, SINGLE, WEEKLY. Details: " + ", ".join(error_messages))
|
101
|
+
elif match == 0:
|
102
|
+
# no match
|
103
|
+
raise ValueError("No match found when setting `actual_instance` in PaymentRequestSchedule with oneOf schemas: CUSTOM, DAILY, MONTHLY, SINGLE, WEEKLY. Details: " + ", ".join(error_messages))
|
104
|
+
else:
|
105
|
+
return v
|
106
|
+
|
107
|
+
@classmethod
|
108
|
+
def from_dict(cls, obj: Union[str, Dict[str, Any]]) -> Self:
|
109
|
+
return cls.from_json(json.dumps(obj))
|
110
|
+
|
111
|
+
@classmethod
|
112
|
+
def from_json(cls, json_str: str) -> Self:
|
113
|
+
"""Returns the object represented by the json string"""
|
114
|
+
instance = cls.model_construct()
|
115
|
+
error_messages = []
|
116
|
+
match = 0
|
117
|
+
|
118
|
+
# deserialize data into SINGLE
|
119
|
+
try:
|
120
|
+
instance.actual_instance = SINGLE.from_json(json_str)
|
121
|
+
match += 1
|
122
|
+
except (ValidationError, ValueError) as e:
|
123
|
+
error_messages.append(str(e))
|
124
|
+
# deserialize data into DAILY
|
125
|
+
try:
|
126
|
+
instance.actual_instance = DAILY.from_json(json_str)
|
127
|
+
match += 1
|
128
|
+
except (ValidationError, ValueError) as e:
|
129
|
+
error_messages.append(str(e))
|
130
|
+
# deserialize data into WEEKLY
|
131
|
+
try:
|
132
|
+
instance.actual_instance = WEEKLY.from_json(json_str)
|
133
|
+
match += 1
|
134
|
+
except (ValidationError, ValueError) as e:
|
135
|
+
error_messages.append(str(e))
|
136
|
+
# deserialize data into MONTHLY
|
137
|
+
try:
|
138
|
+
instance.actual_instance = MONTHLY.from_json(json_str)
|
139
|
+
match += 1
|
140
|
+
except (ValidationError, ValueError) as e:
|
141
|
+
error_messages.append(str(e))
|
142
|
+
# deserialize data into CUSTOM
|
143
|
+
try:
|
144
|
+
instance.actual_instance = CUSTOM.from_json(json_str)
|
145
|
+
match += 1
|
146
|
+
except (ValidationError, ValueError) as e:
|
147
|
+
error_messages.append(str(e))
|
148
|
+
|
149
|
+
if match > 1:
|
150
|
+
# more than 1 match
|
151
|
+
raise ValueError("Multiple matches found when deserializing the JSON string into PaymentRequestSchedule with oneOf schemas: CUSTOM, DAILY, MONTHLY, SINGLE, WEEKLY. Details: " + ", ".join(error_messages))
|
152
|
+
elif match == 0:
|
153
|
+
# no match
|
154
|
+
raise ValueError("No match found when deserializing the JSON string into PaymentRequestSchedule with oneOf schemas: CUSTOM, DAILY, MONTHLY, SINGLE, WEEKLY. Details: " + ", ".join(error_messages))
|
155
|
+
else:
|
156
|
+
return instance
|
157
|
+
|
158
|
+
def to_json(self) -> str:
|
159
|
+
"""Returns the JSON representation of the actual instance"""
|
160
|
+
if self.actual_instance is None:
|
161
|
+
return "null"
|
162
|
+
|
163
|
+
if hasattr(self.actual_instance, "to_json") and callable(self.actual_instance.to_json):
|
164
|
+
return self.actual_instance.to_json()
|
165
|
+
else:
|
166
|
+
return json.dumps(self.actual_instance)
|
167
|
+
|
168
|
+
def to_dict(self) -> Optional[Union[Dict[str, Any], CUSTOM, DAILY, MONTHLY, SINGLE, WEEKLY]]:
|
169
|
+
"""Returns the dict representation of the actual instance"""
|
170
|
+
if self.actual_instance is None:
|
171
|
+
return None
|
172
|
+
|
173
|
+
if hasattr(self.actual_instance, "to_dict") and callable(self.actual_instance.to_dict):
|
174
|
+
return self.actual_instance.to_dict()
|
175
|
+
else:
|
176
|
+
# primitive type
|
177
|
+
return self.actual_instance
|
178
|
+
|
179
|
+
def to_str(self) -> str:
|
180
|
+
"""Returns the string representation of the actual instance"""
|
181
|
+
return pprint.pformat(self.model_dump())
|
182
|
+
|
183
|
+
|
@@ -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.payment_request import PaymentRequest
|
24
|
+
from typing import Optional, Set
|
25
|
+
from typing_extensions import Self
|
26
|
+
|
27
|
+
class PaymentRequestsList200Response(BaseModel):
|
28
|
+
"""
|
29
|
+
PaymentRequestsList200Response
|
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[PaymentRequest]] = Field(default=None, description="List of payment requests")
|
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 PaymentRequestsList200Response 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 PaymentRequestsList200Response 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": [PaymentRequest.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,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.schedule_payment import SchedulePayment
|
24
|
+
from typing import Optional, Set
|
25
|
+
from typing_extensions import Self
|
26
|
+
|
27
|
+
class PaymentSchedulesList200Response(BaseModel):
|
28
|
+
"""
|
29
|
+
PaymentSchedulesList200Response
|
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[SchedulePayment]] = Field(default=None, description="List of scheduled payments from a payment request")
|
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 PaymentSchedulesList200Response 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 PaymentSchedulesList200Response 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": [SchedulePayment.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,121 @@
|
|
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
|
23
|
+
from typing import Any, ClassVar, Dict, List, Optional, Union
|
24
|
+
from pluggy_sdk.models.payroll_loan_client import PayrollLoanClient
|
25
|
+
from typing import Optional, Set
|
26
|
+
from typing_extensions import Self
|
27
|
+
|
28
|
+
class PayrollLoan(BaseModel):
|
29
|
+
"""
|
30
|
+
Information related to a payroll loan
|
31
|
+
""" # noqa: E501
|
32
|
+
contract_code: StrictStr = Field(description="Contract code given by the contracting institution", alias="contractCode")
|
33
|
+
cnpj_original_contract_creditor: Optional[StrictStr] = Field(default=None, description="CNPJ of the original creditor of the contract", alias="cnpjOriginalContractCreditor")
|
34
|
+
nominal_interest_rate: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Nominal interest rate", alias="nominalInterestRate")
|
35
|
+
efective_interest_rate: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Effective interest rate", alias="efectiveInterestRate")
|
36
|
+
cet_annual_rate: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="CET annual rate", alias="cetAnnualRate")
|
37
|
+
cet_month_rate: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="CET monthly rate", alias="cetMonthRate")
|
38
|
+
currency_code: Optional[StrictStr] = Field(default=None, description="Code referencing the currency of the loan", alias="currencyCode")
|
39
|
+
amortization_regime: Optional[StrictStr] = Field(default=None, description="Amortization regime", alias="amortizationRegime")
|
40
|
+
installments_quantity: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Number of installments", alias="installmentsQuantity")
|
41
|
+
installments_value: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Installment value", alias="installmentsValue")
|
42
|
+
due_date_first_installment: Optional[datetime] = Field(default=None, description="Due date of the first installment", alias="dueDateFirstInstallment")
|
43
|
+
due_date_last_installment: Optional[datetime] = Field(default=None, description="Due date of the last installment", alias="dueDateLastInstallment")
|
44
|
+
cnpj_correspondent_banking: Optional[StrictStr] = Field(default=None, description="CNPJ of the correspondent banking", alias="cnpjCorrespondentBanking")
|
45
|
+
operation_hiring_date: Optional[datetime] = Field(default=None, description="Operation hiring date", alias="operationHiringDate")
|
46
|
+
client: PayrollLoanClient
|
47
|
+
__properties: ClassVar[List[str]] = ["contractCode", "cnpjOriginalContractCreditor", "nominalInterestRate", "efectiveInterestRate", "cetAnnualRate", "cetMonthRate", "currencyCode", "amortizationRegime", "installmentsQuantity", "installmentsValue", "dueDateFirstInstallment", "dueDateLastInstallment", "cnpjCorrespondentBanking", "operationHiringDate", "client"]
|
48
|
+
|
49
|
+
model_config = ConfigDict(
|
50
|
+
populate_by_name=True,
|
51
|
+
validate_assignment=True,
|
52
|
+
protected_namespaces=(),
|
53
|
+
)
|
54
|
+
|
55
|
+
|
56
|
+
def to_str(self) -> str:
|
57
|
+
"""Returns the string representation of the model using alias"""
|
58
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
59
|
+
|
60
|
+
def to_json(self) -> str:
|
61
|
+
"""Returns the JSON representation of the model using alias"""
|
62
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
63
|
+
return json.dumps(self.to_dict())
|
64
|
+
|
65
|
+
@classmethod
|
66
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
67
|
+
"""Create an instance of PayrollLoan from a JSON string"""
|
68
|
+
return cls.from_dict(json.loads(json_str))
|
69
|
+
|
70
|
+
def to_dict(self) -> Dict[str, Any]:
|
71
|
+
"""Return the dictionary representation of the model using alias.
|
72
|
+
|
73
|
+
This has the following differences from calling pydantic's
|
74
|
+
`self.model_dump(by_alias=True)`:
|
75
|
+
|
76
|
+
* `None` is only added to the output dict for nullable fields that
|
77
|
+
were set at model initialization. Other fields with value `None`
|
78
|
+
are ignored.
|
79
|
+
"""
|
80
|
+
excluded_fields: Set[str] = set([
|
81
|
+
])
|
82
|
+
|
83
|
+
_dict = self.model_dump(
|
84
|
+
by_alias=True,
|
85
|
+
exclude=excluded_fields,
|
86
|
+
exclude_none=True,
|
87
|
+
)
|
88
|
+
# override the default output from pydantic by calling `to_dict()` of client
|
89
|
+
if self.client:
|
90
|
+
_dict['client'] = self.client.to_dict()
|
91
|
+
return _dict
|
92
|
+
|
93
|
+
@classmethod
|
94
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
95
|
+
"""Create an instance of PayrollLoan from a dict"""
|
96
|
+
if obj is None:
|
97
|
+
return None
|
98
|
+
|
99
|
+
if not isinstance(obj, dict):
|
100
|
+
return cls.model_validate(obj)
|
101
|
+
|
102
|
+
_obj = cls.model_validate({
|
103
|
+
"contractCode": obj.get("contractCode"),
|
104
|
+
"cnpjOriginalContractCreditor": obj.get("cnpjOriginalContractCreditor"),
|
105
|
+
"nominalInterestRate": obj.get("nominalInterestRate"),
|
106
|
+
"efectiveInterestRate": obj.get("efectiveInterestRate"),
|
107
|
+
"cetAnnualRate": obj.get("cetAnnualRate"),
|
108
|
+
"cetMonthRate": obj.get("cetMonthRate"),
|
109
|
+
"currencyCode": obj.get("currencyCode"),
|
110
|
+
"amortizationRegime": obj.get("amortizationRegime"),
|
111
|
+
"installmentsQuantity": obj.get("installmentsQuantity"),
|
112
|
+
"installmentsValue": obj.get("installmentsValue"),
|
113
|
+
"dueDateFirstInstallment": obj.get("dueDateFirstInstallment"),
|
114
|
+
"dueDateLastInstallment": obj.get("dueDateLastInstallment"),
|
115
|
+
"cnpjCorrespondentBanking": obj.get("cnpjCorrespondentBanking"),
|
116
|
+
"operationHiringDate": obj.get("operationHiringDate"),
|
117
|
+
"client": PayrollLoanClient.from_dict(obj["client"]) if obj.get("client") is not None else None
|
118
|
+
})
|
119
|
+
return _obj
|
120
|
+
|
121
|
+
|
@@ -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, 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 PayrollLoanClient(BaseModel):
|
27
|
+
"""
|
28
|
+
Client information
|
29
|
+
""" # noqa: E501
|
30
|
+
name: Optional[StrictStr] = Field(default=None, description="Client name")
|
31
|
+
document: Optional[StrictStr] = Field(default=None, description="Client CPF")
|
32
|
+
phone: Optional[StrictStr] = Field(default=None, description="Client phone")
|
33
|
+
addres_street: Optional[StrictStr] = Field(default=None, description="Client email", alias="addresStreet")
|
34
|
+
address_number: Optional[StrictStr] = Field(default=None, description="Client address number", alias="addressNumber")
|
35
|
+
address_city: Optional[StrictStr] = Field(default=None, description="Client address city", alias="addressCity")
|
36
|
+
address_zip_code: Optional[StrictStr] = Field(default=None, description="Client address zip code", alias="addressZipCode")
|
37
|
+
address_state: Optional[StrictStr] = Field(default=None, description="Client address state", alias="addressState")
|
38
|
+
__properties: ClassVar[List[str]] = ["name", "document", "phone", "addresStreet", "addressNumber", "addressCity", "addressZipCode", "addressState"]
|
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 PayrollLoanClient 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
|
+
return _dict
|
80
|
+
|
81
|
+
@classmethod
|
82
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
83
|
+
"""Create an instance of PayrollLoanClient from a dict"""
|
84
|
+
if obj is None:
|
85
|
+
return None
|
86
|
+
|
87
|
+
if not isinstance(obj, dict):
|
88
|
+
return cls.model_validate(obj)
|
89
|
+
|
90
|
+
_obj = cls.model_validate({
|
91
|
+
"name": obj.get("name"),
|
92
|
+
"document": obj.get("document"),
|
93
|
+
"phone": obj.get("phone"),
|
94
|
+
"addresStreet": obj.get("addresStreet"),
|
95
|
+
"addressNumber": obj.get("addressNumber"),
|
96
|
+
"addressCity": obj.get("addressCity"),
|
97
|
+
"addressZipCode": obj.get("addressZipCode"),
|
98
|
+
"addressState": obj.get("addressState")
|
99
|
+
})
|
100
|
+
return _obj
|
101
|
+
|
102
|
+
|