pluggy-sdk 1.0.0.post36__py3-none-any.whl → 1.0.0.post37__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.
@@ -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.post37/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.post37".\
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,10 @@ 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
50
55
  from pluggy_sdk.models.create_boleto_payment_request import CreateBoletoPaymentRequest
51
56
  from pluggy_sdk.models.create_bulk_payment import CreateBulkPayment
52
57
  from pluggy_sdk.models.create_client_category_rule import CreateClientCategoryRule
@@ -85,6 +90,8 @@ from pluggy_sdk.models.investment_expenses import InvestmentExpenses
85
90
  from pluggy_sdk.models.investment_metadata import InvestmentMetadata
86
91
  from pluggy_sdk.models.investment_transaction import InvestmentTransaction
87
92
  from pluggy_sdk.models.investments_list200_response import InvestmentsList200Response
93
+ from pluggy_sdk.models.issued_boleto import IssuedBoleto
94
+ from pluggy_sdk.models.issued_boleto_payer import IssuedBoletoPayer
88
95
  from pluggy_sdk.models.item import Item
89
96
  from pluggy_sdk.models.item_creation_error_response import ItemCreationErrorResponse
90
97
  from pluggy_sdk.models.item_error import ItemError
@@ -119,6 +126,7 @@ from pluggy_sdk.models.payment_data_boleto_metadata import PaymentDataBoletoMeta
119
126
  from pluggy_sdk.models.payment_data_participant import PaymentDataParticipant
120
127
  from pluggy_sdk.models.payment_institution import PaymentInstitution
121
128
  from pluggy_sdk.models.payment_intent import PaymentIntent
129
+ from pluggy_sdk.models.payment_intent_error_detail import PaymentIntentErrorDetail
122
130
  from pluggy_sdk.models.payment_intent_parameter import PaymentIntentParameter
123
131
  from pluggy_sdk.models.payment_intents_list200_response import PaymentIntentsList200Response
124
132
  from pluggy_sdk.models.payment_receipt import PaymentReceipt
@@ -130,6 +138,7 @@ from pluggy_sdk.models.payment_recipients_institution_list200_response import Pa
130
138
  from pluggy_sdk.models.payment_recipients_list200_response import PaymentRecipientsList200Response
131
139
  from pluggy_sdk.models.payment_request import PaymentRequest
132
140
  from pluggy_sdk.models.payment_request_callback_urls import PaymentRequestCallbackUrls
141
+ from pluggy_sdk.models.payment_request_error_detail import PaymentRequestErrorDetail
133
142
  from pluggy_sdk.models.payment_request_receipt_list200_response import PaymentRequestReceiptList200Response
134
143
  from pluggy_sdk.models.payment_request_schedule import PaymentRequestSchedule
135
144
  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
+
@@ -0,0 +1,91 @@
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_extensions import Annotated
24
+ from typing import Optional, Set
25
+ from typing_extensions import Self
26
+
27
+ class CreateBoletoConnection(BaseModel):
28
+ """
29
+ Request with information to create a boleto connection
30
+ """ # noqa: E501
31
+ connector_id: Annotated[int, Field(strict=True, ge=1)] = Field(description="Connector identifier. Check out the list of connectors, and if it has the flag 'supportsBoletoManagement' as true, it means it's possible to create a boleto connection with it.", alias="connectorId")
32
+ credentials: Dict[str, StrictStr] = Field(description="Credentials required for the connection. For Inter, they are clientId, clientSecret, certificate and privateKey, follow: https://docs.pluggy.ai/docs/connect-an-account#inter-pj")
33
+ __properties: ClassVar[List[str]] = ["connectorId", "credentials"]
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 CreateBoletoConnection 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 CreateBoletoConnection 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
+ "connectorId": obj.get("connectorId"),
87
+ "credentials": obj.get("credentials")
88
+ })
89
+ return _obj
90
+
91
+