Skip to content

Commit 4edb99e

Browse files
authored
pbb documentation (#89)
1 parent acd541e commit 4edb99e

30 files changed

Lines changed: 762 additions & 119 deletions

.openapi-generator/FILES

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -161,10 +161,13 @@ conekta/models/payment_method_card.py
161161
conekta/models/payment_method_card_request.py
162162
conekta/models/payment_method_card_response.py
163163
conekta/models/payment_method_cash.py
164+
conekta/models/payment_method_cash_recurrent_response.py
164165
conekta/models/payment_method_cash_request.py
165166
conekta/models/payment_method_cash_response.py
166167
conekta/models/payment_method_cash_response_all_of_agreements.py
167168
conekta/models/payment_method_general_request.py
169+
conekta/models/payment_method_pbb_payment.py
170+
conekta/models/payment_method_pbb_request.py
168171
conekta/models/payment_method_response.py
169172
conekta/models/payment_method_spei_recurrent.py
170173
conekta/models/payment_method_spei_request.py
@@ -360,10 +363,13 @@ docs/PaymentMethodCard.md
360363
docs/PaymentMethodCardRequest.md
361364
docs/PaymentMethodCardResponse.md
362365
docs/PaymentMethodCash.md
366+
docs/PaymentMethodCashRecurrentResponse.md
363367
docs/PaymentMethodCashRequest.md
364368
docs/PaymentMethodCashResponse.md
365369
docs/PaymentMethodCashResponseAllOfAgreements.md
366370
docs/PaymentMethodGeneralRequest.md
371+
docs/PaymentMethodPbbPayment.md
372+
docs/PaymentMethodPbbRequest.md
367373
docs/PaymentMethodResponse.md
368374
docs/PaymentMethodSpeiRecurrent.md
369375
docs/PaymentMethodSpeiRequest.md

README.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ Conekta sdk
44
This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:
55

66
- API version: 2.2.0
7-
- Package version: 7.0.2
7+
- Package version: 7.0.3
88
- Generator version: 7.9.0
99
- Build package: org.openapitools.codegen.languages.PythonClientCodegen
1010
For more information, please visit [https://github.com/conekta/openapi/issues](https://github.com/conekta/openapi/issues)
@@ -335,10 +335,13 @@ Class | Method | HTTP request | Description
335335
- [PaymentMethodCardRequest](docs/PaymentMethodCardRequest.md)
336336
- [PaymentMethodCardResponse](docs/PaymentMethodCardResponse.md)
337337
- [PaymentMethodCash](docs/PaymentMethodCash.md)
338+
- [PaymentMethodCashRecurrentResponse](docs/PaymentMethodCashRecurrentResponse.md)
338339
- [PaymentMethodCashRequest](docs/PaymentMethodCashRequest.md)
339340
- [PaymentMethodCashResponse](docs/PaymentMethodCashResponse.md)
340341
- [PaymentMethodCashResponseAllOfAgreements](docs/PaymentMethodCashResponseAllOfAgreements.md)
341342
- [PaymentMethodGeneralRequest](docs/PaymentMethodGeneralRequest.md)
343+
- [PaymentMethodPbbPayment](docs/PaymentMethodPbbPayment.md)
344+
- [PaymentMethodPbbRequest](docs/PaymentMethodPbbRequest.md)
342345
- [PaymentMethodResponse](docs/PaymentMethodResponse.md)
343346
- [PaymentMethodSpeiRecurrent](docs/PaymentMethodSpeiRecurrent.md)
344347
- [PaymentMethodSpeiRequest](docs/PaymentMethodSpeiRequest.md)

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
7.0.2
1+
7.0.3

conekta/__init__.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
""" # noqa: E501
1616

1717

18-
__version__ = "7.0.2"
18+
__version__ = "7.0.3"
1919

2020
# import apis into sdk package
2121
from conekta.api.antifraud_api import AntifraudApi
@@ -181,10 +181,13 @@
181181
from conekta.models.payment_method_card_request import PaymentMethodCardRequest
182182
from conekta.models.payment_method_card_response import PaymentMethodCardResponse
183183
from conekta.models.payment_method_cash import PaymentMethodCash
184+
from conekta.models.payment_method_cash_recurrent_response import PaymentMethodCashRecurrentResponse
184185
from conekta.models.payment_method_cash_request import PaymentMethodCashRequest
185186
from conekta.models.payment_method_cash_response import PaymentMethodCashResponse
186187
from conekta.models.payment_method_cash_response_all_of_agreements import PaymentMethodCashResponseAllOfAgreements
187188
from conekta.models.payment_method_general_request import PaymentMethodGeneralRequest
189+
from conekta.models.payment_method_pbb_payment import PaymentMethodPbbPayment
190+
from conekta.models.payment_method_pbb_request import PaymentMethodPbbRequest
188191
from conekta.models.payment_method_response import PaymentMethodResponse
189192
from conekta.models.payment_method_spei_recurrent import PaymentMethodSpeiRecurrent
190193
from conekta.models.payment_method_spei_request import PaymentMethodSpeiRequest

conekta/api_client.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ class ApiClient:
7474
'lang': 'python',
7575
'lang_version': platform.python_version(),
7676
'publisher': 'conekta',
77-
'bindings_version': '7.0.2',
77+
'bindings_version': '7.0.3',
7878
'uname': platform.uname()
7979
}
8080
_pool = None
@@ -97,7 +97,7 @@ def __init__(
9797
self.default_headers[header_name] = header_value
9898
self.cookie = cookie
9999
# Set default User-Agent.
100-
self.user_agent = 'Conekta/v2 PythonBindings/7.0.2'
100+
self.user_agent = 'Conekta/v2 PythonBindings/7.0.3'
101101
self.conekta_user_agent = json.dumps(self.data)
102102
self.client_side_validation = configuration.client_side_validation
103103

conekta/configuration.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -393,7 +393,7 @@ def to_debug_report(self):
393393
"OS: {env}\n"\
394394
"Python Version: {pyversion}\n"\
395395
"Version of the API: 2.2.0\n"\
396-
"SDK Package Version: 7.0.2".\
396+
"SDK Package Version: 7.0.3".\
397397
format(env=sys.platform, pyversion=sys.version)
398398

399399
def get_host_settings(self):

conekta/models/__init__.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -141,10 +141,13 @@
141141
from conekta.models.payment_method_card_request import PaymentMethodCardRequest
142142
from conekta.models.payment_method_card_response import PaymentMethodCardResponse
143143
from conekta.models.payment_method_cash import PaymentMethodCash
144+
from conekta.models.payment_method_cash_recurrent_response import PaymentMethodCashRecurrentResponse
144145
from conekta.models.payment_method_cash_request import PaymentMethodCashRequest
145146
from conekta.models.payment_method_cash_response import PaymentMethodCashResponse
146147
from conekta.models.payment_method_cash_response_all_of_agreements import PaymentMethodCashResponseAllOfAgreements
147148
from conekta.models.payment_method_general_request import PaymentMethodGeneralRequest
149+
from conekta.models.payment_method_pbb_payment import PaymentMethodPbbPayment
150+
from conekta.models.payment_method_pbb_request import PaymentMethodPbbRequest
148151
from conekta.models.payment_method_response import PaymentMethodResponse
149152
from conekta.models.payment_method_spei_recurrent import PaymentMethodSpeiRecurrent
150153
from conekta.models.payment_method_spei_request import PaymentMethodSpeiRequest

conekta/models/charge_order_response_payment_method.py

Lines changed: 32 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,12 @@
2222
from conekta.models.payment_method_bnpl_payment import PaymentMethodBnplPayment
2323
from conekta.models.payment_method_card import PaymentMethodCard
2424
from conekta.models.payment_method_cash import PaymentMethodCash
25+
from conekta.models.payment_method_pbb_payment import PaymentMethodPbbPayment
2526
from pydantic import StrictStr, Field
2627
from typing import Union, List, Set, Optional, Dict
2728
from typing_extensions import Literal, Self
2829

29-
CHARGEORDERRESPONSEPAYMENTMETHOD_ONE_OF_SCHEMAS = ["PaymentMethodBankTransfer", "PaymentMethodBnplPayment", "PaymentMethodCard", "PaymentMethodCash"]
30+
CHARGEORDERRESPONSEPAYMENTMETHOD_ONE_OF_SCHEMAS = ["PaymentMethodBankTransfer", "PaymentMethodBnplPayment", "PaymentMethodCard", "PaymentMethodCash", "PaymentMethodPbbPayment"]
3031

3132
class ChargeOrderResponsePaymentMethod(BaseModel):
3233
"""
@@ -40,8 +41,10 @@ class ChargeOrderResponsePaymentMethod(BaseModel):
4041
oneof_schema_3_validator: Optional[PaymentMethodBankTransfer] = None
4142
# data type: PaymentMethodBnplPayment
4243
oneof_schema_4_validator: Optional[PaymentMethodBnplPayment] = None
43-
actual_instance: Optional[Union[PaymentMethodBankTransfer, PaymentMethodBnplPayment, PaymentMethodCard, PaymentMethodCash]] = None
44-
one_of_schemas: Set[str] = { "PaymentMethodBankTransfer", "PaymentMethodBnplPayment", "PaymentMethodCard", "PaymentMethodCash" }
44+
# data type: PaymentMethodPbbPayment
45+
oneof_schema_5_validator: Optional[PaymentMethodPbbPayment] = None
46+
actual_instance: Optional[Union[PaymentMethodBankTransfer, PaymentMethodBnplPayment, PaymentMethodCard, PaymentMethodCash, PaymentMethodPbbPayment]] = None
47+
one_of_schemas: Set[str] = { "PaymentMethodBankTransfer", "PaymentMethodBnplPayment", "PaymentMethodCard", "PaymentMethodCash", "PaymentMethodPbbPayment" }
4548

4649
model_config = ConfigDict(
4750
validate_assignment=True,
@@ -87,12 +90,17 @@ def actual_instance_must_validate_oneof(cls, v):
8790
error_messages.append(f"Error! Input type `{type(v)}` is not `PaymentMethodBnplPayment`")
8891
else:
8992
match += 1
93+
# validate data type: PaymentMethodPbbPayment
94+
if not isinstance(v, PaymentMethodPbbPayment):
95+
error_messages.append(f"Error! Input type `{type(v)}` is not `PaymentMethodPbbPayment`")
96+
else:
97+
match += 1
9098
if match > 1:
9199
# more than 1 match
92-
raise ValueError("Multiple matches found when setting `actual_instance` in ChargeOrderResponsePaymentMethod with oneOf schemas: PaymentMethodBankTransfer, PaymentMethodBnplPayment, PaymentMethodCard, PaymentMethodCash. Details: " + ", ".join(error_messages))
100+
raise ValueError("Multiple matches found when setting `actual_instance` in ChargeOrderResponsePaymentMethod with oneOf schemas: PaymentMethodBankTransfer, PaymentMethodBnplPayment, PaymentMethodCard, PaymentMethodCash, PaymentMethodPbbPayment. Details: " + ", ".join(error_messages))
93101
elif match == 0:
94102
# no match
95-
raise ValueError("No match found when setting `actual_instance` in ChargeOrderResponsePaymentMethod with oneOf schemas: PaymentMethodBankTransfer, PaymentMethodBnplPayment, PaymentMethodCard, PaymentMethodCash. Details: " + ", ".join(error_messages))
103+
raise ValueError("No match found when setting `actual_instance` in ChargeOrderResponsePaymentMethod with oneOf schemas: PaymentMethodBankTransfer, PaymentMethodBnplPayment, PaymentMethodCard, PaymentMethodCash, PaymentMethodPbbPayment. Details: " + ", ".join(error_messages))
96104
else:
97105
return v
98106

@@ -132,6 +140,11 @@ def from_json(cls, json_str: str) -> Self:
132140
instance.actual_instance = PaymentMethodCash.from_json(json_str)
133141
return instance
134142

143+
# check if data type is `PaymentMethodPbbPayment`
144+
if _data_type == "pbb_payment":
145+
instance.actual_instance = PaymentMethodPbbPayment.from_json(json_str)
146+
return instance
147+
135148
# check if data type is `PaymentMethodBankTransfer`
136149
if _data_type == "payment_method_bank_transfer":
137150
instance.actual_instance = PaymentMethodBankTransfer.from_json(json_str)
@@ -152,6 +165,11 @@ def from_json(cls, json_str: str) -> Self:
152165
instance.actual_instance = PaymentMethodCash.from_json(json_str)
153166
return instance
154167

168+
# check if data type is `PaymentMethodPbbPayment`
169+
if _data_type == "payment_method_pbb_payment":
170+
instance.actual_instance = PaymentMethodPbbPayment.from_json(json_str)
171+
return instance
172+
155173
# deserialize data into PaymentMethodCash
156174
try:
157175
instance.actual_instance = PaymentMethodCash.from_json(json_str)
@@ -176,13 +194,19 @@ def from_json(cls, json_str: str) -> Self:
176194
match += 1
177195
except (ValidationError, ValueError) as e:
178196
error_messages.append(str(e))
197+
# deserialize data into PaymentMethodPbbPayment
198+
try:
199+
instance.actual_instance = PaymentMethodPbbPayment.from_json(json_str)
200+
match += 1
201+
except (ValidationError, ValueError) as e:
202+
error_messages.append(str(e))
179203

180204
if match > 1:
181205
# more than 1 match
182-
raise ValueError("Multiple matches found when deserializing the JSON string into ChargeOrderResponsePaymentMethod with oneOf schemas: PaymentMethodBankTransfer, PaymentMethodBnplPayment, PaymentMethodCard, PaymentMethodCash. Details: " + ", ".join(error_messages))
206+
raise ValueError("Multiple matches found when deserializing the JSON string into ChargeOrderResponsePaymentMethod with oneOf schemas: PaymentMethodBankTransfer, PaymentMethodBnplPayment, PaymentMethodCard, PaymentMethodCash, PaymentMethodPbbPayment. Details: " + ", ".join(error_messages))
183207
elif match == 0:
184208
# no match
185-
raise ValueError("No match found when deserializing the JSON string into ChargeOrderResponsePaymentMethod with oneOf schemas: PaymentMethodBankTransfer, PaymentMethodBnplPayment, PaymentMethodCard, PaymentMethodCash. Details: " + ", ".join(error_messages))
209+
raise ValueError("No match found when deserializing the JSON string into ChargeOrderResponsePaymentMethod with oneOf schemas: PaymentMethodBankTransfer, PaymentMethodBnplPayment, PaymentMethodCard, PaymentMethodCash, PaymentMethodPbbPayment. Details: " + ", ".join(error_messages))
186210
else:
187211
return instance
188212

@@ -196,7 +220,7 @@ def to_json(self) -> str:
196220
else:
197221
return json.dumps(self.actual_instance)
198222

199-
def to_dict(self) -> Optional[Union[Dict[str, Any], PaymentMethodBankTransfer, PaymentMethodBnplPayment, PaymentMethodCard, PaymentMethodCash]]:
223+
def to_dict(self) -> Optional[Union[Dict[str, Any], PaymentMethodBankTransfer, PaymentMethodBnplPayment, PaymentMethodCard, PaymentMethodCash, PaymentMethodPbbPayment]]:
200224
"""Returns the dict representation of the actual instance"""
201225
if self.actual_instance is None:
202226
return None

conekta/models/charge_request_payment_method.py

Lines changed: 25 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -21,24 +21,27 @@
2121
from conekta.models.payment_method_bnpl_request import PaymentMethodBnplRequest
2222
from conekta.models.payment_method_card_request import PaymentMethodCardRequest
2323
from conekta.models.payment_method_general_request import PaymentMethodGeneralRequest
24+
from conekta.models.payment_method_pbb_request import PaymentMethodPbbRequest
2425
from pydantic import StrictStr, Field
2526
from typing import Union, List, Set, Optional, Dict
2627
from typing_extensions import Literal, Self
2728

28-
CHARGEREQUESTPAYMENTMETHOD_ONE_OF_SCHEMAS = ["PaymentMethodBnplRequest", "PaymentMethodCardRequest", "PaymentMethodGeneralRequest"]
29+
CHARGEREQUESTPAYMENTMETHOD_ONE_OF_SCHEMAS = ["PaymentMethodBnplRequest", "PaymentMethodCardRequest", "PaymentMethodGeneralRequest", "PaymentMethodPbbRequest"]
2930

3031
class ChargeRequestPaymentMethod(BaseModel):
3132
"""
3233
ChargeRequestPaymentMethod
3334
"""
35+
# data type: PaymentMethodPbbRequest
36+
oneof_schema_1_validator: Optional[PaymentMethodPbbRequest] = None
3437
# data type: PaymentMethodBnplRequest
35-
oneof_schema_1_validator: Optional[PaymentMethodBnplRequest] = None
38+
oneof_schema_2_validator: Optional[PaymentMethodBnplRequest] = None
3639
# data type: PaymentMethodCardRequest
37-
oneof_schema_2_validator: Optional[PaymentMethodCardRequest] = None
40+
oneof_schema_3_validator: Optional[PaymentMethodCardRequest] = None
3841
# data type: PaymentMethodGeneralRequest
39-
oneof_schema_3_validator: Optional[PaymentMethodGeneralRequest] = None
40-
actual_instance: Optional[Union[PaymentMethodBnplRequest, PaymentMethodCardRequest, PaymentMethodGeneralRequest]] = None
41-
one_of_schemas: Set[str] = { "PaymentMethodBnplRequest", "PaymentMethodCardRequest", "PaymentMethodGeneralRequest" }
42+
oneof_schema_4_validator: Optional[PaymentMethodGeneralRequest] = None
43+
actual_instance: Optional[Union[PaymentMethodBnplRequest, PaymentMethodCardRequest, PaymentMethodGeneralRequest, PaymentMethodPbbRequest]] = None
44+
one_of_schemas: Set[str] = { "PaymentMethodBnplRequest", "PaymentMethodCardRequest", "PaymentMethodGeneralRequest", "PaymentMethodPbbRequest" }
4245

4346
model_config = ConfigDict(
4447
validate_assignment=True,
@@ -61,6 +64,11 @@ def actual_instance_must_validate_oneof(cls, v):
6164
instance = ChargeRequestPaymentMethod.model_construct()
6265
error_messages = []
6366
match = 0
67+
# validate data type: PaymentMethodPbbRequest
68+
if not isinstance(v, PaymentMethodPbbRequest):
69+
error_messages.append(f"Error! Input type `{type(v)}` is not `PaymentMethodPbbRequest`")
70+
else:
71+
match += 1
6472
# validate data type: PaymentMethodBnplRequest
6573
if not isinstance(v, PaymentMethodBnplRequest):
6674
error_messages.append(f"Error! Input type `{type(v)}` is not `PaymentMethodBnplRequest`")
@@ -78,10 +86,10 @@ def actual_instance_must_validate_oneof(cls, v):
7886
match += 1
7987
if match > 1:
8088
# more than 1 match
81-
raise ValueError("Multiple matches found when setting `actual_instance` in ChargeRequestPaymentMethod with oneOf schemas: PaymentMethodBnplRequest, PaymentMethodCardRequest, PaymentMethodGeneralRequest. Details: " + ", ".join(error_messages))
89+
raise ValueError("Multiple matches found when setting `actual_instance` in ChargeRequestPaymentMethod with oneOf schemas: PaymentMethodBnplRequest, PaymentMethodCardRequest, PaymentMethodGeneralRequest, PaymentMethodPbbRequest. Details: " + ", ".join(error_messages))
8290
elif match == 0:
8391
# no match
84-
raise ValueError("No match found when setting `actual_instance` in ChargeRequestPaymentMethod with oneOf schemas: PaymentMethodBnplRequest, PaymentMethodCardRequest, PaymentMethodGeneralRequest. Details: " + ", ".join(error_messages))
92+
raise ValueError("No match found when setting `actual_instance` in ChargeRequestPaymentMethod with oneOf schemas: PaymentMethodBnplRequest, PaymentMethodCardRequest, PaymentMethodGeneralRequest, PaymentMethodPbbRequest. Details: " + ", ".join(error_messages))
8593
else:
8694
return v
8795

@@ -96,6 +104,12 @@ def from_json(cls, json_str: str) -> Self:
96104
error_messages = []
97105
match = 0
98106

107+
# deserialize data into PaymentMethodPbbRequest
108+
try:
109+
instance.actual_instance = PaymentMethodPbbRequest.from_json(json_str)
110+
match += 1
111+
except (ValidationError, ValueError) as e:
112+
error_messages.append(str(e))
99113
# deserialize data into PaymentMethodBnplRequest
100114
try:
101115
instance.actual_instance = PaymentMethodBnplRequest.from_json(json_str)
@@ -117,10 +131,10 @@ def from_json(cls, json_str: str) -> Self:
117131

118132
if match > 1:
119133
# more than 1 match
120-
raise ValueError("Multiple matches found when deserializing the JSON string into ChargeRequestPaymentMethod with oneOf schemas: PaymentMethodBnplRequest, PaymentMethodCardRequest, PaymentMethodGeneralRequest. Details: " + ", ".join(error_messages))
134+
raise ValueError("Multiple matches found when deserializing the JSON string into ChargeRequestPaymentMethod with oneOf schemas: PaymentMethodBnplRequest, PaymentMethodCardRequest, PaymentMethodGeneralRequest, PaymentMethodPbbRequest. Details: " + ", ".join(error_messages))
121135
elif match == 0:
122136
# no match
123-
raise ValueError("No match found when deserializing the JSON string into ChargeRequestPaymentMethod with oneOf schemas: PaymentMethodBnplRequest, PaymentMethodCardRequest, PaymentMethodGeneralRequest. Details: " + ", ".join(error_messages))
137+
raise ValueError("No match found when deserializing the JSON string into ChargeRequestPaymentMethod with oneOf schemas: PaymentMethodBnplRequest, PaymentMethodCardRequest, PaymentMethodGeneralRequest, PaymentMethodPbbRequest. Details: " + ", ".join(error_messages))
124138
else:
125139
return instance
126140

@@ -134,7 +148,7 @@ def to_json(self) -> str:
134148
else:
135149
return json.dumps(self.actual_instance)
136150

137-
def to_dict(self) -> Optional[Union[Dict[str, Any], PaymentMethodBnplRequest, PaymentMethodCardRequest, PaymentMethodGeneralRequest]]:
151+
def to_dict(self) -> Optional[Union[Dict[str, Any], PaymentMethodBnplRequest, PaymentMethodCardRequest, PaymentMethodGeneralRequest, PaymentMethodPbbRequest]]:
138152
"""Returns the dict representation of the actual instance"""
139153
if self.actual_instance is None:
140154
return None

0 commit comments

Comments
 (0)