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.
@@ -31,7 +31,7 @@ class CreateItem(BaseModel):
31
31
  connector_id: Union[StrictFloat, StrictInt] = Field(description="Primary identifier of the connector", alias="connectorId")
32
32
  parameters: CreateItemParameters
33
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")
34
+ client_user_id: Optional[StrictStr] = Field(default=None, description="Client's external identifier for the user, it can be a ID, UUID or even an email. This is free for clients to use.", alias="clientUserId")
35
35
  oauth_redirect_uri: Optional[StrictStr] = Field(default=None, description="Redirect URI required for the Oauth flow", alias="oauthRedirectUri")
36
36
  products: Optional[List[StrictStr]] = Field(default=None, description="Products to be collected in the connection")
37
37
  avoid_duplicates: Optional[StrictBool] = Field(default=None, description="Avoids creating a new item if there is already one with the same credentials", alias="avoidDuplicates")
@@ -35,8 +35,8 @@ class CreateWebhook(BaseModel):
35
35
  @field_validator('event')
36
36
  def event_validate_enum(cls, value):
37
37
  """Validates the enum"""
38
- if value not in set(['all', 'item/created', 'item/updated', 'item/error', 'item/deleted', 'item/waiting_user_input', 'item/waiting_user_action', 'item/login_succeeded', 'connector/status_updated', 'transactions/updated', 'transactions/deleted', 'payment_intent/created', 'payment_intent/completed', 'payment_intent/waiting_payer_authorization', 'payment_intent/error', 'scheduled_payment/created', 'scheduled_payment/completed', 'scheduled_payment/error', 'scheduled_payment/canceled', 'scheduled_payment/all_completed', 'payment_refund/completed', 'payment_refund/error']):
39
- raise ValueError("must be one of enum values ('all', 'item/created', 'item/updated', 'item/error', 'item/deleted', 'item/waiting_user_input', 'item/waiting_user_action', 'item/login_succeeded', 'connector/status_updated', 'transactions/updated', 'transactions/deleted', 'payment_intent/created', 'payment_intent/completed', 'payment_intent/waiting_payer_authorization', 'payment_intent/error', 'scheduled_payment/created', 'scheduled_payment/completed', 'scheduled_payment/error', 'scheduled_payment/canceled', 'scheduled_payment/all_completed', 'payment_refund/completed', 'payment_refund/error')")
38
+ if value not in set(['all', 'item/created', 'item/updated', 'item/error', 'item/deleted', 'item/waiting_user_input', 'item/waiting_user_action', 'item/login_succeeded', 'connector/status_updated', 'transactions/created', 'transactions/updated', 'transactions/deleted', 'payment_intent/created', 'payment_intent/completed', 'payment_intent/waiting_payer_authorization', 'payment_intent/error', 'scheduled_payment/created', 'scheduled_payment/completed', 'scheduled_payment/error', 'scheduled_payment/canceled', 'scheduled_payment/all_completed', 'payment_refund/completed', 'payment_refund/error']):
39
+ raise ValueError("must be one of enum values ('all', 'item/created', 'item/updated', 'item/error', 'item/deleted', 'item/waiting_user_input', 'item/waiting_user_action', 'item/login_succeeded', 'connector/status_updated', 'transactions/created', 'transactions/updated', 'transactions/deleted', 'payment_intent/created', 'payment_intent/completed', 'payment_intent/waiting_payer_authorization', 'payment_intent/error', 'scheduled_payment/created', 'scheduled_payment/completed', 'scheduled_payment/error', 'scheduled_payment/canceled', 'scheduled_payment/all_completed', 'payment_refund/completed', 'payment_refund/error')")
40
40
  return value
41
41
 
