pluggy-sdk 1.0.0.post2__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (163) hide show
  1. pluggy_sdk/__init__.py +183 -0
  2. pluggy_sdk/api/__init__.py +26 -0
  3. pluggy_sdk/api/account_api.py +582 -0
  4. pluggy_sdk/api/acquirer_anticipation_api.py +658 -0
  5. pluggy_sdk/api/acquirer_receivable_api.py +658 -0
  6. pluggy_sdk/api/acquirer_sale_api.py +658 -0
  7. pluggy_sdk/api/auth_api.py +599 -0
  8. pluggy_sdk/api/bill_api.py +561 -0
  9. pluggy_sdk/api/bulk_payment_api.py +854 -0
  10. pluggy_sdk/api/category_api.py +1084 -0
  11. pluggy_sdk/api/connector_api.py +970 -0
  12. pluggy_sdk/api/identity_api.py +575 -0
  13. pluggy_sdk/api/income_report_api.py +308 -0
  14. pluggy_sdk/api/investment_api.py +909 -0
  15. pluggy_sdk/api/items_api.py +1441 -0
  16. pluggy_sdk/api/loan_api.py +561 -0
  17. pluggy_sdk/api/payment_customer_api.py +1399 -0
  18. pluggy_sdk/api/payment_intent_api.py +833 -0
  19. pluggy_sdk/api/payment_recipient_api.py +1976 -0
  20. pluggy_sdk/api/payment_request_api.py +1636 -0
  21. pluggy_sdk/api/portfolio_yield_api.py +574 -0
  22. pluggy_sdk/api/smart_account_api.py +1116 -0
  23. pluggy_sdk/api/transaction_api.py +954 -0
  24. pluggy_sdk/api/webhook_api.py +1391 -0
  25. pluggy_sdk/api_client.py +769 -0
  26. pluggy_sdk/api_response.py +21 -0
  27. pluggy_sdk/configuration.py +466 -0
  28. pluggy_sdk/exceptions.py +200 -0
  29. pluggy_sdk/models/__init__.py +145 -0
  30. pluggy_sdk/models/account.py +134 -0
  31. pluggy_sdk/models/accounts_list200_response.py +102 -0
  32. pluggy_sdk/models/acquirer_anticipation.py +117 -0
  33. pluggy_sdk/models/acquirer_anticipation_data.py +101 -0
  34. pluggy_sdk/models/acquirer_data.py +113 -0
  35. pluggy_sdk/models/acquirer_receivable.py +143 -0
  36. pluggy_sdk/models/acquirer_receivable_data.py +108 -0
  37. pluggy_sdk/models/acquirer_receivable_data_establishment.py +96 -0
  38. pluggy_sdk/models/acquirer_receivable_destination_account.py +92 -0
  39. pluggy_sdk/models/acquirer_receivable_related_sale.py +99 -0
  40. pluggy_sdk/models/acquirer_sale.py +171 -0
  41. pluggy_sdk/models/acquirer_sale_data.py +150 -0
  42. pluggy_sdk/models/acquirer_sale_installment.py +93 -0
  43. pluggy_sdk/models/acquirer_sale_installment_data.py +95 -0
  44. pluggy_sdk/models/address.py +110 -0
  45. pluggy_sdk/models/aggregated_portfolio.py +120 -0
  46. pluggy_sdk/models/aggregated_portfolio_response.py +102 -0
  47. pluggy_sdk/models/asset_distribution.py +88 -0
  48. pluggy_sdk/models/auth_request.py +90 -0
  49. pluggy_sdk/models/auth_response.py +88 -0
  50. pluggy_sdk/models/bank_data.py +92 -0
  51. pluggy_sdk/models/bill.py +109 -0
  52. pluggy_sdk/models/bill_finance_charge.py +103 -0
  53. pluggy_sdk/models/bills_list200_response.py +102 -0
  54. pluggy_sdk/models/bulk_payment.py +128 -0
  55. pluggy_sdk/models/bulk_payments_list200_response.py +102 -0
  56. pluggy_sdk/models/category.py +96 -0
  57. pluggy_sdk/models/client_category_rule.py +94 -0
  58. pluggy_sdk/models/company.py +90 -0
  59. pluggy_sdk/models/connect_token_request.py +94 -0
  60. pluggy_sdk/models/connect_token_response.py +88 -0
  61. pluggy_sdk/models/connector.py +141 -0
  62. pluggy_sdk/models/connector_credential.py +121 -0
  63. pluggy_sdk/models/connector_health.py +96 -0
  64. pluggy_sdk/models/connector_health_details.py +90 -0
  65. pluggy_sdk/models/connector_list_response.py +102 -0
  66. pluggy_sdk/models/connector_user_action.py +93 -0
  67. pluggy_sdk/models/create_bulk_payment.py +96 -0
  68. pluggy_sdk/models/create_client_category_rule.py +92 -0
  69. pluggy_sdk/models/create_item.py +111 -0
  70. pluggy_sdk/models/create_item_parameters.py +144 -0
  71. pluggy_sdk/models/create_or_update_payment_customer.py +105 -0
  72. pluggy_sdk/models/create_payment_customer_request_body.py +103 -0
  73. pluggy_sdk/models/create_payment_intent.py +94 -0
  74. pluggy_sdk/models/create_payment_recipient.py +100 -0
  75. pluggy_sdk/models/create_payment_request.py +102 -0
  76. pluggy_sdk/models/create_pix_qr_payment_request.py +96 -0
  77. pluggy_sdk/models/create_smart_account_request.py +102 -0
  78. pluggy_sdk/models/create_webhook.py +99 -0
  79. pluggy_sdk/models/credential_select_option.py +90 -0
  80. pluggy_sdk/models/credit_card_metadata.py +101 -0
  81. pluggy_sdk/models/credit_data.py +127 -0
  82. pluggy_sdk/models/document.py +100 -0
  83. pluggy_sdk/models/email.py +100 -0
  84. pluggy_sdk/models/global_error_response.py +94 -0
  85. pluggy_sdk/models/i_count_response.py +88 -0
  86. pluggy_sdk/models/identity_relation.py +102 -0
  87. pluggy_sdk/models/identity_response.py +149 -0
  88. pluggy_sdk/models/income_report.py +90 -0
  89. pluggy_sdk/models/income_reports_response.py +102 -0
  90. pluggy_sdk/models/investment.py +192 -0
  91. pluggy_sdk/models/investment_expenses.py +108 -0
  92. pluggy_sdk/models/investment_metadata.py +99 -0
  93. pluggy_sdk/models/investment_transaction.py +124 -0
  94. pluggy_sdk/models/investments_list200_response.py +102 -0
  95. pluggy_sdk/models/item.py +148 -0
  96. pluggy_sdk/models/item_creation_error_response.py +102 -0
  97. pluggy_sdk/models/item_error.py +94 -0
  98. pluggy_sdk/models/item_options.py +90 -0
  99. pluggy_sdk/models/loan.py +199 -0
  100. pluggy_sdk/models/loan_contracted_fee.py +118 -0
  101. pluggy_sdk/models/loan_contracted_finance_charge.py +92 -0
  102. pluggy_sdk/models/loan_installment_balloon_payment.py +95 -0
  103. pluggy_sdk/models/loan_installment_balloon_payment_amount.py +90 -0
  104. pluggy_sdk/models/loan_installments.py +130 -0
  105. pluggy_sdk/models/loan_interest_rate.py +136 -0
  106. pluggy_sdk/models/loan_payment_release.py +103 -0
  107. pluggy_sdk/models/loan_payment_release_over_parcel.py +106 -0
  108. pluggy_sdk/models/loan_payment_release_over_parcel_charge.py +92 -0
  109. pluggy_sdk/models/loan_payment_release_over_parcel_fee.py +92 -0
  110. pluggy_sdk/models/loan_payments.py +98 -0
  111. pluggy_sdk/models/loan_warranty.py +94 -0
  112. pluggy_sdk/models/loans_list200_response.py +102 -0
  113. pluggy_sdk/models/merchant.py +96 -0
  114. pluggy_sdk/models/monthly_portfolio.py +100 -0
  115. pluggy_sdk/models/monthly_portfolio_response.py +102 -0
  116. pluggy_sdk/models/not_authenticated_response.py +90 -0
  117. pluggy_sdk/models/page_response_acquirer_anticipations.py +102 -0
  118. pluggy_sdk/models/page_response_acquirer_receivables.py +102 -0
  119. pluggy_sdk/models/page_response_acquirer_sales.py +102 -0
  120. pluggy_sdk/models/page_response_category_rules.py +102 -0
  121. pluggy_sdk/models/page_response_investment_transactions.py +102 -0
  122. pluggy_sdk/models/page_response_transactions.py +102 -0
  123. pluggy_sdk/models/parameter_validation_error.py +92 -0
  124. pluggy_sdk/models/parameter_validation_response.py +98 -0
  125. pluggy_sdk/models/payment_customer.py +105 -0
  126. pluggy_sdk/models/payment_customers_list200_response.py +102 -0
  127. pluggy_sdk/models/payment_data.py +105 -0
  128. pluggy_sdk/models/payment_data_participant.py +101 -0
  129. pluggy_sdk/models/payment_institution.py +101 -0
  130. pluggy_sdk/models/payment_intent.py +145 -0
  131. pluggy_sdk/models/payment_intents_list200_response.py +102 -0
  132. pluggy_sdk/models/payment_recipient.py +106 -0
  133. pluggy_sdk/models/payment_recipient_account.py +99 -0
  134. pluggy_sdk/models/payment_recipients_institution_list200_response.py +102 -0
  135. pluggy_sdk/models/payment_recipients_list200_response.py +102 -0
  136. pluggy_sdk/models/payment_request.py +118 -0
  137. pluggy_sdk/models/payment_request_callback_urls.py +92 -0
  138. pluggy_sdk/models/payment_requests_list200_response.py +102 -0
  139. pluggy_sdk/models/percentage_over_index.py +90 -0
  140. pluggy_sdk/models/phone_number.py +100 -0
  141. pluggy_sdk/models/pix_data.py +90 -0
  142. pluggy_sdk/models/smart_account.py +107 -0
  143. pluggy_sdk/models/smart_account_address.py +112 -0
  144. pluggy_sdk/models/smart_account_balance.py +95 -0
  145. pluggy_sdk/models/smart_accounts_list200_response.py +102 -0
  146. pluggy_sdk/models/status_detail.py +142 -0
  147. pluggy_sdk/models/status_detail_product.py +101 -0
  148. pluggy_sdk/models/status_detail_product_warning.py +92 -0
  149. pluggy_sdk/models/transaction.py +145 -0
  150. pluggy_sdk/models/update_item.py +109 -0
  151. pluggy_sdk/models/update_item_parameters.py +144 -0
  152. pluggy_sdk/models/update_payment_recipient.py +100 -0
  153. pluggy_sdk/models/update_payment_request.py +102 -0
  154. pluggy_sdk/models/update_transaction.py +88 -0
  155. pluggy_sdk/models/webhook.py +106 -0
  156. pluggy_sdk/models/webhook_creation_error_response.py +90 -0
  157. pluggy_sdk/models/webhooks_list200_response.py +102 -0
  158. pluggy_sdk/py.typed +0 -0
  159. pluggy_sdk/rest.py +258 -0
  160. pluggy_sdk-1.0.0.post2.dist-info/METADATA +336 -0
  161. pluggy_sdk-1.0.0.post2.dist-info/RECORD +163 -0
  162. pluggy_sdk-1.0.0.post2.dist-info/WHEEL +5 -0
  163. pluggy_sdk-1.0.0.post2.dist-info/top_level.txt +1 -0
