pluggy-sdk 1.0.0.post11__py3-none-any.whl → 1.0.0.post13__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 +18 -1
- pluggy_sdk/api/__init__.py +2 -0
- pluggy_sdk/api/benefit_api.py +561 -0
- pluggy_sdk/api/consent_api.py +570 -0
- pluggy_sdk/api/payment_request_api.py +259 -0
- pluggy_sdk/api/payroll_loan_api.py +561 -0
- pluggy_sdk/api_client.py +1 -1
- pluggy_sdk/configuration.py +1 -1
- pluggy_sdk/models/__init__.py +15 -0
- pluggy_sdk/models/benefit_response.py +118 -0
- pluggy_sdk/models/benefit_response_paying_institution.py +94 -0
- pluggy_sdk/models/benefits_list200_response.py +102 -0
- pluggy_sdk/models/connector.py +2 -2
- pluggy_sdk/models/consent.py +120 -0
- pluggy_sdk/models/create_item.py +2 -2
- pluggy_sdk/models/create_payment_request.py +8 -2
- pluggy_sdk/models/item.py +2 -2
- pluggy_sdk/models/page_response_consents.py +102 -0
- pluggy_sdk/models/payment_recipient_account.py +2 -9
- pluggy_sdk/models/payment_request.py +10 -4
- pluggy_sdk/models/payment_request_schedule.py +183 -0
- pluggy_sdk/models/payment_schedules_list200_response.py +102 -0
- pluggy_sdk/models/payroll_loan.py +121 -0
- pluggy_sdk/models/payroll_loan_client.py +102 -0
- pluggy_sdk/models/payroll_loan_response.py +125 -0
- pluggy_sdk/models/payroll_loan_response_client.py +102 -0
- pluggy_sdk/models/payroll_loans_list200_response.py +102 -0
- pluggy_sdk/models/schedule_payment.py +102 -0
- pluggy_sdk/models/schedule_type_custom.py +100 -0
- pluggy_sdk/models/schedule_type_daily.py +101 -0
- pluggy_sdk/models/schedule_type_monthly.py +103 -0
- pluggy_sdk/models/schedule_type_single.py +98 -0
- pluggy_sdk/models/schedule_type_weekly.py +110 -0
- pluggy_sdk/models/update_item.py +2 -2
- {pluggy_sdk-1.0.0.post11.dist-info → pluggy_sdk-1.0.0.post13.dist-info}/METADATA +22 -2
- {pluggy_sdk-1.0.0.post11.dist-info → pluggy_sdk-1.0.0.post13.dist-info}/RECORD +38 -17
- {pluggy_sdk-1.0.0.post11.dist-info → pluggy_sdk-1.0.0.post13.dist-info}/WHEEL +1 -1
- {pluggy_sdk-1.0.0.post11.dist-info → pluggy_sdk-1.0.0.post13.dist-info}/top_level.txt +0 -0
@@ -0,0 +1,118 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
|
3
|
+
"""
|
4
|
+
Pluggy API
|
5
|
+
|
6
|
+
Pluggy's main API to review data and execute connectors
|
7
|
+
|
8
|
+
The version of the OpenAPI document: 1.0.0
|
9
|
+
Contact: hello@pluggy.ai
|
10
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
11
|
+
|
12
|
+
Do not edit the class manually.
|
13
|
+
""" # noqa: E501
|
14
|
+
|
15
|
+
|
16
|
+
from __future__ import annotations
|
17
|
+
import pprint
|
18
|
+
import re # noqa: F401
|
19
|
+
import json
|
20
|
+
|
21
|
+
from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt, StrictStr
|
22
|
+
from typing import Any, ClassVar, Dict, List, Optional, Union
|
23
|
+
from pluggy_sdk.models.benefit_response_paying_institution import BenefitResponsePayingInstitution
|
24
|
+
from pluggy_sdk.models.payroll_loan import PayrollLoan
|
25
|
+
from typing import Optional, Set
|
26
|
+
from typing_extensions import Self
|
27
|
+
|
28
|
+
class BenefitResponse(BaseModel):
|
29
|
+
"""
|
30
|
+
Response with information related to a benefit
|
31
|
+
""" # noqa: E501
|
32
|
+
id: StrictStr = Field(description="Primary identifier")
|
33
|
+
item_id: StrictStr = Field(description="Identifier of the item linked to the loan", alias="itemId")
|
34
|
+
beneficiary_name: StrictStr = Field(description="Beneficiary name", alias="beneficiaryName")
|
35
|
+
available_margin_value: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Available margin value", alias="availableMarginValue")
|
36
|
+
margin_base_value: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Base margin value", alias="marginBaseValue")
|
37
|
+
payroll_deductible_available_margin_value: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Payroll deductible available margin value", alias="payrollDeductibleAvailableMarginValue")
|
38
|
+
used_margin_value: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Used margin value", alias="usedMarginValue")
|
39
|
+
reserved_margin_value: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Reserved margin value", alias="reservedMarginValue")
|
40
|
+
paying_institution: Optional[BenefitResponsePayingInstitution] = Field(default=None, alias="payingInstitution")
|
41
|
+
payroll_loans: Optional[List[PayrollLoan]] = Field(default=None, description="List of payroll loans", alias="payrollLoans")
|
42
|
+
__properties: ClassVar[List[str]] = ["id", "itemId", "beneficiaryName", "availableMarginValue", "marginBaseValue", "payrollDeductibleAvailableMarginValue", "usedMarginValue", "reservedMarginValue", "payingInstitution", "payrollLoans"]
|
43
|
+
|
44
|
+
model_config = ConfigDict(
|
45
|
+
populate_by_name=True,
|
46
|
+
validate_assignment=True,
|
47
|
+
protected_namespaces=(),
|
48
|
+
)
|
49
|
+
|
50
|
+
|
51
|
+
def to_str(self) -> str:
|
52
|
+
"""Returns the string representation of the model using alias"""
|
53
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
54
|
+
|
55
|
+
def to_json(self) -> str:
|
56
|
+
"""Returns the JSON representation of the model using alias"""
|
57
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
58
|
+
return json.dumps(self.to_dict())
|
59
|
+
|
60
|
+
@classmethod
|
61
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
62
|
+
"""Create an instance of BenefitResponse from a JSON string"""
|
63
|
+
return cls.from_dict(json.loads(json_str))
|
64
|
+
|
65
|
+
def to_dict(self) -> Dict[str, Any]:
|
66
|
+
"""Return the dictionary representation of the model using alias.
|
67
|
+
|
68
|
+
This has the following differences from calling pydantic's
|
69
|
+
`self.model_dump(by_alias=True)`:
|
70
|
+
|
71
|
+
* `None` is only added to the output dict for nullable fields that
|
72
|
+
were set at model initialization. Other fields with value `None`
|
73
|
+
are ignored.
|
74
|
+
"""
|
75
|
+
excluded_fields: Set[str] = set([
|
76
|
+
])
|
77
|
+
|
78
|
+
_dict = self.model_dump(
|
79
|
+
by_alias=True,
|
80
|
+
exclude=excluded_fields,
|
81
|
+
exclude_none=True,
|
82
|
+
)
|
83
|
+
# override the default output from pydantic by calling `to_dict()` of paying_institution
|
84
|
+
if self.paying_institution:
|
85
|
+
_dict['payingInstitution'] = self.paying_institution.to_dict()
|
86
|
+
# override the default output from pydantic by calling `to_dict()` of each item in payroll_loans (list)
|
87
|
+
_items = []
|
88
|
+
if self.payroll_loans:
|
89
|
+
for _item in self.payroll_loans:
|
90
|
+
if _item:
|
91
|
+
_items.append(_item.to_dict())
|
92
|
+
_dict['payrollLoans'] = _items
|
93
|
+
return _dict
|
94
|
+
|
95
|
+
@classmethod
|
96
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
97
|
+
"""Create an instance of BenefitResponse from a dict"""
|
98
|
+
if obj is None:
|
99
|
+
return None
|
100
|
+
|
101
|
+
if not isinstance(obj, dict):
|
102
|
+
return cls.model_validate(obj)
|
103
|
+
|
104
|
+
_obj = cls.model_validate({
|
105
|
+
"id": obj.get("id"),
|
106
|
+
"itemId": obj.get("itemId"),
|
107
|
+
"beneficiaryName": obj.get("beneficiaryName"),
|
108
|
+
"availableMarginValue": obj.get("availableMarginValue"),
|
109
|
+
"marginBaseValue": obj.get("marginBaseValue"),
|
110
|
+
"payrollDeductibleAvailableMarginValue": obj.get("payrollDeductibleAvailableMarginValue"),
|
111
|
+
"usedMarginValue": obj.get("usedMarginValue"),
|
112
|
+
"reservedMarginValue": obj.get("reservedMarginValue"),
|
113
|
+
"payingInstitution": BenefitResponsePayingInstitution.from_dict(obj["payingInstitution"]) if obj.get("payingInstitution") is not None else None,
|
114
|
+
"payrollLoans": [PayrollLoan.from_dict(_item) for _item in obj["payrollLoans"]] if obj.get("payrollLoans") is not None else None
|
115
|
+
})
|
116
|
+
return _obj
|
117
|
+
|
118
|
+
|
@@ -0,0 +1,94 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
|
3
|
+
"""
|
4
|
+
Pluggy API
|
5
|
+
|
6
|
+
Pluggy's main API to review data and execute connectors
|
7
|
+
|
8
|
+
The version of the OpenAPI document: 1.0.0
|
9
|
+
Contact: hello@pluggy.ai
|
10
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
11
|
+
|
12
|
+
Do not edit the class manually.
|
13
|
+
""" # noqa: E501
|
14
|
+
|
15
|
+
|
16
|
+
from __future__ import annotations
|
17
|
+
import pprint
|
18
|
+
import re # noqa: F401
|
19
|
+
import json
|
20
|
+
|
21
|
+
from pydantic import BaseModel, ConfigDict, Field, StrictStr
|
22
|
+
from typing import Any, ClassVar, Dict, List, Optional
|
23
|
+
from typing import Optional, Set
|
24
|
+
from typing_extensions import Self
|
25
|
+
|
26
|
+
class BenefitResponsePayingInstitution(BaseModel):
|
27
|
+
"""
|
28
|
+
Paying institution information
|
29
|
+
""" # noqa: E501
|
30
|
+
code: Optional[StrictStr] = Field(default=None, description="Paying institution code")
|
31
|
+
name: Optional[StrictStr] = Field(default=None, description="Paying institution name")
|
32
|
+
agency: Optional[StrictStr] = Field(default=None, description="Paying institution agency")
|
33
|
+
account: Optional[StrictStr] = Field(default=None, description="Paying institution account")
|
34
|
+
__properties: ClassVar[List[str]] = ["code", "name", "agency", "account"]
|
35
|
+
|
36
|
+
model_config = ConfigDict(
|
37
|
+
populate_by_name=True,
|
38
|
+
validate_assignment=True,
|
39
|
+
protected_namespaces=(),
|
40
|
+
)
|
41
|
+
|
42
|
+
|
43
|
+
def to_str(self) -> str:
|
44
|
+
"""Returns the string representation of the model using alias"""
|
45
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
46
|
+
|
47
|
+
def to_json(self) -> str:
|
48
|
+
"""Returns the JSON representation of the model using alias"""
|
49
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
50
|
+
return json.dumps(self.to_dict())
|
51
|
+
|
52
|
+
@classmethod
|
53
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
54
|
+
"""Create an instance of BenefitResponsePayingInstitution from a JSON string"""
|
55
|
+
return cls.from_dict(json.loads(json_str))
|
56
|
+
|
57
|
+
def to_dict(self) -> Dict[str, Any]:
|
58
|
+
"""Return the dictionary representation of the model using alias.
|
59
|
+
|
60
|
+
This has the following differences from calling pydantic's
|
61
|
+
`self.model_dump(by_alias=True)`:
|
62
|
+
|
63
|
+
* `None` is only added to the output dict for nullable fields that
|
64
|
+
were set at model initialization. Other fields with value `None`
|
65
|
+
are ignored.
|
66
|
+
"""
|
67
|
+
excluded_fields: Set[str] = set([
|
68
|
+
])
|
69
|
+
|
70
|
+
_dict = self.model_dump(
|
71
|
+
by_alias=True,
|
72
|
+
exclude=excluded_fields,
|
73
|
+
exclude_none=True,
|
74
|
+
)
|
75
|
+
return _dict
|
76
|
+
|
77
|
+
@classmethod
|
78
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
79
|
+
"""Create an instance of BenefitResponsePayingInstitution from a dict"""
|
80
|
+
if obj is None:
|
81
|
+
return None
|
82
|
+
|
83
|
+
if not isinstance(obj, dict):
|
84
|
+
return cls.model_validate(obj)
|
85
|
+
|
86
|
+
_obj = cls.model_validate({
|
87
|
+
"code": obj.get("code"),
|
88
|
+
"name": obj.get("name"),
|
89
|
+
"agency": obj.get("agency"),
|
90
|
+
"account": obj.get("account")
|
91
|
+
})
|
92
|
+
return _obj
|
93
|
+
|
94
|
+
|
@@ -0,0 +1,102 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
|
3
|
+
"""
|
4
|
+
Pluggy API
|
5
|
+
|
6
|
+
Pluggy's main API to review data and execute connectors
|
7
|
+
|
8
|
+
The version of the OpenAPI document: 1.0.0
|
9
|
+
Contact: hello@pluggy.ai
|
10
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
11
|
+
|
12
|
+
Do not edit the class manually.
|
13
|
+
""" # noqa: E501
|
14
|
+
|
15
|
+
|
16
|
+
from __future__ import annotations
|
17
|
+
import pprint
|
18
|
+
import re # noqa: F401
|
19
|
+
import json
|
20
|
+
|
21
|
+
from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt
|
22
|
+
from typing import Any, ClassVar, Dict, List, Optional, Union
|
23
|
+
from pluggy_sdk.models.benefit_response import BenefitResponse
|
24
|
+
from typing import Optional, Set
|
25
|
+
from typing_extensions import Self
|
26
|
+
|
27
|
+
class BenefitsList200Response(BaseModel):
|
28
|
+
"""
|
29
|
+
BenefitsList200Response
|
30
|
+
""" # noqa: E501
|
31
|
+
page: Optional[Union[StrictFloat, StrictInt]] = None
|
32
|
+
total: Optional[Union[StrictFloat, StrictInt]] = None
|
33
|
+
total_pages: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, alias="totalPages")
|
34
|
+
results: Optional[List[BenefitResponse]] = Field(default=None, description="List of benefits")
|
35
|
+
__properties: ClassVar[List[str]] = ["page", "total", "totalPages", "results"]
|
36
|
+
|
37
|
+
model_config = ConfigDict(
|
38
|
+
populate_by_name=True,
|
39
|
+
validate_assignment=True,
|
40
|
+
protected_namespaces=(),
|
41
|
+
)
|
42
|
+
|
43
|
+
|
44
|
+
def to_str(self) -> str:
|
45
|
+
"""Returns the string representation of the model using alias"""
|
46
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
47
|
+
|
48
|
+
def to_json(self) -> str:
|
49
|
+
"""Returns the JSON representation of the model using alias"""
|
50
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
51
|
+
return json.dumps(self.to_dict())
|
52
|
+
|
53
|
+
@classmethod
|
54
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
55
|
+
"""Create an instance of BenefitsList200Response from a JSON string"""
|
56
|
+
return cls.from_dict(json.loads(json_str))
|
57
|
+
|
58
|
+
def to_dict(self) -> Dict[str, Any]:
|
59
|
+
"""Return the dictionary representation of the model using alias.
|
60
|
+
|
61
|
+
This has the following differences from calling pydantic's
|
62
|
+
`self.model_dump(by_alias=True)`:
|
63
|
+
|
64
|
+
* `None` is only added to the output dict for nullable fields that
|
65
|
+
were set at model initialization. Other fields with value `None`
|
66
|
+
are ignored.
|
67
|
+
"""
|
68
|
+
excluded_fields: Set[str] = set([
|
69
|
+
])
|
70
|
+
|
71
|
+
_dict = self.model_dump(
|
72
|
+
by_alias=True,
|
73
|
+
exclude=excluded_fields,
|
74
|
+
exclude_none=True,
|
75
|
+
)
|
76
|
+
# override the default output from pydantic by calling `to_dict()` of each item in results (list)
|
77
|
+
_items = []
|
78
|
+
if self.results:
|
79
|
+
for _item in self.results:
|
80
|
+
if _item:
|
81
|
+
_items.append(_item.to_dict())
|
82
|
+
_dict['results'] = _items
|
83
|
+
return _dict
|
84
|
+
|
85
|
+
@classmethod
|
86
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
87
|
+
"""Create an instance of BenefitsList200Response from a dict"""
|
88
|
+
if obj is None:
|
89
|
+
return None
|
90
|
+
|
91
|
+
if not isinstance(obj, dict):
|
92
|
+
return cls.model_validate(obj)
|
93
|
+
|
94
|
+
_obj = cls.model_validate({
|
95
|
+
"page": obj.get("page"),
|
96
|
+
"total": obj.get("total"),
|
97
|
+
"totalPages": obj.get("totalPages"),
|
98
|
+
"results": [BenefitResponse.from_dict(_item) for _item in obj["results"]] if obj.get("results") is not None else None
|
99
|
+
})
|
100
|
+
return _obj
|
101
|
+
|
102
|
+
|
pluggy_sdk/models/connector.py
CHANGED
@@ -54,8 +54,8 @@ class Connector(BaseModel):
|
|
54
54
|
return value
|
55
55
|
|
56
56
|
for i in value:
|
57
|
-
if i not in set(['ACCOUNTS', '
|
58
|
-
raise ValueError("each list item must be one of ('ACCOUNTS', '
|
57
|
+
if i not in set(['ACCOUNTS', 'CREDIT_CARDS', 'TRANSACTIONS', 'PAYMENT_DATA', 'INVESTMENTS', 'INVESTMENTS_TRANSACTIONS', 'IDENTITY', 'BROKERAGE_NOTE', 'OPPORTUNITIES', 'PORTFOLIO', 'INCOME_REPORTS', 'MOVE_SECURITY', 'LOANS', 'ACQUIRER_OPERATIONS']):
|
58
|
+
raise ValueError("each list item must be one of ('ACCOUNTS', 'CREDIT_CARDS', 'TRANSACTIONS', 'PAYMENT_DATA', 'INVESTMENTS', 'INVESTMENTS_TRANSACTIONS', 'IDENTITY', 'BROKERAGE_NOTE', 'OPPORTUNITIES', 'PORTFOLIO', 'INCOME_REPORTS', 'MOVE_SECURITY', 'LOANS', 'ACQUIRER_OPERATIONS')")
|
59
59
|
return value
|
60
60
|
|
61
61
|
model_config = ConfigDict(
|
@@ -0,0 +1,120 @@
|
|
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 typing import Optional, Set
|
25
|
+
from typing_extensions import Self
|
26
|
+
|
27
|
+
class Consent(BaseModel):
|
28
|
+
"""
|
29
|
+
Item consent information
|
30
|
+
""" # noqa: E501
|
31
|
+
id: StrictStr = Field(description="Consent primary identifier")
|
32
|
+
item_id: StrictStr = Field(description="Primary identifier of the item associated to the consent", alias="itemId")
|
33
|
+
products: List[StrictStr] = Field(description="Products to be collected in the connection")
|
34
|
+
open_finance_permissions_granted: Optional[List[StrictStr]] = Field(default=None, description="Products consented by the user to be collected", alias="openFinancePermissionsGranted")
|
35
|
+
created_at: datetime = Field(description="Date when the consent was given", alias="createdAt")
|
36
|
+
expires_at: Optional[datetime] = Field(default=None, description="Date when the consent expires. Null if the consent doesn't expire", alias="expiresAt")
|
37
|
+
revoked_at: Optional[datetime] = Field(default=None, description="Date when the consent was revoked", alias="revokedAt")
|
38
|
+
__properties: ClassVar[List[str]] = ["id", "itemId", "products", "openFinancePermissionsGranted", "createdAt", "expiresAt", "revokedAt"]
|
39
|
+
|
40
|
+
@field_validator('products')
|
41
|
+
def products_validate_enum(cls, value):
|
42
|
+
"""Validates the enum"""
|
43
|
+
for i in value:
|
44
|
+
if i not in set(['ACCOUNTS', 'CREDIT_CARDS', 'TRANSACTIONS', 'PAYMENT_DATA', 'INVESTMENTS', 'INVESTMENTS_TRANSACTIONS', 'IDENTITY', 'BROKERAGE_NOTE', 'OPPORTUNITIES', 'PORTFOLIO', 'INCOME_REPORTS', 'MOVE_SECURITY', 'LOANS', 'ACQUIRER_OPERATIONS']):
|
45
|
+
raise ValueError("each list item must be one of ('ACCOUNTS', 'CREDIT_CARDS', 'TRANSACTIONS', 'PAYMENT_DATA', 'INVESTMENTS', 'INVESTMENTS_TRANSACTIONS', 'IDENTITY', 'BROKERAGE_NOTE', 'OPPORTUNITIES', 'PORTFOLIO', 'INCOME_REPORTS', 'MOVE_SECURITY', 'LOANS', 'ACQUIRER_OPERATIONS')")
|
46
|
+
return value
|
47
|
+
|
48
|
+
@field_validator('open_finance_permissions_granted')
|
49
|
+
def open_finance_permissions_granted_validate_enum(cls, value):
|
50
|
+
"""Validates the enum"""
|
51
|
+
if value is None:
|
52
|
+
return value
|
53
|
+
|
54
|
+
for i in value:
|
55
|
+
if i not in set(['REGISTRATION_ALL', 'REGISTRATION_IDENTIFICATIONS', 'REGISTRATION_QUALIFICATIONS', 'REGISTRATION_FINANCIAL_RELATIONS', 'ACCOUNTS_ALL', 'ACCOUNTS_LIST', 'ACCOUNTS_BALANCES', 'ACCOUNTS_LIMITS', 'ACCOUNTS_TRANSACTIONS', 'CREDIT_CARDS_ALL', 'CREDIT_CARDS_LIST', 'CREDIT_CARDS_LIMITS', 'CREDIT_CARDS_TRANSACTIONS', 'CREDIT_CARDS_BILLS', 'CREDIT_OPERATIONS_ALL', 'INVESTMENTS_ALL', 'EXCHANGES_ALL']):
|
56
|
+
raise ValueError("each list item must be one of ('REGISTRATION_ALL', 'REGISTRATION_IDENTIFICATIONS', 'REGISTRATION_QUALIFICATIONS', 'REGISTRATION_FINANCIAL_RELATIONS', 'ACCOUNTS_ALL', 'ACCOUNTS_LIST', 'ACCOUNTS_BALANCES', 'ACCOUNTS_LIMITS', 'ACCOUNTS_TRANSACTIONS', 'CREDIT_CARDS_ALL', 'CREDIT_CARDS_LIST', 'CREDIT_CARDS_LIMITS', 'CREDIT_CARDS_TRANSACTIONS', 'CREDIT_CARDS_BILLS', 'CREDIT_OPERATIONS_ALL', 'INVESTMENTS_ALL', 'EXCHANGES_ALL')")
|
57
|
+
return value
|
58
|
+
|
59
|
+
model_config = ConfigDict(
|
60
|
+
populate_by_name=True,
|
61
|
+
validate_assignment=True,
|
62
|
+
protected_namespaces=(),
|
63
|
+
)
|
64
|
+
|
65
|
+
|
66
|
+
def to_str(self) -> str:
|
67
|
+
"""Returns the string representation of the model using alias"""
|
68
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
69
|
+
|
70
|
+
def to_json(self) -> str:
|
71
|
+
"""Returns the JSON representation of the model using alias"""
|
72
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
73
|
+
return json.dumps(self.to_dict())
|
74
|
+
|
75
|
+
@classmethod
|
76
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
77
|
+
"""Create an instance of Consent from a JSON string"""
|
78
|
+
return cls.from_dict(json.loads(json_str))
|
79
|
+
|
80
|
+
def to_dict(self) -> Dict[str, Any]:
|
81
|
+
"""Return the dictionary representation of the model using alias.
|
82
|
+
|
83
|
+
This has the following differences from calling pydantic's
|
84
|
+
`self.model_dump(by_alias=True)`:
|
85
|
+
|
86
|
+
* `None` is only added to the output dict for nullable fields that
|
87
|
+
were set at model initialization. Other fields with value `None`
|
88
|
+
are ignored.
|
89
|
+
"""
|
90
|
+
excluded_fields: Set[str] = set([
|
91
|
+
])
|
92
|
+
|
93
|
+
_dict = self.model_dump(
|
94
|
+
by_alias=True,
|
95
|
+
exclude=excluded_fields,
|
96
|
+
exclude_none=True,
|
97
|
+
)
|
98
|
+
return _dict
|
99
|
+
|
100
|
+
@classmethod
|
101
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
102
|
+
"""Create an instance of Consent from a dict"""
|
103
|
+
if obj is None:
|
104
|
+
return None
|
105
|
+
|
106
|
+
if not isinstance(obj, dict):
|
107
|
+
return cls.model_validate(obj)
|
108
|
+
|
109
|
+
_obj = cls.model_validate({
|
110
|
+
"id": obj.get("id"),
|
111
|
+
"itemId": obj.get("itemId"),
|
112
|
+
"products": obj.get("products"),
|
113
|
+
"openFinancePermissionsGranted": obj.get("openFinancePermissionsGranted"),
|
114
|
+
"createdAt": obj.get("createdAt"),
|
115
|
+
"expiresAt": obj.get("expiresAt"),
|
116
|
+
"revokedAt": obj.get("revokedAt")
|
117
|
+
})
|
118
|
+
return _obj
|
119
|
+
|
120
|
+
|
pluggy_sdk/models/create_item.py
CHANGED
@@ -42,8 +42,8 @@ class CreateItem(BaseModel):
|
|
42
42
|
return value
|
43
43
|
|
44
44
|
for i in value:
|
45
|
-
if i not in set(['ACCOUNTS', '
|
46
|
-
raise ValueError("each list item must be one of ('ACCOUNTS', '
|
45
|
+
if i not in set(['ACCOUNTS', 'CREDIT_CARDS', 'TRANSACTIONS', 'PAYMENT_DATA', 'INVESTMENTS', 'INVESTMENTS_TRANSACTIONS', 'IDENTITY', 'BROKERAGE_NOTE', 'OPPORTUNITIES', 'PORTFOLIO', 'INCOME_REPORTS', 'MOVE_SECURITY', 'LOANS', 'ACQUIRER_OPERATIONS']):
|
46
|
+
raise ValueError("each list item must be one of ('ACCOUNTS', 'CREDIT_CARDS', 'TRANSACTIONS', 'PAYMENT_DATA', 'INVESTMENTS', 'INVESTMENTS_TRANSACTIONS', 'IDENTITY', 'BROKERAGE_NOTE', 'OPPORTUNITIES', 'PORTFOLIO', 'INCOME_REPORTS', 'MOVE_SECURITY', 'LOANS', 'ACQUIRER_OPERATIONS')")
|
47
47
|
return value
|
48
48
|
|
49
49
|
model_config = ConfigDict(
|
@@ -21,6 +21,7 @@ import json
|
|
21
21
|
from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt, StrictStr
|
22
22
|
from typing import Any, ClassVar, Dict, List, Optional, Union
|
23
23
|
from pluggy_sdk.models.payment_request_callback_urls import PaymentRequestCallbackUrls
|
24
|
+
from pluggy_sdk.models.payment_request_schedule import PaymentRequestSchedule
|
24
25
|
from typing import Optional, Set
|
25
26
|
from typing_extensions import Self
|
26
27
|
|
@@ -35,7 +36,8 @@ class CreatePaymentRequest(BaseModel):
|
|
35
36
|
customer_id: Optional[StrictStr] = Field(default=None, description="Customer identifier associated to the payment", alias="customerId")
|
36
37
|
client_payment_id: Optional[StrictStr] = Field(default=None, description="Your payment identifier", alias="clientPaymentId")
|
37
38
|
smart_account_id: Optional[StrictStr] = Field(default=None, description="Smart account identifier associated to the payment, used to be able to use PIX Qr method", alias="smartAccountId")
|
38
|
-
|
39
|
+
schedule: Optional[PaymentRequestSchedule] = None
|
40
|
+
__properties: ClassVar[List[str]] = ["amount", "description", "callbackUrls", "recipientId", "customerId", "clientPaymentId", "smartAccountId", "schedule"]
|
39
41
|
|
40
42
|
model_config = ConfigDict(
|
41
43
|
populate_by_name=True,
|
@@ -79,6 +81,9 @@ class CreatePaymentRequest(BaseModel):
|
|
79
81
|
# override the default output from pydantic by calling `to_dict()` of callback_urls
|
80
82
|
if self.callback_urls:
|
81
83
|
_dict['callbackUrls'] = self.callback_urls.to_dict()
|
84
|
+
# override the default output from pydantic by calling `to_dict()` of schedule
|
85
|
+
if self.schedule:
|
86
|
+
_dict['schedule'] = self.schedule.to_dict()
|
82
87
|
return _dict
|
83
88
|
|
84
89
|
@classmethod
|
@@ -97,7 +102,8 @@ class CreatePaymentRequest(BaseModel):
|
|
97
102
|
"recipientId": obj.get("recipientId"),
|
98
103
|
"customerId": obj.get("customerId"),
|
99
104
|
"clientPaymentId": obj.get("clientPaymentId"),
|
100
|
-
"smartAccountId": obj.get("smartAccountId")
|
105
|
+
"smartAccountId": obj.get("smartAccountId"),
|
106
|
+
"schedule": PaymentRequestSchedule.from_dict(obj["schedule"]) if obj.get("schedule") is not None else None
|
101
107
|
})
|
102
108
|
return _obj
|
103
109
|
|
pluggy_sdk/models/item.py
CHANGED
@@ -57,8 +57,8 @@ class Item(BaseModel):
|
|
57
57
|
return value
|
58
58
|
|
59
59
|
for i in value:
|
60
|
-
if i not in set(['ACCOUNTS', '
|
61
|
-
raise ValueError("each list item must be one of ('ACCOUNTS', '
|
60
|
+
if i not in set(['ACCOUNTS', 'CREDIT_CARDS', 'TRANSACTIONS', 'PAYMENT_DATA', 'INVESTMENTS', 'INVESTMENTS_TRANSACTIONS', 'IDENTITY', 'BROKERAGE_NOTE', 'OPPORTUNITIES', 'PORTFOLIO', 'INCOME_REPORTS', 'MOVE_SECURITY', 'LOANS', 'ACQUIRER_OPERATIONS']):
|
61
|
+
raise ValueError("each list item must be one of ('ACCOUNTS', 'CREDIT_CARDS', 'TRANSACTIONS', 'PAYMENT_DATA', 'INVESTMENTS', 'INVESTMENTS_TRANSACTIONS', 'IDENTITY', 'BROKERAGE_NOTE', 'OPPORTUNITIES', 'PORTFOLIO', 'INCOME_REPORTS', 'MOVE_SECURITY', 'LOANS', 'ACQUIRER_OPERATIONS')")
|
62
62
|
return value
|
63
63
|
|
64
64
|
model_config = ConfigDict(
|
@@ -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, Union
|
23
|
+
from pluggy_sdk.models.consent import Consent
|
24
|
+
from typing import Optional, Set
|
25
|
+
from typing_extensions import Self
|
26
|
+
|
27
|
+
class PageResponseConsents(BaseModel):
|
28
|
+
"""
|
29
|
+
|
30
|
+
""" # noqa: E501
|
31
|
+
results: List[Consent]
|
32
|
+
page: Union[StrictFloat, StrictInt]
|
33
|
+
total: Union[StrictFloat, StrictInt]
|
34
|
+
total_pages: Union[StrictFloat, StrictInt] = Field(alias="totalPages")
|
35
|
+
__properties: ClassVar[List[str]] = ["results", "page", "total", "totalPages"]
|
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 PageResponseConsents 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 PageResponseConsents 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
|
+
"results": [Consent.from_dict(_item) for _item in obj["results"]] if obj.get("results") is not None else None,
|
96
|
+
"page": obj.get("page"),
|
97
|
+
"total": obj.get("total"),
|
98
|
+
"totalPages": obj.get("totalPages")
|
99
|
+
})
|
100
|
+
return _obj
|
101
|
+
|
102
|
+
|
@@ -18,7 +18,7 @@ import pprint
|
|
18
18
|
import re # noqa: F401
|
19
19
|
import json
|
20
20
|
|
21
|
-
from pydantic import BaseModel, ConfigDict, Field, StrictStr
|
21
|
+
from pydantic import BaseModel, ConfigDict, Field, StrictStr
|
22
22
|
from typing import Any, ClassVar, Dict, List
|
23
23
|
from typing import Optional, Set
|
24
24
|
from typing_extensions import Self
|
@@ -29,16 +29,9 @@ class PaymentRecipientAccount(BaseModel):
|
|
29
29
|
""" # noqa: E501
|
30
30
|
branch: StrictStr = Field(description="Receiver bank account branch (agency)")
|
31
31
|
number: StrictStr = Field(description="Receiver bank account number")
|
32
|
-
type: StrictStr = Field(description="Receiver bank account type")
|
32
|
+
type: StrictStr = Field(description="Receiver bank account type, could be: 'CHECKING_ACCOUNT', 'SAVINGS_ACCOUNT' or 'GUARANTEED_ACCOUNT'")
|
33
33
|
__properties: ClassVar[List[str]] = ["branch", "number", "type"]
|
34
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
35
|
model_config = ConfigDict(
|
43
36
|
populate_by_name=True,
|
44
37
|
validate_assignment=True,
|