42
42
  model_config = ConfigDict(
@@ -0,0 +1,121 @@
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, Union
24
+ from typing_extensions import Annotated
25
+ from pluggy_sdk.models.issued_boleto_payer import IssuedBoletoPayer
26
+ from typing import Optional, Set
27
+ from typing_extensions import Self
28
+
29
+ class IssuedBoleto(BaseModel):
30
+ """
31
+ Response with information related to an issued boleto
32
+ """ # noqa: E501
33
+ id: StrictStr = Field(description="Primary identifier")
34
+ amount: Union[Annotated[float, Field(strict=True, ge=2.5)], Annotated[int, Field(strict=True, ge=3)]] = Field(description="Boleto amount")
35
+ status: StrictStr = Field(description="Current status of the boleto")
36
+ seu_numero: Annotated[str, Field(strict=True, max_length=10)] = Field(description="Your identifier for this boleto", alias="seuNumero")
37
+ due_date: datetime = Field(description="Due date of the boleto", alias="dueDate")
38
+ payer: IssuedBoletoPayer
39
+ pix_qr: Optional[StrictStr] = Field(default=None, description="PIX QR code for payment", alias="pixQr")
40
+ digitable_line: StrictStr = Field(description="Boleto digitable line", alias="digitableLine")
41
+ nosso_numero: Optional[StrictStr] = Field(default=None, description="Bank's internal identifier for the boleto", alias="nossoNumero")
42
+ barcode: StrictStr = Field(description="Boleto barcode")
43
+ boleto_connection_id: StrictStr = Field(description="ID of the boleto connection used to create this boleto", alias="boletoConnectionId")
44
+ __properties: ClassVar[List[str]] = ["id", "amount", "status", "seuNumero", "dueDate", "payer", "pixQr", "digitableLine", "nossoNumero", "barcode", "boletoConnectionId"]
45
+
46
+ @field_validator('status')
47
+ def status_validate_enum(cls, value):
48
+ """Validates the enum"""
49
+ if value not in set(['OPEN', 'PAID', 'OVERDUE', 'CANCELLED']):
50
+ raise ValueError("must be one of enum values ('OPEN', 'PAID', 'OVERDUE', 'CANCELLED')")
51
+ return value
52
+
53
+ model_config = ConfigDict(
54
+ populate_by_name=True,
55
+ validate_assignment=True,
56
+ protected_namespaces=(),
57
+ )
58
+
59
+
60
+ def to_str(self) -> str:
61
+ """Returns the string representation of the model using alias"""
62
+ return pprint.pformat(self.model_dump(by_alias=True))
63
+
64
+ def to_json(self) -> str:
65
+ """Returns the JSON representation of the model using alias"""
66
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
67
+ return json.dumps(self.to_dict())
68
+
69
+ @classmethod
70
+ def from_json(cls, json_str: str) -> Optional[Self]:
71
+ """Create an instance of IssuedBoleto from a JSON string"""
72
+ return cls.from_dict(json.loads(json_str))
73
+
74
+ def to_dict(self) -> Dict[str, Any]:
75
+ """Return the dictionary representation of the model using alias.
76
+
77
+ This has the following differences from calling pydantic's
78
+ `self.model_dump(by_alias=True)`:
79
+
80
+ * `None` is only added to the output dict for nullable fields that
81
+ were set at model initialization. Other fields with value `None`
82
+ are ignored.
83
+ """
84
+ excluded_fields: Set[str] = set([
85
+ ])
86
+
87
+ _dict = self.model_dump(
88
+ by_alias=True,
89
+ exclude=excluded_fields,
90
+ exclude_none=True,
91
+ )
92
+ # override the default output from pydantic by calling `to_dict()` of payer
93
+ if self.payer:
94
+ _dict['payer'] = self.payer.to_dict()
95
+ return _dict
96
+
97
+ @classmethod
98
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
99
+ """Create an instance of IssuedBoleto from a dict"""
100
+ if obj is None:
101
+ return None
102
+
103
+ if not isinstance(obj, dict):
104
+ return cls.model_validate(obj)
105
+
106
+ _obj = cls.model_validate({
107
+ "id": obj.get("id"),
108
+ "amount": obj.get("amount"),
109
+ "status": obj.get("status"),
110
+ "seuNumero": obj.get("seuNumero"),
111
+ "dueDate": obj.get("dueDate"),
112
+ "payer": IssuedBoletoPayer.from_dict(obj["payer"]) if obj.get("payer") is not None else None,
113
+ "pixQr": obj.get("pixQr"),
114
+ "digitableLine": obj.get("digitableLine"),
115
+ "nossoNumero": obj.get("nossoNumero"),
116
+ "barcode": obj.get("barcode"),
117
+ "boletoConnectionId": obj.get("boletoConnectionId")
118
+ })
119
+ return _obj
120
+
121
+
@@ -0,0 +1,112 @@
1
+ # coding: utf-8
2
+
3
+ """
4
+ Pluggy API
5
+
6
+ Pluggy's main API to review data and execute connectors
7
+
8
+ The version of the OpenAPI document: 1.0.0
9
+ Contact: hello@pluggy.ai
10
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
11
+
12
+ Do not edit the class manually.
13
+ """ # noqa: E501
14
+
15
+
16
+ from __future__ import annotations
17
+ import pprint
18
+ import re # noqa: F401
19
+ import json
20
+
21
+ from pydantic import BaseModel, ConfigDict, Field, 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 IssuedBoletoPayer(BaseModel):
27
+ """
28
+ IssuedBoletoPayer
29
+ """ # noqa: E501
30
+ tax_number: StrictStr = Field(description="Payer tax number (CPF/CNPJ)", alias="taxNumber")
31
+ person_type: Optional[StrictStr] = Field(default=None, description="Type of person (individual or business)", alias="personType")
32
+ name: StrictStr = Field(description="Payer name")
33
+ address_street: Optional[StrictStr] = Field(default=None, description="Payer street address", alias="addressStreet")
34
+ address_number: Optional[StrictStr] = Field(default=None, description="Payer address number", alias="addressNumber")
35
+ address_complement: Optional[StrictStr] = Field(default=None, description="Additional address information", alias="addressComplement")
36
+ address_neighborhood: Optional[StrictStr] = Field(default=None, description="Payer neighborhood", alias="addressNeighborhood")
37
+ address_city: Optional[StrictStr] = Field(default=None, description="Payer city", alias="addressCity")
38
+ address_state: StrictStr = Field(description="Payer state", alias="addressState")
39
+ address_zip_code: StrictStr = Field(description="Payer ZIP code", alias="addressZipCode")
40
+ email: Optional[StrictStr] = Field(default=None, description="Payer email")
41
+ ddd: Optional[StrictStr] = Field(default=None, description="Payer area code")
42
+ phone_number: Optional[StrictStr] = Field(default=None, description="Payer phone number", alias="phoneNumber")
43
+ __properties: ClassVar[List[str]] = ["taxNumber", "personType", "name", "addressStreet", "addressNumber", "addressComplement", "addressNeighborhood", "addressCity", "addressState", "addressZipCode", "email", "ddd", "phoneNumber"]
44
+
45
+ model_config = ConfigDict(
46
+ populate_by_name=True,
47
+ validate_assignment=True,
48
+ protected_namespaces=(),
49
+ )
50
+
51
+
52
+ def to_str(self) -> str:
53
+ """Returns the string representation of the model using alias"""
54
+ return pprint.pformat(self.model_dump(by_alias=True))
55
+
56
+ def to_json(self) -> str:
57
+ """Returns the JSON representation of the model using alias"""
58
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
59
+ return json.dumps(self.to_dict())
60
+
61
+ @classmethod
62
+ def from_json(cls, json_str: str) -> Optional[Self]:
63
+ """Create an instance of IssuedBoletoPayer from a JSON string"""
64
+ return cls.from_dict(json.loads(json_str))
65
+
66
+ def to_dict(self) -> Dict[str, Any]:
67
+ """Return the dictionary representation of the model using alias.
68
+
69
+ This has the following differences from calling pydantic's
70
+ `self.model_dump(by_alias=True)`:
71
+
72
+ * `None` is only added to the output dict for nullable fields that
73
+ were set at model initialization. Other fields with value `None`
74
+ are ignored.
75
+ """
76
+ excluded_fields: Set[str] = set([
77
+ ])
78
+
79
+ _dict = self.model_dump(
80
+ by_alias=True,
81
+ exclude=excluded_fields,
82
+ exclude_none=True,
83
+ )
84
+ return _dict
85
+
86
+ @classmethod
87
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
88
+ """Create an instance of IssuedBoletoPayer from a dict"""
89
+ if obj is None:
90
+ return None
91
+
92
+ if not isinstance(obj, dict):
93
+ return cls.model_validate(obj)
94
+
95
+ _obj = cls.model_validate({
96
+ "taxNumber": obj.get("taxNumber"),
97
+ "personType": obj.get("personType"),
98
+ "name": obj.get("name"),
99
+ "addressStreet": obj.get("addressStreet"),
100
+ "addressNumber": obj.get("addressNumber"),
101
+ "addressComplement": obj.get("addressComplement"),
102
+ "addressNeighborhood": obj.get("addressNeighborhood"),
103
+ "addressCity": obj.get("addressCity"),
104
+ "addressState": obj.get("addressState"),
105
+ "addressZipCode": obj.get("addressZipCode"),
106
+ "email": obj.get("email"),
107
+ "ddd": obj.get("ddd"),
108
+ "phoneNumber": obj.get("phoneNumber")
109
+ })
110
+ return _obj
111
+
112
+
@@ -27,7 +27,7 @@ class ItemOptions(BaseModel):
27
27
  """
28
28
  Item options available to send through connect tokens
29
29
  """ # noqa: E501
30
- 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")
30
+ client_user_id: Optional[StrictStr] = Field(default=None, description="Client's external identifier for the user, it can be a ID, UUID or even an email. This is free for clients to use.", alias="clientUserId")
31
31
  webhook_url: Optional[StrictStr] = Field(default=None, description="Url to be notified of this specific item changes", alias="webhookUrl")
32
32
  oauth_redirect_uri: Optional[StrictStr] = Field(default=None, description="Url to redirect the user after the connect flow", alias="oauthRedirectUri")
33
33
  avoid_duplicates: Optional[StrictBool] = Field(default=None, description="Avoids creating a new item if there is already one with the same credentials", alias="avoidDuplicates")
@@ -23,6 +23,7 @@ from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator
23
23
  from typing import Any, ClassVar, Dict, List, Optional
24
24
  from pluggy_sdk.models.bulk_payment import BulkPayment
25
25
  from pluggy_sdk.models.connector import Connector
26
+ from pluggy_sdk.models.payment_intent_error_detail import PaymentIntentErrorDetail
26
27
  from pluggy_sdk.models.payment_request import PaymentRequest
27
28
  from pluggy_sdk.models.pix_data import PixData
28
29
  from typing import Optional, Set
@@ -43,7 +44,8 @@ class PaymentIntent(BaseModel):
43
44
  reference_id: Optional[StrictStr] = Field(default=None, description="Pix id related to the payment intent", alias="referenceId")
44
45
  payment_method: Optional[StrictStr] = Field(default='PIS', description="Payment method can be PIS (Payment Initiation) or PIX", alias="paymentMethod")
45
46
  pix_data: Optional[PixData] = Field(default=None, description="Pix data related to the payment intent (only applies for PIX payment method)", alias="pixData")
46
- __properties: ClassVar[List[str]] = ["id", "status", "createdAt", "updatedAt", "paymentRequest", "bulkPayment", "connector", "consentUrl", "referenceId", "paymentMethod", "pixData"]
47
+ error_detail: Optional[PaymentIntentErrorDetail] = Field(default=None, alias="errorDetail")
48
+ __properties: ClassVar[List[str]] = ["id", "status", "createdAt", "updatedAt", "paymentRequest", "bulkPayment", "connector", "consentUrl", "referenceId", "paymentMethod", "pixData", "errorDetail"]
47
49
 
48
50
  @field_validator('status')
49
51
  def status_validate_enum(cls, value):
@@ -116,6 +118,9 @@ class PaymentIntent(BaseModel):
116
118
  # override the default output from pydantic by calling `to_dict()` of pix_data
117
119
  if self.pix_data:
118
120
  _dict['pixData'] = self.pix_data.to_dict()
121
+ # override the default output from pydantic by calling `to_dict()` of error_detail
122
+ if self.error_detail:
123
+ _dict['errorDetail'] = self.error_detail.to_dict()
119
124
  return _dict
120
125
 
121
126
  @classmethod
@@ -138,7 +143,8 @@ class PaymentIntent(BaseModel):
138
143
  "consentUrl": obj.get("consentUrl"),
139
144
  "referenceId": obj.get("referenceId"),
140
145
  "paymentMethod": obj.get("paymentMethod") if obj.get("paymentMethod") is not None else 'PIS',
141
- "pixData": PixData.from_dict(obj["pixData"]) if obj.get("pixData") is not None else None
146
+ "pixData": PixData.from_dict(obj["pixData"]) if obj.get("pixData") is not None else None,
147
+ "errorDetail": PaymentIntentErrorDetail.from_dict(obj["errorDetail"]) if obj.get("errorDetail") is not None else None
142
148
  })
