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.
Files changed (63) hide show
  1. pluggy_sdk/__init__.py +9 -3
  2. pluggy_sdk/api/__init__.py +1 -2
  3. pluggy_sdk/api/payment_request_api.py +804 -0
  4. pluggy_sdk/api/payment_schedule_api.py +3 -3
  5. pluggy_sdk/api/smart_account_api.py +572 -0
  6. pluggy_sdk/api/smart_transfer_api.py +1396 -0
  7. pluggy_sdk/api_client.py +8 -1
  8. pluggy_sdk/configuration.py +1 -1
  9. pluggy_sdk/models/__init__.py +7 -0
  10. pluggy_sdk/models/accounts_list200_response.py +3 -3
  11. pluggy_sdk/models/acquirer_receivable.py +3 -3
  12. pluggy_sdk/models/acquirer_sale.py +3 -3
  13. pluggy_sdk/models/acquirer_sale_data.py +3 -3
  14. pluggy_sdk/models/aggregated_portfolio_response.py +3 -3
  15. pluggy_sdk/models/benefit_response.py +3 -3
  16. pluggy_sdk/models/benefits_list200_response.py +3 -3
  17. pluggy_sdk/models/bill.py +3 -3
  18. pluggy_sdk/models/bills_list200_response.py +3 -3
  19. pluggy_sdk/models/bulk_payment.py +3 -3
  20. pluggy_sdk/models/bulk_payments_list200_response.py +3 -3
  21. pluggy_sdk/models/connector.py +3 -3
  22. pluggy_sdk/models/connector_credential.py +3 -3
  23. pluggy_sdk/models/connector_list_response.py +3 -3
  24. pluggy_sdk/models/create_smart_transfer_payment.py +96 -0
  25. pluggy_sdk/models/create_smart_transfer_preauthorization.py +104 -0
  26. pluggy_sdk/models/identity_response.py +12 -12
  27. pluggy_sdk/models/income_reports_response.py +3 -3
  28. pluggy_sdk/models/investment.py +3 -3
  29. pluggy_sdk/models/investments_list200_response.py +3 -3
  30. pluggy_sdk/models/item_creation_error_response.py +3 -3
  31. pluggy_sdk/models/loan.py +12 -12
  32. pluggy_sdk/models/loan_installments.py +3 -3
  33. pluggy_sdk/models/loan_payment_release_over_parcel.py +6 -6
  34. pluggy_sdk/models/loan_payments.py +3 -3
  35. pluggy_sdk/models/loans_list200_response.py +3 -3
  36. pluggy_sdk/models/monthly_portfolio_response.py +3 -3
  37. pluggy_sdk/models/page_response_acquirer_anticipations.py +3 -3
  38. pluggy_sdk/models/page_response_acquirer_receivables.py +3 -3
  39. pluggy_sdk/models/page_response_acquirer_sales.py +3 -3
  40. pluggy_sdk/models/page_response_category_rules.py +3 -3
  41. pluggy_sdk/models/page_response_consents.py +3 -3
  42. pluggy_sdk/models/page_response_investment_transactions.py +3 -3
  43. pluggy_sdk/models/page_response_transactions.py +3 -3
  44. pluggy_sdk/models/parameter_validation_response.py +3 -3
  45. pluggy_sdk/models/payment_customers_list200_response.py +3 -3
  46. pluggy_sdk/models/payment_intents_list200_response.py +3 -3
  47. pluggy_sdk/models/payment_recipients_institution_list200_response.py +3 -3
  48. pluggy_sdk/models/payment_recipients_list200_response.py +3 -3
  49. pluggy_sdk/models/payment_request_receipt_list200_response.py +3 -3
  50. pluggy_sdk/models/payment_requests_list200_response.py +3 -3
  51. pluggy_sdk/models/payment_schedules_list200_response.py +3 -3
  52. pluggy_sdk/models/smart_accounts_list200_response.py +3 -3
  53. pluggy_sdk/models/smart_tranfers_preauthorizations_list200_response.py +102 -0
  54. pluggy_sdk/models/smart_transfer_callback_urls.py +90 -0
  55. pluggy_sdk/models/smart_transfer_payment.py +116 -0
  56. pluggy_sdk/models/smart_transfer_preauthorization.py +128 -0
  57. pluggy_sdk/models/smart_transfer_preauthorization_parameter.py +90 -0
  58. pluggy_sdk/models/status_detail_product.py +3 -3
  59. pluggy_sdk/models/webhooks_list200_response.py +3 -3
  60. {pluggy_sdk-1.0.0.post16.dist-info → pluggy_sdk-1.0.0.post18.dist-info}/METADATA +20 -8
  61. {pluggy_sdk-1.0.0.post16.dist-info → pluggy_sdk-1.0.0.post18.dist-info}/RECORD +63 -55
  62. {pluggy_sdk-1.0.0.post16.dist-info → pluggy_sdk-1.0.0.post18.dist-info}/WHEEL +1 -1
  63. {pluggy_sdk-1.0.0.post16.dist-info → pluggy_sdk-1.0.0.post18.dist-info}/top_level.txt +0 -0
