pluggy-sdk 1.0.0.post36__py3-none-any.whl → 1.0.0.post38__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 (33) hide show
  1. pluggy_sdk/__init__.py +12 -1
  2. pluggy_sdk/api/__init__.py +1 -0
  3. pluggy_sdk/api/boleto_management_api.py +1375 -0
  4. pluggy_sdk/api/payment_recipient_api.py +1 -18
  5. pluggy_sdk/api/transaction_api.py +46 -3
  6. pluggy_sdk/api_client.py +1 -1
  7. pluggy_sdk/configuration.py +1 -1
  8. pluggy_sdk/models/__init__.py +10 -0
  9. pluggy_sdk/models/boleto_connection.py +95 -0
  10. pluggy_sdk/models/create_boleto.py +94 -0
  11. pluggy_sdk/models/create_boleto_boleto.py +100 -0
  12. pluggy_sdk/models/create_boleto_boleto_payer.py +98 -0
  13. pluggy_sdk/models/create_boleto_connection.py +91 -0
  14. pluggy_sdk/models/create_boleto_connection_from_item.py +88 -0
  15. pluggy_sdk/models/create_item.py +1 -1
  16. pluggy_sdk/models/create_or_update_payment_customer.py +1 -1
  17. pluggy_sdk/models/create_payment_customer_request_body.py +1 -1
  18. pluggy_sdk/models/create_payment_recipient.py +2 -4
  19. pluggy_sdk/models/create_webhook.py +2 -2
  20. pluggy_sdk/models/investment.py +1 -11
  21. pluggy_sdk/models/issued_boleto.py +121 -0
  22. pluggy_sdk/models/issued_boleto_payer.py +126 -0
  23. pluggy_sdk/models/item_options.py +1 -1
  24. pluggy_sdk/models/payment_intent.py +8 -2
  25. pluggy_sdk/models/payment_intent_error_detail.py +94 -0
  26. pluggy_sdk/models/payment_request.py +8 -2
  27. pluggy_sdk/models/payment_request_error_detail.py +90 -0
  28. pluggy_sdk/models/update_item.py +1 -1
  29. pluggy_sdk/models/update_payment_recipient.py +2 -4
  30. {pluggy_sdk-1.0.0.post36.dist-info → pluggy_sdk-1.0.0.post38.dist-info}/METADATA +17 -2
  31. {pluggy_sdk-1.0.0.post36.dist-info → pluggy_sdk-1.0.0.post38.dist-info}/RECORD +33 -22
  32. {pluggy_sdk-1.0.0.post36.dist-info → pluggy_sdk-1.0.0.post38.dist-info}/WHEEL +0 -0
  33. {pluggy_sdk-1.0.0.post36.dist-info → pluggy_sdk-1.0.0.post38.dist-info}/top_level.txt +0 -0
@@ -17,7 +17,7 @@ from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt
17
17
  from typing import Any, Dict, List, Optional, Tuple, Union
18
18
  from typing_extensions import Annotated
19
19
 
20
- from pydantic import Field, StrictBool, StrictFloat, StrictInt, StrictStr
20
+ from pydantic import Field, StrictFloat, StrictInt, StrictStr
21
21
  from typing import Optional, Union
22
22
  from typing_extensions import Annotated
23
23
  from pluggy_sdk.models.create_payment_recipient import CreatePaymentRecipient
@@ -1703,7 +1703,6 @@ class PaymentRecipientApi:
1703
1703
  @validate_call
1704
1704
  def payment_recipients_list(
1705
1705
  self,
1706
- is_default: Annotated[Optional[StrictBool], Field(description="Filter recipients only if its default or not")] = None,
1707
1706
  page_size: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="Page size for the paging request, default: 20")] = None,
1708
1707
  page: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="Page number for the paging request, default: 1")] = None,