143
149
  return _obj
144
150
 
@@ -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, Optional
23
+ from typing import Optional, Set
24
+ from typing_extensions import Self
25
+
26
+ class PaymentIntentErrorDetail(BaseModel):
27
+ """
28
+ Error details when payment intent fails
29
+ """ # noqa: E501
30
+ code: Optional[StrictStr] = Field(default=None, description="Error code")
31
+ provider_code: Optional[StrictStr] = Field(default=None, description="Provider error code", alias="providerCode")
32
+ provider_title: Optional[StrictStr] = Field(default=None, description="Provider error title", alias="providerTitle")
33
+ provider_detail: Optional[StrictStr] = Field(default=None, description="Provider detailed error description", alias="providerDetail")
34
+ __properties: ClassVar[List[str]] = ["code", "providerCode", "providerTitle", "providerDetail"]
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 PaymentIntentErrorDetail 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
+ return _dict
76
+
77
+ @classmethod
78
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
79
+ """Create an instance of PaymentIntentErrorDetail from a dict"""
80
+ if obj is None:
81
+ return None
82
+
83
+ if not isinstance(obj, dict):
84
+ return cls.model_validate(obj)
85
+
86
+ _obj = cls.model_validate({
87
+ "code": obj.get("code"),
88
+ "providerCode": obj.get("providerCode"),
89
+ "providerTitle": obj.get("providerTitle"),
90
+ "providerDetail": obj.get("providerDetail")
91
+ })
92
+ return _obj
93
+
94
+
@@ -23,6 +23,7 @@ from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt, Stric
23
23
  from typing import Any, ClassVar, Dict, List, Optional, Union
