pluggy-sdk 1.0.0.post11__py3-none-any.whl → 1.0.0.post12__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 +15 -1
- pluggy_sdk/api/__init__.py +1 -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 +13 -0
- pluggy_sdk/models/consent.py +120 -0
- pluggy_sdk/models/create_payment_request.py +8 -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 +8 -2
- pluggy_sdk/models/payment_request_schedule.py +183 -0
- pluggy_sdk/models/payment_schedules_list200_response.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-1.0.0.post11.dist-info → pluggy_sdk-1.0.0.post12.dist-info}/METADATA +18 -2
- {pluggy_sdk-1.0.0.post11.dist-info → pluggy_sdk-1.0.0.post12.dist-info}/RECORD +27 -13
- {pluggy_sdk-1.0.0.post11.dist-info → pluggy_sdk-1.0.0.post12.dist-info}/WHEEL +0 -0
- {pluggy_sdk-1.0.0.post11.dist-info → pluggy_sdk-1.0.0.post12.dist-info}/top_level.txt +0 -0
@@ -0,0 +1,125 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
|
3
|
+
"""
|
4
|
+
Pluggy API
|
5
|
+
|
6
|
+
Pluggy's main API to review data and execute connectors
|
7
|
+
|
8
|
+
The version of the OpenAPI document: 1.0.0
|
9
|
+
Contact: hello@pluggy.ai
|
10
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
11
|
+
|
12
|
+
Do not edit the class manually.
|
13
|
+
""" # noqa: E501
|
14
|
+
|
15
|
+
|
16
|
+
from __future__ import annotations
|
17
|
+
import pprint
|
18
|
+
import re # noqa: F401
|
19
|
+
import json
|
20
|
+
|
21
|
+
from datetime import datetime
|
22
|
+
from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt, StrictStr
|
23
|
+
from typing import Any, ClassVar, Dict, List, Optional, Union
|
24
|
+
from pluggy_sdk.models.payroll_loan_response_client import PayrollLoanResponseClient
|
25
|
+
from typing import Optional, Set
|
26
|
+
from typing_extensions import Self
|
27
|
+
|
28
|
+
class PayrollLoanResponse(BaseModel):
|
29
|
+
"""
|
30
|
+
Response with information related to a payload loan
|
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
|
+
contract_code: Optional[StrictStr] = Field(default=None, description="Contract code given by the contracting institution", alias="contractCode")
|
35
|
+
cnpj_original_contract_creditor: Optional[StrictStr] = Field(default=None, description="CNPJ of the original creditor of the contract", alias="cnpjOriginalContractCreditor")
|
36
|
+
nominal_interest_rate: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Nominal interest rate", alias="nominalInterestRate")
|
37
|
+
efective_interest_rate: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Effective interest rate", alias="efectiveInterestRate")
|
38
|
+
cet_annual_rate: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="CET annual rate", alias="cetAnnualRate")
|
39
|
+
cet_month_rate: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="CET monthly rate", alias="cetMonthRate")
|
40
|
+
currency_code: StrictStr = Field(description="Code referencing the currency of the loan", alias="currencyCode")
|
41
|
+
amortization_regime: StrictStr = Field(description="Amortization regime", alias="amortizationRegime")
|
42
|
+
installments_quantity: Union[StrictFloat, StrictInt] = Field(description="Number of installments", alias="installmentsQuantity")
|
43
|
+
installments_value: Union[StrictFloat, StrictInt] = Field(description="Installment value", alias="installmentsValue")
|
44
|
+
due_date_first_installment: datetime = Field(description="Due date of the first installment", alias="dueDateFirstInstallment")
|
45
|
+
due_date_last_installment: datetime = Field(description="Due date of the last installment", alias="dueDateLastInstallment")
|
46
|
+
cnpj_correspondent_banking: Optional[StrictStr] = Field(default=None, description="CNPJ of the correspondent banking", alias="cnpjCorrespondentBanking")
|
47
|
+
operation_hiring_date: datetime = Field(description="Operation hiring date", alias="operationHiringDate")
|
48
|
+
client: PayrollLoanResponseClient
|
49
|
+
__properties: ClassVar[List[str]] = ["id", "itemId", "contractCode", "cnpjOriginalContractCreditor", "nominalInterestRate", "efectiveInterestRate", "cetAnnualRate", "cetMonthRate", "currencyCode", "amortizationRegime", "installmentsQuantity", "installmentsValue", "dueDateFirstInstallment", "dueDateLastInstallment", "cnpjCorrespondentBanking", "operationHiringDate", "client"]
|
50
|
+
|
51
|
+
model_config = ConfigDict(
|
52
|
+
populate_by_name=True,
|
53
|
+
validate_assignment=True,
|
54
|
+
protected_namespaces=(),
|
55
|
+
)
|
56
|
+
|
57
|
+
|
58
|
+
def to_str(self) -> str:
|
59
|
+
"""Returns the string representation of the model using alias"""
|
60
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
61
|
+
|
62
|
+
def to_json(self) -> str:
|
63
|
+
"""Returns the JSON representation of the model using alias"""
|
64
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
65
|
+
return json.dumps(self.to_dict())
|
66
|
+
|
67
|
+
@classmethod
|
68
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
69
|
+
"""Create an instance of PayrollLoanResponse from a JSON string"""
|
70
|
+
return cls.from_dict(json.loads(json_str))
|
71
|
+
|
72
|
+
def to_dict(self) -> Dict[str, Any]:
|
73
|
+
"""Return the dictionary representation of the model using alias.
|
74
|
+
|
75
|
+
This has the following differences from calling pydantic's
|
76
|
+
`self.model_dump(by_alias=True)`:
|
77
|
+
|
78
|
+
* `None` is only added to the output dict for nullable fields that
|
79
|
+
were set at model initialization. Other fields with value `None`
|
80
|
+
are ignored.
|
81
|
+
"""
|
82
|
+
excluded_fields: Set[str] = set([
|
83
|
+
])
|
84
|
+
|
85
|
+
_dict = self.model_dump(
|
86
|
+
by_alias=True,
|
87
|
+
exclude=excluded_fields,
|
88
|
+
exclude_none=True,
|
89
|
+
)
|
90
|
+
# override the default output from pydantic by calling `to_dict()` of client
|
91
|
+
if self.client:
|
92
|
+
_dict['client'] = self.client.to_dict()
|
93
|
+
return _dict
|
94
|
+
|
95
|
+
@classmethod
|
96
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
97
|
+
"""Create an instance of PayrollLoanResponse 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
|
+
"contractCode": obj.get("contractCode"),
|
108
|
+
"cnpjOriginalContractCreditor": obj.get("cnpjOriginalContractCreditor"),
|
109
|
+
"nominalInterestRate": obj.get("nominalInterestRate"),
|
110
|
+
"efectiveInterestRate": obj.get("efectiveInterestRate"),
|
111
|
+
"cetAnnualRate": obj.get("cetAnnualRate"),
|
112
|
+
"cetMonthRate": obj.get("cetMonthRate"),
|
113
|
+
"currencyCode": obj.get("currencyCode"),
|
114
|
+
"amortizationRegime": obj.get("amortizationRegime"),
|
115
|
+
"installmentsQuantity": obj.get("installmentsQuantity"),
|
116
|
+
"installmentsValue": obj.get("installmentsValue"),
|
117
|
+
"dueDateFirstInstallment": obj.get("dueDateFirstInstallment"),
|
118
|
+
"dueDateLastInstallment": obj.get("dueDateLastInstallment"),
|
119
|
+
"cnpjCorrespondentBanking": obj.get("cnpjCorrespondentBanking"),
|
120
|
+
"operationHiringDate": obj.get("operationHiringDate"),
|
121
|
+
"client": PayrollLoanResponseClient.from_dict(obj["client"]) if obj.get("client") is not None else None
|
122
|
+
})
|
123
|
+
return _obj
|
124
|
+
|
125
|
+
|
@@ -0,0 +1,102 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
|
3
|
+
"""
|
4
|
+
Pluggy API
|
5
|
+
|
6
|
+
Pluggy's main API to review data and execute connectors
|
7
|
+
|
8
|
+
The version of the OpenAPI document: 1.0.0
|
9
|
+
Contact: hello@pluggy.ai
|
10
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
11
|
+
|
12
|
+
Do not edit the class manually.
|
13
|
+
""" # noqa: E501
|
14
|
+
|
15
|
+
|
16
|
+
from __future__ import annotations
|
17
|
+
import pprint
|
18
|
+
import re # noqa: F401
|
19
|
+
import json
|
20
|
+
|
21
|
+
from pydantic import BaseModel, ConfigDict, Field, StrictStr
|
22
|
+
from typing import Any, ClassVar, Dict, List, Optional
|
23
|
+
from typing import Optional, Set
|
24
|
+
from typing_extensions import Self
|
25
|
+
|
26
|
+
class PayrollLoanResponseClient(BaseModel):
|
27
|
+
"""
|
28
|
+
Client information
|
29
|
+
""" # noqa: E501
|
30
|
+
name: Optional[StrictStr] = Field(default=None, description="Client name")
|
31
|
+
document: Optional[StrictStr] = Field(default=None, description="Client CPF")
|
32
|
+
phone: Optional[StrictStr] = Field(default=None, description="Client phone")
|
33
|
+
addres_street: Optional[StrictStr] = Field(default=None, description="Client email", alias="addresStreet")
|
34
|
+
address_number: Optional[StrictStr] = Field(default=None, description="Client address number", alias="addressNumber")
|
35
|
+
address_city: Optional[StrictStr] = Field(default=None, description="Client address city", alias="addressCity")
|
36
|
+
address_zip_code: Optional[StrictStr] = Field(default=None, description="Client address zip code", alias="addressZipCode")
|
37
|
+
address_state: Optional[StrictStr] = Field(default=None, description="Client address state", alias="addressState")
|
38
|
+
__properties: ClassVar[List[str]] = ["name", "document", "phone", "addresStreet", "addressNumber", "addressCity", "addressZipCode", "addressState"]
|
39
|
+
|
40
|
+
model_config = ConfigDict(
|
41
|
+
populate_by_name=True,
|
42
|
+
validate_assignment=True,
|
43
|
+
protected_namespaces=(),
|
44
|
+
)
|
45
|
+
|
46
|
+
|
47
|
+
def to_str(self) -> str:
|
48
|
+
"""Returns the string representation of the model using alias"""
|
49
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
50
|
+
|
51
|
+
def to_json(self) -> str:
|
52
|
+
"""Returns the JSON representation of the model using alias"""
|
53
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
54
|
+
return json.dumps(self.to_dict())
|
55
|
+
|
56
|
+
@classmethod
|
57
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
58
|
+
"""Create an instance of PayrollLoanResponseClient 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 PayrollLoanResponseClient from a dict"""
|
84
|
+
if obj is None:
|
85
|
+
return None
|
86
|
+
|
87
|
+
if not isinstance(obj, dict):
|
88
|
+
return cls.model_validate(obj)
|
89
|
+
|
90
|
+
_obj = cls.model_validate({
|
91
|
+
"name": obj.get("name"),
|
92
|
+
"document": obj.get("document"),
|
93
|
+
"phone": obj.get("phone"),
|
94
|
+
"addresStreet": obj.get("addresStreet"),
|
95
|
+
"addressNumber": obj.get("addressNumber"),
|
96
|
+
"addressCity": obj.get("addressCity"),
|
97
|
+
"addressZipCode": obj.get("addressZipCode"),
|
98
|
+
"addressState": obj.get("addressState")
|
99
|
+
})
|
100
|
+
return _obj
|
101
|
+
|
102
|
+
|
@@ -0,0 +1,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.payroll_loan_response import PayrollLoanResponse
|
24
|
+
from typing import Optional, Set
|
25
|
+
from typing_extensions import Self
|
26
|
+
|
27
|
+
class PayrollLoansList200Response(BaseModel):
|
28
|
+
"""
|
29
|
+
PayrollLoansList200Response
|
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[PayrollLoanResponse]] = Field(default=None, description="List of payroll loans")
|
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 PayrollLoansList200Response 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 PayrollLoansList200Response 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": [PayrollLoanResponse.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,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 datetime import date
|
22
|
+
from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator
|
23
|
+
from typing import Any, ClassVar, Dict, List
|
24
|
+
from typing import Optional, Set
|
25
|
+
from typing_extensions import Self
|
26
|
+
|
27
|
+
class SchedulePayment(BaseModel):
|
28
|
+
"""
|
29
|
+
Information of a schedule payment
|
30
|
+
""" # noqa: E501
|
31
|
+
id: StrictStr
|
32
|
+
description: StrictStr = Field(description="Scheduled payment description")
|
33
|
+
status: StrictStr = Field(description="Scheduled payment status")
|
34
|
+
scheduled_date: date = Field(description="Date when the payment is scheduled", alias="scheduledDate")
|
35
|
+
__properties: ClassVar[List[str]] = ["id", "description", "status", "scheduledDate"]
|
36
|
+
|
37
|
+
@field_validator('status')
|
38
|
+
def status_validate_enum(cls, value):
|
39
|
+
"""Validates the enum"""
|
40
|
+
if value not in set(['SCHEDULED', 'COMPLETED', 'ERROR']):
|
41
|
+
raise ValueError("must be one of enum values ('SCHEDULED', 'COMPLETED', 'ERROR')")
|
42
|
+
return value
|
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 SchedulePayment 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
|
+
return _dict
|
84
|
+
|
85
|
+
@classmethod
|
86
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
87
|
+
"""Create an instance of SchedulePayment 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
|
+
"id": obj.get("id"),
|
96
|
+
"description": obj.get("description"),
|
97
|
+
"status": obj.get("status"),
|
98
|
+
"scheduledDate": obj.get("scheduledDate")
|
99
|
+
})
|
100
|
+
return _obj
|
101
|
+
|
102
|
+
|
@@ -0,0 +1,100 @@
|
|
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 date
|
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 ScheduleTypeCustom(BaseModel):
|
28
|
+
"""
|
29
|
+
Schedule atribute to generate custom payments in the future
|
30
|
+
""" # noqa: E501
|
31
|
+
type: StrictStr = Field(description="Scheduled type")
|
32
|
+
dates: List[date]
|
33
|
+
additional_information: Optional[StrictStr] = Field(default=None, description="Additional information about the custom schedule", alias="additionalInformation")
|
34
|
+
__properties: ClassVar[List[str]] = ["type", "dates", "additionalInformation"]
|
35
|
+
|
36
|
+
@field_validator('type')
|
37
|
+
def type_validate_enum(cls, value):
|
38
|
+
"""Validates the enum"""
|
39
|
+
if value not in set(['CUSTOM']):
|
40
|
+
raise ValueError("must be one of enum values ('CUSTOM')")
|
41
|
+
return value
|
42
|
+
|
43
|
+
model_config = ConfigDict(
|
44
|
+
populate_by_name=True,
|
45
|
+
validate_assignment=True,
|
46
|
+
protected_namespaces=(),
|
47
|
+
)
|
48
|
+
|
49
|
+
|
50
|
+
def to_str(self) -> str:
|
51
|
+
"""Returns the string representation of the model using alias"""
|
52
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
53
|
+
|
54
|
+
def to_json(self) -> str:
|
55
|
+
"""Returns the JSON representation of the model using alias"""
|
56
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
57
|
+
return json.dumps(self.to_dict())
|
58
|
+
|
59
|
+
@classmethod
|
60
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
61
|
+
"""Create an instance of ScheduleTypeCustom from a JSON string"""
|
62
|
+
return cls.from_dict(json.loads(json_str))
|
63
|
+
|
64
|
+
def to_dict(self) -> Dict[str, Any]:
|
65
|
+
"""Return the dictionary representation of the model using alias.
|
66
|
+
|
67
|
+
This has the following differences from calling pydantic's
|
68
|
+
`self.model_dump(by_alias=True)`:
|
69
|
+
|
70
|
+
* `None` is only added to the output dict for nullable fields that
|
71
|
+
were set at model initialization. Other fields with value `None`
|
72
|
+
are ignored.
|
73
|
+
"""
|
74
|
+
excluded_fields: Set[str] = set([
|
75
|
+
])
|
76
|
+
|
77
|
+
_dict = self.model_dump(
|
78
|
+
by_alias=True,
|
79
|
+
exclude=excluded_fields,
|
80
|
+
exclude_none=True,
|
81
|
+
)
|
82
|
+
return _dict
|
83
|
+
|
84
|
+
@classmethod
|
85
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
86
|
+
"""Create an instance of ScheduleTypeCustom from a dict"""
|
87
|
+
if obj is None:
|
88
|
+
return None
|
89
|
+
|
90
|
+
if not isinstance(obj, dict):
|
91
|
+
return cls.model_validate(obj)
|
92
|
+
|
93
|
+
_obj = cls.model_validate({
|
94
|
+
"type": obj.get("type"),
|
95
|
+
"dates": obj.get("dates"),
|
96
|
+
"additionalInformation": obj.get("additionalInformation")
|
97
|
+
})
|
98
|
+
return _obj
|
99
|
+
|
100
|
+
|
@@ -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 date
|
22
|
+
from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator
|
23
|
+
from typing import Any, ClassVar, Dict, List, Union
|
24
|
+
from typing_extensions import Annotated
|
25
|
+
from typing import Optional, Set
|
26
|
+
from typing_extensions import Self
|
27
|
+
|
28
|
+
class ScheduleTypeDaily(BaseModel):
|
29
|
+
"""
|
30
|
+
Schedule atribute to generate daily payments
|
31
|
+
""" # noqa: E501
|
32
|
+
type: StrictStr = Field(description="Scheduled type")
|
33
|
+
start_date: date = Field(alias="startDate")
|
34
|
+
quantity: Union[Annotated[float, Field(le=59, strict=True, ge=3)], Annotated[int, Field(le=59, strict=True, ge=3)]]
|
35
|
+
__properties: ClassVar[List[str]] = ["type", "startDate", "quantity"]
|
36
|
+
|
37
|
+
@field_validator('type')
|
38
|
+
def type_validate_enum(cls, value):
|
39
|
+
"""Validates the enum"""
|
40
|
+
if value not in set(['DAILY']):
|
41
|
+
raise ValueError("must be one of enum values ('DAILY')")
|
42
|
+
return value
|
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 ScheduleTypeDaily 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
|
+
return _dict
|
84
|
+
|
85
|
+
@classmethod
|
86
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
87
|
+
"""Create an instance of ScheduleTypeDaily 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
|
+
"type": obj.get("type"),
|
96
|
+
"startDate": obj.get("startDate"),
|
97
|
+
"quantity": obj.get("quantity")
|
98
|
+
})
|
99
|
+
return _obj
|
100
|
+
|
101
|
+
|