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,96 @@
|
|
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 pluggy_sdk.models.payment_request_callback_urls import PaymentRequestCallbackUrls
|
24
|
+
from typing import Optional, Set
|
25
|
+
from typing_extensions import Self
|
26
|
+
|
27
|
+
class CreatePixQrPaymentRequest(BaseModel):
|
28
|
+
"""
|
29
|
+
Request with information to create a PIX QR payment request
|
30
|
+
""" # noqa: E501
|
31
|
+
pix_qr_code: StrictStr = Field(description="Pix QR code", alias="pixQrCode")
|
32
|
+
callback_urls: Optional[PaymentRequestCallbackUrls] = Field(default=None, alias="callbackUrls")
|
33
|
+
customer_id: Optional[StrictStr] = Field(default=None, description="Customer identifier associated to the payment", alias="customerId")
|
34
|
+
__properties: ClassVar[List[str]] = ["pixQrCode", "callbackUrls", "customerId"]
|
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 CreatePixQrPaymentRequest 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
|
+
# override the default output from pydantic by calling `to_dict()` of callback_urls
|
76
|
+
if self.callback_urls:
|
77
|
+
_dict['callbackUrls'] = self.callback_urls.to_dict()
|
78
|
+
return _dict
|
79
|
+
|
80
|
+
@classmethod
|
81
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
82
|
+
"""Create an instance of CreatePixQrPaymentRequest from a dict"""
|
83
|
+
if obj is None:
|
84
|
+
return None
|
85
|
+
|
86
|
+
if not isinstance(obj, dict):
|
87
|
+
return cls.model_validate(obj)
|
88
|
+
|
89
|
+
_obj = cls.model_validate({
|
90
|
+
"pixQrCode": obj.get("pixQrCode"),
|
91
|
+
"callbackUrls": PaymentRequestCallbackUrls.from_dict(obj["callbackUrls"]) if obj.get("callbackUrls") is not None else None,
|
92
|
+
"customerId": obj.get("customerId")
|
93
|
+
})
|
94
|
+
return _obj
|
95
|
+
|
96
|
+
|
@@ -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, StrictBool, StrictStr
|
22
|
+
from typing import Any, ClassVar, Dict, List, Optional
|
23
|
+
from pluggy_sdk.models.smart_account_address import SmartAccountAddress
|
24
|
+
from typing import Optional, Set
|
25
|
+
from typing_extensions import Self
|
26
|
+
|
27
|
+
class CreateSmartAccountRequest(BaseModel):
|
28
|
+
"""
|
29
|
+
Create smart account request
|
30
|
+
""" # noqa: E501
|
31
|
+
name: StrictStr = Field(description="Account owner fullName")
|
32
|
+
tax_number: StrictStr = Field(description="Account owner tax number (CPF or CNPJ)", alias="taxNumber")
|
33
|
+
email: StrictStr = Field(description="Account owner email")
|
34
|
+
phone_number: StrictStr = Field(description="Account owner phone", alias="phoneNumber")
|
35
|
+
is_sandbox: Optional[StrictBool] = Field(default=None, description="Indicates if the smart account is a sandbox account", alias="isSandbox")
|
36
|
+
address: SmartAccountAddress
|
37
|
+
__properties: ClassVar[List[str]] = ["name", "taxNumber", "email", "phoneNumber", "isSandbox", "address"]
|
38
|
+
|
39
|
+
model_config = ConfigDict(
|
40
|
+
populate_by_name=True,
|
41
|
+
validate_assignment=True,
|
42
|
+
protected_namespaces=(),
|
43
|
+
)
|
44
|
+
|
45
|
+
|
46
|
+
def to_str(self) -> str:
|
47
|
+
"""Returns the string representation of the model using alias"""
|
48
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
49
|
+
|
50
|
+
def to_json(self) -> str:
|
51
|
+
"""Returns the JSON representation of the model using alias"""
|
52
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
53
|
+
return json.dumps(self.to_dict())
|
54
|
+
|
55
|
+
@classmethod
|
56
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
57
|
+
"""Create an instance of CreateSmartAccountRequest from a JSON string"""
|
58
|
+
return cls.from_dict(json.loads(json_str))
|
59
|
+
|
60
|
+
def to_dict(self) -> Dict[str, Any]:
|
61
|
+
"""Return the dictionary representation of the model using alias.
|
62
|
+
|
63
|
+
This has the following differences from calling pydantic's
|
64
|
+
`self.model_dump(by_alias=True)`:
|
65
|
+
|
66
|
+
* `None` is only added to the output dict for nullable fields that
|
67
|
+
were set at model initialization. Other fields with value `None`
|
68
|
+
are ignored.
|
69
|
+
"""
|
70
|
+
excluded_fields: Set[str] = set([
|
71
|
+
])
|
72
|
+
|
73
|
+
_dict = self.model_dump(
|
74
|
+
by_alias=True,
|
75
|
+
exclude=excluded_fields,
|
76
|
+
exclude_none=True,
|
77
|
+
)
|
78
|
+
# override the default output from pydantic by calling `to_dict()` of address
|
79
|
+
if self.address:
|
80
|
+
_dict['address'] = self.address.to_dict()
|
81
|
+
return _dict
|
82
|
+
|
83
|
+
@classmethod
|
84
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
85
|
+
"""Create an instance of CreateSmartAccountRequest 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
|
+
"name": obj.get("name"),
|
94
|
+
"taxNumber": obj.get("taxNumber"),
|
95
|
+
"email": obj.get("email"),
|
96
|
+
"phoneNumber": obj.get("phoneNumber"),
|
97
|
+
"isSandbox": obj.get("isSandbox"),
|
98
|
+
"address": SmartAccountAddress.from_dict(obj["address"]) if obj.get("address") is not None else None
|
99
|
+
})
|
100
|
+
return _obj
|
101
|
+
|
102
|
+
|
@@ -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, Optional
|
23
|
+
from typing import Optional, Set
|
24
|
+
from typing_extensions import Self
|
25
|
+
|
26
|
+
class CreateWebhook(BaseModel):
|
27
|
+
"""
|
28
|
+
|
29
|
+
""" # noqa: E501
|
30
|
+
url: StrictStr
|
31
|
+
event: StrictStr
|
32
|
+
headers: Optional[Dict[str, Any]] = Field(default=None, description="HTTP headers that will be included in the webhook notifications (useful for things like authorization)")
|
33
|
+
__properties: ClassVar[List[str]] = ["url", "event", "headers"]
|
34
|
+
|
35
|
+
@field_validator('event')
|
36
|
+
def event_validate_enum(cls, value):
|
37
|
+
"""Validates the enum"""
|
38
|
+
if value not in set(['all', 'item/created', 'item/updated', 'item/error', 'item/deleted', 'item/waiting_user_input', 'item/waiting_user_action', 'item/login_succeeded', 'connector/status_updated', 'transactions/deleted', 'payment_intent/created', 'payment_intent/completed', 'payment_intent/waiting_payer_authorization', 'payment_intent/error']):
|
39
|
+
raise ValueError("must be one of enum values ('all', 'item/created', 'item/updated', 'item/error', 'item/deleted', 'item/waiting_user_input', 'item/waiting_user_action', 'item/login_succeeded', 'connector/status_updated', 'transactions/deleted', 'payment_intent/created', 'payment_intent/completed', 'payment_intent/waiting_payer_authorization', 'payment_intent/error')")
|
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 CreateWebhook 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 CreateWebhook 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
|
+
"url": obj.get("url"),
|
94
|
+
"event": obj.get("event"),
|
95
|
+
"headers": obj.get("headers")
|
96
|
+
})
|
97
|
+
return _obj
|
98
|
+
|
99
|
+
|
@@ -0,0 +1,90 @@
|
|
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
|
23
|
+
from typing import Optional, Set
|
24
|
+
from typing_extensions import Self
|
25
|
+
|
26
|
+
class CredentialSelectOption(BaseModel):
|
27
|
+
"""
|
28
|
+
Option for ConnectorCredential of type select
|
29
|
+
""" # noqa: E501
|
30
|
+
value: StrictStr = Field(description="Value for the option")
|
31
|
+
label: StrictStr = Field(description="Label for the option")
|
32
|
+
__properties: ClassVar[List[str]] = ["value", "label"]
|
33
|
+
|
34
|
+
model_config = ConfigDict(
|
35
|
+
populate_by_name=True,
|
36
|
+
validate_assignment=True,
|
37
|
+
protected_namespaces=(),
|
38
|
+
)
|
39
|
+
|
40
|
+
|
41
|
+
def to_str(self) -> str:
|
42
|
+
"""Returns the string representation of the model using alias"""
|
43
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
44
|
+
|
45
|
+
def to_json(self) -> str:
|
46
|
+
"""Returns the JSON representation of the model using alias"""
|
47
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
48
|
+
return json.dumps(self.to_dict())
|
49
|
+
|
50
|
+
@classmethod
|
51
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
52
|
+
"""Create an instance of CredentialSelectOption from a JSON string"""
|
53
|
+
return cls.from_dict(json.loads(json_str))
|
54
|
+
|
55
|
+
def to_dict(self) -> Dict[str, Any]:
|
56
|
+
"""Return the dictionary representation of the model using alias.
|
57
|
+
|
58
|
+
This has the following differences from calling pydantic's
|
59
|
+
`self.model_dump(by_alias=True)`:
|
60
|
+
|
61
|
+
* `None` is only added to the output dict for nullable fields that
|
62
|
+
were set at model initialization. Other fields with value `None`
|
63
|
+
are ignored.
|
64
|
+
"""
|
65
|
+
excluded_fields: Set[str] = set([
|
66
|
+
])
|
67
|
+
|
68
|
+
_dict = self.model_dump(
|
69
|
+
by_alias=True,
|
70
|
+
exclude=excluded_fields,
|
71
|
+
exclude_none=True,
|
72
|
+
)
|
73
|
+
return _dict
|
74
|
+
|
75
|
+
@classmethod
|
76
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
77
|
+
"""Create an instance of CredentialSelectOption from a dict"""
|
78
|
+
if obj is None:
|
79
|
+
return None
|
80
|
+
|
81
|
+
if not isinstance(obj, dict):
|
82
|
+
return cls.model_validate(obj)
|
83
|
+
|
84
|
+
_obj = cls.model_validate({
|
85
|
+
"value": obj.get("value"),
|
86
|
+
"label": obj.get("label")
|
87
|
+
})
|
88
|
+
return _obj
|
89
|
+
|
90
|
+
|
@@ -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, StrictFloat, StrictInt, StrictStr
|
23
|
+
from typing import Any, ClassVar, Dict, List, Optional, Union
|
24
|
+
from typing import Optional, Set
|
25
|
+
from typing_extensions import Self
|
26
|
+
|
27
|
+
class CreditCardMetadata(BaseModel):
|
28
|
+
"""
|
29
|
+
Data of a transaction specific to credit card transactions
|
30
|
+
""" # noqa: E501
|
31
|
+
installment_number: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Number of the current installment of the purchase", alias="installmentNumber")
|
32
|
+
total_installments: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Total number of installments of the purchase", alias="totalInstallments")
|
33
|
+
total_amount: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Total amount of the purchase", alias="totalAmount")
|
34
|
+
purchase_date: Optional[datetime] = Field(default=None, description="Original Date of the purchase", alias="purchaseDate")
|
35
|
+
payee_mcc: Optional[StrictStr] = Field(default=None, description="Merchant Category Code of the merchant", alias="payeeMCC")
|
36
|
+
card_number: Optional[StrictStr] = Field(default=None, description="Credit Card Number associated with transaction, can be different from the account if its done by an additional or virtual card.", alias="cardNumber")
|
37
|
+
bill_id: Optional[StrictStr] = Field(default=None, description="Id of the bill associated to this transaction", alias="billId")
|
38
|
+
__properties: ClassVar[List[str]] = ["installmentNumber", "totalInstallments", "totalAmount", "purchaseDate", "payeeMCC", "cardNumber", "billId"]
|
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 CreditCardMetadata 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 CreditCardMetadata 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
|
+
"installmentNumber": obj.get("installmentNumber"),
|
92
|
+
"totalInstallments": obj.get("totalInstallments"),
|
93
|
+
"totalAmount": obj.get("totalAmount"),
|
94
|
+
"purchaseDate": obj.get("purchaseDate"),
|
95
|
+
"payeeMCC": obj.get("payeeMCC"),
|
96
|
+
"cardNumber": obj.get("cardNumber"),
|
97
|
+
"billId": obj.get("billId")
|
98
|
+
})
|
99
|
+
return _obj
|
100
|
+
|
101
|
+
|
@@ -0,0 +1,127 @@
|
|
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, field_validator
|
23
|
+
from typing import Any, ClassVar, Dict, List, Optional, Union
|
24
|
+
from typing import Optional, Set
|
25
|
+
from typing_extensions import Self
|
26
|
+
|
27
|
+
class CreditData(BaseModel):
|
28
|
+
"""
|
29
|
+
Credit account additional fields
|
30
|
+
""" # noqa: E501
|
31
|
+
level: Optional[StrictStr] = Field(default=None, description="Card level (Black, Signature)")
|
32
|
+
brand: Optional[StrictStr] = Field(default=None, description="Card Brand (Visa, Mastercard, Elo)")
|
33
|
+
balance_close_date: Optional[datetime] = Field(default=None, description="Date when the balance was closed", alias="balanceCloseDate")
|
34
|
+
balance_due_date: Optional[datetime] = Field(default=None, description="Date when the balance is dued", alias="balanceDueDate")
|
35
|
+
available_credit_limit: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Credit limit available to spent", alias="availableCreditLimit")
|
36
|
+
balance_foreign_currency: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Balance in USD", alias="balanceForeignCurrency")
|
37
|
+
minimum_payment: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Minimum payment due", alias="minimumPayment")
|
38
|
+
credit_limit: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Maximum amount that can be spent", alias="creditLimit")
|
39
|
+
status: Optional[StrictStr] = Field(default=None, description="Credit card status")
|
40
|
+
holder_type: Optional[StrictStr] = Field(default=None, description="Credit card holder type", alias="holderType")
|
41
|
+
__properties: ClassVar[List[str]] = ["level", "brand", "balanceCloseDate", "balanceDueDate", "availableCreditLimit", "balanceForeignCurrency", "minimumPayment", "creditLimit", "status", "holderType"]
|
42
|
+
|
43
|
+
@field_validator('status')
|
44
|
+
def status_validate_enum(cls, value):
|
45
|
+
"""Validates the enum"""
|
46
|
+
if value is None:
|
47
|
+
return value
|
48
|
+
|
49
|
+
if value not in set(['ACTIVE', 'BLOCKED', 'CANCELLED']):
|
50
|
+
raise ValueError("must be one of enum values ('ACTIVE', 'BLOCKED', 'CANCELLED')")
|
51
|
+
return value
|
52
|
+
|
53
|
+
@field_validator('holder_type')
|
54
|
+
def holder_type_validate_enum(cls, value):
|
55
|
+
"""Validates the enum"""
|
56
|
+
if value is None:
|
57
|
+
return value
|
58
|
+
|
59
|
+
if value not in set(['MAIN', 'ADDITIONAL']):
|
60
|
+
raise ValueError("must be one of enum values ('MAIN', 'ADDITIONAL')")
|
61
|
+
return value
|
62
|
+
|
63
|
+
model_config = ConfigDict(
|
64
|
+
populate_by_name=True,
|
65
|
+
validate_assignment=True,
|
66
|
+
protected_namespaces=(),
|
67
|
+
)
|
68
|
+
|
69
|
+
|
70
|
+
def to_str(self) -> str:
|
71
|
+
"""Returns the string representation of the model using alias"""
|
72
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
73
|
+
|
74
|
+
def to_json(self) -> str:
|
75
|
+
"""Returns the JSON representation of the model using alias"""
|
76
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
77
|
+
return json.dumps(self.to_dict())
|
78
|
+
|
79
|
+
@classmethod
|
80
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
81
|
+
"""Create an instance of CreditData from a JSON string"""
|
82
|
+
return cls.from_dict(json.loads(json_str))
|
83
|
+
|
84
|
+
def to_dict(self) -> Dict[str, Any]:
|
85
|
+
"""Return the dictionary representation of the model using alias.
|
86
|
+
|
87
|
+
This has the following differences from calling pydantic's
|
88
|
+
`self.model_dump(by_alias=True)`:
|
89
|
+
|
90
|
+
* `None` is only added to the output dict for nullable fields that
|
91
|
+
were set at model initialization. Other fields with value `None`
|
92
|
+
are ignored.
|
93
|
+
"""
|
94
|
+
excluded_fields: Set[str] = set([
|
95
|
+
])
|
96
|
+
|
97
|
+
_dict = self.model_dump(
|
98
|
+
by_alias=True,
|
99
|
+
exclude=excluded_fields,
|
100
|
+
exclude_none=True,
|
101
|
+
)
|
102
|
+
return _dict
|
103
|
+
|
104
|
+
@classmethod
|
105
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
106
|
+
"""Create an instance of CreditData from a dict"""
|
107
|
+
if obj is None:
|
108
|
+
return None
|
109
|
+
|
110
|
+
if not isinstance(obj, dict):
|
111
|
+
return cls.model_validate(obj)
|
112
|
+
|
113
|
+
_obj = cls.model_validate({
|
114
|
+
"level": obj.get("level"),
|
115
|
+
"brand": obj.get("brand"),
|
116
|
+
"balanceCloseDate": obj.get("balanceCloseDate"),
|
117
|
+
"balanceDueDate": obj.get("balanceDueDate"),
|
118
|
+
"availableCreditLimit": obj.get("availableCreditLimit"),
|
119
|
+
"balanceForeignCurrency": obj.get("balanceForeignCurrency"),
|
120
|
+
"minimumPayment": obj.get("minimumPayment"),
|
121
|
+
"creditLimit": obj.get("creditLimit"),
|
122
|
+
"status": obj.get("status"),
|
123
|
+
"holderType": obj.get("holderType")
|
124
|
+
})
|
125
|
+
return _obj
|
126
|
+
|
127
|
+
|