24
24
  from pluggy_sdk.models.boleto import Boleto
25
25
  from pluggy_sdk.models.payment_request_callback_urls import PaymentRequestCallbackUrls
26
+ from pluggy_sdk.models.payment_request_error_detail import PaymentRequestErrorDetail
26
27
  from pluggy_sdk.models.payment_request_schedule import PaymentRequestSchedule
27
28
  from typing import Optional, Set
28
29
  from typing_extensions import Self
@@ -44,7 +45,8 @@ class PaymentRequest(BaseModel):
44
45
  pix_qr_code: Optional[StrictStr] = Field(default=None, description="Pix QR code generated by the payment receiver", alias="pixQrCode")
45
46
  boleto: Optional[Boleto] = None
46
47
  schedule: Optional[PaymentRequestSchedule] = None
47
- __properties: ClassVar[List[str]] = ["id", "amount", "description", "status", "clientPaymentId", "createdAt", "updatedAt", "callbackUrls", "recipientId", "paymentUrl", "pixQrCode", "boleto", "schedule"]
48
+ error_detail: Optional[PaymentRequestErrorDetail] = Field(default=None, alias="errorDetail")
49
+ __properties: ClassVar[List[str]] = ["id", "amount", "description", "status", "clientPaymentId", "createdAt", "updatedAt", "callbackUrls", "recipientId", "paymentUrl", "pixQrCode", "boleto", "schedule", "errorDetail"]
48
50
 
