pluggy-sdk 1.0.0.post20__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 (213) hide show
  1. pluggy_sdk/__init__.py +220 -0
  2. pluggy_sdk/api/__init__.py +30 -0
  3. pluggy_sdk/api/account_api.py +588 -0
  4. pluggy_sdk/api/acquirer_anticipation_api.py +664 -0
  5. pluggy_sdk/api/acquirer_receivable_api.py +664 -0
  6. pluggy_sdk/api/acquirer_sale_api.py +664 -0
  7. pluggy_sdk/api/auth_api.py +605 -0
  8. pluggy_sdk/api/benefit_api.py +567 -0
  9. pluggy_sdk/api/bill_api.py +567 -0
  10. pluggy_sdk/api/bulk_payment_api.py +1127 -0
  11. pluggy_sdk/api/category_api.py +1096 -0
  12. pluggy_sdk/api/connector_api.py +979 -0
  13. pluggy_sdk/api/consent_api.py +576 -0
  14. pluggy_sdk/api/identity_api.py +581 -0
  15. pluggy_sdk/api/income_report_api.py +311 -0
  16. pluggy_sdk/api/investment_api.py +918 -0
  17. pluggy_sdk/api/items_api.py +1456 -0
  18. pluggy_sdk/api/loan_api.py +567 -0
  19. pluggy_sdk/api/payment_customer_api.py +1414 -0
  20. pluggy_sdk/api/payment_intent_api.py +842 -0
  21. pluggy_sdk/api/payment_receipts_api.py +842 -0
  22. pluggy_sdk/api/payment_recipient_api.py +1997 -0
  23. pluggy_sdk/api/payment_request_api.py +2739 -0
  24. pluggy_sdk/api/payment_schedule_api.py +823 -0
  25. pluggy_sdk/api/payroll_loan_api.py +561 -0
  26. pluggy_sdk/api/portfolio_yield_api.py +580 -0
  27. pluggy_sdk/api/smart_account_api.py +1704 -0
  28. pluggy_sdk/api/smart_account_transfer_api.py +610 -0
  29. pluggy_sdk/api/smart_transfer_api.py +1406 -0
  30. pluggy_sdk/api/transaction_api.py +963 -0
  31. pluggy_sdk/api/webhook_api.py +1406 -0
  32. pluggy_sdk/api_client.py +798 -0
  33. pluggy_sdk/api_response.py +21 -0
  34. pluggy_sdk/configuration.py +480 -0
  35. pluggy_sdk/exceptions.py +200 -0
  36. pluggy_sdk/models/__init__.py +178 -0
  37. pluggy_sdk/models/account.py +134 -0
  38. pluggy_sdk/models/accounts_list200_response.py +102 -0
  39. pluggy_sdk/models/acquirer_anticipation.py +117 -0
  40. pluggy_sdk/models/acquirer_anticipation_data.py +101 -0
  41. pluggy_sdk/models/acquirer_data.py +113 -0
  42. pluggy_sdk/models/acquirer_receivable.py +143 -0
  43. pluggy_sdk/models/acquirer_receivable_data.py +108 -0
  44. pluggy_sdk/models/acquirer_receivable_data_establishment.py +96 -0
  45. pluggy_sdk/models/acquirer_receivable_destination_account.py +92 -0
  46. pluggy_sdk/models/acquirer_receivable_related_sale.py +99 -0
  47. pluggy_sdk/models/acquirer_sale.py +171 -0
  48. pluggy_sdk/models/acquirer_sale_data.py +150 -0
  49. pluggy_sdk/models/acquirer_sale_installment.py +93 -0
  50. pluggy_sdk/models/acquirer_sale_installment_data.py +95 -0
  51. pluggy_sdk/models/address.py +110 -0
  52. pluggy_sdk/models/aggregated_portfolio.py +120 -0
  53. pluggy_sdk/models/aggregated_portfolio_response.py +102 -0
  54. pluggy_sdk/models/asset_distribution.py +88 -0
  55. pluggy_sdk/models/auth_request.py +90 -0
  56. pluggy_sdk/models/auth_response.py +88 -0
  57. pluggy_sdk/models/bank_data.py +92 -0
  58. pluggy_sdk/models/benefit_loan.py +121 -0
  59. pluggy_sdk/models/benefit_loan_client.py +102 -0
  60. pluggy_sdk/models/benefit_response.py +118 -0
  61. pluggy_sdk/models/benefit_response_paying_institution.py +94 -0
  62. pluggy_sdk/models/benefits_list200_response.py +102 -0
  63. pluggy_sdk/models/bill.py +109 -0
  64. pluggy_sdk/models/bill_finance_charge.py +103 -0
  65. pluggy_sdk/models/bills_list200_response.py +102 -0
  66. pluggy_sdk/models/boleto.py +121 -0
  67. pluggy_sdk/models/boleto_payer.py +90 -0
  68. pluggy_sdk/models/boleto_recipient.py +90 -0
  69. pluggy_sdk/models/bulk_payment.py +128 -0
  70. pluggy_sdk/models/bulk_payments_list200_response.py +102 -0
  71. pluggy_sdk/models/category.py +96 -0
  72. pluggy_sdk/models/client_category_rule.py +94 -0
  73. pluggy_sdk/models/company.py +90 -0
  74. pluggy_sdk/models/connect_token_request.py +94 -0
  75. pluggy_sdk/models/connect_token_response.py +88 -0
  76. pluggy_sdk/models/connector.py +145 -0
  77. pluggy_sdk/models/connector_credential.py +121 -0
  78. pluggy_sdk/models/connector_health.py +96 -0
  79. pluggy_sdk/models/connector_health_details.py +90 -0
  80. pluggy_sdk/models/connector_list_response.py +102 -0
  81. pluggy_sdk/models/connector_user_action.py +93 -0
  82. pluggy_sdk/models/consent.py +120 -0
  83. pluggy_sdk/models/create_boleto_payment_request.py +98 -0
  84. pluggy_sdk/models/create_bulk_payment.py +96 -0
  85. pluggy_sdk/models/create_client_category_rule.py +92 -0
  86. pluggy_sdk/models/create_item.py +113 -0
  87. pluggy_sdk/models/create_item_parameters.py +144 -0
  88. pluggy_sdk/models/create_or_update_payment_customer.py +105 -0
  89. pluggy_sdk/models/create_payment_customer_request_body.py +103 -0
  90. pluggy_sdk/models/create_payment_intent.py +110 -0
  91. pluggy_sdk/models/create_payment_recipient.py +104 -0
  92. pluggy_sdk/models/create_payment_request.py +110 -0
  93. pluggy_sdk/models/create_pix_qr_payment_request.py +96 -0
  94. pluggy_sdk/models/create_smart_account_request.py +102 -0
  95. pluggy_sdk/models/create_smart_account_transfer_request.py +92 -0
  96. pluggy_sdk/models/create_smart_transfer_payment.py +96 -0
  97. pluggy_sdk/models/create_smart_transfer_preauthorization.py +104 -0
  98. pluggy_sdk/models/create_webhook.py +99 -0
  99. pluggy_sdk/models/credential_select_option.py +90 -0
  100. pluggy_sdk/models/credit_card_metadata.py +101 -0
  101. pluggy_sdk/models/credit_data.py +127 -0
  102. pluggy_sdk/models/custom.py +100 -0
  103. pluggy_sdk/models/daily.py +101 -0
  104. pluggy_sdk/models/document.py +100 -0
  105. pluggy_sdk/models/email.py +100 -0
  106. pluggy_sdk/models/global_error_response.py +94 -0
  107. pluggy_sdk/models/i_count_response.py +88 -0
  108. pluggy_sdk/models/identity_relation.py +102 -0
  109. pluggy_sdk/models/identity_response.py +149 -0
  110. pluggy_sdk/models/income_report.py +90 -0
  111. pluggy_sdk/models/income_reports_response.py +102 -0
  112. pluggy_sdk/models/investment.py +192 -0
  113. pluggy_sdk/models/investment_expenses.py +108 -0
  114. pluggy_sdk/models/investment_metadata.py +100 -0
  115. pluggy_sdk/models/investment_transaction.py +124 -0
  116. pluggy_sdk/models/investments_list200_response.py +102 -0
  117. pluggy_sdk/models/item.py +150 -0
  118. pluggy_sdk/models/item_creation_error_response.py +102 -0
  119. pluggy_sdk/models/item_error.py +94 -0
  120. pluggy_sdk/models/item_options.py +90 -0
  121. pluggy_sdk/models/loan.py +199 -0
  122. pluggy_sdk/models/loan_contracted_fee.py +118 -0
  123. pluggy_sdk/models/loan_contracted_finance_charge.py +92 -0
  124. pluggy_sdk/models/loan_installment_balloon_payment.py +95 -0
  125. pluggy_sdk/models/loan_installment_balloon_payment_amount.py +90 -0
  126. pluggy_sdk/models/loan_installments.py +130 -0
  127. pluggy_sdk/models/loan_interest_rate.py +136 -0
  128. pluggy_sdk/models/loan_payment_release.py +103 -0
  129. pluggy_sdk/models/loan_payment_release_over_parcel.py +106 -0
  130. pluggy_sdk/models/loan_payment_release_over_parcel_charge.py +92 -0
  131. pluggy_sdk/models/loan_payment_release_over_parcel_fee.py +92 -0
  132. pluggy_sdk/models/loan_payments.py +98 -0
  133. pluggy_sdk/models/loan_warranty.py +94 -0
  134. pluggy_sdk/models/loans_list200_response.py +102 -0
  135. pluggy_sdk/models/merchant.py +96 -0
  136. pluggy_sdk/models/monthly.py +103 -0
  137. pluggy_sdk/models/monthly_portfolio.py +100 -0
  138. pluggy_sdk/models/monthly_portfolio_response.py +102 -0
  139. pluggy_sdk/models/not_authenticated_response.py +90 -0
  140. pluggy_sdk/models/page_response_acquirer_anticipations.py +102 -0
  141. pluggy_sdk/models/page_response_acquirer_receivables.py +102 -0
  142. pluggy_sdk/models/page_response_acquirer_sales.py +102 -0
  143. pluggy_sdk/models/page_response_category_rules.py +102 -0
  144. pluggy_sdk/models/page_response_consents.py +102 -0
  145. pluggy_sdk/models/page_response_investment_transactions.py +102 -0
  146. pluggy_sdk/models/page_response_transactions.py +102 -0
  147. pluggy_sdk/models/parameter_validation_error.py +92 -0
  148. pluggy_sdk/models/parameter_validation_response.py +98 -0
  149. pluggy_sdk/models/payment_customer.py +105 -0
  150. pluggy_sdk/models/payment_customers_list200_response.py +102 -0
  151. pluggy_sdk/models/payment_data.py +105 -0
  152. pluggy_sdk/models/payment_data_participant.py +102 -0
  153. pluggy_sdk/models/payment_institution.py +101 -0
  154. pluggy_sdk/models/payment_intent.py +145 -0
  155. pluggy_sdk/models/payment_intent_parameter.py +90 -0
  156. pluggy_sdk/models/payment_intents_list200_response.py +102 -0
  157. pluggy_sdk/models/payment_receipt.py +120 -0
  158. pluggy_sdk/models/payment_receipt_bank_account.py +92 -0
  159. pluggy_sdk/models/payment_receipt_person.py +96 -0
  160. pluggy_sdk/models/payment_recipient.py +110 -0
  161. pluggy_sdk/models/payment_recipient_account.py +92 -0
  162. pluggy_sdk/models/payment_recipients_institution_list200_response.py +102 -0
  163. pluggy_sdk/models/payment_recipients_list200_response.py +102 -0
  164. pluggy_sdk/models/payment_request.py +132 -0
  165. pluggy_sdk/models/payment_request_callback_urls.py +92 -0
  166. pluggy_sdk/models/payment_request_receipt_list200_response.py +102 -0
  167. pluggy_sdk/models/payment_request_schedule.py +183 -0
  168. pluggy_sdk/models/payment_requests_list200_response.py +102 -0
  169. pluggy_sdk/models/payment_schedules_list200_response.py +102 -0
  170. pluggy_sdk/models/payroll_loan.py +121 -0
  171. pluggy_sdk/models/payroll_loan_client.py +102 -0
  172. pluggy_sdk/models/payroll_loan_response.py +125 -0
  173. pluggy_sdk/models/payroll_loan_response_client.py +102 -0
  174. pluggy_sdk/models/payroll_loans_list200_response.py +102 -0
  175. pluggy_sdk/models/percentage_over_index.py +90 -0
  176. pluggy_sdk/models/phone_number.py +100 -0
  177. pluggy_sdk/models/pix_data.py +90 -0
  178. pluggy_sdk/models/schedule_payment.py +102 -0
  179. pluggy_sdk/models/schedule_type_custom.py +100 -0
  180. pluggy_sdk/models/schedule_type_daily.py +101 -0
  181. pluggy_sdk/models/schedule_type_monthly.py +103 -0
  182. pluggy_sdk/models/schedule_type_single.py +98 -0
  183. pluggy_sdk/models/schedule_type_weekly.py +110 -0
  184. pluggy_sdk/models/single.py +98 -0
  185. pluggy_sdk/models/smart_account.py +107 -0
  186. pluggy_sdk/models/smart_account_address.py +112 -0
  187. pluggy_sdk/models/smart_account_balance.py +95 -0
  188. pluggy_sdk/models/smart_account_transfer.py +123 -0
  189. pluggy_sdk/models/smart_accounts_list200_response.py +102 -0
  190. pluggy_sdk/models/smart_tranfers_preauthorizations_list200_response.py +102 -0
  191. pluggy_sdk/models/smart_transfer_callback_urls.py +90 -0
  192. pluggy_sdk/models/smart_transfer_payment.py +116 -0
  193. pluggy_sdk/models/smart_transfer_preauthorization.py +128 -0
  194. pluggy_sdk/models/smart_transfer_preauthorization_parameter.py +90 -0
  195. pluggy_sdk/models/status_detail.py +142 -0
  196. pluggy_sdk/models/status_detail_product.py +101 -0
  197. pluggy_sdk/models/status_detail_product_warning.py +92 -0
  198. pluggy_sdk/models/transaction.py +145 -0
  199. pluggy_sdk/models/update_item.py +109 -0
  200. pluggy_sdk/models/update_item_parameters.py +144 -0
  201. pluggy_sdk/models/update_payment_recipient.py +102 -0
  202. pluggy_sdk/models/update_payment_request.py +102 -0
  203. pluggy_sdk/models/update_transaction.py +88 -0
  204. pluggy_sdk/models/webhook.py +106 -0
  205. pluggy_sdk/models/webhook_creation_error_response.py +90 -0
  206. pluggy_sdk/models/webhooks_list200_response.py +102 -0
  207. pluggy_sdk/models/weekly.py +110 -0
  208. pluggy_sdk/py.typed +0 -0
  209. pluggy_sdk/rest.py +258 -0
  210. pluggy_sdk-1.0.0.post20.dist-info/METADATA +388 -0
  211. pluggy_sdk-1.0.0.post20.dist-info/RECORD +213 -0
  212. pluggy_sdk-1.0.0.post20.dist-info/WHEEL +5 -0
  213. pluggy_sdk-1.0.0.post20.dist-info/top_level.txt +1 -0