@@ -0,0 +1,107 @@
1
+ # coding: utf-8
2
+
3
+ """
4
+ Pluggy API
5
+
6
+ Pluggy's main API to review data and execute connectors
7
+
8
+ The version of the OpenAPI document: 1.0.0
9
+ Contact: hello@pluggy.ai
10
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
11
+
12
+ Do not edit the class manually.
13
+ """ # noqa: E501
14
+
15
+
16
+ from __future__ import annotations
17
+ import pprint
18
+ import re # noqa: F401
19
+ import json
20
+
21
+ from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr, field_validator
22
+ from typing import Any, ClassVar, Dict, List
23
+ from typing import Optional, Set
24
+ from typing_extensions import Self
25
+
26
+ class SmartAccount(BaseModel):
27
+ """
28
+ Smart account product
29
+ """ # noqa: E501
30
+ id: StrictStr = Field(description="Primary identifier of the acquirer anticipation")
31
+ ispb: StrictStr = Field(description="Smart account ISP number")
32
+ agency: StrictStr = Field(description="Smart account agency number")
33
+ number: StrictStr = Field(description="Smart account number")
34
+ verifying_digit: StrictStr = Field(description="Smart account verifying digit", alias="verifyingDigit")
35
+ type: StrictStr = Field(description="Smart account type")
36
+ is_sandbox: StrictBool = Field(description="Indicates if the smart account is a sandbox account", alias="isSandbox")
37
+ __properties: ClassVar[List[str]] = ["id", "ispb", "agency", "number", "verifyingDigit", "type", "isSandbox"]
38
+
39
+ @field_validator('type')
40
+ def type_validate_enum(cls, value):
41
+ """Validates the enum"""
42
+ if value not in set(['CHECKING_ACCOUNT']):
43
+ raise ValueError("must be one of enum values ('CHECKING_ACCOUNT')")
44
+ return value
45
+
46
+ model_config = ConfigDict(
47
+ populate_by_name=True,
48
+ validate_assignment=True,
49
+ protected_namespaces=(),
50
+ )
51
+
52
+
53
+ def to_str(self) -> str:
54
+ """Returns the string representation of the model using alias"""
55
+ return pprint.pformat(self.model_dump(by_alias=True))
56
+
57
+ def to_json(self) -> str:
58
+ """Returns the JSON representation of the model using alias"""
59
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
60
+ return json.dumps(self.to_dict())
61
+
62
+ @classmethod
63
+ def from_json(cls, json_str: str) -> Optional[Self]:
64
+ """Create an instance of SmartAccount from a JSON string"""
65
+ return cls.from_dict(json.loads(json_str))
66
+
67
+ def to_dict(self) -> Dict[str, Any]:
68
+ """Return the dictionary representation of the model using alias.
69
+
70
+ This has the following differences from calling pydantic's
71
+ `self.model_dump(by_alias=True)`:
72
+
73
+ * `None` is only added to the output dict for nullable fields that
74
+ were set at model initialization. Other fields with value `None`
75
+ are ignored.
76
+ """
77
+ excluded_fields: Set[str] = set([
78
+ ])
79
+
80
+ _dict = self.model_dump(
81
+ by_alias=True,
82
+ exclude=excluded_fields,
83
+ exclude_none=True,
84
+ )
85
+ return _dict
86
+
87
+ @classmethod
88
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
89
+ """Create an instance of SmartAccount from a dict"""
90
+ if obj is None:
91
+ return None
92
+
93
+ if not isinstance(obj, dict):
94
+ return cls.model_validate(obj)
95
+
96
+ _obj = cls.model_validate({
97
+ "id": obj.get("id"),
98
+ "ispb": obj.get("ispb"),
99
+ "agency": obj.get("agency"),
100
+ "number": obj.get("number"),
101
+ "verifyingDigit": obj.get("verifyingDigit"),
102
+ "type": obj.get("type"),
103
+ "isSandbox": obj.get("isSandbox")
104
+ })
105
+ return _obj
106
+
107
+
@@ -0,0 +1,112 @@
1
+ # coding: utf-8
2
+
3
+ """
4
+ Pluggy API
5
+
6
+ Pluggy's main API to review data and execute connectors
7
+
8
+ The version of the OpenAPI document: 1.0.0
9
+ Contact: hello@pluggy.ai
10
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
11
+
12
+ Do not edit the class manually.
13
+ """ # noqa: E501
14
+
15
+
16
+ from __future__ import annotations
17
+ import pprint
18
+ import re # noqa: F401
19
+ import json
20
+
21
+ from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr, field_validator
22
+ from typing import Any, ClassVar, Dict, List, Optional
23
+ from typing import Optional, Set
24
+ from typing_extensions import Self
25
+
26
+ class SmartAccountAddress(BaseModel):
27
+ """
28
+ Smart account owner address
29
+ """ # noqa: E501
30
+ address_type: Optional[StrictStr] = Field(default=None, description="Owner address type", alias="addressType")
31
+ postal_code: Optional[StrictStr] = Field(default=None, description="Owner address postal code", alias="postalCode")
32
+ street_name: Optional[StrictStr] = Field(default=None, description="Owner address street name", alias="streetName")
33
+ street_number: Optional[StrictStr] = Field(default=None, description="Owner address street number", alias="streetNumber")
34
+ city: StrictStr = Field(description="Owner address city")
35
+ state: Optional[StrictStr] = Field(default=None, description="Owner address state")
36
+ is_primary_address: Optional[StrictBool] = Field(default=None, description="Indicates if the owner address is the primary one", alias="isPrimaryAddress")
37
+ is_mailing_address: Optional[StrictBool] = Field(default=None, description="Indicates if the owner address is the mailing one", alias="isMailingAddress")
38
+ __properties: ClassVar[List[str]] = ["addressType", "postalCode", "streetName", "streetNumber", "city", "state", "isPrimaryAddress", "isMailingAddress"]
39
+
40
+ @field_validator('address_type')
41
+ def address_type_validate_enum(cls, value):
42
+ """Validates the enum"""
43
+ if value is None:
44
+ return value
45
+
46
+ if value not in set(['residential', 'commercial']):
47
+ raise ValueError("must be one of enum values ('residential', 'commercial')")
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 SmartAccountAddress 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
+ return _dict
90
+
91
+ @classmethod
92
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
93
+ """Create an instance of SmartAccountAddress from a dict"""
94
+ if obj is None:
95
+ return None
96
+
97
+ if not isinstance(obj, dict):
98
+ return cls.model_validate(obj)
99
+
100
+ _obj = cls.model_validate({
101
+ "addressType": obj.get("addressType"),
102
+ "postalCode": obj.get("postalCode"),
103
+ "streetName": obj.get("streetName"),
104
+ "streetNumber": obj.get("streetNumber"),
105
+ "city": obj.get("city"),
106
+ "state": obj.get("state"),
107
+ "isPrimaryAddress": obj.get("isPrimaryAddress"),
108
+ "isMailingAddress": obj.get("isMailingAddress")
109
+ })
110
+ return _obj
111
+
112
+
@@ -0,0 +1,95 @@
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
23
+ from typing import Any, ClassVar, Dict, List, Union
24
+ from typing import Optional, Set
25
+ from typing_extensions import Self
26
+
27
+ class SmartAccountBalance(BaseModel):
28
+ """
29
+ Smart account balance product
30
+ """ # noqa: E501
31
+ last_updated_at: datetime = Field(description="Balance date", alias="lastUpdatedAt")
32
+ balance: Union[StrictFloat, StrictInt] = Field(description="Smart account balance amount")
33
+ blocked_balance: Union[StrictFloat, StrictInt] = Field(description="Smart account blocked balance amount", alias="blockedBalance")
34
+ scheduled_balance: Union[StrictFloat, StrictInt] = Field(description="Smart account scheduled balance amount", alias="scheduledBalance")
35
+ __properties: ClassVar[List[str]] = ["lastUpdatedAt", "balance", "blockedBalance", "scheduledBalance"]
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 SmartAccountBalance 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 SmartAccountBalance 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
+ "lastUpdatedAt": obj.get("lastUpdatedAt"),
89
+ "balance": obj.get("balance"),
90
+ "blockedBalance": obj.get("blockedBalance"),
91
+ "scheduledBalance": obj.get("scheduledBalance")
92
+ })
93
+ return _obj
94
+
95
+
@@ -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_account import SmartAccount
24
+ from typing import Optional, Set
25
+ from typing_extensions import Self
26
+
27
+ class SmartAccountsList200Response(BaseModel):
28
+ """
29
+ SmartAccountsList200Response
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[SmartAccount]] = Field(default=None, description="List of smart accounts")
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 SmartAccountsList200Response 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 SmartAccountsList200Response 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": [SmartAccount.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,142 @@
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
22
+ from typing import Any, ClassVar, Dict, List, Optional
23
+ from pluggy_sdk.models.status_detail_product import StatusDetailProduct
24
+ from typing import Optional, Set
25
+ from typing_extensions import Self
26
+
27
+ class StatusDetail(BaseModel):
28
+ """
29
+ Detailed status of the item. This field will be present when the status is PARTIAL_SUCCESS or when a product in the item has warnings
30
+ """ # noqa: E501
31
+ accounts: Optional[StatusDetailProduct] = None
32
+ credit_cards: Optional[StatusDetailProduct] = Field(default=None, alias="creditCards")
33
+ transactions: Optional[StatusDetailProduct] = None
34
+ investments: Optional[StatusDetailProduct] = None
35
+ identity: Optional[StatusDetailProduct] = None
36
+ investment_transactions: Optional[StatusDetailProduct] = Field(default=None, alias="investmentTransactions")
37
+ payment_data: Optional[StatusDetailProduct] = Field(default=None, alias="paymentData")
38
+ income_reports: Optional[StatusDetailProduct] = Field(default=None, alias="incomeReports")
39
+ loans: Optional[StatusDetailProduct] = None
40
+ portfolio: Optional[StatusDetailProduct] = None
41
+ opportunities: Optional[StatusDetailProduct] = None
42
+ __properties: ClassVar[List[str]] = ["accounts", "creditCards", "transactions", "investments", "identity", "investmentTransactions", "paymentData", "incomeReports", "loans", "portfolio", "opportunities"]
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 StatusDetail 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 accounts
84
+ if self.accounts:
85
+ _dict['accounts'] = self.accounts.to_dict()
86
+ # override the default output from pydantic by calling `to_dict()` of credit_cards
87
+ if self.credit_cards:
88
+ _dict['creditCards'] = self.credit_cards.to_dict()
89
+ # override the default output from pydantic by calling `to_dict()` of transactions
90
+ if self.transactions:
91
+ _dict['transactions'] = self.transactions.to_dict()
92
+ # override the default output from pydantic by calling `to_dict()` of investments
93
+ if self.investments:
94
+ _dict['investments'] = self.investments.to_dict()
95
+ # override the default output from pydantic by calling `to_dict()` of identity
96
+ if self.identity:
97
+ _dict['identity'] = self.identity.to_dict()
98
+ # override the default output from pydantic by calling `to_dict()` of investment_transactions
99
+ if self.investment_transactions:
100
+ _dict['investmentTransactions'] = self.investment_transactions.to_dict()
101
+ # override the default output from pydantic by calling `to_dict()` of payment_data
102
+ if self.payment_data:
103
+ _dict['paymentData'] = self.payment_data.to_dict()
104
+ # override the default output from pydantic by calling `to_dict()` of income_reports
105
+ if self.income_reports:
106
+ _dict['incomeReports'] = self.income_reports.to_dict()
107
+ # override the default output from pydantic by calling `to_dict()` of loans
108
+ if self.loans:
109
+ _dict['loans'] = self.loans.to_dict()
110
+ # override the default output from pydantic by calling `to_dict()` of portfolio
111
+ if self.portfolio:
112
+ _dict['portfolio'] = self.portfolio.to_dict()
113
+ # override the default output from pydantic by calling `to_dict()` of opportunities
114
+ if self.opportunities:
115
+ _dict['opportunities'] = self.opportunities.to_dict()
116
+ return _dict
117
+
118
+ @classmethod
119
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
120
+ """Create an instance of StatusDetail from a dict"""
121
+ if obj is None:
122
+ return None
123
+
124
+ if not isinstance(obj, dict):
125
+ return cls.model_validate(obj)
126
+
127
+ _obj = cls.model_validate({
128
+ "accounts": StatusDetailProduct.from_dict(obj["accounts"]) if obj.get("accounts") is not None else None,
129
+ "creditCards": StatusDetailProduct.from_dict(obj["creditCards"]) if obj.get("creditCards") is not None else None,
130
+ "transactions": StatusDetailProduct.from_dict(obj["transactions"]) if obj.get("transactions") is not None else None,
131
+ "investments": StatusDetailProduct.from_dict(obj["investments"]) if obj.get("investments") is not None else None,
132
+ "identity": StatusDetailProduct.from_dict(obj["identity"]) if obj.get("identity") is not None else None,
133
+ "investmentTransactions": StatusDetailProduct.from_dict(obj["investmentTransactions"]) if obj.get("investmentTransactions") is not None else None,
134
+ "paymentData": StatusDetailProduct.from_dict(obj["paymentData"]) if obj.get("paymentData") is not None else None,
135
+ "incomeReports": StatusDetailProduct.from_dict(obj["incomeReports"]) if obj.get("incomeReports") is not None else None,
136
+ "loans": StatusDetailProduct.from_dict(obj["loans"]) if obj.get("loans") is not None else None,
137
+ "portfolio": StatusDetailProduct.from_dict(obj["portfolio"]) if obj.get("portfolio") is not None else None,
138
+ "opportunities": StatusDetailProduct.from_dict(obj["opportunities"]) if obj.get("opportunities") is not None else None
139
+ })
140
+ return _obj
141
+
142
+
@@ -0,0 +1,101 @@
1
+ # coding: utf-8
2
+
3
+ """
4
+ Pluggy API
5
+
6
+ Pluggy's main API to review data and execute connectors
7
+
8
+ The version of the OpenAPI document: 1.0.0
9
+ Contact: hello@pluggy.ai
10
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
11
+
12
+ Do not edit the class manually.
13
+ """ # noqa: E501
14
+
15
+
16
+ from __future__ import annotations
17
+ import pprint
18
+ import re # noqa: F401
19
+ import json
20
+
21
+ from datetime import datetime
22
+ from pydantic import BaseModel, ConfigDict, Field, StrictBool
23
+ from typing import Any, ClassVar, Dict, List, Optional
24
+ from pluggy_sdk.models.status_detail_product_warning import StatusDetailProductWarning
25
+ from typing import Optional, Set
26
+ from typing_extensions import Self
27
+
28
+ class StatusDetailProduct(BaseModel):
29
+ """
30
+ Detailed status of the product
31
+ """ # noqa: E501
32
+ last_updated_at: Optional[datetime] = Field(default=None, description="Date when the product was last updated", alias="lastUpdatedAt")
33
+ is_updated: Optional[StrictBool] = Field(default=None, description="Product was updated in the last execution", alias="isUpdated")
34
+ warnings: Optional[List[StatusDetailProductWarning]] = Field(default=None, description="Warnings about the product data. For example, a warning about missing permissions for viewing a product")
35
+ __properties: ClassVar[List[str]] = ["lastUpdatedAt", "isUpdated", "warnings"]
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 StatusDetailProduct 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 warnings (list)
77
+ _items = []
78
+ if self.warnings:
79
+ for _item in self.warnings:
80
+ if _item:
81
+ _items.append(_item.to_dict())
82
+ _dict['warnings'] = _items
83
+ return _dict
84
+
85
+ @classmethod
86
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
87
+ """Create an instance of StatusDetailProduct 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
+ "lastUpdatedAt": obj.get("lastUpdatedAt"),
96
+ "isUpdated": obj.get("isUpdated"),
97
+ "warnings": [StatusDetailProductWarning.from_dict(_item) for _item in obj["warnings"]] if obj.get("warnings") is not None else None
98
+ })
99
+ return _obj
100
+
101
+