49
51
  @field_validator('status')
50
52
  def status_validate_enum(cls, value):
@@ -101,6 +103,9 @@ class PaymentRequest(BaseModel):
101
103
  # override the default output from pydantic by calling `to_dict()` of schedule
102
104
  if self.schedule:
103
105
  _dict['schedule'] = self.schedule.to_dict()
106
+ # override the default output from pydantic by calling `to_dict()` of error_detail
107
+ if self.error_detail:
108
+ _dict['errorDetail'] = self.error_detail.to_dict()
104
109
  return _dict
105
110
 
106
111
  @classmethod
@@ -125,7 +130,8 @@ class PaymentRequest(BaseModel):
125
130
  "paymentUrl": obj.get("paymentUrl"),
126
131
  "pixQrCode": obj.get("pixQrCode"),
127
132
  "boleto": Boleto.from_dict(obj["boleto"]) if obj.get("boleto") is not None else None,
128
- "schedule": PaymentRequestSchedule.from_dict(obj["schedule"]) if obj.get("schedule") is not None else None
133
+ "schedule": PaymentRequestSchedule.from_dict(obj["schedule"]) if obj.get("schedule") is not None else None,
134
+ "errorDetail": PaymentRequestErrorDetail.from_dict(obj["errorDetail"]) if obj.get("errorDetail") is not None else None
129
135
  })
130
136
  return _obj
131
137
 
