pluggy-sdk 1.0.0.post2__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 +183 -0
- pluggy_sdk/api/__init__.py +26 -0
- pluggy_sdk/api/account_api.py +582 -0
- pluggy_sdk/api/acquirer_anticipation_api.py +658 -0
- pluggy_sdk/api/acquirer_receivable_api.py +658 -0
- pluggy_sdk/api/acquirer_sale_api.py +658 -0
- pluggy_sdk/api/auth_api.py +599 -0
- pluggy_sdk/api/bill_api.py +561 -0
- pluggy_sdk/api/bulk_payment_api.py +854 -0
- pluggy_sdk/api/category_api.py +1084 -0
- pluggy_sdk/api/connector_api.py +970 -0
- pluggy_sdk/api/identity_api.py +575 -0
- pluggy_sdk/api/income_report_api.py +308 -0
- pluggy_sdk/api/investment_api.py +909 -0
- pluggy_sdk/api/items_api.py +1441 -0
- pluggy_sdk/api/loan_api.py +561 -0
- pluggy_sdk/api/payment_customer_api.py +1399 -0
- pluggy_sdk/api/payment_intent_api.py +833 -0
- pluggy_sdk/api/payment_recipient_api.py +1976 -0
- pluggy_sdk/api/payment_request_api.py +1636 -0
- pluggy_sdk/api/portfolio_yield_api.py +574 -0
- pluggy_sdk/api/smart_account_api.py +1116 -0
- pluggy_sdk/api/transaction_api.py +954 -0
- pluggy_sdk/api/webhook_api.py +1391 -0
- pluggy_sdk/api_client.py +769 -0
- pluggy_sdk/api_response.py +21 -0
- pluggy_sdk/configuration.py +466 -0
- pluggy_sdk/exceptions.py +200 -0
- pluggy_sdk/models/__init__.py +145 -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/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/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 +94 -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 +141 -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/create_bulk_payment.py +96 -0
- pluggy_sdk/models/create_client_category_rule.py +92 -0
- pluggy_sdk/models/create_item.py +111 -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 +94 -0
- pluggy_sdk/models/create_payment_recipient.py +100 -0
- pluggy_sdk/models/create_payment_request.py +102 -0
- pluggy_sdk/models/create_pix_qr_payment_request.py +96 -0
- pluggy_sdk/models/create_smart_account_request.py +102 -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/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 +149 -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 +99 -0
- pluggy_sdk/models/investment_transaction.py +124 -0
- pluggy_sdk/models/investments_list200_response.py +102 -0
- pluggy_sdk/models/item.py +148 -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 +90 -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_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_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 +105 -0
- pluggy_sdk/models/payment_data_participant.py +101 -0
- pluggy_sdk/models/payment_institution.py +101 -0
- pluggy_sdk/models/payment_intent.py +145 -0
- pluggy_sdk/models/payment_intents_list200_response.py +102 -0
- pluggy_sdk/models/payment_recipient.py +106 -0
- pluggy_sdk/models/payment_recipient_account.py +99 -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 +118 -0
- pluggy_sdk/models/payment_request_callback_urls.py +92 -0
- pluggy_sdk/models/payment_requests_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/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_accounts_list200_response.py +102 -0
- pluggy_sdk/models/status_detail.py +142 -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 +145 -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 +100 -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/py.typed +0 -0
- pluggy_sdk/rest.py +258 -0
- pluggy_sdk-1.0.0.post2.dist-info/METADATA +336 -0
- pluggy_sdk-1.0.0.post2.dist-info/RECORD +163 -0
- pluggy_sdk-1.0.0.post2.dist-info/WHEEL +5 -0
- pluggy_sdk-1.0.0.post2.dist-info/top_level.txt +1 -0
@@ -0,0 +1,101 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
|
3
|
+
"""
|
4
|
+
Pluggy API
|
5
|
+
|
6
|
+
Pluggy's main API to review data and execute connectors
|
7
|
+
|
8
|
+
The version of the OpenAPI document: 1.0.0
|
9
|
+
Contact: hello@pluggy.ai
|
10
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
11
|
+
|
12
|
+
Do not edit the class manually.
|
13
|
+
""" # noqa: E501
|
14
|
+
|
15
|
+
|
16
|
+
from __future__ import annotations
|
17
|
+
import pprint
|
18
|
+
import re # noqa: F401
|
19
|
+
import json
|
20
|
+
|
21
|
+
from datetime import datetime
|
22
|
+
from pydantic import BaseModel, ConfigDict, Field, StrictStr
|
23
|
+
from typing import Any, ClassVar, Dict, List, Optional
|
24
|
+
from typing import Optional, Set
|
25
|
+
from typing_extensions import Self
|
26
|
+
|
27
|
+
class PaymentInstitution(BaseModel):
|
28
|
+
"""
|
29
|
+
Response with information related to a payment institution
|
30
|
+
""" # noqa: E501
|
31
|
+
id: StrictStr = Field(description="Primary identifier")
|
32
|
+
name: StrictStr = Field(description="Payment institution name")
|
33
|
+
trade_name: StrictStr = Field(description="Payment institution trade name", alias="tradeName")
|
34
|
+
ispb: StrictStr = Field(description="Payment institution ISPB")
|
35
|
+
compe: Optional[StrictStr] = Field(default=None, description="Payment institution COMPE")
|
36
|
+
created_at: datetime = Field(description="Date when the payment institution was created", alias="createdAt")
|
37
|
+
updated_at: datetime = Field(description="Date when the payment institution was updated", alias="updatedAt")
|
38
|
+
__properties: ClassVar[List[str]] = ["id", "name", "tradeName", "ispb", "compe", "createdAt", "updatedAt"]
|
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 PaymentInstitution 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 PaymentInstitution 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
|
+
"id": obj.get("id"),
|
92
|
+
"name": obj.get("name"),
|
93
|
+
"tradeName": obj.get("tradeName"),
|
94
|
+
"ispb": obj.get("ispb"),
|
95
|
+
"compe": obj.get("compe"),
|
96
|
+
"createdAt": obj.get("createdAt"),
|
97
|
+
"updatedAt": obj.get("updatedAt")
|
98
|
+
})
|
99
|
+
return _obj
|
100
|
+
|
101
|
+
|
@@ -0,0 +1,145 @@
|
|
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, StrictStr, field_validator
|
23
|
+
from typing import Any, ClassVar, Dict, List, Optional
|
24
|
+
from pluggy_sdk.models.bulk_payment import BulkPayment
|
25
|
+
from pluggy_sdk.models.connector import Connector
|
26
|
+
from pluggy_sdk.models.payment_request import PaymentRequest
|
27
|
+
from pluggy_sdk.models.pix_data import PixData
|
28
|
+
from typing import Optional, Set
|
29
|
+
from typing_extensions import Self
|
30
|
+
|
31
|
+
class PaymentIntent(BaseModel):
|
32
|
+
"""
|
33
|
+
Request with information related to a payment intent
|
34
|
+
""" # noqa: E501
|
35
|
+
id: Optional[StrictStr] = Field(default=None, description="Primary identifier")
|
36
|
+
status: Optional[StrictStr] = Field(default=None, description="Payment intent status")
|
37
|
+
created_at: Optional[datetime] = Field(default=None, description="Date when the payment intent was created", alias="createdAt")
|
38
|
+
updated_at: Optional[datetime] = Field(default=None, description="Date when the payment intent was updated", alias="updatedAt")
|
39
|
+
payment_request: Optional[PaymentRequest] = Field(default=None, alias="paymentRequest")
|
40
|
+
bulk_payment: Optional[BulkPayment] = Field(default=None, alias="bulkPayment")
|
41
|
+
connector: Optional[Connector] = None
|
42
|
+
consent_url: Optional[StrictStr] = Field(default=None, description="Url to authorize the payment intent", alias="consentUrl")
|
43
|
+
reference_id: Optional[StrictStr] = Field(default=None, description="Pix id related to the payment intent", alias="referenceId")
|
44
|
+
payment_method: Optional[StrictStr] = Field(default='PIS', description="Payment method can be PIS (Payment Initiation) or PIX", alias="paymentMethod")
|
45
|
+
pix_data: Optional[PixData] = Field(default=None, alias="pixData")
|
46
|
+
__properties: ClassVar[List[str]] = ["id", "status", "createdAt", "updatedAt", "paymentRequest", "bulkPayment", "connector", "consentUrl", "referenceId", "paymentMethod", "pixData"]
|
47
|
+
|
48
|
+
@field_validator('status')
|
49
|
+
def status_validate_enum(cls, value):
|
50
|
+
"""Validates the enum"""
|
51
|
+
if value is None:
|
52
|
+
return value
|
53
|
+
|
54
|
+
if value not in set(['PAYMENT_REJECTED', 'ERROR', 'CANCELED', 'CONSENT_REJECTED', 'STARTED', 'ENQUEUED', 'CONSENT_AWAITING_AUTHORIZATION', 'CONSENT_AUTHORIZED', 'PAYMENT_PENDING', 'PAYMENT_PARTIALLY_ACCEPTED', 'PAYMENT_SETTLEMENT_PROCESSING', 'PAYMENT_SETTLEMENT_DEBTOR_ACCOUNT', 'PAYMENT_COMPLETED']):
|
55
|
+
raise ValueError("must be one of enum values ('PAYMENT_REJECTED', 'ERROR', 'CANCELED', 'CONSENT_REJECTED', 'STARTED', 'ENQUEUED', 'CONSENT_AWAITING_AUTHORIZATION', 'CONSENT_AUTHORIZED', 'PAYMENT_PENDING', 'PAYMENT_PARTIALLY_ACCEPTED', 'PAYMENT_SETTLEMENT_PROCESSING', 'PAYMENT_SETTLEMENT_DEBTOR_ACCOUNT', 'PAYMENT_COMPLETED')")
|
56
|
+
return value
|
57
|
+
|
58
|
+
@field_validator('payment_method')
|
59
|
+
def payment_method_validate_enum(cls, value):
|
60
|
+
"""Validates the enum"""
|
61
|
+
if value is None:
|
62
|
+
return value
|
63
|
+
|
64
|
+
if value not in set(['PIS', 'PIX']):
|
65
|
+
raise ValueError("must be one of enum values ('PIS', 'PIX')")
|
66
|
+
return value
|
67
|
+
|
68
|
+
model_config = ConfigDict(
|
69
|
+
populate_by_name=True,
|
70
|
+
validate_assignment=True,
|
71
|
+
protected_namespaces=(),
|
72
|
+
)
|
73
|
+
|
74
|
+
|
75
|
+
def to_str(self) -> str:
|
76
|
+
"""Returns the string representation of the model using alias"""
|
77
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
78
|
+
|
79
|
+
def to_json(self) -> str:
|
80
|
+
"""Returns the JSON representation of the model using alias"""
|
81
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
82
|
+
return json.dumps(self.to_dict())
|
83
|
+
|
84
|
+
@classmethod
|
85
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
86
|
+
"""Create an instance of PaymentIntent from a JSON string"""
|
87
|
+
return cls.from_dict(json.loads(json_str))
|
88
|
+
|
89
|
+
def to_dict(self) -> Dict[str, Any]:
|
90
|
+
"""Return the dictionary representation of the model using alias.
|
91
|
+
|
92
|
+
This has the following differences from calling pydantic's
|
93
|
+
`self.model_dump(by_alias=True)`:
|
94
|
+
|
95
|
+
* `None` is only added to the output dict for nullable fields that
|
96
|
+
were set at model initialization. Other fields with value `None`
|
97
|
+
are ignored.
|
98
|
+
"""
|
99
|
+
excluded_fields: Set[str] = set([
|
100
|
+
])
|
101
|
+
|
102
|
+
_dict = self.model_dump(
|
103
|
+
by_alias=True,
|
104
|
+
exclude=excluded_fields,
|
105
|
+
exclude_none=True,
|
106
|
+
)
|
107
|
+
# override the default output from pydantic by calling `to_dict()` of payment_request
|
108
|
+
if self.payment_request:
|
109
|
+
_dict['paymentRequest'] = self.payment_request.to_dict()
|
110
|
+
# override the default output from pydantic by calling `to_dict()` of bulk_payment
|
111
|
+
if self.bulk_payment:
|
112
|
+
_dict['bulkPayment'] = self.bulk_payment.to_dict()
|
113
|
+
# override the default output from pydantic by calling `to_dict()` of connector
|
114
|
+
if self.connector:
|
115
|
+
_dict['connector'] = self.connector.to_dict()
|
116
|
+
# override the default output from pydantic by calling `to_dict()` of pix_data
|
117
|
+
if self.pix_data:
|
118
|
+
_dict['pixData'] = self.pix_data.to_dict()
|
119
|
+
return _dict
|
120
|
+
|
121
|
+
@classmethod
|
122
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
123
|
+
"""Create an instance of PaymentIntent from a dict"""
|
124
|
+
if obj is None:
|
125
|
+
return None
|
126
|
+
|
127
|
+
if not isinstance(obj, dict):
|
128
|
+
return cls.model_validate(obj)
|
129
|
+
|
130
|
+
_obj = cls.model_validate({
|
131
|
+
"id": obj.get("id"),
|
132
|
+
"status": obj.get("status"),
|
133
|
+
"createdAt": obj.get("createdAt"),
|
134
|
+
"updatedAt": obj.get("updatedAt"),
|
135
|
+
"paymentRequest": PaymentRequest.from_dict(obj["paymentRequest"]) if obj.get("paymentRequest") is not None else None,
|
136
|
+
"bulkPayment": BulkPayment.from_dict(obj["bulkPayment"]) if obj.get("bulkPayment") is not None else None,
|
137
|
+
"connector": Connector.from_dict(obj["connector"]) if obj.get("connector") is not None else None,
|
138
|
+
"consentUrl": obj.get("consentUrl"),
|
139
|
+
"referenceId": obj.get("referenceId"),
|
140
|
+
"paymentMethod": obj.get("paymentMethod") if obj.get("paymentMethod") is not None else 'PIS',
|
141
|
+
"pixData": PixData.from_dict(obj["pixData"]) if obj.get("pixData") is not None else None
|
142
|
+
})
|
143
|
+
return _obj
|
144
|
+
|
145
|
+
|
@@ -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_intent import PaymentIntent
|
24
|
+
from typing import Optional, Set
|
25
|
+
from typing_extensions import Self
|
26
|
+
|
27
|
+
class PaymentIntentsList200Response(BaseModel):
|
28
|
+
"""
|
29
|
+
PaymentIntentsList200Response
|
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[PaymentIntent]] = Field(default=None, description="List of payment intents")
|
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 PaymentIntentsList200Response 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 PaymentIntentsList200Response 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": [PaymentIntent.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,106 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
|
3
|
+
"""
|
4
|
+
Pluggy API
|
5
|
+
|
6
|
+
Pluggy's main API to review data and execute connectors
|
7
|
+
|
8
|
+
The version of the OpenAPI document: 1.0.0
|
9
|
+
Contact: hello@pluggy.ai
|
10
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
11
|
+
|
12
|
+
Do not edit the class manually.
|
13
|
+
""" # noqa: E501
|
14
|
+
|
15
|
+
|
16
|
+
from __future__ import annotations
|
17
|
+
import pprint
|
18
|
+
import re # noqa: F401
|
19
|
+
import json
|
20
|
+
|
21
|
+
from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr
|
22
|
+
from typing import Any, ClassVar, Dict, List, Optional
|
23
|
+
from pluggy_sdk.models.payment_institution import PaymentInstitution
|
24
|
+
from pluggy_sdk.models.payment_recipient_account import PaymentRecipientAccount
|
25
|
+
from typing import Optional, Set
|
26
|
+
from typing_extensions import Self
|
27
|
+
|
28
|
+
class PaymentRecipient(BaseModel):
|
29
|
+
"""
|
30
|
+
Response with information related to a payment recipient
|
31
|
+
""" # noqa: E501
|
32
|
+
id: StrictStr = Field(description="Primary identifier")
|
33
|
+
tax_number: StrictStr = Field(description="Account owner tax number. Can be CPF or CNPJ (only numbers)", alias="taxNumber")
|
34
|
+
name: StrictStr = Field(description="Account owner name")
|
35
|
+
payment_institution: Optional[PaymentInstitution] = Field(default=None, alias="paymentInstitution")
|
36
|
+
is_default: Optional[StrictBool] = Field(default=None, description="Indicates if the recipient is the default one", alias="isDefault")
|
37
|
+
account: PaymentRecipientAccount
|
38
|
+
__properties: ClassVar[List[str]] = ["id", "taxNumber", "name", "paymentInstitution", "isDefault", "account"]
|
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 PaymentRecipient from a JSON string"""
|
59
|
+
return cls.from_dict(json.loads(json_str))
|
60
|
+
|
61
|
+
def to_dict(self) -> Dict[str, Any]:
|
62
|
+
"""Return the dictionary representation of the model using alias.
|
63
|
+
|
64
|
+
This has the following differences from calling pydantic's
|
65
|
+
`self.model_dump(by_alias=True)`:
|
66
|
+
|
67
|
+
* `None` is only added to the output dict for nullable fields that
|
68
|
+
were set at model initialization. Other fields with value `None`
|
69
|
+
are ignored.
|
70
|
+
"""
|
71
|
+
excluded_fields: Set[str] = set([
|
72
|
+
])
|
73
|
+
|
74
|
+
_dict = self.model_dump(
|
75
|
+
by_alias=True,
|
76
|
+
exclude=excluded_fields,
|
77
|
+
exclude_none=True,
|
78
|
+
)
|
79
|
+
# override the default output from pydantic by calling `to_dict()` of payment_institution
|
80
|
+
if self.payment_institution:
|
81
|
+
_dict['paymentInstitution'] = self.payment_institution.to_dict()
|
82
|
+
# override the default output from pydantic by calling `to_dict()` of account
|
83
|
+
if self.account:
|
84
|
+
_dict['account'] = self.account.to_dict()
|
85
|
+
return _dict
|
86
|
+
|
87
|
+
@classmethod
|
88
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
89
|
+
"""Create an instance of PaymentRecipient from a dict"""
|
90
|
+
if obj is None:
|
91
|
+
return None
|
92
|
+
|
93
|
+
if not isinstance(obj, dict):
|
94
|
+
return cls.model_validate(obj)
|
95
|
+
|
96
|
+
_obj = cls.model_validate({
|
97
|
+
"id": obj.get("id"),
|
98
|
+
"taxNumber": obj.get("taxNumber"),
|
99
|
+
"name": obj.get("name"),
|
100
|
+
"paymentInstitution": PaymentInstitution.from_dict(obj["paymentInstitution"]) if obj.get("paymentInstitution") is not None else None,
|
101
|
+
"isDefault": obj.get("isDefault"),
|
102
|
+
"account": PaymentRecipientAccount.from_dict(obj["account"]) if obj.get("account") is not None else None
|
103
|
+
})
|
104
|
+
return _obj
|
105
|
+
|
106
|
+
|
@@ -0,0 +1,99 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
|
3
|
+
"""
|
4
|
+
Pluggy API
|
5
|
+
|
6
|
+
Pluggy's main API to review data and execute connectors
|
7
|
+
|
8
|
+
The version of the OpenAPI document: 1.0.0
|
9
|
+
Contact: hello@pluggy.ai
|
10
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
11
|
+
|
12
|
+
Do not edit the class manually.
|
13
|
+
""" # noqa: E501
|
14
|
+
|
15
|
+
|
16
|
+
from __future__ import annotations
|
17
|
+
import pprint
|
18
|
+
import re # noqa: F401
|
19
|
+
import json
|
20
|
+
|
21
|
+
from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator
|
22
|
+
from typing import Any, ClassVar, Dict, List
|
23
|
+
from typing import Optional, Set
|
24
|
+
from typing_extensions import Self
|
25
|
+
|
26
|
+
class PaymentRecipientAccount(BaseModel):
|
27
|
+
"""
|
28
|
+
Payment receiver bank account information
|
29
|
+
""" # noqa: E501
|
30
|
+
branch: StrictStr = Field(description="Receiver bank account branch (agency)")
|
31
|
+
number: StrictStr = Field(description="Receiver bank account number")
|
32
|
+
type: StrictStr = Field(description="Receiver bank account type")
|
33
|
+
__properties: ClassVar[List[str]] = ["branch", "number", "type"]
|
34
|
+
|
35
|
+
@field_validator('type')
|
36
|
+
def type_validate_enum(cls, value):
|
37
|
+
"""Validates the enum"""
|
38
|
+
if value not in set(['CHECKING_ACCOUNT', 'SAVINGS_ACCOUNT', 'GUARANTEED_ACCOUNT']):
|
39
|
+
raise ValueError("must be one of enum values ('CHECKING_ACCOUNT', 'SAVINGS_ACCOUNT', 'GUARANTEED_ACCOUNT')")
|
40
|
+
return value
|
41
|
+
|
42
|
+
model_config = ConfigDict(
|
43
|
+
populate_by_name=True,
|
44
|
+
validate_assignment=True,
|
45
|
+
protected_namespaces=(),
|
46
|
+
)
|
47
|
+
|
48
|
+
|
49
|
+
def to_str(self) -> str:
|
50
|
+
"""Returns the string representation of the model using alias"""
|
51
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
52
|
+
|
53
|
+
def to_json(self) -> str:
|
54
|
+
"""Returns the JSON representation of the model using alias"""
|
55
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
56
|
+
return json.dumps(self.to_dict())
|
57
|
+
|
58
|
+
@classmethod
|
59
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
60
|
+
"""Create an instance of PaymentRecipientAccount from a JSON string"""
|
61
|
+
return cls.from_dict(json.loads(json_str))
|
62
|
+
|
63
|
+
def to_dict(self) -> Dict[str, Any]:
|
64
|
+
"""Return the dictionary representation of the model using alias.
|
65
|
+
|
66
|
+
This has the following differences from calling pydantic's
|
67
|
+
`self.model_dump(by_alias=True)`:
|
68
|
+
|
69
|
+
* `None` is only added to the output dict for nullable fields that
|
70
|
+
were set at model initialization. Other fields with value `None`
|
71
|
+
are ignored.
|
72
|
+
"""
|
73
|
+
excluded_fields: Set[str] = set([
|
74
|
+
])
|
75
|
+
|
76
|
+
_dict = self.model_dump(
|
77
|
+
by_alias=True,
|
78
|
+
exclude=excluded_fields,
|
79
|
+
exclude_none=True,
|
80
|
+
)
|
81
|
+
return _dict
|
82
|
+
|
83
|
+
@classmethod
|
84
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
85
|
+
"""Create an instance of PaymentRecipientAccount from a dict"""
|
86
|
+
if obj is None:
|
87
|
+
return None
|
88
|
+
|
89
|
+
if not isinstance(obj, dict):
|
90
|
+
return cls.model_validate(obj)
|
91
|
+
|
92
|
+
_obj = cls.model_validate({
|
93
|
+
"branch": obj.get("branch"),
|
94
|
+
"number": obj.get("number"),
|
95
|
+
"type": obj.get("type")
|
96
|
+
})
|
97
|
+
return _obj
|
98
|
+
|
99
|
+
|
@@ -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_institution import PaymentInstitution
|
24
|
+
from typing import Optional, Set
|
25
|
+
from typing_extensions import Self
|
26
|
+
|
27
|
+
class PaymentRecipientsInstitutionList200Response(BaseModel):
|
28
|
+
"""
|
29
|
+
PaymentRecipientsInstitutionList200Response
|
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[PaymentInstitution]] = Field(default=None, description="List of payment institutions")
|
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 PaymentRecipientsInstitutionList200Response 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 PaymentRecipientsInstitutionList200Response 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": [PaymentInstitution.from_dict(_item) for _item in obj["results"]] if obj.get("results") is not None else None
|
99
|
+
})
|
100
|
+
return _obj
|
101
|
+
|
102
|
+
|