pluggy-sdk 1.0.0.post34__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.
- pluggy_sdk/__init__.py +200 -0
- pluggy_sdk/api/__init__.py +25 -0
- pluggy_sdk/api/account_api.py +588 -0
- pluggy_sdk/api/acquirer_anticipation_api.py +664 -0
- pluggy_sdk/api/acquirer_receivable_api.py +664 -0
- pluggy_sdk/api/acquirer_sale_api.py +664 -0
- pluggy_sdk/api/auth_api.py +605 -0
- pluggy_sdk/api/benefit_api.py +567 -0
- pluggy_sdk/api/bill_api.py +567 -0
- pluggy_sdk/api/bulk_payment_api.py +1127 -0
- pluggy_sdk/api/category_api.py +1096 -0
- pluggy_sdk/api/connector_api.py +979 -0
- pluggy_sdk/api/consent_api.py +576 -0
- pluggy_sdk/api/identity_api.py +581 -0
- pluggy_sdk/api/income_report_api.py +311 -0
- pluggy_sdk/api/investment_api.py +918 -0
- pluggy_sdk/api/items_api.py +1456 -0
- pluggy_sdk/api/loan_api.py +567 -0
- pluggy_sdk/api/payment_customer_api.py +1414 -0
- pluggy_sdk/api/payment_intent_api.py +842 -0
- pluggy_sdk/api/payment_receipts_api.py +842 -0
- pluggy_sdk/api/payment_recipient_api.py +1997 -0
- pluggy_sdk/api/payment_request_api.py +2739 -0
- pluggy_sdk/api/payment_schedule_api.py +823 -0
- pluggy_sdk/api/payroll_loan_api.py +561 -0
- pluggy_sdk/api/portfolio_yield_api.py +580 -0
- pluggy_sdk/api/smart_account_api.py +1704 -0
- pluggy_sdk/api/smart_account_transfer_api.py +610 -0
- pluggy_sdk/api/smart_transfer_api.py +1406 -0
- pluggy_sdk/api/transaction_api.py +963 -0
- pluggy_sdk/api/webhook_api.py +1406 -0
- pluggy_sdk/api_client.py +798 -0
- pluggy_sdk/api_response.py +21 -0
- pluggy_sdk/configuration.py +596 -0
- pluggy_sdk/exceptions.py +217 -0
- pluggy_sdk/models/__init__.py +163 -0
- pluggy_sdk/models/account.py +134 -0
- pluggy_sdk/models/accounts_list200_response.py +102 -0
- pluggy_sdk/models/acquirer_anticipation.py +117 -0
- pluggy_sdk/models/acquirer_anticipation_data.py +101 -0
- pluggy_sdk/models/acquirer_data.py +113 -0
- pluggy_sdk/models/acquirer_receivable.py +143 -0
- pluggy_sdk/models/acquirer_receivable_data.py +108 -0
- pluggy_sdk/models/acquirer_receivable_data_establishment.py +96 -0
- pluggy_sdk/models/acquirer_receivable_destination_account.py +92 -0
- pluggy_sdk/models/acquirer_receivable_related_sale.py +99 -0
- pluggy_sdk/models/acquirer_sale.py +171 -0
- pluggy_sdk/models/acquirer_sale_data.py +150 -0
- pluggy_sdk/models/acquirer_sale_installment.py +93 -0
- pluggy_sdk/models/acquirer_sale_installment_data.py +95 -0
- pluggy_sdk/models/address.py +110 -0
- pluggy_sdk/models/aggregated_portfolio.py +120 -0
- pluggy_sdk/models/aggregated_portfolio_response.py +102 -0
- pluggy_sdk/models/asset_distribution.py +88 -0
- pluggy_sdk/models/auth_request.py +90 -0
- pluggy_sdk/models/auth_response.py +88 -0
- pluggy_sdk/models/bank_data.py +92 -0
- pluggy_sdk/models/benefit_loan.py +121 -0
- pluggy_sdk/models/benefit_loan_client.py +102 -0
- pluggy_sdk/models/benefit_response.py +118 -0
- pluggy_sdk/models/benefit_response_paying_institution.py +94 -0
- pluggy_sdk/models/benefits_list200_response.py +102 -0
- pluggy_sdk/models/bill.py +109 -0
- pluggy_sdk/models/bill_finance_charge.py +103 -0
- pluggy_sdk/models/bills_list200_response.py +102 -0
- pluggy_sdk/models/boleto.py +121 -0
- pluggy_sdk/models/boleto_payer.py +90 -0
- pluggy_sdk/models/boleto_recipient.py +90 -0
- pluggy_sdk/models/bulk_payment.py +128 -0
- pluggy_sdk/models/bulk_payments_list200_response.py +102 -0
- pluggy_sdk/models/category.py +96 -0
- pluggy_sdk/models/client_category_rule.py +98 -0
- pluggy_sdk/models/company.py +90 -0
- pluggy_sdk/models/connect_token_request.py +94 -0
- pluggy_sdk/models/connect_token_response.py +88 -0
- pluggy_sdk/models/connector.py +145 -0
- pluggy_sdk/models/connector_credential.py +121 -0
- pluggy_sdk/models/connector_health.py +96 -0
- pluggy_sdk/models/connector_health_details.py +90 -0
- pluggy_sdk/models/connector_list_response.py +102 -0
- pluggy_sdk/models/connector_user_action.py +93 -0
- pluggy_sdk/models/consent.py +120 -0
- pluggy_sdk/models/create_boleto_payment_request.py +98 -0
- pluggy_sdk/models/create_bulk_payment.py +96 -0
- pluggy_sdk/models/create_client_category_rule.py +96 -0
- pluggy_sdk/models/create_item.py +115 -0
- pluggy_sdk/models/create_item_parameters.py +144 -0
- pluggy_sdk/models/create_or_update_payment_customer.py +105 -0
- pluggy_sdk/models/create_payment_customer_request_body.py +103 -0
- pluggy_sdk/models/create_payment_intent.py +110 -0
- pluggy_sdk/models/create_payment_recipient.py +104 -0
- pluggy_sdk/models/create_payment_request.py +115 -0
- pluggy_sdk/models/create_payment_request_schedule.py +189 -0
- pluggy_sdk/models/create_pix_qr_payment_request.py +96 -0
- pluggy_sdk/models/create_smart_account_request.py +104 -0
- pluggy_sdk/models/create_smart_account_transfer_request.py +92 -0
- pluggy_sdk/models/create_smart_transfer_payment.py +96 -0
- pluggy_sdk/models/create_smart_transfer_preauthorization.py +104 -0
- pluggy_sdk/models/create_webhook.py +99 -0
- pluggy_sdk/models/credential_select_option.py +90 -0
- pluggy_sdk/models/credit_card_metadata.py +101 -0
- pluggy_sdk/models/credit_data.py +127 -0
- pluggy_sdk/models/custom.py +100 -0
- pluggy_sdk/models/daily.py +101 -0
- pluggy_sdk/models/document.py +100 -0
- pluggy_sdk/models/email.py +100 -0
- pluggy_sdk/models/global_error_response.py +94 -0
- pluggy_sdk/models/i_count_response.py +88 -0
- pluggy_sdk/models/identity_relation.py +102 -0
- pluggy_sdk/models/identity_response.py +173 -0
- pluggy_sdk/models/identity_response_financial_relationships.py +111 -0
- pluggy_sdk/models/identity_response_financial_relationships_accounts_inner.py +98 -0
- pluggy_sdk/models/identity_response_financial_relationships_procurators_inner.py +101 -0
- pluggy_sdk/models/identity_response_qualifications.py +112 -0
- pluggy_sdk/models/identity_response_qualifications_informed_income.py +100 -0
- pluggy_sdk/models/identity_response_qualifications_informed_patrimony.py +90 -0
- pluggy_sdk/models/income_report.py +90 -0
- pluggy_sdk/models/income_reports_response.py +102 -0
- pluggy_sdk/models/investment.py +192 -0
- pluggy_sdk/models/investment_expenses.py +108 -0
- pluggy_sdk/models/investment_metadata.py +100 -0
- pluggy_sdk/models/investment_transaction.py +124 -0
- pluggy_sdk/models/investments_list200_response.py +102 -0
- pluggy_sdk/models/item.py +150 -0
- pluggy_sdk/models/item_creation_error_response.py +102 -0
- pluggy_sdk/models/item_error.py +94 -0
- pluggy_sdk/models/item_options.py +94 -0
- pluggy_sdk/models/loan.py +199 -0
- pluggy_sdk/models/loan_contracted_fee.py +118 -0
- pluggy_sdk/models/loan_contracted_finance_charge.py +92 -0
- pluggy_sdk/models/loan_installment_balloon_payment.py +95 -0
- pluggy_sdk/models/loan_installment_balloon_payment_amount.py +90 -0
- pluggy_sdk/models/loan_installments.py +130 -0
- pluggy_sdk/models/loan_interest_rate.py +136 -0
- pluggy_sdk/models/loan_payment_release.py +103 -0
- pluggy_sdk/models/loan_payment_release_over_parcel.py +106 -0
- pluggy_sdk/models/loan_payment_release_over_parcel_charge.py +92 -0
- pluggy_sdk/models/loan_payment_release_over_parcel_fee.py +92 -0
- pluggy_sdk/models/loan_payments.py +98 -0
- pluggy_sdk/models/loan_warranty.py +94 -0
- pluggy_sdk/models/loans_list200_response.py +102 -0
- pluggy_sdk/models/merchant.py +96 -0
- pluggy_sdk/models/monthly.py +103 -0
- pluggy_sdk/models/monthly_portfolio.py +100 -0
- pluggy_sdk/models/monthly_portfolio_response.py +102 -0
- pluggy_sdk/models/not_authenticated_response.py +90 -0
- pluggy_sdk/models/page_response_acquirer_anticipations.py +102 -0
- pluggy_sdk/models/page_response_acquirer_receivables.py +102 -0
- pluggy_sdk/models/page_response_acquirer_sales.py +102 -0
- pluggy_sdk/models/page_response_category_rules.py +102 -0
- pluggy_sdk/models/page_response_consents.py +102 -0
- pluggy_sdk/models/page_response_investment_transactions.py +102 -0
- pluggy_sdk/models/page_response_transactions.py +102 -0
- pluggy_sdk/models/parameter_validation_error.py +92 -0
- pluggy_sdk/models/parameter_validation_response.py +98 -0
- pluggy_sdk/models/payment_customer.py +105 -0
- pluggy_sdk/models/payment_customers_list200_response.py +102 -0
- pluggy_sdk/models/payment_data.py +111 -0
- pluggy_sdk/models/payment_data_boleto_metadata.py +98 -0
- pluggy_sdk/models/payment_data_participant.py +102 -0
- pluggy_sdk/models/payment_institution.py +101 -0
- pluggy_sdk/models/payment_intent.py +145 -0
- pluggy_sdk/models/payment_intent_parameter.py +90 -0
- pluggy_sdk/models/payment_intents_list200_response.py +102 -0
- pluggy_sdk/models/payment_receipt.py +120 -0
- pluggy_sdk/models/payment_receipt_bank_account.py +92 -0
- pluggy_sdk/models/payment_receipt_person.py +96 -0
- pluggy_sdk/models/payment_recipient.py +110 -0
- pluggy_sdk/models/payment_recipient_account.py +92 -0
- pluggy_sdk/models/payment_recipients_institution_list200_response.py +102 -0
- pluggy_sdk/models/payment_recipients_list200_response.py +102 -0
- pluggy_sdk/models/payment_request.py +132 -0
- pluggy_sdk/models/payment_request_callback_urls.py +92 -0
- pluggy_sdk/models/payment_request_receipt_list200_response.py +102 -0
- pluggy_sdk/models/payment_request_schedule.py +183 -0
- pluggy_sdk/models/payment_requests_list200_response.py +102 -0
- pluggy_sdk/models/payment_schedules_list200_response.py +102 -0
- pluggy_sdk/models/payroll_loan.py +121 -0
- pluggy_sdk/models/payroll_loan_client.py +102 -0
- pluggy_sdk/models/payroll_loan_response.py +125 -0
- pluggy_sdk/models/payroll_loan_response_client.py +102 -0
- pluggy_sdk/models/payroll_loans_list200_response.py +102 -0
- pluggy_sdk/models/percentage_over_index.py +90 -0
- pluggy_sdk/models/phone_number.py +100 -0
- pluggy_sdk/models/pix_data.py +90 -0
- pluggy_sdk/models/schedule_payment.py +102 -0
- pluggy_sdk/models/schedule_type_custom.py +100 -0
- pluggy_sdk/models/schedule_type_daily.py +101 -0
- pluggy_sdk/models/schedule_type_monthly.py +103 -0
- pluggy_sdk/models/schedule_type_single.py +98 -0
- pluggy_sdk/models/schedule_type_weekly.py +110 -0
- pluggy_sdk/models/single.py +98 -0
- pluggy_sdk/models/smart_account.py +107 -0
- pluggy_sdk/models/smart_account_address.py +112 -0
- pluggy_sdk/models/smart_account_balance.py +95 -0
- pluggy_sdk/models/smart_account_transfer.py +123 -0
- pluggy_sdk/models/smart_accounts_list200_response.py +102 -0
- pluggy_sdk/models/smart_tranfers_preauthorizations_list200_response.py +102 -0
- pluggy_sdk/models/smart_transfer_callback_urls.py +90 -0
- pluggy_sdk/models/smart_transfer_payment.py +116 -0
- pluggy_sdk/models/smart_transfer_preauthorization.py +128 -0
- pluggy_sdk/models/smart_transfer_preauthorization_parameter.py +90 -0
- pluggy_sdk/models/status_detail.py +127 -0
- pluggy_sdk/models/status_detail_product.py +101 -0
- pluggy_sdk/models/status_detail_product_warning.py +92 -0
- pluggy_sdk/models/transaction.py +141 -0
- pluggy_sdk/models/update_item.py +109 -0
- pluggy_sdk/models/update_item_parameters.py +144 -0
- pluggy_sdk/models/update_payment_recipient.py +102 -0
- pluggy_sdk/models/update_payment_request.py +102 -0
- pluggy_sdk/models/update_transaction.py +88 -0
- pluggy_sdk/models/webhook.py +106 -0
- pluggy_sdk/models/webhook_creation_error_response.py +90 -0
- pluggy_sdk/models/webhooks_list200_response.py +102 -0
- pluggy_sdk/models/weekly.py +110 -0
- pluggy_sdk/py.typed +0 -0
- pluggy_sdk/rest.py +258 -0
- pluggy_sdk-1.0.0.post34.dist-info/METADATA +373 -0
- pluggy_sdk-1.0.0.post34.dist-info/RECORD +221 -0
- pluggy_sdk-1.0.0.post34.dist-info/WHEEL +5 -0
- pluggy_sdk-1.0.0.post34.dist-info/top_level.txt +1 -0
@@ -0,0 +1,92 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
|
3
|
+
"""
|
4
|
+
Pluggy API
|
5
|
+
|
6
|
+
Pluggy's main API to review data and execute connectors
|
7
|
+
|
8
|
+
The version of the OpenAPI document: 1.0.0
|
9
|
+
Contact: hello@pluggy.ai
|
10
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
11
|
+
|
12
|
+
Do not edit the class manually.
|
13
|
+
""" # noqa: E501
|
14
|
+
|
15
|
+
|
16
|
+
from __future__ import annotations
|
17
|
+
import pprint
|
18
|
+
import re # noqa: F401
|
19
|
+
import json
|
20
|
+
|
21
|
+
from pydantic import BaseModel, ConfigDict, Field, StrictStr
|
22
|
+
from typing import Any, ClassVar, Dict, List
|
23
|
+
from typing import Optional, Set
|
24
|
+
from typing_extensions import Self
|
25
|
+
|
26
|
+
class AcquirerReceivableDestinationAccount(BaseModel):
|
27
|
+
"""
|
28
|
+
Acquirer receivable destination account
|
29
|
+
""" # noqa: E501
|
30
|
+
receiving_bank: StrictStr = Field(description="Name of the receiving bank", alias="receivingBank")
|
31
|
+
agency: StrictStr = Field(description="Agency of the receiving account")
|
32
|
+
account: StrictStr = Field(description="Number of the receiving account")
|
33
|
+
__properties: ClassVar[List[str]] = ["receivingBank", "agency", "account"]
|
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 AcquirerReceivableDestinationAccount 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 AcquirerReceivableDestinationAccount 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
|
+
"receivingBank": obj.get("receivingBank"),
|
87
|
+
"agency": obj.get("agency"),
|
88
|
+
"account": obj.get("account")
|
89
|
+
})
|
90
|
+
return _obj
|
91
|
+
|
92
|
+
|
@@ -0,0 +1,99 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
|
3
|
+
"""
|
4
|
+
Pluggy API
|
5
|
+
|
6
|
+
Pluggy's main API to review data and execute connectors
|
7
|
+
|
8
|
+
The version of the OpenAPI document: 1.0.0
|
9
|
+
Contact: hello@pluggy.ai
|
10
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
11
|
+
|
12
|
+
Do not edit the class manually.
|
13
|
+
""" # noqa: E501
|
14
|
+
|
15
|
+
|
16
|
+
from __future__ import annotations
|
17
|
+
import pprint
|
18
|
+
import re # noqa: F401
|
19
|
+
import json
|
20
|
+
|
21
|
+
from datetime import datetime
|
22
|
+
from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt, StrictStr
|
23
|
+
from typing import Any, ClassVar, Dict, List, Union
|
24
|
+
from typing import Optional, Set
|
25
|
+
from typing_extensions import Self
|
26
|
+
|
27
|
+
class AcquirerReceivableRelatedSale(BaseModel):
|
28
|
+
"""
|
29
|
+
Acquirer receivable related operation (sale or cancellation)
|
30
|
+
""" # noqa: E501
|
31
|
+
var_date: datetime = Field(description="Date when the sale occurred", alias="date")
|
32
|
+
gross_amount: Union[StrictFloat, StrictInt] = Field(description="Gross amount of the related sale", alias="grossAmount")
|
33
|
+
net_amount: Union[StrictFloat, StrictInt] = Field(description="Net amount of the related sale", alias="netAmount")
|
34
|
+
installment_count: Union[StrictFloat, StrictInt] = Field(description="Amount of installments of the sale", alias="installmentCount")
|
35
|
+
installment_number: Union[StrictFloat, StrictInt] = Field(description="Installment of the sale being paid or cancelled", alias="installmentNumber")
|
36
|
+
nsu: StrictStr = Field(description="NSU of the sale")
|
37
|
+
__properties: ClassVar[List[str]] = ["date", "grossAmount", "netAmount", "installmentCount", "installmentNumber", "nsu"]
|
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 AcquirerReceivableRelatedSale 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
|
+
return _dict
|
79
|
+
|
80
|
+
@classmethod
|
81
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
82
|
+
"""Create an instance of AcquirerReceivableRelatedSale from a dict"""
|
83
|
+
if obj is None:
|
84
|
+
return None
|
85
|
+
|
86
|
+
if not isinstance(obj, dict):
|
87
|
+
return cls.model_validate(obj)
|
88
|
+
|
89
|
+
_obj = cls.model_validate({
|
90
|
+
"date": obj.get("date"),
|
91
|
+
"grossAmount": obj.get("grossAmount"),
|
92
|
+
"netAmount": obj.get("netAmount"),
|
93
|
+
"installmentCount": obj.get("installmentCount"),
|
94
|
+
"installmentNumber": obj.get("installmentNumber"),
|
95
|
+
"nsu": obj.get("nsu")
|
96
|
+
})
|
97
|
+
return _obj
|
98
|
+
|
99
|
+
|
@@ -0,0 +1,171 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
|
3
|
+
"""
|
4
|
+
Pluggy API
|
5
|
+
|
6
|
+
Pluggy's main API to review data and execute connectors
|
7
|
+
|
8
|
+
The version of the OpenAPI document: 1.0.0
|
9
|
+
Contact: hello@pluggy.ai
|
10
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
11
|
+
|
12
|
+
Do not edit the class manually.
|
13
|
+
""" # noqa: E501
|
14
|
+
|
15
|
+
|
16
|
+
from __future__ import annotations
|
17
|
+
import pprint
|
18
|
+
import re # noqa: F401
|
19
|
+
import json
|
20
|
+
|
21
|
+
from datetime import datetime
|
22
|
+
from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt, StrictStr, field_validator
|
23
|
+
from typing import Any, ClassVar, Dict, List, Optional, Union
|
24
|
+
from pluggy_sdk.models.acquirer_sale_installment_data import AcquirerSaleInstallmentData
|
25
|
+
from typing import Optional, Set
|
26
|
+
from typing_extensions import Self
|
27
|
+
|
28
|
+
class AcquirerSale(BaseModel):
|
29
|
+
"""
|
30
|
+
Acquirer Sale product
|
31
|
+
""" # noqa: E501
|
32
|
+
id: StrictStr = Field(description="Primary identifier of the acquirer sale")
|
33
|
+
item_id: StrictStr = Field(description="Primary identifier of the item associated to the acquirer sale", alias="itemId")
|
34
|
+
description: StrictStr = Field(description="Clean description of the acquirer sale")
|
35
|
+
currency_code: StrictStr = Field(description="Currency ISO code", alias="currencyCode")
|
36
|
+
var_date: datetime = Field(description="Date when the acquirer sale was made", alias="date")
|
37
|
+
gross_amount: Union[StrictFloat, StrictInt] = Field(description="Acquirer sale gross amount", alias="grossAmount")
|
38
|
+
payment_method: Optional[StrictStr] = Field(default=None, description="Acquirer sale payment method", alias="paymentMethod")
|
39
|
+
authorization_code: Optional[StrictStr] = Field(default=None, description="Code generated by the card issuer to authorize the sale", alias="authorizationCode")
|
40
|
+
card_flag: Optional[StrictStr] = Field(default=None, description="Flag of the card used", alias="cardFlag")
|
41
|
+
card_number: Optional[StrictStr] = Field(default=None, description="Masked card number of the card used", alias="cardNumber")
|
42
|
+
card_funding_source: Optional[StrictStr] = Field(default=None, description="CREDIT or DEBIT", alias="cardFundingSource")
|
43
|
+
nsu: Optional[StrictStr] = Field(default=None, description="Tax id of the transaction")
|
44
|
+
status: Optional[StrictStr] = Field(default=None, description="Acquirer sale status")
|
45
|
+
net_amount: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Acquirer sale net amount", alias="netAmount")
|
46
|
+
mdr_fee: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Percentage of the merchant discount rate", alias="mdrFee")
|
47
|
+
mdr_fee_amount: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Total amount of the merchant discount rate", alias="mdrFeeAmount")
|
48
|
+
installments: Optional[List[AcquirerSaleInstallmentData]] = None
|
49
|
+
terminal_id: Optional[StrictStr] = Field(default=None, description="Id of the terminal (maquininha) used for the sale", alias="terminalId")
|
50
|
+
__properties: ClassVar[List[str]] = ["id", "itemId", "description", "currencyCode", "date", "grossAmount", "paymentMethod", "authorizationCode", "cardFlag", "cardNumber", "cardFundingSource", "nsu", "status", "netAmount", "mdrFee", "mdrFeeAmount", "installments", "terminalId"]
|
51
|
+
|
52
|
+
@field_validator('payment_method')
|
53
|
+
def payment_method_validate_enum(cls, value):
|
54
|
+
"""Validates the enum"""
|
55
|
+
if value is None:
|
56
|
+
return value
|
57
|
+
|
58
|
+
if value not in set(['CARD', 'PIX']):
|
59
|
+
raise ValueError("must be one of enum values ('CARD', 'PIX')")
|
60
|
+
return value
|
61
|
+
|
62
|
+
@field_validator('card_flag')
|
63
|
+
def card_flag_validate_enum(cls, value):
|
64
|
+
"""Validates the enum"""
|
65
|
+
if value is None:
|
66
|
+
return value
|
67
|
+
|
68
|
+
if value not in set(['VISA', 'MASTERCARD', 'AMEX', 'ELO', 'CABAL', 'OTHER']):
|
69
|
+
raise ValueError("must be one of enum values ('VISA', 'MASTERCARD', 'AMEX', 'ELO', 'CABAL', 'OTHER')")
|
70
|
+
return value
|
71
|
+
|
72
|
+
@field_validator('card_funding_source')
|
73
|
+
def card_funding_source_validate_enum(cls, value):
|
74
|
+
"""Validates the enum"""
|
75
|
+
if value is None:
|
76
|
+
return value
|
77
|
+
|
78
|
+
if value not in set(['CREDIT', 'DEBIT']):
|
79
|
+
raise ValueError("must be one of enum values ('CREDIT', 'DEBIT')")
|
80
|
+
return value
|
81
|
+
|
82
|
+
@field_validator('status')
|
83
|
+
def status_validate_enum(cls, value):
|
84
|
+
"""Validates the enum"""
|
85
|
+
if value is None:
|
86
|
+
return value
|
87
|
+
|
88
|
+
if value not in set(['APPROVED', 'CANCELLED']):
|
89
|
+
raise ValueError("must be one of enum values ('APPROVED', 'CANCELLED')")
|
90
|
+
return value
|
91
|
+
|
92
|
+
model_config = ConfigDict(
|
93
|
+
populate_by_name=True,
|
94
|
+
validate_assignment=True,
|
95
|
+
protected_namespaces=(),
|
96
|
+
)
|
97
|
+
|
98
|
+
|
99
|
+
def to_str(self) -> str:
|
100
|
+
"""Returns the string representation of the model using alias"""
|
101
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
102
|
+
|
103
|
+
def to_json(self) -> str:
|
104
|
+
"""Returns the JSON representation of the model using alias"""
|
105
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
106
|
+
return json.dumps(self.to_dict())
|
107
|
+
|
108
|
+
@classmethod
|
109
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
110
|
+
"""Create an instance of AcquirerSale from a JSON string"""
|
111
|
+
return cls.from_dict(json.loads(json_str))
|
112
|
+
|
113
|
+
def to_dict(self) -> Dict[str, Any]:
|
114
|
+
"""Return the dictionary representation of the model using alias.
|
115
|
+
|
116
|
+
This has the following differences from calling pydantic's
|
117
|
+
`self.model_dump(by_alias=True)`:
|
118
|
+
|
119
|
+
* `None` is only added to the output dict for nullable fields that
|
120
|
+
were set at model initialization. Other fields with value `None`
|
121
|
+
are ignored.
|
122
|
+
"""
|
123
|
+
excluded_fields: Set[str] = set([
|
124
|
+
])
|
125
|
+
|
126
|
+
_dict = self.model_dump(
|
127
|
+
by_alias=True,
|
128
|
+
exclude=excluded_fields,
|
129
|
+
exclude_none=True,
|
130
|
+
)
|
131
|
+
# override the default output from pydantic by calling `to_dict()` of each item in installments (list)
|
132
|
+
_items = []
|
133
|
+
if self.installments:
|
134
|
+
for _item_installments in self.installments:
|
135
|
+
if _item_installments:
|
136
|
+
_items.append(_item_installments.to_dict())
|
137
|
+
_dict['installments'] = _items
|
138
|
+
return _dict
|
139
|
+
|
140
|
+
@classmethod
|
141
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
142
|
+
"""Create an instance of AcquirerSale from a dict"""
|
143
|
+
if obj is None:
|
144
|
+
return None
|
145
|
+
|
146
|
+
if not isinstance(obj, dict):
|
147
|
+
return cls.model_validate(obj)
|
148
|
+
|
149
|
+
_obj = cls.model_validate({
|
150
|
+
"id": obj.get("id"),
|
151
|
+
"itemId": obj.get("itemId"),
|
152
|
+
"description": obj.get("description"),
|
153
|
+
"currencyCode": obj.get("currencyCode"),
|
154
|
+
"date": obj.get("date"),
|
155
|
+
"grossAmount": obj.get("grossAmount"),
|
156
|
+
"paymentMethod": obj.get("paymentMethod"),
|
157
|
+
"authorizationCode": obj.get("authorizationCode"),
|
158
|
+
"cardFlag": obj.get("cardFlag"),
|
159
|
+
"cardNumber": obj.get("cardNumber"),
|
160
|
+
"cardFundingSource": obj.get("cardFundingSource"),
|
161
|
+
"nsu": obj.get("nsu"),
|
162
|
+
"status": obj.get("status"),
|
163
|
+
"netAmount": obj.get("netAmount"),
|
164
|
+
"mdrFee": obj.get("mdrFee"),
|
165
|
+
"mdrFeeAmount": obj.get("mdrFeeAmount"),
|
166
|
+
"installments": [AcquirerSaleInstallmentData.from_dict(_item) for _item in obj["installments"]] if obj.get("installments") is not None else None,
|
167
|
+
"terminalId": obj.get("terminalId")
|
168
|
+
})
|
169
|
+
return _obj
|
170
|
+
|
171
|
+
|
@@ -0,0 +1,150 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
|
3
|
+
"""
|
4
|
+
Pluggy API
|
5
|
+
|
6
|
+
Pluggy's main API to review data and execute connectors
|
7
|
+
|
8
|
+
The version of the OpenAPI document: 1.0.0
|
9
|
+
Contact: hello@pluggy.ai
|
10
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
11
|
+
|
12
|
+
Do not edit the class manually.
|
13
|
+
""" # noqa: E501
|
14
|
+
|
15
|
+
|
16
|
+
from __future__ import annotations
|
17
|
+
import pprint
|
18
|
+
import re # noqa: F401
|
19
|
+
import json
|
20
|
+
|
21
|
+
from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt, StrictStr, field_validator
|
22
|
+
from typing import Any, ClassVar, Dict, List, Optional, Union
|
23
|
+
from pluggy_sdk.models.acquirer_sale_installment import AcquirerSaleInstallment
|
24
|
+
from typing import Optional, Set
|
25
|
+
from typing_extensions import Self
|
26
|
+
|
27
|
+
class AcquirerSaleData(BaseModel):
|
28
|
+
"""
|
29
|
+
AcquirerSaleData
|
30
|
+
""" # noqa: E501
|
31
|
+
nsu: StrictStr = Field(description="Tax id of the transaction")
|
32
|
+
authorization_code: Optional[StrictStr] = Field(default=None, description="Code generated by the card issuer to authorize the sale", alias="authorizationCode")
|
33
|
+
payment_method: Optional[StrictStr] = Field(default=None, alias="paymentMethod")
|
34
|
+
net_amount: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="The total net amount of the sale", alias="netAmount")
|
35
|
+
mdr_fee: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Merchant discount rate percentage", alias="mdrFee")
|
36
|
+
mdr_fee_amount: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Merchant discount rate ampount", alias="mdrFeeAmount")
|
37
|
+
status: Optional[StrictStr] = None
|
38
|
+
installment_count: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Number of installments of the sale", alias="installmentCount")
|
39
|
+
installments: Optional[List[AcquirerSaleInstallment]] = None
|
40
|
+
card_flag: Optional[StrictStr] = Field(default=None, description="Flag of the card used", alias="cardFlag")
|
41
|
+
card_number: Optional[StrictStr] = Field(default=None, description="Masked number of the card used", alias="cardNumber")
|
42
|
+
card_funding_source: Optional[StrictStr] = Field(default=None, alias="cardFundingSource")
|
43
|
+
terminal_id: Optional[StrictStr] = Field(default=None, description="Id of the terminal (posnet) used for the sale", alias="terminalId")
|
44
|
+
__properties: ClassVar[List[str]] = ["nsu", "authorizationCode", "paymentMethod", "netAmount", "mdrFee", "mdrFeeAmount", "status", "installmentCount", "installments", "cardFlag", "cardNumber", "cardFundingSource", "terminalId"]
|
45
|
+
|
46
|
+
@field_validator('payment_method')
|
47
|
+
def payment_method_validate_enum(cls, value):
|
48
|
+
"""Validates the enum"""
|
49
|
+
if value is None:
|
50
|
+
return value
|
51
|
+
|
52
|
+
if value not in set(['CARD', 'PIX']):
|
53
|
+
raise ValueError("must be one of enum values ('CARD', 'PIX')")
|
54
|
+
return value
|
55
|
+
|
56
|
+
@field_validator('status')
|
57
|
+
def status_validate_enum(cls, value):
|
58
|
+
"""Validates the enum"""
|
59
|
+
if value is None:
|
60
|
+
return value
|
61
|
+
|
62
|
+
if value not in set(['APPROVED', 'CANCELLED']):
|
63
|
+
raise ValueError("must be one of enum values ('APPROVED', 'CANCELLED')")
|
64
|
+
return value
|
65
|
+
|
66
|
+
@field_validator('card_funding_source')
|
67
|
+
def card_funding_source_validate_enum(cls, value):
|
68
|
+
"""Validates the enum"""
|
69
|
+
if value is None:
|
70
|
+
return value
|
71
|
+
|
72
|
+
if value not in set(['CREDIT', 'DEBIT']):
|
73
|
+
raise ValueError("must be one of enum values ('CREDIT', 'DEBIT')")
|
74
|
+
return value
|
75
|
+
|
76
|
+
model_config = ConfigDict(
|
77
|
+
populate_by_name=True,
|
78
|
+
validate_assignment=True,
|
79
|
+
protected_namespaces=(),
|
80
|
+
)
|
81
|
+
|
82
|
+
|
83
|
+
def to_str(self) -> str:
|
84
|
+
"""Returns the string representation of the model using alias"""
|
85
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
86
|
+
|
87
|
+
def to_json(self) -> str:
|
88
|
+
"""Returns the JSON representation of the model using alias"""
|
89
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
90
|
+
return json.dumps(self.to_dict())
|
91
|
+
|
92
|
+
@classmethod
|
93
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
94
|
+
"""Create an instance of AcquirerSaleData from a JSON string"""
|
95
|
+
return cls.from_dict(json.loads(json_str))
|
96
|
+
|
97
|
+
def to_dict(self) -> Dict[str, Any]:
|
98
|
+
"""Return the dictionary representation of the model using alias.
|
99
|
+
|
100
|
+
This has the following differences from calling pydantic's
|
101
|
+
`self.model_dump(by_alias=True)`:
|
102
|
+
|
103
|
+
* `None` is only added to the output dict for nullable fields that
|
104
|
+
were set at model initialization. Other fields with value `None`
|
105
|
+
are ignored.
|
106
|
+
"""
|
107
|
+
excluded_fields: Set[str] = set([
|
108
|
+
])
|
109
|
+
|
110
|
+
_dict = self.model_dump(
|
111
|
+
by_alias=True,
|
112
|
+
exclude=excluded_fields,
|
113
|
+
exclude_none=True,
|
114
|
+
)
|
115
|
+
# override the default output from pydantic by calling `to_dict()` of each item in installments (list)
|
116
|
+
_items = []
|
117
|
+
if self.installments:
|
118
|
+
for _item_installments in self.installments:
|
119
|
+
if _item_installments:
|
120
|
+
_items.append(_item_installments.to_dict())
|
121
|
+
_dict['installments'] = _items
|
122
|
+
return _dict
|
123
|
+
|
124
|
+
@classmethod
|
125
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
126
|
+
"""Create an instance of AcquirerSaleData from a dict"""
|
127
|
+
if obj is None:
|
128
|
+
return None
|
129
|
+
|
130
|
+
if not isinstance(obj, dict):
|
131
|
+
return cls.model_validate(obj)
|
132
|
+
|
133
|
+
_obj = cls.model_validate({
|
134
|
+
"nsu": obj.get("nsu"),
|
135
|
+
"authorizationCode": obj.get("authorizationCode"),
|
136
|
+
"paymentMethod": obj.get("paymentMethod"),
|
137
|
+
"netAmount": obj.get("netAmount"),
|
138
|
+
"mdrFee": obj.get("mdrFee"),
|
139
|
+
"mdrFeeAmount": obj.get("mdrFeeAmount"),
|
140
|
+
"status": obj.get("status"),
|
141
|
+
"installmentCount": obj.get("installmentCount"),
|
142
|
+
"installments": [AcquirerSaleInstallment.from_dict(_item) for _item in obj["installments"]] if obj.get("installments") is not None else None,
|
143
|
+
"cardFlag": obj.get("cardFlag"),
|
144
|
+
"cardNumber": obj.get("cardNumber"),
|
145
|
+
"cardFundingSource": obj.get("cardFundingSource"),
|
146
|
+
"terminalId": obj.get("terminalId")
|
147
|
+
})
|
148
|
+
return _obj
|
149
|
+
|
150
|
+
|
@@ -0,0 +1,93 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
|
3
|
+
"""
|
4
|
+
Pluggy API
|
5
|
+
|
6
|
+
Pluggy's main API to review data and execute connectors
|
7
|
+
|
8
|
+
The version of the OpenAPI document: 1.0.0
|
9
|
+
Contact: hello@pluggy.ai
|
10
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
11
|
+
|
12
|
+
Do not edit the class manually.
|
13
|
+
""" # noqa: E501
|
14
|
+
|
15
|
+
|
16
|
+
from __future__ import annotations
|
17
|
+
import pprint
|
18
|
+
import re # noqa: F401
|
19
|
+
import json
|
20
|
+
|
21
|
+
from datetime import datetime
|
22
|
+
from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt
|
23
|
+
from typing import Any, ClassVar, Dict, List, Optional, Union
|
24
|
+
from typing import Optional, Set
|
25
|
+
from typing_extensions import Self
|
26
|
+
|
27
|
+
class AcquirerSaleInstallment(BaseModel):
|
28
|
+
"""
|
29
|
+
AcquirerSaleInstallment
|
30
|
+
""" # noqa: E501
|
31
|
+
number: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Ordinal number of the installment")
|
32
|
+
net_amount: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Amount of the installment, with taxes applied", alias="netAmount")
|
33
|
+
receipt_date: Optional[datetime] = Field(default=None, description="Date when the installment was received", alias="receiptDate")
|
34
|
+
__properties: ClassVar[List[str]] = ["number", "netAmount", "receiptDate"]
|
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 AcquirerSaleInstallment 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 AcquirerSaleInstallment 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
|
+
"number": obj.get("number"),
|
88
|
+
"netAmount": obj.get("netAmount"),
|
89
|
+
"receiptDate": obj.get("receiptDate")
|
90
|
+
})
|
91
|
+
return _obj
|
92
|
+
|
93
|
+
|