@@ -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
+
@@ -0,0 +1,98 @@
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.payment_request_callback_urls import PaymentRequestCallbackUrls
24
+ from typing import Optional, Set
25
+ from typing_extensions import Self
26
+
27
+ class CreateBoletoPaymentRequest(BaseModel):
28
+ """
29
+ Request with information to create a boleto payment request
30
+ """ # noqa: E501
31
+ description: Optional[StrictStr] = Field(default=None, description="Payment description")
32
+ boleto_digitable_line: StrictStr = Field(description="Boleto digitable line", alias="boletoDigitableLine")
33
+ callback_urls: Optional[PaymentRequestCallbackUrls] = Field(default=None, alias="callbackUrls")
34
+ customer_id: Optional[StrictStr] = Field(default=None, description="Customer identifier associated to the payment", alias="customerId")
35
+ __properties: ClassVar[List[str]] = ["description", "boletoDigitableLine", "callbackUrls", "customerId"]
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 CreateBoletoPaymentRequest 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 callback_urls
77
+ if self.callback_urls:
78
+ _dict['callbackUrls'] = self.callback_urls.to_dict()
79
+ return _dict
80
+
81
+ @classmethod
82
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
83
+ """Create an instance of CreateBoletoPaymentRequest 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
+ "description": obj.get("description"),
92
+ "boletoDigitableLine": obj.get("boletoDigitableLine"),
93
+ "callbackUrls": PaymentRequestCallbackUrls.from_dict(obj["callbackUrls"]) if obj.get("callbackUrls") is not None else None,
94
+ "customerId": obj.get("customerId")
95
+ })
96
+ return _obj
97
+
98
+
@@ -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, StrictStr
22
+ from typing import Any, ClassVar, Dict, List, Optional
23
+ from pluggy_sdk.models.payment_request_callback_urls import PaymentRequestCallbackUrls
24
+ from typing import Optional, Set
25
+ from typing_extensions import Self
26
+
27
+ class CreateBulkPayment(BaseModel):
28
+ """
29
+ Request with information to create a bulk payment
30
+ """ # noqa: E501
31
+ payment_request_ids: List[StrictStr] = Field(description="List of payment request identifiers to be associated with the bulk payment", alias="paymentRequestIds")
32
+ callback_urls: Optional[PaymentRequestCallbackUrls] = Field(default=None, alias="callbackUrls")
33
+ smart_account_id: StrictStr = Field(description="Smart account identifier associated with the bulk payment", alias="smartAccountId")
34
+ __properties: ClassVar[List[str]] = ["paymentRequestIds", "callbackUrls", "smartAccountId"]
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 CreateBulkPayment 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
+ # override the default output from pydantic by calling `to_dict()` of callback_urls
76
+ if self.callback_urls:
77
+ _dict['callbackUrls'] = self.callback_urls.to_dict()
78
+ return _dict
79
+
80
+ @classmethod
81
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
82
+ """Create an instance of CreateBulkPayment from a dict"""
83
+ if obj is None:
84
+ return None
85
+
86
+ if not isinstance(obj, dict):
87
+ return cls.model_validate(obj)
88
+
89
+ _obj = cls.model_validate({
90
+ "paymentRequestIds": obj.get("paymentRequestIds"),
91
+ "callbackUrls": PaymentRequestCallbackUrls.from_dict(obj["callbackUrls"]) if obj.get("callbackUrls") is not None else None,
92
+ "smartAccountId": obj.get("smartAccountId")
93
+ })
94
+ return _obj
95
+
96
+
@@ -0,0 +1,92 @@
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
23
+ from typing import Optional, Set
24
+ from typing_extensions import Self
25
+
26
+ class CreateClientCategoryRule(BaseModel):
27
+ """
28
+ Create client category rule
29
+ """ # noqa: E501
30
+ description: StrictStr = Field(description="Description of the transaction rule.")
31
+ category_id: StrictStr = Field(description="Identifier of the category", alias="categoryId")
32
+ client_id: StrictStr = Field(description="Identifier of the client", alias="clientId")
33
+ __properties: ClassVar[List[str]] = ["description", "categoryId", "clientId"]
34
+
35
+ model_config = ConfigDict(
36
+ populate_by_name=True,
37
+ validate_assignment=True,
38
+ protected_namespaces=(),
39
+ )
40
+
41
+
42
+ def to_str(self) -> str:
43
+ """Returns the string representation of the model using alias"""
44
+ return pprint.pformat(self.model_dump(by_alias=True))
45
+
46
+ def to_json(self) -> str:
47
+ """Returns the JSON representation of the model using alias"""
48
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
49
+ return json.dumps(self.to_dict())
50
+
51
+ @classmethod
52
+ def from_json(cls, json_str: str) -> Optional[Self]:
53
+ """Create an instance of CreateClientCategoryRule from a JSON string"""
54
+ return cls.from_dict(json.loads(json_str))
55
+
56
+ def to_dict(self) -> Dict[str, Any]:
57
+ """Return the dictionary representation of the model using alias.
58
+
59
+ This has the following differences from calling pydantic's
60
+ `self.model_dump(by_alias=True)`:
61
+
62
+ * `None` is only added to the output dict for nullable fields that
63
+ were set at model initialization. Other fields with value `None`
64
+ are ignored.
65
+ """
66
+ excluded_fields: Set[str] = set([
67
+ ])
68
+
69
+ _dict = self.model_dump(
70
+ by_alias=True,
71
+ exclude=excluded_fields,
72
+ exclude_none=True,
73
+ )
74
+ return _dict
75
+
76
+ @classmethod
77
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
78
+ """Create an instance of CreateClientCategoryRule from a dict"""
79
+ if obj is None:
80
+ return None
81
+
82
+ if not isinstance(obj, dict):
83
+ return cls.model_validate(obj)
84
+
85
+ _obj = cls.model_validate({
86
+ "description": obj.get("description"),
87
+ "categoryId": obj.get("categoryId"),
88
+ "clientId": obj.get("clientId")
89
+ })
90
+ return _obj
91
+
92
+
@@ -0,0 +1,113 @@
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, field_validator
22
+ from typing import Any, ClassVar, Dict, List, Optional, Union
23
+ from pluggy_sdk.models.create_item_parameters import CreateItemParameters
24
+ from typing import Optional, Set
25
+ from typing_extensions import Self
26
+
27
+ class CreateItem(BaseModel):
28
+ """
29
+ Create Item Request
30
+ """ # noqa: E501
31
+ connector_id: Union[StrictFloat, StrictInt] = Field(description="Primary identifier of the connector", alias="connectorId")
32
+ parameters: CreateItemParameters
33
+ webhook_url: Optional[StrictStr] = Field(default=None, description="Url to be notified of item changes", alias="webhookUrl")
34
+ client_user_id: Optional[StrictStr] = Field(default=None, description="Client's identifier for the user, it can be a ID, UUID or even an email.", alias="clientUserId")
35
+ oauth_redirect_uri: Optional[StrictStr] = Field(default=None, description="Redirect URI required for the Oauth flow", alias="oauthRedirectUri")
36
+ products: Optional[List[StrictStr]] = Field(default=None, description="Products to be collected in the connection")
37
+ __properties: ClassVar[List[str]] = ["connectorId", "parameters", "webhookUrl", "clientUserId", "oauthRedirectUri", "products"]
38
+
39
+ @field_validator('products')
40
+ def products_validate_enum(cls, value):
41
+ """Validates the enum"""
42
+ if value is None:
43
+ return value
44
+
45
+ for i in value:
46
+ 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']):
47
+ 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')")
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 CreateItem from a JSON string"""
69
+ return cls.from_dict(json.loads(json_str))
70
+
71
+ def to_dict(self) -> Dict[str, Any]:
72
+ """Return the dictionary representation of the model using alias.
73
+
74
+ This has the following differences from calling pydantic's
75
+ `self.model_dump(by_alias=True)`:
76
+
77
+ * `None` is only added to the output dict for nullable fields that
78
+ were set at model initialization. Other fields with value `None`
79
+ are ignored.
80
+ """
81
+ excluded_fields: Set[str] = set([
82
+ ])
83
+
84
+ _dict = self.model_dump(
85
+ by_alias=True,
86
+ exclude=excluded_fields,
87
+ exclude_none=True,
88
+ )
89
+ # override the default output from pydantic by calling `to_dict()` of parameters
90
+ if self.parameters:
91
+ _dict['parameters'] = self.parameters.to_dict()
92
+ return _dict
93
+
94
+ @classmethod
95
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
96
+ """Create an instance of CreateItem from a dict"""
97
+ if obj is None:
98
+ return None
99
+
100
+ if not isinstance(obj, dict):
101
+ return cls.model_validate(obj)
102
+
103
+ _obj = cls.model_validate({
104
+ "connectorId": obj.get("connectorId"),
105
+ "parameters": CreateItemParameters.from_dict(obj["parameters"]) if obj.get("parameters") is not None else None,
106
+ "webhookUrl": obj.get("webhookUrl"),
107
+ "clientUserId": obj.get("clientUserId"),
108
+ "oauthRedirectUri": obj.get("oauthRedirectUri"),
109
+ "products": obj.get("products")
110
+ })
111
+ return _obj
112
+
113
+
@@ -0,0 +1,144 @@
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 json
18
+ import pprint
19
+ from pydantic import BaseModel, ConfigDict, Field, StrictStr, ValidationError, field_validator
20
+ from typing import Any, Dict, List, Optional
21
+ from pydantic import StrictStr, Field
22
+ from typing import Union, List, Set, Optional, Dict
23
+ from typing_extensions import Literal, Self
24
+
25
+ CREATEITEMPARAMETERS_ONE_OF_SCHEMAS = ["object", "str"]
26
+
27
+ class CreateItemParameters(BaseModel):
28
+ """
29
+ Connector's credentials that are required to execute on a Key-Value object or a string if they are encrypted
30
+ """
31
+ # data type: object
32
+ oneof_schema_1_validator: Optional[Dict[str, Any]] = None
33
+ # data type: str
34
+ oneof_schema_2_validator: Optional[StrictStr] = None
35
+ actual_instance: Optional[Union[object, str]] = None
36
+ one_of_schemas: Set[str] = { "object", "str" }
37
+
38
+ model_config = ConfigDict(
39
+ validate_assignment=True,
40
+ protected_namespaces=(),
41
+ )
42
+
43
+
44
+ def __init__(self, *args, **kwargs) -> None:
45
+ if args:
46
+ if len(args) > 1:
47
+ raise ValueError("If a position argument is used, only 1 is allowed to set `actual_instance`")
48
+ if kwargs:
49
+ raise ValueError("If a position argument is used, keyword arguments cannot be used.")
50
+ super().__init__(actual_instance=args[0])
51
+ else:
52
+ super().__init__(**kwargs)
53
+
54
+ @field_validator('actual_instance')
55
+ def actual_instance_must_validate_oneof(cls, v):
56
+ instance = CreateItemParameters.model_construct()
57
+ error_messages = []
58
+ match = 0
59
+ # validate data type: object
60
+ try:
61
+ instance.oneof_schema_1_validator = v
62
+ match += 1
63
+ except (ValidationError, ValueError) as e:
64
+ error_messages.append(str(e))
65
+ # validate data type: str
66
+ try:
67
+ instance.oneof_schema_2_validator = v
68
+ match += 1
69
+ except (ValidationError, ValueError) as e:
70
+ error_messages.append(str(e))
71
+ if match > 1:
72
+ # more than 1 match
73
+ raise ValueError("Multiple matches found when setting `actual_instance` in CreateItemParameters with oneOf schemas: object, str. Details: " + ", ".join(error_messages))
74
+ elif match == 0:
75
+ # no match
76
+ raise ValueError("No match found when setting `actual_instance` in CreateItemParameters with oneOf schemas: object, str. Details: " + ", ".join(error_messages))
77
+ else:
78
+ return v
79
+
80
+ @classmethod
81
+ def from_dict(cls, obj: Union[str, Dict[str, Any]]) -> Self:
82
+ return cls.from_json(json.dumps(obj))
83
+
84
+ @classmethod
85
+ def from_json(cls, json_str: str) -> Self:
86
+ """Returns the object represented by the json string"""
87
+ instance = cls.model_construct()
88
+ error_messages = []
89
+ match = 0
90
+
91
+ # deserialize data into object
92
+ try:
93
+ # validation
94
+ instance.oneof_schema_1_validator = json.loads(json_str)
95
+ # assign value to actual_instance
96
+ instance.actual_instance = instance.oneof_schema_1_validator
97
+ match += 1
98
+ except (ValidationError, ValueError) as e:
99
+ error_messages.append(str(e))
100
+ # deserialize data into str
101
+ try:
102
+ # validation
103
+ instance.oneof_schema_2_validator = json.loads(json_str)
104
+ # assign value to actual_instance
105
+ instance.actual_instance = instance.oneof_schema_2_validator
106
+ match += 1
107
+ except (ValidationError, ValueError) as e:
108
+ error_messages.append(str(e))
109
+
110
+ if match > 1:
111
+ # more than 1 match
112
+ raise ValueError("Multiple matches found when deserializing the JSON string into CreateItemParameters with oneOf schemas: object, str. Details: " + ", ".join(error_messages))
113
+ elif match == 0:
114
+ # no match
115
+ raise ValueError("No match found when deserializing the JSON string into CreateItemParameters with oneOf schemas: object, str. Details: " + ", ".join(error_messages))
116
+ else:
117
+ return instance
118
+
119
+ def to_json(self) -> str:
120
+ """Returns the JSON representation of the actual instance"""
121
+ if self.actual_instance is None:
122
+ return "null"
123
+
124
+ if hasattr(self.actual_instance, "to_json") and callable(self.actual_instance.to_json):
125
+ return self.actual_instance.to_json()
126
+ else:
127
+ return json.dumps(self.actual_instance)
128
+
129
+ def to_dict(self) -> Optional[Union[Dict[str, Any], object, str]]:
130
+ """Returns the dict representation of the actual instance"""
131
+ if self.actual_instance is None:
132
+ return None
133
+
134
+ if hasattr(self.actual_instance, "to_dict") and callable(self.actual_instance.to_dict):
135
+ return self.actual_instance.to_dict()
136
+ else:
137
+ # primitive type
138
+ return self.actual_instance
139
+
140
+ def to_str(self) -> str:
141
+ """Returns the string representation of the actual instance"""
142
+ return pprint.pformat(self.model_dump())
143
+
144
+