pluggy_sdk/api_client.py CHANGED
@@ -16,6 +16,7 @@
16
16
  import datetime
17
17
  from dateutil.parser import parse
18
18
  from enum import Enum
19
+ import decimal
19
20
  import json
20
21
  import mimetypes
21
22
  import os
@@ -67,6 +68,7 @@ class ApiClient:
67
68
  'bool': bool,
68
69
  'date': datetime.date,
69
70
  'datetime': datetime.datetime,
71
+ 'decimal': decimal.Decimal,
70
72
  'object': object,
71
73
  }
72
74
  _pool = None
@@ -89,7 +91,7 @@ class ApiClient:
89
91
  self.default_headers[header_name] = header_value
90
92
  self.cookie = cookie
91
93
  # Set default User-Agent.
92
- self.user_agent = 'OpenAPI-Generator/1.0.0.post16/python'
94
+ self.user_agent = 'OpenAPI-Generator/1.0.0.post18/python'
93
95
  self.client_side_validation = configuration.client_side_validation
94
96
 
95
97
  def __enter__(self):
@@ -339,6 +341,7 @@ class ApiClient:
339
341
  If obj is str, int, long, float, bool, return directly.
340
342
  If obj is datetime.datetime, datetime.date
341
343
  convert to string in iso8601 format.
344
+ If obj is decimal.Decimal return string representation.
342
345
  If obj is list, sanitize each element in the list.
343
346
  If obj is dict, return the dict.
344
347
  If obj is OpenAPI model, return the properties dict.
@@ -364,6 +367,8 @@ class ApiClient:
364
367
  )
365
368
  elif isinstance(obj, (datetime.datetime, datetime.date)):
366
369
  return obj.isoformat()
370
+ elif isinstance(obj, decimal.Decimal):
371
+ return str(obj)
367
372
 
368
373
  elif isinstance(obj, dict):
369
374
  obj_dict = obj
@@ -455,6 +460,8 @@ class ApiClient:
455
460
  return self.__deserialize_date(data)
456
461
  elif klass == datetime.datetime:
457
462
  return self.__deserialize_datetime(data)
463
+ elif klass == decimal.Decimal:
464
+ return decimal.Decimal(data)
458
465
  elif issubclass(klass, Enum):
459
466
  return self.__deserialize_enum(data, klass)
460
467
  else:
