pluggy-sdk 1.0.0.post12__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 +13 -10
- pluggy_sdk/api/__init__.py +2 -1
- pluggy_sdk/api/benefit_api.py +561 -0
- pluggy_sdk/api/consent_api.py +570 -0
- 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 +10 -8
- 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/connector.py +2 -2
- pluggy_sdk/models/create_item.py +2 -2
- pluggy_sdk/models/custom.py +100 -0
- pluggy_sdk/models/daily.py +101 -0
- pluggy_sdk/models/item.py +2 -2
- pluggy_sdk/models/monthly.py +103 -0
- pluggy_sdk/models/payment_request.py +2 -2
- pluggy_sdk/models/payment_request_schedule.py +48 -48
- pluggy_sdk/models/payroll_loan.py +121 -0
- pluggy_sdk/models/payroll_loan_client.py +102 -0
- pluggy_sdk/models/single.py +98 -0
- pluggy_sdk/models/update_item.py +2 -2
- pluggy_sdk/models/weekly.py +110 -0
- {pluggy_sdk-1.0.0.post12.dist-info → pluggy_sdk-1.0.0.post14.dist-info}/METADATA +19 -15
- {pluggy_sdk-1.0.0.post12.dist-info → pluggy_sdk-1.0.0.post14.dist-info}/RECORD +30 -16
- {pluggy_sdk-1.0.0.post12.dist-info → pluggy_sdk-1.0.0.post14.dist-info}/WHEEL +1 -1
- {pluggy_sdk-1.0.0.post12.dist-info → pluggy_sdk-1.0.0.post14.dist-info}/top_level.txt +0 -0
pluggy_sdk/models/__init__.py
CHANGED
@@ -36,6 +36,11 @@ 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
|
41
|
+
from pluggy_sdk.models.benefit_response import BenefitResponse
|
42
|
+
from pluggy_sdk.models.benefit_response_paying_institution import BenefitResponsePayingInstitution
|
43
|
+
from pluggy_sdk.models.benefits_list200_response import BenefitsList200Response
|
39
44
|
from pluggy_sdk.models.bill import Bill
|
40
45
|
from pluggy_sdk.models.bill_finance_charge import BillFinanceCharge
|
41
46
|
from pluggy_sdk.models.bills_list200_response import BillsList200Response
|
@@ -44,6 +49,7 @@ from pluggy_sdk.models.boleto_payer import BoletoPayer
|
|
44
49
|
from pluggy_sdk.models.boleto_recipient import BoletoRecipient
|
45
50
|
from pluggy_sdk.models.bulk_payment import BulkPayment
|
46
51
|
from pluggy_sdk.models.bulk_payments_list200_response import BulkPaymentsList200Response
|
52
|
+
from pluggy_sdk.models.custom import CUSTOM
|
47
53
|
from pluggy_sdk.models.category import Category
|
48
54
|
from pluggy_sdk.models.client_category_rule import ClientCategoryRule
|
49
55
|
from pluggy_sdk.models.company import Company
|
@@ -73,6 +79,7 @@ from pluggy_sdk.models.create_webhook import CreateWebhook
|
|
73
79
|
from pluggy_sdk.models.credential_select_option import CredentialSelectOption
|
74
80
|
from pluggy_sdk.models.credit_card_metadata import CreditCardMetadata
|
75
81
|
from pluggy_sdk.models.credit_data import CreditData
|
82
|
+
from pluggy_sdk.models.daily import DAILY
|
76
83
|
from pluggy_sdk.models.document import Document
|
77
84
|
from pluggy_sdk.models.email import Email
|
78
85
|
from pluggy_sdk.models.global_error_response import GlobalErrorResponse
|
@@ -104,6 +111,7 @@ from pluggy_sdk.models.loan_payment_release_over_parcel_fee import LoanPaymentRe
|
|
104
111
|
from pluggy_sdk.models.loan_payments import LoanPayments
|
105
112
|
from pluggy_sdk.models.loan_warranty import LoanWarranty
|
106
113
|
from pluggy_sdk.models.loans_list200_response import LoansList200Response
|
114
|
+
from pluggy_sdk.models.monthly import MONTHLY
|
107
115
|
from pluggy_sdk.models.merchant import Merchant
|
108
116
|
from pluggy_sdk.models.monthly_portfolio import MonthlyPortfolio
|
109
117
|
from pluggy_sdk.models.monthly_portfolio_response import MonthlyPortfolioResponse
|
@@ -138,18 +146,11 @@ from pluggy_sdk.models.payment_request_receipt_list200_response import PaymentRe
|
|
138
146
|
from pluggy_sdk.models.payment_request_schedule import PaymentRequestSchedule
|
139
147
|
from pluggy_sdk.models.payment_requests_list200_response import PaymentRequestsList200Response
|
140
148
|
from pluggy_sdk.models.payment_schedules_list200_response import PaymentSchedulesList200Response
|
141
|
-
from pluggy_sdk.models.payroll_loan_response import PayrollLoanResponse
|
142
|
-
from pluggy_sdk.models.payroll_loan_response_client import PayrollLoanResponseClient
|
143
|
-
from pluggy_sdk.models.payroll_loans_list200_response import PayrollLoansList200Response
|
144
149
|
from pluggy_sdk.models.percentage_over_index import PercentageOverIndex
|
145
150
|
from pluggy_sdk.models.phone_number import PhoneNumber
|
146
151
|
from pluggy_sdk.models.pix_data import PixData
|
152
|
+
from pluggy_sdk.models.single import SINGLE
|
147
153
|
from pluggy_sdk.models.schedule_payment import SchedulePayment
|
148
|
-
from pluggy_sdk.models.schedule_type_custom import ScheduleTypeCustom
|
149
|
-
from pluggy_sdk.models.schedule_type_daily import ScheduleTypeDaily
|
150
|
-
from pluggy_sdk.models.schedule_type_monthly import ScheduleTypeMonthly
|
151
|
-
from pluggy_sdk.models.schedule_type_single import ScheduleTypeSingle
|
152
|
-
from pluggy_sdk.models.schedule_type_weekly import ScheduleTypeWeekly
|
153
154
|
from pluggy_sdk.models.smart_account import SmartAccount
|
154
155
|
from pluggy_sdk.models.smart_account_address import SmartAccountAddress
|
155
156
|
from pluggy_sdk.models.smart_account_balance import SmartAccountBalance
|
@@ -164,6 +165,7 @@ from pluggy_sdk.models.update_item_parameters import UpdateItemParameters
|
|
164
165
|
from pluggy_sdk.models.update_payment_recipient import UpdatePaymentRecipient
|
165
166
|
from pluggy_sdk.models.update_payment_request import UpdatePaymentRequest
|
166
167
|
from pluggy_sdk.models.update_transaction import UpdateTransaction
|
168
|
+
from pluggy_sdk.models.weekly import WEEKLY
|
167
169
|
from pluggy_sdk.models.webhook import Webhook
|
168
170
|
from pluggy_sdk.models.webhook_creation_error_response import WebhookCreationErrorResponse
|
169
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
|
+
|
@@ -0,0 +1,118 @@
|
|
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.benefit_loan import BenefitLoan
|
24
|
+
from pluggy_sdk.models.benefit_response_paying_institution import BenefitResponsePayingInstitution
|
25
|
+
from typing import Optional, Set
|
26
|
+
from typing_extensions import Self
|
27
|
+
|
28
|
+
class BenefitResponse(BaseModel):
|
29
|
+
"""
|
30
|
+
Response with information related to a benefit
|
31
|
+
""" # noqa: E501
|
32
|
+
id: StrictStr = Field(description="Primary identifier")
|
33
|
+
item_id: StrictStr = Field(description="Identifier of the item linked to the loan", alias="itemId")
|
34
|
+
beneficiary_name: StrictStr = Field(description="Beneficiary name", alias="beneficiaryName")
|
35
|
+
available_margin_value: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Available margin value", alias="availableMarginValue")
|
36
|
+
margin_base_value: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Base margin value", alias="marginBaseValue")
|
37
|
+
deductible_available_margin_value: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Deductible available margin value", alias="deductibleAvailableMarginValue")
|
38
|
+
used_margin_value: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Used margin value", alias="usedMarginValue")
|
39
|
+
reserved_margin_value: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Reserved margin value", alias="reservedMarginValue")
|
40
|
+
paying_institution: Optional[BenefitResponsePayingInstitution] = Field(default=None, alias="payingInstitution")
|
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
|
+
|
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 BenefitResponse 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
|
+
# override the default output from pydantic by calling `to_dict()` of paying_institution
|
84
|
+
if self.paying_institution:
|
85
|
+
_dict['payingInstitution'] = self.paying_institution.to_dict()
|
86
|
+
# override the default output from pydantic by calling `to_dict()` of each item in loans (list)
|
87
|
+
_items = []
|
88
|
+
if self.loans:
|
89
|
+
for _item in self.loans:
|
90
|
+
if _item:
|
91
|
+
_items.append(_item.to_dict())
|
92
|
+
_dict['loans'] = _items
|
93
|
+
return _dict
|
94
|
+
|
95
|
+
@classmethod
|
96
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
97
|
+
"""Create an instance of BenefitResponse from a dict"""
|
98
|
+
if obj is None:
|
99
|
+
return None
|
100
|
+
|
101
|
+
if not isinstance(obj, dict):
|
102
|
+
return cls.model_validate(obj)
|
103
|
+
|
104
|
+
_obj = cls.model_validate({
|
105
|
+
"id": obj.get("id"),
|
106
|
+
"itemId": obj.get("itemId"),
|
107
|
+
"beneficiaryName": obj.get("beneficiaryName"),
|
108
|
+
"availableMarginValue": obj.get("availableMarginValue"),
|
109
|
+
"marginBaseValue": obj.get("marginBaseValue"),
|
110
|
+
"deductibleAvailableMarginValue": obj.get("deductibleAvailableMarginValue"),
|
111
|
+
"usedMarginValue": obj.get("usedMarginValue"),
|
112
|
+
"reservedMarginValue": obj.get("reservedMarginValue"),
|
113
|
+
"payingInstitution": BenefitResponsePayingInstitution.from_dict(obj["payingInstitution"]) if obj.get("payingInstitution") is not None else None,
|
114
|
+
"loans": [BenefitLoan.from_dict(_item) for _item in obj["loans"]] if obj.get("loans") is not None else None
|
115
|
+
})
|
116
|
+
return _obj
|
117
|
+
|
118
|
+
|
@@ -0,0 +1,94 @@
|
|
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 BenefitResponsePayingInstitution(BaseModel):
|
27
|
+
"""
|
28
|
+
Paying institution information
|
29
|
+
""" # noqa: E501
|
30
|
+
code: Optional[StrictStr] = Field(default=None, description="Paying institution code")
|
31
|
+
name: Optional[StrictStr] = Field(default=None, description="Paying institution name")
|
32
|
+
agency: Optional[StrictStr] = Field(default=None, description="Paying institution agency")
|
33
|
+
account: Optional[StrictStr] = Field(default=None, description="Paying institution account")
|
34
|
+
__properties: ClassVar[List[str]] = ["code", "name", "agency", "account"]
|
35
|
+
|
36
|
+
model_config = ConfigDict(
|
37
|
+
populate_by_name=True,
|
38
|
+
validate_assignment=True,
|
39
|
+
protected_namespaces=(),
|
40
|
+
)
|
41
|
+
|
42
|
+
|
43
|
+
def to_str(self) -> str:
|
44
|
+
"""Returns the string representation of the model using alias"""
|
45
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
46
|
+
|
47
|
+
def to_json(self) -> str:
|
48
|
+
"""Returns the JSON representation of the model using alias"""
|
49
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
50
|
+
return json.dumps(self.to_dict())
|
51
|
+
|
52
|
+
@classmethod
|
53
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
54
|
+
"""Create an instance of BenefitResponsePayingInstitution from a JSON string"""
|
55
|
+
return cls.from_dict(json.loads(json_str))
|
56
|
+
|
57
|
+
def to_dict(self) -> Dict[str, Any]:
|
58
|
+
"""Return the dictionary representation of the model using alias.
|
59
|
+
|
60
|
+
This has the following differences from calling pydantic's
|
61
|
+
`self.model_dump(by_alias=True)`:
|
62
|
+
|
63
|
+
* `None` is only added to the output dict for nullable fields that
|
64
|
+
were set at model initialization. Other fields with value `None`
|
65
|
+
are ignored.
|
66
|
+
"""
|
67
|
+
excluded_fields: Set[str] = set([
|
68
|
+
])
|
69
|
+
|
70
|
+
_dict = self.model_dump(
|
71
|
+
by_alias=True,
|
72
|
+
exclude=excluded_fields,
|
73
|
+
exclude_none=True,
|
74
|
+
)
|
75
|
+
return _dict
|
76
|
+
|
77
|
+
@classmethod
|
78
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
79
|
+
"""Create an instance of BenefitResponsePayingInstitution from a dict"""
|
80
|
+
if obj is None:
|
81
|
+
return None
|
82
|
+
|
83
|
+
if not isinstance(obj, dict):
|
84
|
+
return cls.model_validate(obj)
|
85
|
+
|
86
|
+
_obj = cls.model_validate({
|
87
|
+
"code": obj.get("code"),
|
88
|
+
"name": obj.get("name"),
|
89
|
+
"agency": obj.get("agency"),
|
90
|
+
"account": obj.get("account")
|
91
|
+
})
|
92
|
+
return _obj
|
93
|
+
|
94
|
+
|
@@ -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.benefit_response import BenefitResponse
|
24
|
+
from typing import Optional, Set
|
25
|
+
from typing_extensions import Self
|
26
|
+
|
27
|
+
class BenefitsList200Response(BaseModel):
|
28
|
+
"""
|
29
|
+
BenefitsList200Response
|
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[BenefitResponse]] = Field(default=None, description="List of benefits")
|
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 BenefitsList200Response 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 in self.results:
|
80
|
+
if _item:
|
81
|
+
_items.append(_item.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 BenefitsList200Response 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": [BenefitResponse.from_dict(_item) for _item in obj["results"]] if obj.get("results") is not None else None
|
99
|
+
})
|
100
|
+
return _obj
|
101
|
+
|
102
|
+
|
pluggy_sdk/models/connector.py
CHANGED
@@ -54,8 +54,8 @@ class Connector(BaseModel):
|
|
54
54
|
return value
|
55
55
|
|
56
56
|
for i in value:
|
57
|
-
if i not in set(['ACCOUNTS', '
|
58
|
-
raise ValueError("each list item must be one of ('ACCOUNTS', '
|
57
|
+
if i not in set(['ACCOUNTS', 'CREDIT_CARDS', 'TRANSACTIONS', 'PAYMENT_DATA', 'INVESTMENTS', 'INVESTMENTS_TRANSACTIONS', 'IDENTITY', 'BROKERAGE_NOTE', 'OPPORTUNITIES', 'PORTFOLIO', 'INCOME_REPORTS', 'MOVE_SECURITY', 'LOANS', 'ACQUIRER_OPERATIONS']):
|
58
|
+
raise ValueError("each list item must be one of ('ACCOUNTS', 'CREDIT_CARDS', 'TRANSACTIONS', 'PAYMENT_DATA', 'INVESTMENTS', 'INVESTMENTS_TRANSACTIONS', 'IDENTITY', 'BROKERAGE_NOTE', 'OPPORTUNITIES', 'PORTFOLIO', 'INCOME_REPORTS', 'MOVE_SECURITY', 'LOANS', 'ACQUIRER_OPERATIONS')")
|
59
59
|
return value
|
60
60
|
|
61
61
|
model_config = ConfigDict(
|
pluggy_sdk/models/create_item.py
CHANGED
@@ -42,8 +42,8 @@ class CreateItem(BaseModel):
|
|
42
42
|
return value
|
43
43
|
|
44
44
|
for i in value:
|
45
|
-
if i not in set(['ACCOUNTS', '
|
46
|
-
raise ValueError("each list item must be one of ('ACCOUNTS', '
|
45
|
+
if i not in set(['ACCOUNTS', 'CREDIT_CARDS', 'TRANSACTIONS', 'PAYMENT_DATA', 'INVESTMENTS', 'INVESTMENTS_TRANSACTIONS', 'IDENTITY', 'BROKERAGE_NOTE', 'OPPORTUNITIES', 'PORTFOLIO', 'INCOME_REPORTS', 'MOVE_SECURITY', 'LOANS', 'ACQUIRER_OPERATIONS']):
|
46
|
+
raise ValueError("each list item must be one of ('ACCOUNTS', 'CREDIT_CARDS', 'TRANSACTIONS', 'PAYMENT_DATA', 'INVESTMENTS', 'INVESTMENTS_TRANSACTIONS', 'IDENTITY', 'BROKERAGE_NOTE', 'OPPORTUNITIES', 'PORTFOLIO', 'INCOME_REPORTS', 'MOVE_SECURITY', 'LOANS', 'ACQUIRER_OPERATIONS')")
|
47
47
|
return value
|
48
48
|
|
49
49
|
model_config = ConfigDict(
|