pluggy-sdk 1.0.0.post16__py3-none-any.whl → 1.0.0.post18__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 +9 -3
- pluggy_sdk/api/__init__.py +1 -2
- pluggy_sdk/api/payment_request_api.py +804 -0
- pluggy_sdk/api/payment_schedule_api.py +3 -3
- pluggy_sdk/api/smart_account_api.py +572 -0
- pluggy_sdk/api/smart_transfer_api.py +1396 -0
- pluggy_sdk/api_client.py +8 -1
- pluggy_sdk/configuration.py +1 -1
- pluggy_sdk/models/__init__.py +7 -0
- pluggy_sdk/models/accounts_list200_response.py +3 -3
- pluggy_sdk/models/acquirer_receivable.py +3 -3
- pluggy_sdk/models/acquirer_sale.py +3 -3
- pluggy_sdk/models/acquirer_sale_data.py +3 -3
- pluggy_sdk/models/aggregated_portfolio_response.py +3 -3
- pluggy_sdk/models/benefit_response.py +3 -3
- pluggy_sdk/models/benefits_list200_response.py +3 -3
- pluggy_sdk/models/bill.py +3 -3
- pluggy_sdk/models/bills_list200_response.py +3 -3
- pluggy_sdk/models/bulk_payment.py +3 -3
- pluggy_sdk/models/bulk_payments_list200_response.py +3 -3
- pluggy_sdk/models/connector.py +3 -3
- pluggy_sdk/models/connector_credential.py +3 -3
- pluggy_sdk/models/connector_list_response.py +3 -3
- pluggy_sdk/models/create_smart_transfer_payment.py +96 -0
- pluggy_sdk/models/create_smart_transfer_preauthorization.py +104 -0
- pluggy_sdk/models/identity_response.py +12 -12
- pluggy_sdk/models/income_reports_response.py +3 -3
- pluggy_sdk/models/investment.py +3 -3
- pluggy_sdk/models/investments_list200_response.py +3 -3
- pluggy_sdk/models/item_creation_error_response.py +3 -3
- pluggy_sdk/models/loan.py +12 -12
- pluggy_sdk/models/loan_installments.py +3 -3
- pluggy_sdk/models/loan_payment_release_over_parcel.py +6 -6
- pluggy_sdk/models/loan_payments.py +3 -3
- pluggy_sdk/models/loans_list200_response.py +3 -3
- pluggy_sdk/models/monthly_portfolio_response.py +3 -3
- pluggy_sdk/models/page_response_acquirer_anticipations.py +3 -3
- pluggy_sdk/models/page_response_acquirer_receivables.py +3 -3
- pluggy_sdk/models/page_response_acquirer_sales.py +3 -3
- pluggy_sdk/models/page_response_category_rules.py +3 -3
- pluggy_sdk/models/page_response_consents.py +3 -3
- pluggy_sdk/models/page_response_investment_transactions.py +3 -3
- pluggy_sdk/models/page_response_transactions.py +3 -3
- pluggy_sdk/models/parameter_validation_response.py +3 -3
- pluggy_sdk/models/payment_customers_list200_response.py +3 -3
- pluggy_sdk/models/payment_intents_list200_response.py +3 -3
- pluggy_sdk/models/payment_recipients_institution_list200_response.py +3 -3
- pluggy_sdk/models/payment_recipients_list200_response.py +3 -3
- pluggy_sdk/models/payment_request_receipt_list200_response.py +3 -3
- pluggy_sdk/models/payment_requests_list200_response.py +3 -3
- pluggy_sdk/models/payment_schedules_list200_response.py +3 -3
- pluggy_sdk/models/smart_accounts_list200_response.py +3 -3
- pluggy_sdk/models/smart_tranfers_preauthorizations_list200_response.py +102 -0
- pluggy_sdk/models/smart_transfer_callback_urls.py +90 -0
- pluggy_sdk/models/smart_transfer_payment.py +116 -0
- pluggy_sdk/models/smart_transfer_preauthorization.py +128 -0
- pluggy_sdk/models/smart_transfer_preauthorization_parameter.py +90 -0
- pluggy_sdk/models/status_detail_product.py +3 -3
- pluggy_sdk/models/webhooks_list200_response.py +3 -3
- {pluggy_sdk-1.0.0.post16.dist-info → pluggy_sdk-1.0.0.post18.dist-info}/METADATA +20 -8
- {pluggy_sdk-1.0.0.post16.dist-info → pluggy_sdk-1.0.0.post18.dist-info}/RECORD +63 -55
- {pluggy_sdk-1.0.0.post16.dist-info → pluggy_sdk-1.0.0.post18.dist-info}/WHEEL +1 -1
- {pluggy_sdk-1.0.0.post16.dist-info → pluggy_sdk-1.0.0.post18.dist-info}/top_level.txt +0 -0
@@ -75,16 +75,16 @@ class LoanPaymentReleaseOverParcel(BaseModel):
|
|
75
75
|
# override the default output from pydantic by calling `to_dict()` of each item in fees (list)
|
76
76
|
_items = []
|
77
77
|
if self.fees:
|
78
|
-
for
|
79
|
-
if
|
80
|
-
_items.append(
|
78
|
+
for _item_fees in self.fees:
|
79
|
+
if _item_fees:
|
80
|
+
_items.append(_item_fees.to_dict())
|
81
81
|
_dict['fees'] = _items
|
82
82
|
# override the default output from pydantic by calling `to_dict()` of each item in charges (list)
|
83
83
|
_items = []
|
84
84
|
if self.charges:
|
85
|
-
for
|
86
|
-
if
|
87
|
-
_items.append(
|
85
|
+
for _item_charges in self.charges:
|
86
|
+
if _item_charges:
|
87
|
+
_items.append(_item_charges.to_dict())
|
88
88
|
_dict['charges'] = _items
|
89
89
|
return _dict
|
90
90
|
|
@@ -74,9 +74,9 @@ class LoanPayments(BaseModel):
|
|
74
74
|
# override the default output from pydantic by calling `to_dict()` of each item in releases (list)
|
75
75
|
_items = []
|
76
76
|
if self.releases:
|
77
|
-
for
|
78
|
-
if
|
79
|
-
_items.append(
|
77
|
+
for _item_releases in self.releases:
|
78
|
+
if _item_releases:
|
79
|
+
_items.append(_item_releases.to_dict())
|
80
80
|
_dict['releases'] = _items
|
81
81
|
return _dict
|
82
82
|
|
@@ -76,9 +76,9 @@ class LoansList200Response(BaseModel):
|
|
76
76
|
# override the default output from pydantic by calling `to_dict()` of each item in results (list)
|
77
77
|
_items = []
|
78
78
|
if self.results:
|
79
|
-
for
|
80
|
-
if
|
81
|
-
_items.append(
|
79
|
+
for _item_results in self.results:
|
80
|
+
if _item_results:
|
81
|
+
_items.append(_item_results.to_dict())
|
82
82
|
_dict['results'] = _items
|
83
83
|
return _dict
|
84
84
|
|
@@ -76,9 +76,9 @@ class MonthlyPortfolioResponse(BaseModel):
|
|
76
76
|
# override the default output from pydantic by calling `to_dict()` of each item in results (list)
|
77
77
|
_items = []
|
78
78
|
if self.results:
|
79
|
-
for
|
80
|
-
if
|
81
|
-
_items.append(
|
79
|
+
for _item_results in self.results:
|
80
|
+
if _item_results:
|
81
|
+
_items.append(_item_results.to_dict())
|
82
82
|
_dict['results'] = _items
|
83
83
|
return _dict
|
84
84
|
|
@@ -76,9 +76,9 @@ class PageResponseAcquirerAnticipations(BaseModel):
|
|
76
76
|
# override the default output from pydantic by calling `to_dict()` of each item in results (list)
|
77
77
|
_items = []
|
78
78
|
if self.results:
|
79
|
-
for
|
80
|
-
if
|
81
|
-
_items.append(
|
79
|
+
for _item_results in self.results:
|
80
|
+
if _item_results:
|
81
|
+
_items.append(_item_results.to_dict())
|
82
82
|
_dict['results'] = _items
|
83
83
|
return _dict
|
84
84
|
|
@@ -76,9 +76,9 @@ class PageResponseAcquirerReceivables(BaseModel):
|
|
76
76
|
# override the default output from pydantic by calling `to_dict()` of each item in results (list)
|
77
77
|
_items = []
|
78
78
|
if self.results:
|
79
|
-
for
|
80
|
-
if
|
81
|
-
_items.append(
|
79
|
+
for _item_results in self.results:
|
80
|
+
if _item_results:
|
81
|
+
_items.append(_item_results.to_dict())
|
82
82
|
_dict['results'] = _items
|
83
83
|
return _dict
|
84
84
|
|
@@ -76,9 +76,9 @@ class PageResponseAcquirerSales(BaseModel):
|
|
76
76
|
# override the default output from pydantic by calling `to_dict()` of each item in results (list)
|
77
77
|
_items = []
|
78
78
|
if self.results:
|
79
|
-
for
|
80
|
-
if
|
81
|
-
_items.append(
|
79
|
+
for _item_results in self.results:
|
80
|
+
if _item_results:
|
81
|
+
_items.append(_item_results.to_dict())
|
82
82
|
_dict['results'] = _items
|
83
83
|
return _dict
|
84
84
|
|
@@ -76,9 +76,9 @@ class PageResponseCategoryRules(BaseModel):
|
|
76
76
|
# override the default output from pydantic by calling `to_dict()` of each item in results (list)
|
77
77
|
_items = []
|
78
78
|
if self.results:
|
79
|
-
for
|
80
|
-
if
|
81
|
-
_items.append(
|
79
|
+
for _item_results in self.results:
|
80
|
+
if _item_results:
|
81
|
+
_items.append(_item_results.to_dict())
|
82
82
|
_dict['results'] = _items
|
83
83
|
return _dict
|
84
84
|
|
@@ -76,9 +76,9 @@ class PageResponseConsents(BaseModel):
|
|
76
76
|
# override the default output from pydantic by calling `to_dict()` of each item in results (list)
|
77
77
|
_items = []
|
78
78
|
if self.results:
|
79
|
-
for
|
80
|
-
if
|
81
|
-
_items.append(
|
79
|
+
for _item_results in self.results:
|
80
|
+
if _item_results:
|
81
|
+
_items.append(_item_results.to_dict())
|
82
82
|
_dict['results'] = _items
|
83
83
|
return _dict
|
84
84
|
|
@@ -76,9 +76,9 @@ class PageResponseInvestmentTransactions(BaseModel):
|
|
76
76
|
# override the default output from pydantic by calling `to_dict()` of each item in results (list)
|
77
77
|
_items = []
|
78
78
|
if self.results:
|
79
|
-
for
|
80
|
-
if
|
81
|
-
_items.append(
|
79
|
+
for _item_results in self.results:
|
80
|
+
if _item_results:
|
81
|
+
_items.append(_item_results.to_dict())
|
82
82
|
_dict['results'] = _items
|
83
83
|
return _dict
|
84
84
|
|
@@ -76,9 +76,9 @@ class PageResponseTransactions(BaseModel):
|
|
76
76
|
# override the default output from pydantic by calling `to_dict()` of each item in results (list)
|
77
77
|
_items = []
|
78
78
|
if self.results:
|
79
|
-
for
|
80
|
-
if
|
81
|
-
_items.append(
|
79
|
+
for _item_results in self.results:
|
80
|
+
if _item_results:
|
81
|
+
_items.append(_item_results.to_dict())
|
82
82
|
_dict['results'] = _items
|
83
83
|
return _dict
|
84
84
|
|
@@ -74,9 +74,9 @@ class ParameterValidationResponse(BaseModel):
|
|
74
74
|
# override the default output from pydantic by calling `to_dict()` of each item in errors (list)
|
75
75
|
_items = []
|
76
76
|
if self.errors:
|
77
|
-
for
|
78
|
-
if
|
79
|
-
_items.append(
|
77
|
+
for _item_errors in self.errors:
|
78
|
+
if _item_errors:
|
79
|
+
_items.append(_item_errors.to_dict())
|
80
80
|
_dict['errors'] = _items
|
81
81
|
return _dict
|
82
82
|
|
@@ -76,9 +76,9 @@ class PaymentCustomersList200Response(BaseModel):
|
|
76
76
|
# override the default output from pydantic by calling `to_dict()` of each item in results (list)
|
77
77
|
_items = []
|
78
78
|
if self.results:
|
79
|
-
for
|
80
|
-
if
|
81
|
-
_items.append(
|
79
|
+
for _item_results in self.results:
|
80
|
+
if _item_results:
|
81
|
+
_items.append(_item_results.to_dict())
|
82
82
|
_dict['results'] = _items
|
83
83
|
return _dict
|
84
84
|
|
@@ -76,9 +76,9 @@ class PaymentIntentsList200Response(BaseModel):
|
|
76
76
|
# override the default output from pydantic by calling `to_dict()` of each item in results (list)
|
77
77
|
_items = []
|
78
78
|
if self.results:
|
79
|
-
for
|
80
|
-
if
|
81
|
-
_items.append(
|
79
|
+
for _item_results in self.results:
|
80
|
+
if _item_results:
|
81
|
+
_items.append(_item_results.to_dict())
|
82
82
|
_dict['results'] = _items
|
83
83
|
return _dict
|
84
84
|
|
@@ -76,9 +76,9 @@ class PaymentRecipientsInstitutionList200Response(BaseModel):
|
|
76
76
|
# override the default output from pydantic by calling `to_dict()` of each item in results (list)
|
77
77
|
_items = []
|
78
78
|
if self.results:
|
79
|
-
for
|
80
|
-
if
|
81
|
-
_items.append(
|
79
|
+
for _item_results in self.results:
|
80
|
+
if _item_results:
|
81
|
+
_items.append(_item_results.to_dict())
|
82
82
|
_dict['results'] = _items
|
83
83
|
return _dict
|
84
84
|
|
@@ -76,9 +76,9 @@ class PaymentRecipientsList200Response(BaseModel):
|
|
76
76
|
# override the default output from pydantic by calling `to_dict()` of each item in results (list)
|
77
77
|
_items = []
|
78
78
|
if self.results:
|
79
|
-
for
|
80
|
-
if
|
81
|
-
_items.append(
|
79
|
+
for _item_results in self.results:
|
80
|
+
if _item_results:
|
81
|
+
_items.append(_item_results.to_dict())
|
82
82
|
_dict['results'] = _items
|
83
83
|
return _dict
|
84
84
|
|
@@ -76,9 +76,9 @@ class PaymentRequestReceiptList200Response(BaseModel):
|
|
76
76
|
# override the default output from pydantic by calling `to_dict()` of each item in results (list)
|
77
77
|
_items = []
|
78
78
|
if self.results:
|
79
|
-
for
|
80
|
-
if
|
81
|
-
_items.append(
|
79
|
+
for _item_results in self.results:
|
80
|
+
if _item_results:
|
81
|
+
_items.append(_item_results.to_dict())
|
82
82
|
_dict['results'] = _items
|
83
83
|
return _dict
|
84
84
|
|
@@ -76,9 +76,9 @@ class PaymentRequestsList200Response(BaseModel):
|
|
76
76
|
# override the default output from pydantic by calling `to_dict()` of each item in results (list)
|
77
77
|
_items = []
|
78
78
|
if self.results:
|
79
|
-
for
|
80
|
-
if
|
81
|
-
_items.append(
|
79
|
+
for _item_results in self.results:
|
80
|
+
if _item_results:
|
81
|
+
_items.append(_item_results.to_dict())
|
82
82
|
_dict['results'] = _items
|
83
83
|
return _dict
|
84
84
|
|
@@ -76,9 +76,9 @@ class PaymentSchedulesList200Response(BaseModel):
|
|
76
76
|
# override the default output from pydantic by calling `to_dict()` of each item in results (list)
|
77
77
|
_items = []
|
78
78
|
if self.results:
|
79
|
-
for
|
80
|
-
if
|
81
|
-
_items.append(
|
79
|
+
for _item_results in self.results:
|
80
|
+
if _item_results:
|
81
|
+
_items.append(_item_results.to_dict())
|
82
82
|
_dict['results'] = _items
|
83
83
|
return _dict
|
84
84
|
|
@@ -76,9 +76,9 @@ class SmartAccountsList200Response(BaseModel):
|
|
76
76
|
# override the default output from pydantic by calling `to_dict()` of each item in results (list)
|
77
77
|
_items = []
|
78
78
|
if self.results:
|
79
|
-
for
|
80
|
-
if
|
81
|
-
_items.append(
|
79
|
+
for _item_results in self.results:
|
80
|
+
if _item_results:
|
81
|
+
_items.append(_item_results.to_dict())
|
82
82
|
_dict['results'] = _items
|
83
83
|
return _dict
|
84
84
|
|
@@ -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.smart_transfer_preauthorization import SmartTransferPreauthorization
|
24
|
+
from typing import Optional, Set
|
25
|
+
from typing_extensions import Self
|
26
|
+
|
27
|
+
class SmartTranfersPreauthorizationsList200Response(BaseModel):
|
28
|
+
"""
|
29
|
+
SmartTranfersPreauthorizationsList200Response
|
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[SmartTransferPreauthorization]] = Field(default=None, description="List of preauthorizations")
|
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 SmartTranfersPreauthorizationsList200Response from a JSON string"""
|
56
|
+
return cls.from_dict(json.loads(json_str))
|
57
|
+
|
58
|
+
def to_dict(self) -> Dict[str, Any]:
|
59
|
+
"""Return the dictionary representation of the model using alias.
|
60
|
+
|
61
|
+
This has the following differences from calling pydantic's
|
62
|
+
`self.model_dump(by_alias=True)`:
|
63
|
+
|
64
|
+
* `None` is only added to the output dict for nullable fields that
|
65
|
+
were set at model initialization. Other fields with value `None`
|
66
|
+
are ignored.
|
67
|
+
"""
|
68
|
+
excluded_fields: Set[str] = set([
|
69
|
+
])
|
70
|
+
|
71
|
+
_dict = self.model_dump(
|
72
|
+
by_alias=True,
|
73
|
+
exclude=excluded_fields,
|
74
|
+
exclude_none=True,
|
75
|
+
)
|
76
|
+
# override the default output from pydantic by calling `to_dict()` of each item in results (list)
|
77
|
+
_items = []
|
78
|
+
if self.results:
|
79
|
+
for _item_results in self.results:
|
80
|
+
if _item_results:
|
81
|
+
_items.append(_item_results.to_dict())
|
82
|
+
_dict['results'] = _items
|
83
|
+
return _dict
|
84
|
+
|
85
|
+
@classmethod
|
86
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
87
|
+
"""Create an instance of SmartTranfersPreauthorizationsList200Response 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": [SmartTransferPreauthorization.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,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, Optional
|
23
|
+
from typing import Optional, Set
|
24
|
+
from typing_extensions import Self
|
25
|
+
|
26
|
+
class SmartTransferCallbackUrls(BaseModel):
|
27
|
+
"""
|
28
|
+
Redirect urls after the preauthorization flow was completed or ended in error status
|
29
|
+
""" # noqa: E501
|
30
|
+
success: Optional[StrictStr] = Field(default=None, description="Url to be redirected after the preauthorization was completed")
|
31
|
+
error: Optional[StrictStr] = Field(default=None, description="Url to be redirected after the preauthorization ended in error status")
|
32
|
+
__properties: ClassVar[List[str]] = ["success", "error"]
|
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 SmartTransferCallbackUrls 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 SmartTransferCallbackUrls 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
|
+
"success": obj.get("success"),
|
86
|
+
"error": obj.get("error")
|
87
|
+
})
|
88
|
+
return _obj
|
89
|
+
|
90
|
+
|
@@ -0,0 +1,116 @@
|
|
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 pluggy_sdk.models.payment_receipt import PaymentReceipt
|
25
|
+
from typing import Optional, Set
|
26
|
+
from typing_extensions import Self
|
27
|
+
|
28
|
+
class SmartTransferPayment(BaseModel):
|
29
|
+
"""
|
30
|
+
Smart transfer payment
|
31
|
+
""" # noqa: E501
|
32
|
+
id: StrictStr = Field(description="Payment primary identifier")
|
33
|
+
preauthorization_id: StrictStr = Field(description="Payment primary identifier", alias="preauthorizationId")
|
34
|
+
status: StrictStr = Field(description="Payment status")
|
35
|
+
amount: Union[StrictFloat, StrictInt] = Field(description="Payment amount")
|
36
|
+
description: Optional[StrictStr] = Field(default=None, description="Payment description")
|
37
|
+
recipient: PaymentReceipt
|
38
|
+
client_payment_id: Optional[StrictStr] = Field(default=None, description="Client payment identifier", alias="clientPaymentId")
|
39
|
+
created_at: datetime = Field(description="Date when the payemnt was created", alias="createdAt")
|
40
|
+
updated_at: datetime = Field(description="Date when the payment was updated", alias="updatedAt")
|
41
|
+
__properties: ClassVar[List[str]] = ["id", "preauthorizationId", "status", "amount", "description", "recipient", "clientPaymentId", "createdAt", "updatedAt"]
|
42
|
+
|
43
|
+
@field_validator('status')
|
44
|
+
def status_validate_enum(cls, value):
|
45
|
+
"""Validates the enum"""
|
46
|
+
if value not in set(['PAYMENT_REJECTED', 'ERROR', 'CANCELED', 'CONSENT_REJECTED', 'CONSENT_AUTHORIZED', 'PAYMENT_PENDING', 'PAYMENT_PARTIALLY_ACCEPTED', 'PAYMENT_SETTLEMENT_PROCESSING', 'PAYMENT_SETTLEMENT_DEBTOR_ACCOUNT', 'PAYMENT_COMPLETED']):
|
47
|
+
raise ValueError("must be one of enum values ('PAYMENT_REJECTED', 'ERROR', 'CANCELED', 'CONSENT_REJECTED', 'CONSENT_AUTHORIZED', 'PAYMENT_PENDING', 'PAYMENT_PARTIALLY_ACCEPTED', 'PAYMENT_SETTLEMENT_PROCESSING', 'PAYMENT_SETTLEMENT_DEBTOR_ACCOUNT', 'PAYMENT_COMPLETED')")
|
48
|
+
return value
|
49
|
+
|
50
|
+
model_config = ConfigDict(
|
51
|
+
populate_by_name=True,
|
52
|
+
validate_assignment=True,
|
53
|
+
protected_namespaces=(),
|
54
|
+
)
|
55
|
+
|
56
|
+
|
57
|
+
def to_str(self) -> str:
|
58
|
+
"""Returns the string representation of the model using alias"""
|
59
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
60
|
+
|
61
|
+
def to_json(self) -> str:
|
62
|
+
"""Returns the JSON representation of the model using alias"""
|
63
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
64
|
+
return json.dumps(self.to_dict())
|
65
|
+
|
66
|
+
@classmethod
|
67
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
68
|
+
"""Create an instance of SmartTransferPayment from a JSON string"""
|
69
|
+
return cls.from_dict(json.loads(json_str))
|
70
|
+
|
71
|
+
def to_dict(self) -> Dict[str, Any]:
|
72
|
+
"""Return the dictionary representation of the model using alias.
|
73
|
+
|
74
|
+
This has the following differences from calling pydantic's
|
75
|
+
`self.model_dump(by_alias=True)`:
|
76
|
+
|
77
|
+
* `None` is only added to the output dict for nullable fields that
|
78
|
+
were set at model initialization. Other fields with value `None`
|
79
|
+
are ignored.
|
80
|
+
"""
|
81
|
+
excluded_fields: Set[str] = set([
|
82
|
+
])
|
83
|
+
|
84
|
+
_dict = self.model_dump(
|
85
|
+
by_alias=True,
|
86
|
+
exclude=excluded_fields,
|
87
|
+
exclude_none=True,
|
88
|
+
)
|
89
|
+
# override the default output from pydantic by calling `to_dict()` of recipient
|
90
|
+
if self.recipient:
|
91
|
+
_dict['recipient'] = self.recipient.to_dict()
|
92
|
+
return _dict
|
93
|
+
|
94
|
+
@classmethod
|
95
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
96
|
+
"""Create an instance of SmartTransferPayment from a dict"""
|
97
|
+
if obj is None:
|
98
|
+
return None
|
99
|
+
|
100
|
+
if not isinstance(obj, dict):
|
101
|
+
return cls.model_validate(obj)
|
102
|
+
|
103
|
+
_obj = cls.model_validate({
|
104
|
+
"id": obj.get("id"),
|
105
|
+
"preauthorizationId": obj.get("preauthorizationId"),
|
106
|
+
"status": obj.get("status"),
|
107
|
+
"amount": obj.get("amount"),
|
108
|
+
"description": obj.get("description"),
|
109
|
+
"recipient": PaymentReceipt.from_dict(obj["recipient"]) if obj.get("recipient") is not None else None,
|
110
|
+
"clientPaymentId": obj.get("clientPaymentId"),
|
111
|
+
"createdAt": obj.get("createdAt"),
|
112
|
+
"updatedAt": obj.get("updatedAt")
|
113
|
+
})
|
114
|
+
return _obj
|
115
|
+
|
116
|
+
|