1709
1708
  _request_timeout: Union[
@@ -1723,8 +1722,6 @@ class PaymentRecipientApi:
1723
1722
 
1724
1723
  Recovers all created payment recipients
1725
1724
 
1726
- :param is_default: Filter recipients only if its default or not
1727
- :type is_default: bool
1728
1725
  :param page_size: Page size for the paging request, default: 20
1729
1726
  :type page_size: float
1730
1727
  :param page: Page number for the paging request, default: 1
@@ -1752,7 +1749,6 @@ class PaymentRecipientApi:
1752
1749
  """ # noqa: E501
1753
1750
 
1754
1751
  _param = self._payment_recipients_list_serialize(
1755
- is_default=is_default,
1756
1752
  page_size=page_size,
1757
1753
  page=page,
1758
1754
  _request_auth=_request_auth,
@@ -1778,7 +1774,6 @@ class PaymentRecipientApi:
1778
1774
  @validate_call
1779
1775
  def payment_recipients_list_with_http_info(
1780
1776
  self,
1781
- is_default: Annotated[Optional[StrictBool], Field(description="Filter recipients only if its default or not")] = None,
1782
1777
  page_size: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="Page size for the paging request, default: 20")] = None,
1783
1778
  page: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="Page number for the paging request, default: 1")] = None,
1784
1779
  _request_timeout: Union[
@@ -1798,8 +1793,6 @@ class PaymentRecipientApi:
1798
1793
 
1799
1794
  Recovers all created payment recipients
1800
1795
 
1801
- :param is_default: Filter recipients only if its default or not
1802
- :type is_default: bool
1803
1796
  :param page_size: Page size for the paging request, default: 20
1804
1797
  :type page_size: float
1805
1798
  :param page: Page number for the paging request, default: 1
@@ -1827,7 +1820,6 @@ class PaymentRecipientApi:
1827
1820
  """ # noqa: E501
1828
1821
 
1829
1822
  _param = self._payment_recipients_list_serialize(
1830
- is_default=is_default,
1831
1823
  page_size=page_size,
1832
1824
  page=page,
1833
1825
  _request_auth=_request_auth,
@@ -1853,7 +1845,6 @@ class PaymentRecipientApi:
1853
1845
  @validate_call
1854
1846
  def payment_recipients_list_without_preload_content(
1855
1847
  self,
1856
- is_default: Annotated[Optional[StrictBool], Field(description="Filter recipients only if its default or not")] = None,
1857
1848
  page_size: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="Page size for the paging request, default: 20")] = None,
1858
1849
  page: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="Page number for the paging request, default: 1")] = None,