@@ -0,0 +1,90 @@
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 PaymentRequestErrorDetail(BaseModel):
27
+ """
28
+ Error details when payment request fails
29
+ """ # noqa: E501
30
+ code: Optional[StrictStr] = Field(default=None, description="Error code")
31
+ provider_message: Optional[StrictStr] = Field(default=None, description="Error message returned by the institution", alias="providerMessage")
32
+ __properties: ClassVar[List[str]] = ["code", "providerMessage"]
33
+
34
+ model_config = ConfigDict(
35
+ populate_by_name=True,
36
+ validate_assignment=True,
37
+ protected_namespaces=(),
38
+ )
39
+
40
+
41
+ def to_str(self) -> str:
42
+ """Returns the string representation of the model using alias"""
43
+ return pprint.pformat(self.model_dump(by_alias=True))
44
+
45
+ def to_json(self) -> str:
46
+ """Returns the JSON representation of the model using alias"""
47
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
48
+ return json.dumps(self.to_dict())
49
+
50
+ @classmethod
51
+ def from_json(cls, json_str: str) -> Optional[Self]:
52
+ """Create an instance of PaymentRequestErrorDetail from a JSON string"""
53
+ return cls.from_dict(json.loads(json_str))
54
+
55
+ def to_dict(self) -> Dict[str, Any]:
56
+ """Return the dictionary representation of the model using alias.
57
+
58
+ This has the following differences from calling pydantic's
59
+ `self.model_dump(by_alias=True)`:
60
+
61
+ * `None` is only added to the output dict for nullable fields that
62
+ were set at model initialization. Other fields with value `None`
63
+ are ignored.
64
+ """
65
+ excluded_fields: Set[str] = set([
66
+ ])
67
+
68
+ _dict = self.model_dump(
69
+ by_alias=True,
70
+ exclude=excluded_fields,
71
+ exclude_none=True,
72
+ )
73
+ return _dict
74
+
75
+ @classmethod
76
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
77
+ """Create an instance of PaymentRequestErrorDetail from a dict"""
78
+ if obj is None:
79
+ return None
80
+
81
+ if not isinstance(obj, dict):
82
+ return cls.model_validate(obj)
83
+
84
+ _obj = cls.model_validate({
85
+ "code": obj.get("code"),
86
+ "providerMessage": obj.get("providerMessage")
87
+ })
88
+ return _obj
89
+
90
+
@@ -29,7 +29,7 @@ class UpdateItem(BaseModel):
29
29
  Update Item Request