@@ -414,7 +414,7 @@ conf = pluggy_sdk.Configuration(
414
414
  "OS: {env}\n"\
415
415
  "Python Version: {pyversion}\n"\
416
416
  "Version of the API: 1.0.0\n"\
417
- "SDK Package Version: 1.0.0.post16".\
417
+ "SDK Package Version: 1.0.0.post18".\
418
418
  format(env=sys.platform, pyversion=sys.version)
419
419
 
420
420
  def get_host_settings(self):
@@ -75,6 +75,8 @@ from pluggy_sdk.models.create_payment_request import CreatePaymentRequest
75
75
  from pluggy_sdk.models.create_pix_qr_payment_request import CreatePixQrPaymentRequest
76
76
  from pluggy_sdk.models.create_smart_account_request import CreateSmartAccountRequest
77
77
  from pluggy_sdk.models.create_smart_account_transfer_request import CreateSmartAccountTransferRequest
78
+ from pluggy_sdk.models.create_smart_transfer_payment import CreateSmartTransferPayment
79
+ from pluggy_sdk.models.create_smart_transfer_preauthorization import CreateSmartTransferPreauthorization
78
80
  from pluggy_sdk.models.create_webhook import CreateWebhook
79
81
  from pluggy_sdk.models.credential_select_option import CredentialSelectOption
80
82
  from pluggy_sdk.models.credit_card_metadata import CreditCardMetadata
@@ -156,6 +158,11 @@ from pluggy_sdk.models.smart_account_address import SmartAccountAddress
156
158
  from pluggy_sdk.models.smart_account_balance import SmartAccountBalance
157
159
  from pluggy_sdk.models.smart_account_transfer import SmartAccountTransfer
158
160
  from pluggy_sdk.models.smart_accounts_list200_response import SmartAccountsList200Response
161
+ from pluggy_sdk.models.smart_tranfers_preauthorizations_list200_response import SmartTranfersPreauthorizationsList200Response
162
+ from pluggy_sdk.models.smart_transfer_callback_urls import SmartTransferCallbackUrls
163
+ from pluggy_sdk.models.smart_transfer_payment import SmartTransferPayment
164
+ from pluggy_sdk.models.smart_transfer_preauthorization import SmartTransferPreauthorization
165
+ from pluggy_sdk.models.smart_transfer_preauthorization_parameter import SmartTransferPreauthorizationParameter
159
166
  from pluggy_sdk.models.status_detail import StatusDetail
160
167
  from pluggy_sdk.models.status_detail_product import StatusDetailProduct
161
168
  from pluggy_sdk.models.status_detail_product_warning import StatusDetailProductWarning
@@ -76,9 +76,9 @@ class AccountsList200Response(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 _item in self.results:
80
- if _item:
81
- _items.append(_item.to_dict())
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
 
@@ -109,9 +109,9 @@ class AcquirerReceivable(BaseModel):
109
109
  # override the default output from pydantic by calling `to_dict()` of each item in related_sales (list)
110
110
  _items = []
111
111
  if self.related_sales:
112
- for _item in self.related_sales:
113
- if _item:
114
- _items.append(_item.to_dict())
112
+ for _item_related_sales in self.related_sales:
113
+ if _item_related_sales:
114
+ _items.append(_item_related_sales.to_dict())
115
115
  _dict['relatedSales'] = _items
116
116
  return _dict
117
117
 
@@ -131,9 +131,9 @@ class AcquirerSale(BaseModel):
131
131
  # override the default output from pydantic by calling `to_dict()` of each item in installments (list)
132
132
  _items = []
133
133
  if self.installments:
134
- for _item in self.installments:
135
- if _item:
136
- _items.append(_item.to_dict())
134
+ for _item_installments in self.installments:
135
+ if _item_installments:
136
+ _items.append(_item_installments.to_dict())
137
137
  _dict['installments'] = _items
138
138
  return _dict
139
139
 
@@ -115,9 +115,9 @@ class AcquirerSaleData(BaseModel):
115
115
  # override the default output from pydantic by calling `to_dict()` of each item in installments (list)
116
116
  _items = []
117
117
  if self.installments:
118
- for _item in self.installments:
119
- if _item:
120
- _items.append(_item.to_dict())
118
+ for _item_installments in self.installments:
119
+ if _item_installments:
120
+ _items.append(_item_installments.to_dict())
121
121
  _dict['installments'] = _items
122
122
  return _dict
123
123
 
@@ -76,9 +76,9 @@ class AggregatedPortfolioResponse(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 _item in self.results:
80
- if _item:
81
- _items.append(_item.to_dict())
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
 
@@ -86,9 +86,9 @@ class BenefitResponse(BaseModel):
86
86
  # override the default output from pydantic by calling `to_dict()` of each item in loans (list)
87
87
  _items = []
88
88
  if self.loans:
89
- for _item in self.loans:
90
- if _item:
91
- _items.append(_item.to_dict())
89
+ for _item_loans in self.loans:
90
+ if _item_loans:
91
+ _items.append(_item_loans.to_dict())
92
92
  _dict['loans'] = _items
93
93
  return _dict
94
94
 
@@ -76,9 +76,9 @@ class BenefitsList200Response(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 _item in self.results:
80
- if _item:
81
- _items.append(_item.to_dict())
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
 
pluggy_sdk/models/bill.py CHANGED
@@ -80,9 +80,9 @@ class Bill(BaseModel):
80
80
  # override the default output from pydantic by calling `to_dict()` of each item in finance_charges (list)
81
81
  _items = []
82
82
  if self.finance_charges:
83
- for _item in self.finance_charges:
84
- if _item:
85
- _items.append(_item.to_dict())
83
+ for _item_finance_charges in self.finance_charges:
84
+ if _item_finance_charges:
85
+ _items.append(_item_finance_charges.to_dict())
86
86
  _dict['financeCharges'] = _items
87
87
  return _dict
88
88
 
@@ -76,9 +76,9 @@ class BillsList200Response(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 _item in self.results:
80
- if _item:
81
- _items.append(_item.to_dict())
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
 
@@ -94,9 +94,9 @@ class BulkPayment(BaseModel):
94
94
  # override the default output from pydantic by calling `to_dict()` of each item in payment_requests (list)
95
95
  _items = []
96
96
  if self.payment_requests:
97
- for _item in self.payment_requests:
98
- if _item:
99
- _items.append(_item.to_dict())
97
+ for _item_payment_requests in self.payment_requests:
98
+ if _item_payment_requests:
99
+ _items.append(_item_payment_requests.to_dict())
100
100
  _dict['paymentRequests'] = _items
101
101
  # override the default output from pydantic by calling `to_dict()` of smart_account
102
102
  if self.smart_account:
@@ -76,9 +76,9 @@ class BulkPaymentsList200Response(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 _item in self.results:
80
- if _item:
81
- _items.append(_item.to_dict())
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
 
@@ -102,9 +102,9 @@ class Connector(BaseModel):
102
102
  # override the default output from pydantic by calling `to_dict()` of each item in credentials (list)
103
103
  _items = []
104
104
  if self.credentials:
105
- for _item in self.credentials:
106
- if _item:
107
- _items.append(_item.to_dict())
105
+ for _item_credentials in self.credentials:
106
+ if _item_credentials:
107
+ _items.append(_item_credentials.to_dict())
108
108
  _dict['credentials'] = _items
109
109
  # override the default output from pydantic by calling `to_dict()` of health
110
110
  if self.health:
@@ -89,9 +89,9 @@ class ConnectorCredential(BaseModel):
89
89
  # override the default output from pydantic by calling `to_dict()` of each item in options (list)
90
90
  _items = []
91
91
  if self.options:
92
- for _item in self.options:
93
- if _item:
94
- _items.append(_item.to_dict())
92
+ for _item_options in self.options:
93
+ if _item_options:
94
+ _items.append(_item_options.to_dict())
95
95
  _dict['options'] = _items
96
96
  return _dict
97
97
 
@@ -76,9 +76,9 @@ class ConnectorListResponse(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 _item in self.results:
80
- if _item:
81
- _items.append(_item.to_dict())
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,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, StrictFloat, StrictInt, StrictStr
22
+ from typing import Any, ClassVar, Dict, List, Optional, Union
23
+ from typing import Optional, Set
24
+ from typing_extensions import Self
25
+
26
+ class CreateSmartTransferPayment(BaseModel):
27
+ """
28
+ Create smart transfer payment request data
29
+ """ # noqa: E501
30
+ preauthorization_id: StrictStr = Field(description="Primary identifier of the preauthorization", alias="preauthorizationId")
31
+ recipient_id: StrictStr = Field(description="Primary identifier of the paymen recipient", alias="recipientId")
32
+ amount: Union[StrictFloat, StrictInt] = Field(description="Payment amount")
33
+ description: Optional[StrictStr] = Field(default=None, description="Payment description")
34
+ client_payment_id: Optional[StrictStr] = Field(default=None, description="Client payment identifier", alias="clientPaymentId")
35
+ __properties: ClassVar[List[str]] = ["preauthorizationId", "recipientId", "amount", "description", "clientPaymentId"]
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 CreateSmartTransferPayment 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
+ return _dict
77
+
78
+ @classmethod
79
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
80
+ """Create an instance of CreateSmartTransferPayment from a dict"""
81
+ if obj is None:
82
+ return None
83
+
84
+ if not isinstance(obj, dict):
85
+ return cls.model_validate(obj)
86
+
87
+ _obj = cls.model_validate({
88
+ "preauthorizationId": obj.get("preauthorizationId"),
89
+ "recipientId": obj.get("recipientId"),
90
+ "amount": obj.get("amount"),
91
+ "description": obj.get("description"),
92
+ "clientPaymentId": obj.get("clientPaymentId")
93
+ })
94
+ return _obj
95
+
96
+
@@ -0,0 +1,104 @@
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.smart_transfer_callback_urls import SmartTransferCallbackUrls
24
+ from pluggy_sdk.models.smart_transfer_preauthorization_parameter import SmartTransferPreauthorizationParameter
25
+ from typing import Optional, Set
26
+ from typing_extensions import Self
27
+
28
+ class CreateSmartTransferPreauthorization(BaseModel):
29
+ """
30
+ Create smart transfer preauthorization request data
31
+ """ # noqa: E501
32
+ connector_id: StrictStr = Field(description="Primary identifier of the connector", alias="connectorId")
33
+ parameters: SmartTransferPreauthorizationParameter
34
+ recipient_ids: List[StrictStr] = Field(alias="recipientIds")
35
+ callback_urls: Optional[SmartTransferCallbackUrls] = Field(default=None, alias="callbackUrls")
36
+ client_preauthorization_id: Optional[StrictStr] = Field(default=None, description="Client preauthorization identifier", alias="clientPreauthorizationId")
37
+ __properties: ClassVar[List[str]] = ["connectorId", "parameters", "recipientIds", "callbackUrls", "clientPreauthorizationId"]
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 CreateSmartTransferPreauthorization 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 parameters
79
+ if self.parameters:
80
+ _dict['parameters'] = self.parameters.to_dict()
81
+ # override the default output from pydantic by calling `to_dict()` of callback_urls
82
+ if self.callback_urls:
83
+ _dict['callbackUrls'] = self.callback_urls.to_dict()
84
+ return _dict
85
+
86
+ @classmethod
87
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
88
+ """Create an instance of CreateSmartTransferPreauthorization from a dict"""
89
+ if obj is None:
90
+ return None
91
+
92
+ if not isinstance(obj, dict):
93
+ return cls.model_validate(obj)
94
+
95
+ _obj = cls.model_validate({
96
+ "connectorId": obj.get("connectorId"),
97
+ "parameters": SmartTransferPreauthorizationParameter.from_dict(obj["parameters"]) if obj.get("parameters") is not None else None,
98
+ "recipientIds": obj.get("recipientIds"),
99
+ "callbackUrls": SmartTransferCallbackUrls.from_dict(obj["callbackUrls"]) if obj.get("callbackUrls") is not None else None,
100
+ "clientPreauthorizationId": obj.get("clientPreauthorizationId")
101
+ })
102
+ return _obj
103
+
104
+
@@ -91,30 +91,30 @@ class IdentityResponse(BaseModel):
91
91
  # override the default output from pydantic by calling `to_dict()` of each item in phone_numbers (list)
92
92
  _items = []
93
93
  if self.phone_numbers:
94
- for _item in self.phone_numbers:
95
- if _item:
96
- _items.append(_item.to_dict())
94
+ for _item_phone_numbers in self.phone_numbers:
95
+ if _item_phone_numbers:
96
+ _items.append(_item_phone_numbers.to_dict())
97
97
  _dict['phoneNumbers'] = _items
98
98
  # override the default output from pydantic by calling `to_dict()` of each item in emails (list)
99
99
  _items = []
100
100
  if self.emails:
101
- for _item in self.emails:
102
- if _item:
103
- _items.append(_item.to_dict())
101
+ for _item_emails in self.emails:
102
+ if _item_emails:
103
+ _items.append(_item_emails.to_dict())
104
104
  _dict['emails'] = _items
105
105
  # override the default output from pydantic by calling `to_dict()` of each item in addresses (list)
106
106
  _items = []
107
107
  if self.addresses:
108
- for _item in self.addresses:
109
- if _item:
110
- _items.append(_item.to_dict())
108
+ for _item_addresses in self.addresses:
109
+ if _item_addresses:
110
+ _items.append(_item_addresses.to_dict())
111
111
  _dict['addresses'] = _items
112
112
  # override the default output from pydantic by calling `to_dict()` of each item in relations (list)
113
113
  _items = []
114
114
  if self.relations:
115
- for _item in self.relations:
116
- if _item:
117
- _items.append(_item.to_dict())
115
+ for _item_relations in self.relations:
116
+ if _item_relations:
117
+ _items.append(_item_relations.to_dict())
118
118
  _dict['relations'] = _items
119
119
  return _dict
120
120
 
@@ -76,9 +76,9 @@ class IncomeReportsResponse(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 _item in self.results:
80
- if _item:
81
- _items.append(_item.to_dict())
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
 
@@ -137,9 +137,9 @@ class Investment(BaseModel):
137
137
  # override the default output from pydantic by calling `to_dict()` of each item in transactions (list)
138
138
  _items = []
139
139
  if self.transactions:
140
- for _item in self.transactions:
141
- if _item:
142
- _items.append(_item.to_dict())
140
+ for _item_transactions in self.transactions:
141
+ if _item_transactions:
142
+ _items.append(_item_transactions.to_dict())
143
143
  _dict['transactions'] = _items
144
144
  return _dict
145
145
 
@@ -76,9 +76,9 @@ class InvestmentsList200Response(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 _item in self.results:
80
- if _item:
81
- _items.append(_item.to_dict())
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 ItemCreationErrorResponse(BaseModel):
76
76
  # override the default output from pydantic by calling `to_dict()` of each item in errors (list)
77
77
  _items = []
78
78
  if self.errors:
79
- for _item in self.errors:
80
- if _item:
81
- _items.append(_item.to_dict())
79
+ for _item_errors in self.errors:
80
+ if _item_errors:
81
+ _items.append(_item_errors.to_dict())
82
82
  _dict['errors'] = _items
83
83
  return _dict
84
84
 
pluggy_sdk/models/loan.py CHANGED
@@ -124,30 +124,30 @@ class Loan(BaseModel):
124
124
  # override the default output from pydantic by calling `to_dict()` of each item in interest_rates (list)
125
125
  _items = []
126
126
  if self.interest_rates:
127
- for _item in self.interest_rates:
128
- if _item:
129
- _items.append(_item.to_dict())
127
+ for _item_interest_rates in self.interest_rates:
128
+ if _item_interest_rates:
129
+ _items.append(_item_interest_rates.to_dict())
130
130
  _dict['interestRates'] = _items
131
131
  # override the default output from pydantic by calling `to_dict()` of each item in contracted_fees (list)
132
132
  _items = []
133
133
  if self.contracted_fees:
134
- for _item in self.contracted_fees:
135
- if _item:
136
- _items.append(_item.to_dict())
134
+ for _item_contracted_fees in self.contracted_fees:
135
+ if _item_contracted_fees:
136
+ _items.append(_item_contracted_fees.to_dict())
137
137
  _dict['contractedFees'] = _items
138
138
  # override the default output from pydantic by calling `to_dict()` of each item in contracted_finance_charges (list)
139
139
  _items = []
140
140
  if self.contracted_finance_charges:
141
- for _item in self.contracted_finance_charges:
142
- if _item:
143
- _items.append(_item.to_dict())
141
+ for _item_contracted_finance_charges in self.contracted_finance_charges:
142
+ if _item_contracted_finance_charges:
143
+ _items.append(_item_contracted_finance_charges.to_dict())
144
144
  _dict['contractedFinanceCharges'] = _items
145
145
  # override the default output from pydantic by calling `to_dict()` of each item in warranties (list)
146
146
  _items = []
147
147
  if self.warranties:
148
- for _item in self.warranties:
149
- if _item:
150
- _items.append(_item.to_dict())
148
+ for _item_warranties in self.warranties:
149
+ if _item_warranties:
150
+ _items.append(_item_warranties.to_dict())
151
151
  _dict['warranties'] = _items
152
152
  # override the default output from pydantic by calling `to_dict()` of installments
153
153
  if self.installments:
@@ -100,9 +100,9 @@ class LoanInstallments(BaseModel):
100
100
  # override the default output from pydantic by calling `to_dict()` of each item in balloon_payments (list)
101
101
  _items = []
102
102
  if self.balloon_payments:
103
- for _item in self.balloon_payments:
104
- if _item:
105
- _items.append(_item.to_dict())
103
+ for _item_balloon_payments in self.balloon_payments:
104
+ if _item_balloon_payments:
105
+ _items.append(_item_balloon_payments.to_dict())
106
106
  _dict['balloonPayments'] = _items
107
107
  return _dict
108
108