1859
1850
  _request_timeout: Union[
@@ -1873,8 +1864,6 @@ class PaymentRecipientApi:
1873
1864
 
1874
1865
  Recovers all created payment recipients
1875
1866
 
1876
- :param is_default: Filter recipients only if its default or not
1877
- :type is_default: bool
1878
1867
  :param page_size: Page size for the paging request, default: 20
1879
1868
  :type page_size: float
1880
1869
  :param page: Page number for the paging request, default: 1
@@ -1902,7 +1891,6 @@ class PaymentRecipientApi:
1902
1891
  """ # noqa: E501
1903
1892
 
1904
1893
  _param = self._payment_recipients_list_serialize(
1905
- is_default=is_default,
1906
1894
  page_size=page_size,
1907
1895
  page=page,
1908
1896
  _request_auth=_request_auth,
@@ -1923,7 +1911,6 @@ class PaymentRecipientApi:
1923
1911
 
1924
1912
  def _payment_recipients_list_serialize(
1925
1913
  self,
1926
- is_default,
1927
1914
  page_size,
1928
1915
  page,
1929
1916
  _request_auth,
@@ -1948,10 +1935,6 @@ class PaymentRecipientApi:
1948
1935
 
1949
1936
  # process the path parameters
1950
1937
  # process the query parameters
1951
- if is_default is not None:
1952
-
1953
- _query_params.append(('isDefault', is_default))
1954
-
1955
1938
  if page_size is not None:
1956
1939
 
1957
1940
  _query_params.append(('pageSize', page_size))
@@ -50,8 +50,10 @@ class TransactionApi:
50
50
  ids: Annotated[Optional[List[StrictStr]], Field(description="Array of transaction identifiers. If defined, 'from' and 'to' parameters will be discarded")] = None,
51
51
  var_from: Annotated[Optional[datetime], Field(description="Filter greater than date. Format (yyyy-mm-dd)")] = None,
52
52
  to: Annotated[Optional[datetime], Field(description="Filter lower than date. Format (yyyy-mm-dd)")] = None,
53
- page_size: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="Page size for the paging request, default: 20")] = None,
53
+ page_size: Annotated[Optional[Union[Annotated[float, Field(le=500, strict=True, ge=1)], Annotated[int, Field(le=500, strict=True, ge=1)]]], Field(description="Page size for the paging request, default: 20")] = None,
54
54
  page: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="Page number for the paging request, default: 1")] = None,
55
+ bill_id: Annotated[Optional[StrictStr], Field(description="Credit Card Bill's primary identifier, if account is a credit card.")] = None,
56
+ created_at_from: Annotated[Optional[datetime], Field(description="Filter greater than createdAt. Format (yyyy-mm-ddThh:mm:ss.000Z)")] = None,
55
57
  _request_timeout: Union[
56
58
  None,
57
59
  Annotated[StrictFloat, Field(gt=0)],
@@ -81,6 +83,10 @@ class TransactionApi:
81
83
  :type page_size: float
82
84
  :param page: Page number for the paging request, default: 1
83
85
  :type page: float
86
+ :param bill_id: Credit Card Bill's primary identifier, if account is a credit card.
87
+ :type bill_id: str
88
+ :param created_at_from: Filter greater than createdAt. Format (yyyy-mm-ddThh:mm:ss.000Z)
89
+ :type created_at_from: datetime
84
90
  :param _request_timeout: timeout setting for this request. If one
85
91
  number provided, it will be total request
86
92
  timeout. It can also be a pair (tuple) of
@@ -110,6 +116,8 @@ class TransactionApi:
110
116
  to=to,
111
117
  page_size=page_size,
112
118
  page=page,
119
+ bill_id=bill_id,
120
+ created_at_from=created_at_from,
113
121
  _request_auth=_request_auth,
114
122
  _content_type=_content_type,
115
123
  _headers=_headers,
@@ -139,8 +147,10 @@ class TransactionApi:
139
147
  ids: Annotated[Optional[List[StrictStr]], Field(description="Array of transaction identifiers. If defined, 'from' and 'to' parameters will be discarded")] = None,
140
148
  var_from: Annotated[Optional[datetime], Field(description="Filter greater than date. Format (yyyy-mm-dd)")] = None,
141
149
  to: Annotated[Optional[datetime], Field(description="Filter lower than date. Format (yyyy-mm-dd)")] = None,
142
- page_size: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="Page size for the paging request, default: 20")] = None,
150
+ page_size: Annotated[Optional[Union[Annotated[float, Field(le=500, strict=True, ge=1)], Annotated[int, Field(le=500, strict=True, ge=1)]]], Field(description="Page size for the paging request, default: 20")] = None,
143
151
  page: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="Page number for the paging request, default: 1")] = None,
152
+ bill_id: Annotated[Optional[StrictStr], Field(description="Credit Card Bill's primary identifier, if account is a credit card.")] = None,
153
+ created_at_from: Annotated[Optional[datetime], Field(description="Filter greater than createdAt. Format (yyyy-mm-ddThh:mm:ss.000Z)")] = None,
144
154
  _request_timeout: Union[
145
155
  None,
146
156
  Annotated[StrictFloat, Field(gt=0)],
@@ -170,6 +180,10 @@ class TransactionApi:
170
180
  :type page_size: float
171
181
  :param page: Page number for the paging request, default: 1
172
182
  :type page: float
183
+ :param bill_id: Credit Card Bill's primary identifier, if account is a credit card.
184
+ :type bill_id: str
185
+ :param created_at_from: Filter greater than createdAt. Format (yyyy-mm-ddThh:mm:ss.000Z)
186
+ :type created_at_from: datetime
173
187
  :param _request_timeout: timeout setting for this request. If one
174
188
  number provided, it will be total request
175
189
  timeout. It can also be a pair (tuple) of
@@ -199,6 +213,8 @@ class TransactionApi:
199
213
  to=to,
200
214
  page_size=page_size,
201
215
  page=page,
216
+ bill_id=bill_id,
217
+ created_at_from=created_at_from,
202
218
  _request_auth=_request_auth,
203
219
  _content_type=_content_type,
204
220
  _headers=_headers,
@@ -228,8 +244,10 @@ class TransactionApi:
228
244
  ids: Annotated[Optional[List[StrictStr]], Field(description="Array of transaction identifiers. If defined, 'from' and 'to' parameters will be discarded")] = None,
229
245
  var_from: Annotated[Optional[datetime], Field(description="Filter greater than date. Format (yyyy-mm-dd)")] = None,
230
246
  to: Annotated[Optional[datetime], Field(description="Filter lower than date. Format (yyyy-mm-dd)")] = None,
231
- page_size: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="Page size for the paging request, default: 20")] = None,
247
+ page_size: Annotated[Optional[Union[Annotated[float, Field(le=500, strict=True, ge=1)], Annotated[int, Field(le=500, strict=True, ge=1)]]], Field(description="Page size for the paging request, default: 20")] = None,
232
248
  page: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="Page number for the paging request, default: 1")] = None,
249
+ bill_id: Annotated[Optional[StrictStr], Field(description="Credit Card Bill's primary identifier, if account is a credit card.")] = None,
250
+ created_at_from: Annotated[Optional[datetime], Field(description="Filter greater than createdAt. Format (yyyy-mm-ddThh:mm:ss.000Z)")] = None,
233
251
  _request_timeout: Union[
234
252
  None,
235
253
  Annotated[StrictFloat, Field(gt=0)],
@@ -259,6 +277,10 @@ class TransactionApi:
259
277
  :type page_size: float
260
278
  :param page: Page number for the paging request, default: 1
261
279
  :type page: float
280
+ :param bill_id: Credit Card Bill's primary identifier, if account is a credit card.
281
+ :type bill_id: str
282
+ :param created_at_from: Filter greater than createdAt. Format (yyyy-mm-ddThh:mm:ss.000Z)
283
+ :type created_at_from: datetime
262
284
  :param _request_timeout: timeout setting for this request. If one
263
285
  number provided, it will be total request
264
286
  timeout. It can also be a pair (tuple) of
@@ -288,6 +310,8 @@ class TransactionApi:
288
310
  to=to,
289
311
  page_size=page_size,
290
312
  page=page,
313
+ bill_id=bill_id,
314
+ created_at_from=created_at_from,
291
315
  _request_auth=_request_auth,
292
316
  _content_type=_content_type,
293
317
  _headers=_headers,
@@ -314,6 +338,8 @@ class TransactionApi:
314
338
  to,
315
339
  page_size,
316
340
  page,
341
+ bill_id,
342
+ created_at_from,
317
343
  _request_auth,
318
344
  _content_type,
319
345
  _headers,
@@ -379,6 +405,23 @@ class TransactionApi:
379
405
 
380
406
  _query_params.append(('page', page))
381
407
 
408
+ if bill_id is not None:
409
+
410
+ _query_params.append(('billId', bill_id))
411
+
412
+ if created_at_from is not None:
413
+ if isinstance(created_at_from, datetime):
414
+ _query_params.append(
415
+ (
416
+ 'createdAtFrom',
417
+ created_at_from.strftime(
418
+ self.api_client.configuration.datetime_format
419
+ )
420
+ )
421
+ )
422
+ else:
423
+ _query_params.append(('createdAtFrom', created_at_from))
424
+
382
425
  # process the header parameters
383
426
  # process the form parameters
384
427
  # process the body parameter
pluggy_sdk/api_client.py CHANGED
@@ -91,7 +91,7 @@ class ApiClient:
91
91
  self.default_headers[header_name] = header_value
92
92
  self.cookie = cookie
93
93
  # Set default User-Agent.
94
- self.user_agent = 'OpenAPI-Generator/1.0.0.post36/python'
94
+ self.user_agent = 'OpenAPI-Generator/1.0.0.post38/python'
95
95
  self.client_side_validation = configuration.client_side_validation
96
96
 
97
97
  def __enter__(self):
@@ -525,7 +525,7 @@ conf = pluggy_sdk.Configuration(
525
525
  "OS: {env}\n"\
526
526
  "Python Version: {pyversion}\n"\
527
527
  "Version of the API: 1.0.0\n"\
528
- "SDK Package Version: 1.0.0.post36".\
528
+ "SDK Package Version: 1.0.0.post38".\
529
529
  format(env=sys.platform, pyversion=sys.version)
530
530
 
531
531
  def get_host_settings(self) -> List[HostSetting]:
@@ -30,6 +30,7 @@ from pluggy_sdk.models.bill import Bill
30
30
  from pluggy_sdk.models.bill_finance_charge import BillFinanceCharge
31
31
  from pluggy_sdk.models.bills_list200_response import BillsList200Response
32
32
  from pluggy_sdk.models.boleto import Boleto
33
+ from pluggy_sdk.models.boleto_connection import BoletoConnection
33
34
  from pluggy_sdk.models.boleto_payer import BoletoPayer
34
35
  from pluggy_sdk.models.boleto_recipient import BoletoRecipient
35
36
  from pluggy_sdk.models.bulk_payment import BulkPayment
@@ -47,6 +48,11 @@ from pluggy_sdk.models.connector_health_details import ConnectorHealthDetails
47
48
  from pluggy_sdk.models.connector_list_response import ConnectorListResponse
48
49
  from pluggy_sdk.models.connector_user_action import ConnectorUserAction
49
50
  from pluggy_sdk.models.consent import Consent
51
+ from pluggy_sdk.models.create_boleto import CreateBoleto
52
+ from pluggy_sdk.models.create_boleto_boleto import CreateBoletoBoleto
53
+ from pluggy_sdk.models.create_boleto_boleto_payer import CreateBoletoBoletoPayer
54
+ from pluggy_sdk.models.create_boleto_connection import CreateBoletoConnection
55
+ from pluggy_sdk.models.create_boleto_connection_from_item import CreateBoletoConnectionFromItem
50
56
  from pluggy_sdk.models.create_boleto_payment_request import CreateBoletoPaymentRequest
51
57
  from pluggy_sdk.models.create_bulk_payment import CreateBulkPayment
52
58
  from pluggy_sdk.models.create_client_category_rule import CreateClientCategoryRule
@@ -85,6 +91,8 @@ from pluggy_sdk.models.investment_expenses import InvestmentExpenses
85
91
  from pluggy_sdk.models.investment_metadata import InvestmentMetadata
86
92
  from pluggy_sdk.models.investment_transaction import InvestmentTransaction
87
93
  from pluggy_sdk.models.investments_list200_response import InvestmentsList200Response
94
+ from pluggy_sdk.models.issued_boleto import IssuedBoleto
95
+ from pluggy_sdk.models.issued_boleto_payer import IssuedBoletoPayer
88
96
  from pluggy_sdk.models.item import Item
89
97
  from pluggy_sdk.models.item_creation_error_response import ItemCreationErrorResponse
90
98
  from pluggy_sdk.models.item_error import ItemError
@@ -119,6 +127,7 @@ from pluggy_sdk.models.payment_data_boleto_metadata import PaymentDataBoletoMeta
119
127
  from pluggy_sdk.models.payment_data_participant import PaymentDataParticipant
120
128
  from pluggy_sdk.models.payment_institution import PaymentInstitution
121
129
  from pluggy_sdk.models.payment_intent import PaymentIntent
130
+ from pluggy_sdk.models.payment_intent_error_detail import PaymentIntentErrorDetail
122
131
  from pluggy_sdk.models.payment_intent_parameter import PaymentIntentParameter
123
132
  from pluggy_sdk.models.payment_intents_list200_response import PaymentIntentsList200Response
124
133
  from pluggy_sdk.models.payment_receipt import PaymentReceipt
@@ -130,6 +139,7 @@ from pluggy_sdk.models.payment_recipients_institution_list200_response import Pa
130
139
  from pluggy_sdk.models.payment_recipients_list200_response import PaymentRecipientsList200Response
131
140
  from pluggy_sdk.models.payment_request import PaymentRequest
132
141
  from pluggy_sdk.models.payment_request_callback_urls import PaymentRequestCallbackUrls
142
+ from pluggy_sdk.models.payment_request_error_detail import PaymentRequestErrorDetail
133
143
  from pluggy_sdk.models.payment_request_receipt_list200_response import PaymentRequestReceiptList200Response
134
144
  from pluggy_sdk.models.payment_request_schedule import PaymentRequestSchedule
135
145
  from pluggy_sdk.models.payment_requests_list200_response import PaymentRequestsList200Response
@@ -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, StrictInt, StrictStr
23
+ from typing import Any, ClassVar, Dict, List
24
+ from typing import Optional, Set
25
+ from typing_extensions import Self
26
+
27
+ class BoletoConnection(BaseModel):
28
+ """
29
+ Response with information related to a boleto connection
30
+ """ # noqa: E501
31
+ id: StrictStr = Field(description="Primary identifier")
32
+ connector_id: StrictInt = Field(description="Primary identifier of the connector associated with this connection", alias="connectorId")
33
+ created_at: datetime = Field(description="Date when the connection was created", alias="createdAt")
34
+ updated_at: datetime = Field(description="Date when the connection was last updated", alias="updatedAt")
35
+ __properties: ClassVar[List[str]] = ["id", "connectorId", "createdAt", "updatedAt"]
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 BoletoConnection 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 BoletoConnection 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
+ "id": obj.get("id"),
89
+ "connectorId": obj.get("connectorId"),
90
+ "createdAt": obj.get("createdAt"),
91
+ "updatedAt": obj.get("updatedAt")
92
+ })
93
+ return _obj
94
+
95
+
@@ -0,0 +1,94 @@
1
+ # coding: utf-8
2
+
3
+ """
4
+ Pluggy API
5
+
6
+ Pluggy's main API to review data and execute connectors
7
+
8
+ The version of the OpenAPI document: 1.0.0
9
+ Contact: hello@pluggy.ai
10
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
11
+
12
+ Do not edit the class manually.
13
+ """ # noqa: E501
14
+
15
+
16
+ from __future__ import annotations
17
+ import pprint
18
+ import re # noqa: F401
19
+ import json
20
+
21
+ from pydantic import BaseModel, ConfigDict, Field, StrictStr
22
+ from typing import Any, ClassVar, Dict, List
23
+ from pluggy_sdk.models.create_boleto_boleto import CreateBoletoBoleto
24
+ from typing import Optional, Set
25
+ from typing_extensions import Self
26
+
27
+ class CreateBoleto(BaseModel):
28
+ """
29
+ Request with information to create a boleto
30
+ """ # noqa: E501
31
+ boleto_connection_id: StrictStr = Field(description="Primary identifier of the boleto connection", alias="boletoConnectionId")
32
+ boleto: CreateBoletoBoleto
33
+ __properties: ClassVar[List[str]] = ["boletoConnectionId", "boleto"]
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 CreateBoleto 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
+ # override the default output from pydantic by calling `to_dict()` of boleto
75
+ if self.boleto:
76
+ _dict['boleto'] = self.boleto.to_dict()
77
+ return _dict
78
+
79
+ @classmethod
80
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
81
+ """Create an instance of CreateBoleto from a dict"""
82
+ if obj is None:
83
+ return None
84
+
85
+ if not isinstance(obj, dict):
86
+ return cls.model_validate(obj)
87
+
88
+ _obj = cls.model_validate({
89
+ "boletoConnectionId": obj.get("boletoConnectionId"),
90
+ "boleto": CreateBoletoBoleto.from_dict(obj["boleto"]) if obj.get("boleto") is not None else None
91
+ })
92
+ return _obj
93
+
94
+
@@ -0,0 +1,100 @@
1
+ # coding: utf-8
2
+
3
+ """
4
+ Pluggy API
5
+
6
+ Pluggy's main API to review data and execute connectors
7
+
8
+ The version of the OpenAPI document: 1.0.0
9
+ Contact: hello@pluggy.ai
10
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
11
+
12
+ Do not edit the class manually.
13
+ """ # noqa: E501
14
+
15
+
16
+ from __future__ import annotations
17
+ import pprint
18
+ import re # noqa: F401
19
+ import json
20
+
21
+ from datetime import datetime
22
+ from pydantic import BaseModel, ConfigDict, Field
23
+ from typing import Any, ClassVar, Dict, List, Union
24
+ from typing_extensions import Annotated
25
+ from pluggy_sdk.models.create_boleto_boleto_payer import CreateBoletoBoletoPayer
26
+ from typing import Optional, Set
27
+ from typing_extensions import Self
28
+
29
+ class CreateBoletoBoleto(BaseModel):
30
+ """
31
+ CreateBoletoBoleto
32
+ """ # noqa: E501
33
+ seu_numero: Annotated[str, Field(strict=True, max_length=10)] = Field(description="Your identifier for this boleto", alias="seuNumero")
34
+ amount: Union[Annotated[float, Field(strict=True, ge=2.5)], Annotated[int, Field(strict=True, ge=3)]] = Field(description="Boleto amount")
35
+ due_date: datetime = Field(description="Due date for the boleto. Must be today or in the future.", alias="dueDate")
36
+ payer: CreateBoletoBoletoPayer
37
+ __properties: ClassVar[List[str]] = ["seuNumero", "amount", "dueDate", "payer"]
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 CreateBoletoBoleto 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 payer
79
+ if self.payer:
80
+ _dict['payer'] = self.payer.to_dict()
81
+ return _dict
82
+
83
+ @classmethod
84
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
85
+ """Create an instance of CreateBoletoBoleto from a dict"""
86
+ if obj is None:
87
+ return None
88
+
89
+ if not isinstance(obj, dict):
90
+ return cls.model_validate(obj)
91
+
92
+ _obj = cls.model_validate({
93
+ "seuNumero": obj.get("seuNumero"),
94
+ "amount": obj.get("amount"),
95
+ "dueDate": obj.get("dueDate"),
96
+ "payer": CreateBoletoBoletoPayer.from_dict(obj["payer"]) if obj.get("payer") is not None else None
97
+ })
98
+ return _obj
99
+
100
+
@@ -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 typing import Optional, Set
24
+ from typing_extensions import Self
25
+
26
+ class CreateBoletoBoletoPayer(BaseModel):
27
+ """
28
+ CreateBoletoBoletoPayer
29
+ """ # noqa: E501
30
+ tax_number: StrictStr = Field(description="Payer tax number (CPF/CNPJ)", alias="taxNumber")
31
+ name: StrictStr = Field(description="Payer name")
32
+ address_street: Optional[StrictStr] = Field(default=None, description="Payer street address", alias="addressStreet")
33
+ address_city: Optional[StrictStr] = Field(default=None, description="Payer city", alias="addressCity")
34
+ address_state: StrictStr = Field(description="Payer state", alias="addressState")
35
+ address_zip_code: StrictStr = Field(description="Payer ZIP code", alias="addressZipCode")
36
+ __properties: ClassVar[List[str]] = ["taxNumber", "name", "addressStreet", "addressCity", "addressState", "addressZipCode"]
37
+
38
+ model_config = ConfigDict(
39
+ populate_by_name=True,
40
+ validate_assignment=True,
41
+ protected_namespaces=(),
42
+ )
43
+
44
+
45
+ def to_str(self) -> str:
46
+ """Returns the string representation of the model using alias"""
47
+ return pprint.pformat(self.model_dump(by_alias=True))
48
+
49
+ def to_json(self) -> str:
50
+ """Returns the JSON representation of the model using alias"""
51
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
52
+ return json.dumps(self.to_dict())
53
+
54
+ @classmethod
55
+ def from_json(cls, json_str: str) -> Optional[Self]:
56
+ """Create an instance of CreateBoletoBoletoPayer from a JSON string"""
57
+ return cls.from_dict(json.loads(json_str))
58
+
59
+ def to_dict(self) -> Dict[str, Any]:
60
+ """Return the dictionary representation of the model using alias.
61
+
62
+ This has the following differences from calling pydantic's
63
+ `self.model_dump(by_alias=True)`:
64
+
65
+ * `None` is only added to the output dict for nullable fields that
66
+ were set at model initialization. Other fields with value `None`
67
+ are ignored.
68
+ """
69
+ excluded_fields: Set[str] = set([
70
+ ])
71
+
72
+ _dict = self.model_dump(
73
+ by_alias=True,
74
+ exclude=excluded_fields,
75
+ exclude_none=True,
76
+ )
77
+ return _dict
78
+
79
+ @classmethod
80
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
81
+ """Create an instance of CreateBoletoBoletoPayer from a dict"""
82
+ if obj is None:
83
+ return None
84
+
85
+ if not isinstance(obj, dict):
86
+ return cls.model_validate(obj)
87
+
88
+ _obj = cls.model_validate({
89
+ "taxNumber": obj.get("taxNumber"),
90
+ "name": obj.get("name"),
91
+ "addressStreet": obj.get("addressStreet"),
92
+ "addressCity": obj.get("addressCity"),
93
+ "addressState": obj.get("addressState"),
94
+ "addressZipCode": obj.get("addressZipCode")
95
+ })
96
+ return _obj
97
+
98
+