Skip to content

Commit 47c9e32

Browse files
author
Martín Agüera
authored
[AI-453] - I regenerated the SDK (#90)
* chore: [AI-453] - changed version of 7.0.3 to 7.0.5 * feat: [AI-453] - regenerated the SDK to version 7.0.5
1 parent 4edb99e commit 47c9e32

18 files changed

Lines changed: 406 additions & 19 deletions

README.md

Lines changed: 2 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.3
7+
- Package version: 7.0.5
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)
@@ -115,6 +115,7 @@ Class | Method | HTTP request | Description
115115
*CompaniesApi* | [**get_companies**](docs/CompaniesApi.md#get_companies) | **GET** /companies | Get List of Companies
116116
*CompaniesApi* | [**get_company**](docs/CompaniesApi.md#get_company) | **GET** /companies/{id} | Get Company
117117
*CompaniesApi* | [**get_company_documents**](docs/CompaniesApi.md#get_company_documents) | **GET** /companies/{company_id}/documents | Get Company Documents
118+
*CompaniesApi* | [**get_current_company**](docs/CompaniesApi.md#get_current_company) | **GET** /companies/current | Get Current Company
118119
*CompaniesApi* | [**update_company_document**](docs/CompaniesApi.md#update_company_document) | **PATCH** /companies/{company_id}/document | Update Company Document
119120
*CompaniesApi* | [**upload_company_document**](docs/CompaniesApi.md#upload_company_document) | **POST** /companies/{company_id}/document | Upload Company Document
120121
*CustomersApi* | [**create_customer**](docs/CustomersApi.md#create_customer) | **POST** /customers | Create customer

VERSION

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

conekta/__init__.py

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

1717

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

2020
# import apis into sdk package
2121
from conekta.api.antifraud_api import AntifraudApi

conekta/api/companies_api.py

Lines changed: 267 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1226,6 +1226,273 @@ def _get_company_documents_serialize(
12261226

12271227

12281228

1229+
@validate_call
1230+
def get_current_company(
1231+
self,
1232+
accept_language: Annotated[Optional[StrictStr], Field(description="Use for knowing which language to use")] = None,
1233+
_request_timeout: Union[
1234+
None,
1235+
Annotated[StrictFloat, Field(gt=0)],
1236+
Tuple[
1237+
Annotated[StrictFloat, Field(gt=0)],
1238+
Annotated[StrictFloat, Field(gt=0)]
1239+
]
1240+
] = None,
1241+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
1242+
_content_type: Optional[StrictStr] = None,
1243+
_headers: Optional[Dict[StrictStr, Any]] = None,
1244+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1245+
) -> CompanyResponse:
1246+
"""Get Current Company
1247+
1248+
Retrieves information about the currently authenticated company. This endpoint returns the same data as the standard company endpoint but automatically uses the current company's context.
1249+
1250+
:param accept_language: Use for knowing which language to use
1251+
:type accept_language: str
1252+
:param _request_timeout: timeout setting for this request. If one
1253+
number provided, it will be total request
1254+
timeout. It can also be a pair (tuple) of
1255+
(connection, read) timeouts.
1256+
:type _request_timeout: int, tuple(int, int), optional
1257+
:param _request_auth: set to override the auth_settings for an a single
1258+
request; this effectively ignores the
1259+
authentication in the spec for a single request.
1260+
:type _request_auth: dict, optional
1261+
:param _content_type: force content-type for the request.
1262+
:type _content_type: str, Optional
1263+
:param _headers: set to override the headers for a single
1264+
request; this effectively ignores the headers
1265+
in the spec for a single request.
1266+
:type _headers: dict, optional
1267+
:param _host_index: set to override the host_index for a single
1268+
request; this effectively ignores the host_index
1269+
in the spec for a single request.
1270+
:type _host_index: int, optional
1271+
:return: Returns the result object.
1272+
""" # noqa: E501
1273+
1274+
_param = self._get_current_company_serialize(
1275+
accept_language=accept_language,
1276+
_request_auth=_request_auth,
1277+
_content_type=_content_type,
1278+
_headers=_headers,
1279+
_host_index=_host_index
1280+
)
1281+
1282+
_response_types_map: Dict[str, Optional[str]] = {
1283+
'200': "CompanyResponse",
1284+
'401': "Error",
1285+
'500': "Error",
1286+
}
1287+
response_data = self.api_client.call_api(
1288+
*_param,
1289+
_request_timeout=_request_timeout
1290+
)
1291+
response_data.read()
1292+
return self.api_client.response_deserialize(
1293+
response_data=response_data,
1294+
response_types_map=_response_types_map,
1295+
).data
1296+
1297+
1298+
@validate_call
1299+
def get_current_company_with_http_info(
1300+
self,
1301+
accept_language: Annotated[Optional[StrictStr], Field(description="Use for knowing which language to use")] = None,
1302+
_request_timeout: Union[
1303+
None,
1304+
Annotated[StrictFloat, Field(gt=0)],
1305+
Tuple[
1306+
Annotated[StrictFloat, Field(gt=0)],
1307+
Annotated[StrictFloat, Field(gt=0)]
1308+
]
1309+
] = None,
1310+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
1311+
_content_type: Optional[StrictStr] = None,
1312+
_headers: Optional[Dict[StrictStr, Any]] = None,
1313+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1314+
) -> ApiResponse[CompanyResponse]:
1315+
"""Get Current Company
1316+
1317+
Retrieves information about the currently authenticated company. This endpoint returns the same data as the standard company endpoint but automatically uses the current company's context.
1318+
1319+
:param accept_language: Use for knowing which language to use
1320+
:type accept_language: str
1321+
:param _request_timeout: timeout setting for this request. If one
1322+
number provided, it will be total request
1323+
timeout. It can also be a pair (tuple) of
1324+
(connection, read) timeouts.
1325+
:type _request_timeout: int, tuple(int, int), optional
1326+
:param _request_auth: set to override the auth_settings for an a single
1327+
request; this effectively ignores the
1328+
authentication in the spec for a single request.
1329+
:type _request_auth: dict, optional
1330+
:param _content_type: force content-type for the request.
1331+
:type _content_type: str, Optional
1332+
:param _headers: set to override the headers for a single
1333+
request; this effectively ignores the headers
1334+
in the spec for a single request.
1335+
:type _headers: dict, optional
1336+
:param _host_index: set to override the host_index for a single
1337+
request; this effectively ignores the host_index
1338+
in the spec for a single request.
1339+
:type _host_index: int, optional
1340+
:return: Returns the result object.
1341+
""" # noqa: E501
1342+
1343+
_param = self._get_current_company_serialize(
1344+
accept_language=accept_language,
1345+
_request_auth=_request_auth,
1346+
_content_type=_content_type,
1347+
_headers=_headers,
1348+
_host_index=_host_index
1349+
)
1350+
1351+
_response_types_map: Dict[str, Optional[str]] = {
1352+
'200': "CompanyResponse",
1353+
'401': "Error",
1354+
'500': "Error",
1355+
}
1356+
response_data = self.api_client.call_api(
1357+
*_param,
1358+
_request_timeout=_request_timeout
1359+
)
1360+
response_data.read()
1361+
return self.api_client.response_deserialize(
1362+
response_data=response_data,
1363+
response_types_map=_response_types_map,
1364+
)
1365+
1366+
1367+
@validate_call
1368+
def get_current_company_without_preload_content(
1369+
self,
1370+
accept_language: Annotated[Optional[StrictStr], Field(description="Use for knowing which language to use")] = None,
1371+
_request_timeout: Union[
1372+
None,
1373+
Annotated[StrictFloat, Field(gt=0)],
1374+
Tuple[
1375+
Annotated[StrictFloat, Field(gt=0)],
1376+
Annotated[StrictFloat, Field(gt=0)]
1377+
]
1378+
] = None,
1379+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
1380+
_content_type: Optional[StrictStr] = None,
1381+
_headers: Optional[Dict[StrictStr, Any]] = None,
1382+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1383+
) -> RESTResponseType:
1384+
"""Get Current Company
1385+
1386+
Retrieves information about the currently authenticated company. This endpoint returns the same data as the standard company endpoint but automatically uses the current company's context.
1387+
1388+
:param accept_language: Use for knowing which language to use
1389+
:type accept_language: str
1390+
:param _request_timeout: timeout setting for this request. If one
1391+
number provided, it will be total request
1392+
timeout. It can also be a pair (tuple) of
1393+
(connection, read) timeouts.
1394+
:type _request_timeout: int, tuple(int, int), optional
1395+
:param _request_auth: set to override the auth_settings for an a single
1396+
request; this effectively ignores the
1397+
authentication in the spec for a single request.
1398+
:type _request_auth: dict, optional
1399+
:param _content_type: force content-type for the request.
1400+
:type _content_type: str, Optional
1401+
:param _headers: set to override the headers for a single
1402+
request; this effectively ignores the headers
1403+
in the spec for a single request.
1404+
:type _headers: dict, optional
1405+
:param _host_index: set to override the host_index for a single
1406+
request; this effectively ignores the host_index
1407+
in the spec for a single request.
1408+
:type _host_index: int, optional
1409+
:return: Returns the result object.
1410+
""" # noqa: E501
1411+
1412+
_param = self._get_current_company_serialize(
1413+
accept_language=accept_language,
1414+
_request_auth=_request_auth,
1415+
_content_type=_content_type,
1416+
_headers=_headers,
1417+
_host_index=_host_index
1418+
)
1419+
1420+
_response_types_map: Dict[str, Optional[str]] = {
1421+
'200': "CompanyResponse",
1422+
'401': "Error",
1423+
'500': "Error",
1424+
}
1425+
response_data = self.api_client.call_api(
1426+
*_param,
1427+
_request_timeout=_request_timeout
1428+
)
1429+
return response_data.response
1430+
1431+
1432+
def _get_current_company_serialize(
1433+
self,
1434+
accept_language,
1435+
_request_auth,
1436+
_content_type,
1437+
_headers,
1438+
_host_index,
1439+
) -> RequestSerialized:
1440+
1441+
_host = None
1442+
1443+
_collection_formats: Dict[str, str] = {
1444+
}
1445+
1446+
_path_params: Dict[str, str] = {}
1447+
_query_params: List[Tuple[str, str]] = []
1448+
_header_params: Dict[str, Optional[str]] = _headers or {}
1449+
_form_params: List[Tuple[str, str]] = []
1450+
_files: Dict[
1451+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
1452+
] = {}
1453+
_body_params: Optional[bytes] = None
1454+
1455+
# process the path parameters
1456+
# process the query parameters
1457+
# process the header parameters
1458+
if accept_language is not None:
1459+
_header_params['Accept-Language'] = accept_language
1460+
# process the form parameters
1461+
# process the body parameter
1462+
1463+
1464+
# set the HTTP header `Accept`
1465+
if 'Accept' not in _header_params:
1466+
_header_params['Accept'] = self.api_client.select_header_accept(
1467+
[
1468+
'application/vnd.conekta-v2.2.0+json'
1469+
]
1470+
)
1471+
1472+
1473+
# authentication setting
1474+
_auth_settings: List[str] = [
1475+
'bearerAuth'
1476+
]
1477+
1478+
return self.api_client.param_serialize(
1479+
method='GET',
1480+
resource_path='/companies/current',
1481+
path_params=_path_params,
1482+
query_params=_query_params,
1483+
header_params=_header_params,
1484+
body=_body_params,
1485+
post_params=_form_params,
1486+
files=_files,
1487+
auth_settings=_auth_settings,
1488+
collection_formats=_collection_formats,
1489+
_host=_host,
1490+
_request_auth=_request_auth
1491+
)
1492+
1493+
1494+
1495+
12291496
@validate_call
12301497
def update_company_document(
12311498
self,

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.3',
77+
'bindings_version': '7.0.5',
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.3'
100+
self.user_agent = 'Conekta/v2 PythonBindings/7.0.5'
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.3".\
396+
"SDK Package Version: 7.0.5".\
397397
format(env=sys.platform, pyversion=sys.version)
398398

399399
def get_host_settings(self):

conekta/models/checkout.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ class Checkout(BaseModel):
3232
expires_at: StrictInt = Field(description="It is the time when the link will expire. It is expressed in seconds since the Unix epoch. The valid range is from 2 to 365 days (the valid range will be taken from the next day of the creation date at 00:01 hrs) ")
3333
monthly_installments_enabled: Optional[StrictBool] = Field(default=None, description="This flag allows you to specify if months without interest will be active.")
3434
monthly_installments_options: Optional[List[StrictInt]] = Field(default=None, description="This field allows you to specify the number of months without interest.")
35-
three_ds_mode: Optional[StrictStr] = Field(default=None, description="Indicates the 3DS2 mode for the order, either smart or strict.")
35+
three_ds_mode: Optional[StrictStr] = Field(default=None, description="Indicates the 3DS2 mode for the order, either smart or strict. This property is only applicable when 3DS is enabled. When 3DS is disabled, this field should be null.")
3636
name: StrictStr = Field(description="Reason for charge")
3737
needs_shipping_contact: Optional[StrictBool] = Field(default=None, description="This flag allows you to fill in the shipping information at checkout.")
3838
on_demand_enabled: Optional[StrictBool] = Field(default=None, description="This flag allows you to specify if the link will be on demand.")
@@ -84,6 +84,11 @@ def to_dict(self) -> Dict[str, Any]:
8484
# override the default output from pydantic by calling `to_dict()` of order_template
8585
if self.order_template:
8686
_dict['order_template'] = self.order_template.to_dict()
87+
# set to None if three_ds_mode (nullable) is None
88+
# and model_fields_set contains the field
89+
if self.three_ds_mode is None and "three_ds_mode" in self.model_fields_set:
90+
_dict['three_ds_mode'] = None
91+
8792
# set to None if on_demand_enabled (nullable) is None
8893
# and model_fields_set contains the field
8994
if self.on_demand_enabled is None and "on_demand_enabled" in self.model_fields_set:

conekta/models/checkout_request.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,8 @@ class CheckoutRequest(BaseModel):
4545
def allowed_payment_methods_validate_enum(cls, value):
4646
"""Validates the enum"""
4747
for i in value:
48-
if i not in set(['cash', 'card', 'bank_transfer', 'bnpl']):
49-
raise ValueError("each list item must be one of ('cash', 'card', 'bank_transfer', 'bnpl')")
48+
if i not in set(['cash', 'card', 'bank_transfer', 'bnpl', 'pay_by_bank']):
49+
raise ValueError("each list item must be one of ('cash', 'card', 'bank_transfer', 'bnpl', 'pay_by_bank')")
5050
return value
5151

5252
model_config = ConfigDict(

0 commit comments

Comments
 (0)