pluggy-sdk 1.0.0.post13__py3-none-any.whl → 1.0.0.post14__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 +8 -8
- pluggy_sdk/api/payment_request_api.py +9 -9
- pluggy_sdk/api_client.py +1 -1
- pluggy_sdk/configuration.py +1 -1
- pluggy_sdk/models/__init__.py +7 -7
- pluggy_sdk/models/benefit_loan.py +121 -0
- pluggy_sdk/models/benefit_loan_client.py +102 -0
- pluggy_sdk/models/benefit_response.py +10 -10
- pluggy_sdk/models/custom.py +100 -0
- pluggy_sdk/models/daily.py +101 -0
- pluggy_sdk/models/monthly.py +103 -0
- pluggy_sdk/models/payment_request_schedule.py +48 -48
- pluggy_sdk/models/single.py +98 -0
- pluggy_sdk/models/weekly.py +110 -0
- {pluggy_sdk-1.0.0.post13.dist-info → pluggy_sdk-1.0.0.post14.dist-info}/METADATA +12 -12
- {pluggy_sdk-1.0.0.post13.dist-info → pluggy_sdk-1.0.0.post14.dist-info}/RECORD +18 -11
- {pluggy_sdk-1.0.0.post13.dist-info → pluggy_sdk-1.0.0.post14.dist-info}/WHEEL +1 -1
- {pluggy_sdk-1.0.0.post13.dist-info → pluggy_sdk-1.0.0.post14.dist-info}/top_level.txt +0 -0
pluggy_sdk/__init__.py
CHANGED
@@ -15,7 +15,7 @@
|
|
15
15
|
""" # noqa: E501
|
16
16
|
|
17
17
|
|
18
|
-
__version__ = "1.0.0.
|
18
|
+
__version__ = "1.0.0.post14"
|
19
19
|
|
20
20
|
# import apis into sdk package
|
21
21
|
from pluggy_sdk.api.account_api import AccountApi
|
@@ -76,6 +76,8 @@ from pluggy_sdk.models.asset_distribution import AssetDistribution
|
|
76
76
|
from pluggy_sdk.models.auth_request import AuthRequest
|
77
77
|
from pluggy_sdk.models.auth_response import AuthResponse
|
78
78
|
from pluggy_sdk.models.bank_data import BankData
|
79
|
+
from pluggy_sdk.models.benefit_loan import BenefitLoan
|
80
|
+
from pluggy_sdk.models.benefit_loan_client import BenefitLoanClient
|
79
81
|
from pluggy_sdk.models.benefit_response import BenefitResponse
|
80
82
|
from pluggy_sdk.models.benefit_response_paying_institution import BenefitResponsePayingInstitution
|
81
83
|
from pluggy_sdk.models.benefits_list200_response import BenefitsList200Response
|
@@ -87,6 +89,7 @@ from pluggy_sdk.models.boleto_payer import BoletoPayer
|
|
87
89
|
from pluggy_sdk.models.boleto_recipient import BoletoRecipient
|
88
90
|
from pluggy_sdk.models.bulk_payment import BulkPayment
|
89
91
|
from pluggy_sdk.models.bulk_payments_list200_response import BulkPaymentsList200Response
|
92
|
+
from pluggy_sdk.models.custom import CUSTOM
|
90
93
|
from pluggy_sdk.models.category import Category
|
91
94
|
from pluggy_sdk.models.client_category_rule import ClientCategoryRule
|
92
95
|
from pluggy_sdk.models.company import Company
|
@@ -116,6 +119,7 @@ from pluggy_sdk.models.create_webhook import CreateWebhook
|
|
116
119
|
from pluggy_sdk.models.credential_select_option import CredentialSelectOption
|
117
120
|
from pluggy_sdk.models.credit_card_metadata import CreditCardMetadata
|
118
121
|
from pluggy_sdk.models.credit_data import CreditData
|
122
|
+
from pluggy_sdk.models.daily import DAILY
|
119
123
|
from pluggy_sdk.models.document import Document
|
120
124
|
from pluggy_sdk.models.email import Email
|
121
125
|
from pluggy_sdk.models.global_error_response import GlobalErrorResponse
|
@@ -147,6 +151,7 @@ from pluggy_sdk.models.loan_payment_release_over_parcel_fee import LoanPaymentRe
|
|
147
151
|
from pluggy_sdk.models.loan_payments import LoanPayments
|
148
152
|
from pluggy_sdk.models.loan_warranty import LoanWarranty
|
149
153
|
from pluggy_sdk.models.loans_list200_response import LoansList200Response
|
154
|
+
from pluggy_sdk.models.monthly import MONTHLY
|
150
155
|
from pluggy_sdk.models.merchant import Merchant
|
151
156
|
from pluggy_sdk.models.monthly_portfolio import MonthlyPortfolio
|
152
157
|
from pluggy_sdk.models.monthly_portfolio_response import MonthlyPortfolioResponse
|
@@ -181,17 +186,11 @@ from pluggy_sdk.models.payment_request_receipt_list200_response import PaymentRe
|
|
181
186
|
from pluggy_sdk.models.payment_request_schedule import PaymentRequestSchedule
|
182
187
|
from pluggy_sdk.models.payment_requests_list200_response import PaymentRequestsList200Response
|
183
188
|
from pluggy_sdk.models.payment_schedules_list200_response import PaymentSchedulesList200Response
|
184
|
-
from pluggy_sdk.models.payroll_loan import PayrollLoan
|
185
|
-
from pluggy_sdk.models.payroll_loan_client import PayrollLoanClient
|
186
189
|
from pluggy_sdk.models.percentage_over_index import PercentageOverIndex
|
187
190
|
from pluggy_sdk.models.phone_number import PhoneNumber
|
188
191
|
from pluggy_sdk.models.pix_data import PixData
|
192
|
+
from pluggy_sdk.models.single import SINGLE
|
189
193
|
from pluggy_sdk.models.schedule_payment import SchedulePayment
|
190
|
-
from pluggy_sdk.models.schedule_type_custom import ScheduleTypeCustom
|
191
|
-
from pluggy_sdk.models.schedule_type_daily import ScheduleTypeDaily
|
192
|
-
from pluggy_sdk.models.schedule_type_monthly import ScheduleTypeMonthly
|
193
|
-
from pluggy_sdk.models.schedule_type_single import ScheduleTypeSingle
|
194
|
-
from pluggy_sdk.models.schedule_type_weekly import ScheduleTypeWeekly
|
195
194
|
from pluggy_sdk.models.smart_account import SmartAccount
|
196
195
|
from pluggy_sdk.models.smart_account_address import SmartAccountAddress
|
197
196
|
from pluggy_sdk.models.smart_account_balance import SmartAccountBalance
|
@@ -206,6 +205,7 @@ from pluggy_sdk.models.update_item_parameters import UpdateItemParameters
|
|
206
205
|
from pluggy_sdk.models.update_payment_recipient import UpdatePaymentRecipient
|
207
206
|
from pluggy_sdk.models.update_payment_request import UpdatePaymentRequest
|
208
207
|
from pluggy_sdk.models.update_transaction import UpdateTransaction
|
208
|
+
from pluggy_sdk.models.weekly import WEEKLY
|
209
209
|
from pluggy_sdk.models.webhook import Webhook
|
210
210
|
from pluggy_sdk.models.webhook_creation_error_response import WebhookCreationErrorResponse
|
211
211
|
from pluggy_sdk.models.webhooks_list200_response import WebhooksList200Response
|
@@ -1138,7 +1138,7 @@ class PaymentRequestApi:
|
|
1138
1138
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
1139
1139
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
1140
1140
|
) -> PaymentReceipt:
|
1141
|
-
"""Create
|
1141
|
+
"""Create Payment Receipt
|
1142
1142
|
|
1143
1143
|
Creates the payment receipt resource
|
1144
1144
|
|
@@ -1205,7 +1205,7 @@ class PaymentRequestApi:
|
|
1205
1205
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
1206
1206
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
1207
1207
|
) -> ApiResponse[PaymentReceipt]:
|
1208
|
-
"""Create
|
1208
|
+
"""Create Payment Receipt
|
1209
1209
|
|
1210
1210
|
Creates the payment receipt resource
|
1211
1211
|
|
@@ -1272,7 +1272,7 @@ class PaymentRequestApi:
|
|
1272
1272
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
1273
1273
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
1274
1274
|
) -> RESTResponseType:
|
1275
|
-
"""Create
|
1275
|
+
"""Create Payment Receipt
|
1276
1276
|
|
1277
1277
|
Creates the payment receipt resource
|
1278
1278
|
|
@@ -1408,7 +1408,7 @@ class PaymentRequestApi:
|
|
1408
1408
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
1409
1409
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
1410
1410
|
) -> PaymentRequestReceiptList200Response:
|
1411
|
-
"""List
|
1411
|
+
"""List Payment Receipts
|
1412
1412
|
|
1413
1413
|
Recovers all created payment receipts for the payment request provided
|
1414
1414
|
|
@@ -1475,7 +1475,7 @@ class PaymentRequestApi:
|
|
1475
1475
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
1476
1476
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
1477
1477
|
) -> ApiResponse[PaymentRequestReceiptList200Response]:
|
1478
|
-
"""List
|
1478
|
+
"""List Payment Receipts
|
1479
1479
|
|
1480
1480
|
Recovers all created payment receipts for the payment request provided
|
1481
1481
|
|
@@ -1542,7 +1542,7 @@ class PaymentRequestApi:
|
|
1542
1542
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
1543
1543
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
1544
1544
|
) -> RESTResponseType:
|
1545
|
-
"""List
|
1545
|
+
"""List Payment Receipts
|
1546
1546
|
|
1547
1547
|
Recovers all created payment receipts for the payment request provided
|
1548
1548
|
|
@@ -1666,7 +1666,7 @@ class PaymentRequestApi:
|
|
1666
1666
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
1667
1667
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
1668
1668
|
) -> PaymentReceipt:
|
1669
|
-
"""Retrieve
|
1669
|
+
"""Retrieve Payment Receipt
|
1670
1670
|
|
1671
1671
|
Recovers the payment receipt resource by its id
|
1672
1672
|
|
@@ -1737,7 +1737,7 @@ class PaymentRequestApi:
|
|
1737
1737
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
1738
1738
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
1739
1739
|
) -> ApiResponse[PaymentReceipt]:
|
1740
|
-
"""Retrieve
|
1740
|
+
"""Retrieve Payment Receipt
|
1741
1741
|
|
1742
1742
|
Recovers the payment receipt resource by its id
|
1743
1743
|
|
@@ -1808,7 +1808,7 @@ class PaymentRequestApi:
|
|
1808
1808
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
1809
1809
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
1810
1810
|
) -> RESTResponseType:
|
1811
|
-
"""Retrieve
|
1811
|
+
"""Retrieve Payment Receipt
|
1812
1812
|
|
1813
1813
|
Recovers the payment receipt resource by its id
|
1814
1814
|
|
pluggy_sdk/api_client.py
CHANGED
@@ -89,7 +89,7 @@ class ApiClient:
|
|
89
89
|
self.default_headers[header_name] = header_value
|
90
90
|
self.cookie = cookie
|
91
91
|
# Set default User-Agent.
|
92
|
-
self.user_agent = 'OpenAPI-Generator/1.0.0.
|
92
|
+
self.user_agent = 'OpenAPI-Generator/1.0.0.post14/python'
|
93
93
|
self.client_side_validation = configuration.client_side_validation
|
94
94
|
|
95
95
|
def __enter__(self):
|
pluggy_sdk/configuration.py
CHANGED
@@ -400,7 +400,7 @@ conf = pluggy_sdk.Configuration(
|
|
400
400
|
"OS: {env}\n"\
|
401
401
|
"Python Version: {pyversion}\n"\
|
402
402
|
"Version of the API: 1.0.0\n"\
|
403
|
-
"SDK Package Version: 1.0.0.
|
403
|
+
"SDK Package Version: 1.0.0.post14".\
|
404
404
|
format(env=sys.platform, pyversion=sys.version)
|
405
405
|
|
406
406
|
def get_host_settings(self):
|
pluggy_sdk/models/__init__.py
CHANGED
@@ -36,6 +36,8 @@ from pluggy_sdk.models.asset_distribution import AssetDistribution
|
|
36
36
|
from pluggy_sdk.models.auth_request import AuthRequest
|
37
37
|
from pluggy_sdk.models.auth_response import AuthResponse
|
38
38
|
from pluggy_sdk.models.bank_data import BankData
|
39
|
+
from pluggy_sdk.models.benefit_loan import BenefitLoan
|
40
|
+
from pluggy_sdk.models.benefit_loan_client import BenefitLoanClient
|
39
41
|
from pluggy_sdk.models.benefit_response import BenefitResponse
|
40
42
|
from pluggy_sdk.models.benefit_response_paying_institution import BenefitResponsePayingInstitution
|
41
43
|
from pluggy_sdk.models.benefits_list200_response import BenefitsList200Response
|
@@ -47,6 +49,7 @@ from pluggy_sdk.models.boleto_payer import BoletoPayer
|
|
47
49
|
from pluggy_sdk.models.boleto_recipient import BoletoRecipient
|
48
50
|
from pluggy_sdk.models.bulk_payment import BulkPayment
|
49
51
|
from pluggy_sdk.models.bulk_payments_list200_response import BulkPaymentsList200Response
|
52
|
+
from pluggy_sdk.models.custom import CUSTOM
|
50
53
|
from pluggy_sdk.models.category import Category
|
51
54
|
from pluggy_sdk.models.client_category_rule import ClientCategoryRule
|
52
55
|
from pluggy_sdk.models.company import Company
|
@@ -76,6 +79,7 @@ from pluggy_sdk.models.create_webhook import CreateWebhook
|
|
76
79
|
from pluggy_sdk.models.credential_select_option import CredentialSelectOption
|
77
80
|
from pluggy_sdk.models.credit_card_metadata import CreditCardMetadata
|
78
81
|
from pluggy_sdk.models.credit_data import CreditData
|
82
|
+
from pluggy_sdk.models.daily import DAILY
|
79
83
|
from pluggy_sdk.models.document import Document
|
80
84
|
from pluggy_sdk.models.email import Email
|
81
85
|
from pluggy_sdk.models.global_error_response import GlobalErrorResponse
|
@@ -107,6 +111,7 @@ from pluggy_sdk.models.loan_payment_release_over_parcel_fee import LoanPaymentRe
|
|
107
111
|
from pluggy_sdk.models.loan_payments import LoanPayments
|
108
112
|
from pluggy_sdk.models.loan_warranty import LoanWarranty
|
109
113
|
from pluggy_sdk.models.loans_list200_response import LoansList200Response
|
114
|
+
from pluggy_sdk.models.monthly import MONTHLY
|
110
115
|
from pluggy_sdk.models.merchant import Merchant
|
111
116
|
from pluggy_sdk.models.monthly_portfolio import MonthlyPortfolio
|
112
117
|
from pluggy_sdk.models.monthly_portfolio_response import MonthlyPortfolioResponse
|
@@ -141,17 +146,11 @@ from pluggy_sdk.models.payment_request_receipt_list200_response import PaymentRe
|
|
141
146
|
from pluggy_sdk.models.payment_request_schedule import PaymentRequestSchedule
|
142
147
|
from pluggy_sdk.models.payment_requests_list200_response import PaymentRequestsList200Response
|
143
148
|
from pluggy_sdk.models.payment_schedules_list200_response import PaymentSchedulesList200Response
|
144
|
-
from pluggy_sdk.models.payroll_loan import PayrollLoan
|
145
|
-
from pluggy_sdk.models.payroll_loan_client import PayrollLoanClient
|
146
149
|
from pluggy_sdk.models.percentage_over_index import PercentageOverIndex
|
147
150
|
from pluggy_sdk.models.phone_number import PhoneNumber
|
148
151
|
from pluggy_sdk.models.pix_data import PixData
|
152
|
+
from pluggy_sdk.models.single import SINGLE
|
149
153
|
from pluggy_sdk.models.schedule_payment import SchedulePayment
|
150
|
-
from pluggy_sdk.models.schedule_type_custom import ScheduleTypeCustom
|
151
|
-
from pluggy_sdk.models.schedule_type_daily import ScheduleTypeDaily
|
152
|
-
from pluggy_sdk.models.schedule_type_monthly import ScheduleTypeMonthly
|
153
|
-
from pluggy_sdk.models.schedule_type_single import ScheduleTypeSingle
|
154
|
-
from pluggy_sdk.models.schedule_type_weekly import ScheduleTypeWeekly
|
155
154
|
from pluggy_sdk.models.smart_account import SmartAccount
|
156
155
|
from pluggy_sdk.models.smart_account_address import SmartAccountAddress
|
157
156
|
from pluggy_sdk.models.smart_account_balance import SmartAccountBalance
|
@@ -166,6 +165,7 @@ from pluggy_sdk.models.update_item_parameters import UpdateItemParameters
|
|
166
165
|
from pluggy_sdk.models.update_payment_recipient import UpdatePaymentRecipient
|
167
166
|
from pluggy_sdk.models.update_payment_request import UpdatePaymentRequest
|
168
167
|
from pluggy_sdk.models.update_transaction import UpdateTransaction
|
168
|
+
from pluggy_sdk.models.weekly import WEEKLY
|
169
169
|
from pluggy_sdk.models.webhook import Webhook
|
170
170
|
from pluggy_sdk.models.webhook_creation_error_response import WebhookCreationErrorResponse
|
171
171
|
from pluggy_sdk.models.webhooks_list200_response import WebhooksList200Response
|
@@ -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.benefit_loan_client import BenefitLoanClient
|
25
|
+
from typing import Optional, Set
|
26
|
+
from typing_extensions import Self
|
27
|
+
|
28
|
+
class BenefitLoan(BaseModel):
|
29
|
+
"""
|
30
|
+
Information related to a benefit 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: BenefitLoanClient
|
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 BenefitLoan 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 BenefitLoan 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": BenefitLoanClient.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 BenefitLoanClient(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 BenefitLoanClient 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 BenefitLoanClient 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
|
+
|
@@ -20,8 +20,8 @@ import json
|
|
20
20
|
|
21
21
|
from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt, StrictStr
|
22
22
|
from typing import Any, ClassVar, Dict, List, Optional, Union
|
23
|
+
from pluggy_sdk.models.benefit_loan import BenefitLoan
|
23
24
|
from pluggy_sdk.models.benefit_response_paying_institution import BenefitResponsePayingInstitution
|
24
|
-
from pluggy_sdk.models.payroll_loan import PayrollLoan
|
25
25
|
from typing import Optional, Set
|
26
26
|
from typing_extensions import Self
|
27
27
|
|
@@ -34,12 +34,12 @@ class BenefitResponse(BaseModel):
|
|
34
34
|
beneficiary_name: StrictStr = Field(description="Beneficiary name", alias="beneficiaryName")
|
35
35
|
available_margin_value: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Available margin value", alias="availableMarginValue")
|
36
36
|
margin_base_value: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Base margin value", alias="marginBaseValue")
|
37
|
-
|
37
|
+
deductible_available_margin_value: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Deductible available margin value", alias="deductibleAvailableMarginValue")
|
38
38
|
used_margin_value: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Used margin value", alias="usedMarginValue")
|
39
39
|
reserved_margin_value: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Reserved margin value", alias="reservedMarginValue")
|
40
40
|
paying_institution: Optional[BenefitResponsePayingInstitution] = Field(default=None, alias="payingInstitution")
|
41
|
-
|
42
|
-
__properties: ClassVar[List[str]] = ["id", "itemId", "beneficiaryName", "availableMarginValue", "marginBaseValue", "
|
41
|
+
loans: Optional[List[BenefitLoan]] = Field(default=None, description="List of benefit loans")
|
42
|
+
__properties: ClassVar[List[str]] = ["id", "itemId", "beneficiaryName", "availableMarginValue", "marginBaseValue", "deductibleAvailableMarginValue", "usedMarginValue", "reservedMarginValue", "payingInstitution", "loans"]
|
43
43
|
|
44
44
|
model_config = ConfigDict(
|
45
45
|
populate_by_name=True,
|
@@ -83,13 +83,13 @@ class BenefitResponse(BaseModel):
|
|
83
83
|
# override the default output from pydantic by calling `to_dict()` of paying_institution
|
84
84
|
if self.paying_institution:
|
85
85
|
_dict['payingInstitution'] = self.paying_institution.to_dict()
|
86
|
-
# override the default output from pydantic by calling `to_dict()` of each item in
|
86
|
+
# override the default output from pydantic by calling `to_dict()` of each item in loans (list)
|
87
87
|
_items = []
|
88
|
-
if self.
|
89
|
-
for _item in self.
|
88
|
+
if self.loans:
|
89
|
+
for _item in self.loans:
|
90
90
|
if _item:
|
91
91
|
_items.append(_item.to_dict())
|
92
|
-
_dict['
|
92
|
+
_dict['loans'] = _items
|
93
93
|
return _dict
|
94
94
|
|
95
95
|
@classmethod
|
@@ -107,11 +107,11 @@ class BenefitResponse(BaseModel):
|
|
107
107
|
"beneficiaryName": obj.get("beneficiaryName"),
|
108
108
|
"availableMarginValue": obj.get("availableMarginValue"),
|
109
109
|
"marginBaseValue": obj.get("marginBaseValue"),
|
110
|
-
"
|
110
|
+
"deductibleAvailableMarginValue": obj.get("deductibleAvailableMarginValue"),
|
111
111
|
"usedMarginValue": obj.get("usedMarginValue"),
|
112
112
|
"reservedMarginValue": obj.get("reservedMarginValue"),
|
113
113
|
"payingInstitution": BenefitResponsePayingInstitution.from_dict(obj["payingInstitution"]) if obj.get("payingInstitution") is not None else None,
|
114
|
-
"
|
114
|
+
"loans": [BenefitLoan.from_dict(_item) for _item in obj["loans"]] if obj.get("loans") is not None else None
|
115
115
|
})
|
116
116
|
return _obj
|
117
117
|
|
@@ -0,0 +1,100 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
|
3
|
+
"""
|
4
|
+
Pluggy API
|
5
|
+
|
6
|
+
Pluggy's main API to review data and execute connectors
|
7
|
+
|
8
|
+
The version of the OpenAPI document: 1.0.0
|
9
|
+
Contact: hello@pluggy.ai
|
10
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
11
|
+
|
12
|
+
Do not edit the class manually.
|
13
|
+
""" # noqa: E501
|
14
|
+
|
15
|
+
|
16
|
+
from __future__ import annotations
|
17
|
+
import pprint
|
18
|
+
import re # noqa: F401
|
19
|
+
import json
|
20
|
+
|
21
|
+
from datetime import date
|
22
|
+
from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator
|
23
|
+
from typing import Any, ClassVar, Dict, List, Optional
|
24
|
+
from typing import Optional, Set
|
25
|
+
from typing_extensions import Self
|
26
|
+
|
27
|
+
class CUSTOM(BaseModel):
|
28
|
+
"""
|
29
|
+
Schedule atribute to generate custom payments in the future
|
30
|
+
""" # noqa: E501
|
31
|
+
type: StrictStr = Field(description="Scheduled type")
|
32
|
+
dates: List[date]
|
33
|
+
additional_information: Optional[StrictStr] = Field(default=None, description="Additional information about the custom schedule", alias="additionalInformation")
|
34
|
+
__properties: ClassVar[List[str]] = ["type", "dates", "additionalInformation"]
|
35
|
+
|
36
|
+
@field_validator('type')
|
37
|
+
def type_validate_enum(cls, value):
|
38
|
+
"""Validates the enum"""
|
39
|
+
if value not in set(['CUSTOM']):
|
40
|
+
raise ValueError("must be one of enum values ('CUSTOM')")
|
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 CUSTOM 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 CUSTOM 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
|
+
"type": obj.get("type"),
|
95
|
+
"dates": obj.get("dates"),
|
96
|
+
"additionalInformation": obj.get("additionalInformation")
|
97
|
+
})
|
98
|
+
return _obj
|
99
|
+
|
100
|
+
|