30
30
  """ # noqa: E501
31
31
  parameters: Optional[UpdateItemParameters] = None
32
- 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")
32
+ client_user_id: Optional[StrictStr] = Field(default=None, description="Client's external identifier for the user, it can be a ID, UUID or even an email. This is free for clients to use.", alias="clientUserId")
33
33
  webhook_url: Optional[StrictStr] = Field(default=None, description="Url to be notified of item changes", alias="webhookUrl")
34
34
  products: Optional[List[StrictStr]] = Field(default=None, description="Products to be collected in the connection")
35
35
  __properties: ClassVar[List[str]] = ["parameters", "clientUserId", "webhookUrl", "products"]
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: pluggy-sdk
3
- Version: 1.0.0.post36
3
+ Version: 1.0.0.post37
4
4
  Summary: Pluggy API
5
5
  Home-page: https://github.com/diraol/pluggy-python
6
6
  Author: Pluggy
@@ -28,7 +28,7 @@ Pluggy's main API to review data and execute connectors
28
28
  This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:
29
29
 
30
30
  - API version: 1.0.0
31
- - Package version: 1.0.0.post36
31
+ - Package version: 1.0.0.post37
32
32
  - Generator version: 7.12.0-SNAPSHOT
33
33
  - Build package: org.openapitools.codegen.languages.PythonClientCodegen
34
34
  For more information, please visit [https://pluggy.ai](https://pluggy.ai)
@@ -129,6 +129,9 @@ Class | Method | HTTP request | Description
129
129
  *BenefitApi* | [**benefits_list**](docs/BenefitApi.md#benefits_list) | **GET** /benefits | List
130
130
  *BillApi* | [**bills_list**](docs/BillApi.md#bills_list) | **GET** /bills | List
131
131
  *BillApi* | [**bills_retrieve**](docs/BillApi.md#bills_retrieve) | **GET** /bills/{id} | Retrieve
132
+ *BoletoManagementApi* | [**boleto_cancel**](docs/BoletoManagementApi.md#boleto_cancel) | **POST** /boletos/{id}/cancel | Cancel Boleto
133
+ *BoletoManagementApi* | [**boleto_connection_create**](docs/BoletoManagementApi.md#boleto_connection_create) | **POST** /boleto-connections | Connect boleto credentials
134
+ *BoletoManagementApi* | [**boleto_create**](docs/BoletoManagementApi.md#boleto_create) | **POST** /boletos | Issue Boleto
132
135
  *BulkPaymentApi* | [**bulk_payment_create**](docs/BulkPaymentApi.md#bulk_payment_create) | **POST** /payments/bulk | Create
133
136
  *BulkPaymentApi* | [**bulk_payment_delete**](docs/BulkPaymentApi.md#bulk_payment_delete) | **DELETE** /payments/bulk/{id} | Delete
134
137
  *BulkPaymentApi* | [**bulk_payment_retrieve**](docs/BulkPaymentApi.md#bulk_payment_retrieve) | **GET** /payments/bulk/{id} | Retrieve
@@ -221,6 +224,7 @@ Class | Method | HTTP request | Description
221
224
  - [BillFinanceCharge](docs/BillFinanceCharge.md)
222
225
  - [BillsList200Response](docs/BillsList200Response.md)
223
226
  - [Boleto](docs/Boleto.md)
227
+ - [BoletoConnection](docs/BoletoConnection.md)
224
228
  - [BoletoPayer](docs/BoletoPayer.md)
225
229
  - [BoletoRecipient](docs/BoletoRecipient.md)
226
230
  - [BulkPayment](docs/BulkPayment.md)
@@ -238,6 +242,10 @@ Class | Method | HTTP request | Description
238
242
  - [ConnectorListResponse](docs/ConnectorListResponse.md)
239
243
  - [ConnectorUserAction](docs/ConnectorUserAction.md)
240
244
  - [Consent](docs/Consent.md)
245
+ - [CreateBoleto](docs/CreateBoleto.md)
246
+ - [CreateBoletoBoleto](docs/CreateBoletoBoleto.md)
247
+ - [CreateBoletoBoletoPayer](docs/CreateBoletoBoletoPayer.md)
248
+ - [CreateBoletoConnection](docs/CreateBoletoConnection.md)
241
249
  - [CreateBoletoPaymentRequest](docs/CreateBoletoPaymentRequest.md)
242
250
  - [CreateBulkPayment](docs/CreateBulkPayment.md)
243
251
  - [CreateClientCategoryRule](docs/CreateClientCategoryRule.md)
@@ -276,6 +284,8 @@ Class | Method | HTTP request | Description
276
284
  - [InvestmentMetadata](docs/InvestmentMetadata.md)
277
285
  - [InvestmentTransaction](docs/InvestmentTransaction.md)
278
286
  - [InvestmentsList200Response](docs/InvestmentsList200Response.md)
287
+ - [IssuedBoleto](docs/IssuedBoleto.md)
288
+ - [IssuedBoletoPayer](docs/IssuedBoletoPayer.md)
279
289
  - [Item](docs/Item.md)
280
290
  - [ItemCreationErrorResponse](docs/ItemCreationErrorResponse.md)
281
291
  - [ItemError](docs/ItemError.md)
@@ -310,6 +320,7 @@ Class | Method | HTTP request | Description
310
320
  - [PaymentDataParticipant](docs/PaymentDataParticipant.md)
311
321
  - [PaymentInstitution](docs/PaymentInstitution.md)
312
322
  - [PaymentIntent](docs/PaymentIntent.md)
323
+ - [PaymentIntentErrorDetail](docs/PaymentIntentErrorDetail.md)
313
324
  - [PaymentIntentParameter](docs/PaymentIntentParameter.md)
314
325
  - [PaymentIntentsList200Response](docs/PaymentIntentsList200Response.md)
315
326
  - [PaymentReceipt](docs/PaymentReceipt.md)
@@ -321,6 +332,7 @@ Class | Method | HTTP request | Description
321
332
  - [PaymentRecipientsList200Response](docs/PaymentRecipientsList200Response.md)
322
333
  - [PaymentRequest](docs/PaymentRequest.md)
323
334
  - [PaymentRequestCallbackUrls](docs/PaymentRequestCallbackUrls.md)
335
+ - [PaymentRequestErrorDetail](docs/PaymentRequestErrorDetail.md)
324
336
  - [PaymentRequestReceiptList200Response](docs/PaymentRequestReceiptList200Response.md)
325
337
  - [PaymentRequestSchedule](docs/PaymentRequestSchedule.md)
326
338
  - [PaymentRequestsList200Response](docs/PaymentRequestsList200Response.md)