diff --git a/.openapi-generator/FILES b/.openapi-generator/FILES
index 916fefa..be924b7 100644
--- a/.openapi-generator/FILES
+++ b/.openapi-generator/FILES
@@ -124,8 +124,11 @@ conekta/models/log_response.py
conekta/models/logs_response.py
conekta/models/logs_response_data.py
conekta/models/order_capture_request.py
+conekta/models/order_channel_response.py
+conekta/models/order_charges_response.py
conekta/models/order_customer_info_response.py
conekta/models/order_discount_lines_request.py
+conekta/models/order_discount_lines_response.py
conekta/models/order_fiscal_entity_address_response.py
conekta/models/order_fiscal_entity_request.py
conekta/models/order_fiscal_entity_response.py
@@ -135,10 +138,8 @@ conekta/models/order_refund_request.py
conekta/models/order_request.py
conekta/models/order_request_customer_info.py
conekta/models/order_response.py
-conekta/models/order_response_charges.py
conekta/models/order_response_checkout.py
conekta/models/order_response_customer_info.py
-conekta/models/order_response_discount_lines.py
conekta/models/order_response_products.py
conekta/models/order_response_shipping_contact.py
conekta/models/order_tax_request.py
@@ -150,12 +151,15 @@ conekta/models/page.py
conekta/models/pagination.py
conekta/models/payment_method.py
conekta/models/payment_method_bank_transfer.py
+conekta/models/payment_method_bnpl_payment.py
+conekta/models/payment_method_bnpl_request.py
conekta/models/payment_method_card.py
conekta/models/payment_method_card_request.py
conekta/models/payment_method_card_response.py
conekta/models/payment_method_cash.py
conekta/models/payment_method_cash_request.py
conekta/models/payment_method_cash_response.py
+conekta/models/payment_method_cash_response_all_of_agreements.py
conekta/models/payment_method_general_request.py
conekta/models/payment_method_response.py
conekta/models/payment_method_spei_recurrent.py
@@ -174,6 +178,7 @@ conekta/models/plan_update_request.py
conekta/models/product.py
conekta/models/product_data_response.py
conekta/models/product_order_response.py
+conekta/models/resend_request.py
conekta/models/risk_rules_data.py
conekta/models/risk_rules_list.py
conekta/models/shipping_order_response.py
@@ -312,8 +317,11 @@ docs/LogsApi.md
docs/LogsResponse.md
docs/LogsResponseData.md
docs/OrderCaptureRequest.md
+docs/OrderChannelResponse.md
+docs/OrderChargesResponse.md
docs/OrderCustomerInfoResponse.md
docs/OrderDiscountLinesRequest.md
+docs/OrderDiscountLinesResponse.md
docs/OrderFiscalEntityAddressResponse.md
docs/OrderFiscalEntityRequest.md
docs/OrderFiscalEntityResponse.md
@@ -323,10 +331,8 @@ docs/OrderRefundRequest.md
docs/OrderRequest.md
docs/OrderRequestCustomerInfo.md
docs/OrderResponse.md
-docs/OrderResponseCharges.md
docs/OrderResponseCheckout.md
docs/OrderResponseCustomerInfo.md
-docs/OrderResponseDiscountLines.md
docs/OrderResponseProducts.md
docs/OrderResponseShippingContact.md
docs/OrderTaxRequest.md
@@ -340,12 +346,15 @@ docs/Pagination.md
docs/PaymentLinkApi.md
docs/PaymentMethod.md
docs/PaymentMethodBankTransfer.md
+docs/PaymentMethodBnplPayment.md
+docs/PaymentMethodBnplRequest.md
docs/PaymentMethodCard.md
docs/PaymentMethodCardRequest.md
docs/PaymentMethodCardResponse.md
docs/PaymentMethodCash.md
docs/PaymentMethodCashRequest.md
docs/PaymentMethodCashResponse.md
+docs/PaymentMethodCashResponseAllOfAgreements.md
docs/PaymentMethodGeneralRequest.md
docs/PaymentMethodResponse.md
docs/PaymentMethodSpeiRecurrent.md
@@ -368,6 +377,7 @@ docs/Product.md
docs/ProductDataResponse.md
docs/ProductOrderResponse.md
docs/ProductsApi.md
+docs/ResendRequest.md
docs/RiskRulesData.md
docs/RiskRulesList.md
docs/ShippingContactsApi.md
@@ -421,4 +431,28 @@ setup.cfg
setup.py
test-requirements.txt
test/__init__.py
+test/test_antifraud_api.py
+test/test_api_keys_api.py
+test/test_balances_api.py
+test/test_charges_api.py
+test/test_companies_api.py
+test/test_customers_api.py
+test/test_discounts_api.py
+test/test_events_api.py
+test/test_logs_api.py
+test/test_orders_api.py
+test/test_payment_link_api.py
+test/test_payment_methods_api.py
+test/test_payout_orders_api.py
+test/test_plans_api.py
+test/test_products_api.py
+test/test_shipping_contacts_api.py
+test/test_shippings_api.py
+test/test_subscriptions_api.py
+test/test_taxes_api.py
+test/test_tokens_api.py
+test/test_transactions_api.py
+test/test_transfers_api.py
+test/test_webhook_keys_api.py
+test/test_webhooks_api.py
tox.ini
diff --git a/Makefile b/Makefile
index 9cda55d..575ae52 100644
--- a/Makefile
+++ b/Makefile
@@ -5,7 +5,7 @@ clean:
rm -rf ./dist
python:
- rm -rf docs && \
+ rm -rf docs && rm -rf test && \
rm -rf conekta/models && \
docker run --rm \
-v ${PWD}:/local openapitools/openapi-generator-cli:v7.9.0 generate \
diff --git a/README.md b/README.md
index f959a3a..4733e95 100644
--- a/README.md
+++ b/README.md
@@ -3,7 +3,7 @@ Conekta sdk
This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:
-- API version: 2.1.0
+- API version: 2.2.0
- Package version: 6.0.4
- Generator version: 7.9.0
- Build package: org.openapitools.codegen.languages.PythonClientCodegen
@@ -127,7 +127,7 @@ Class | Method | HTTP request | Description
*DiscountsApi* | [**orders_update_discount_lines**](docs/DiscountsApi.md#orders_update_discount_lines) | **PUT** /orders/{id}/discount_lines/{discount_lines_id} | Update Discount
*EventsApi* | [**get_event**](docs/EventsApi.md#get_event) | **GET** /events/{id} | Get Event
*EventsApi* | [**get_events**](docs/EventsApi.md#get_events) | **GET** /events | Get list of Events
-*EventsApi* | [**resend_event**](docs/EventsApi.md#resend_event) | **POST** /events/{event_id}/webhook_logs/{webhook_log_id}/resend | Resend Event
+*EventsApi* | [**resend_event**](docs/EventsApi.md#resend_event) | **POST** /events/{event_id}/resend | Resend Event
*LogsApi* | [**get_log_by_id**](docs/LogsApi.md#get_log_by_id) | **GET** /logs/{id} | Get Log
*LogsApi* | [**get_logs**](docs/LogsApi.md#get_logs) | **GET** /logs | Get List Of Logs
*OrdersApi* | [**cancel_order**](docs/OrdersApi.md#cancel_order) | **POST** /orders/{id}/cancel | Cancel Order
@@ -166,13 +166,22 @@ Class | Method | HTTP request | Description
*ShippingsApi* | [**orders_create_shipping**](docs/ShippingsApi.md#orders_create_shipping) | **POST** /orders/{id}/shipping_lines | Create Shipping
*ShippingsApi* | [**orders_delete_shipping**](docs/ShippingsApi.md#orders_delete_shipping) | **DELETE** /orders/{id}/shipping_lines/{shipping_id} | Delete Shipping
*ShippingsApi* | [**orders_update_shipping**](docs/ShippingsApi.md#orders_update_shipping) | **PUT** /orders/{id}/shipping_lines/{shipping_id} | Update Shipping
-*SubscriptionsApi* | [**cancel_subscription**](docs/SubscriptionsApi.md#cancel_subscription) | **POST** /customers/{id}/subscription/cancel | Cancel Subscription
-*SubscriptionsApi* | [**create_subscription**](docs/SubscriptionsApi.md#create_subscription) | **POST** /customers/{id}/subscription | Create Subscription
-*SubscriptionsApi* | [**get_all_events_from_subscription**](docs/SubscriptionsApi.md#get_all_events_from_subscription) | **GET** /customers/{id}/subscription/events | Get Events By Subscription
-*SubscriptionsApi* | [**get_subscription**](docs/SubscriptionsApi.md#get_subscription) | **GET** /customers/{id}/subscription | Get Subscription
-*SubscriptionsApi* | [**pause_subscription**](docs/SubscriptionsApi.md#pause_subscription) | **POST** /customers/{id}/subscription/pause | Pause Subscription
-*SubscriptionsApi* | [**resume_subscription**](docs/SubscriptionsApi.md#resume_subscription) | **POST** /customers/{id}/subscription/resume | Resume Subscription
-*SubscriptionsApi* | [**update_subscription**](docs/SubscriptionsApi.md#update_subscription) | **PUT** /customers/{id}/subscription | Update Subscription
+*SubscriptionsApi* | [**cancel_subscription**](docs/SubscriptionsApi.md#cancel_subscription) | **POST** /customers/{id}/subscription/cancel | Cancel Subscription [Deprecated]
+*SubscriptionsApi* | [**create_subscription**](docs/SubscriptionsApi.md#create_subscription) | **POST** /customers/{id}/subscription | Create Subscription [Deprecated]
+*SubscriptionsApi* | [**get_subscription**](docs/SubscriptionsApi.md#get_subscription) | **GET** /customers/{id}/subscription | Get Subscription [Deprecated]
+*SubscriptionsApi* | [**get_subscription_events**](docs/SubscriptionsApi.md#get_subscription_events) | **GET** /customers/{id}/subscription/events | Get Subscription Events [Deprecated]
+*SubscriptionsApi* | [**pause_subscription**](docs/SubscriptionsApi.md#pause_subscription) | **POST** /customers/{id}/subscription/pause | Pause Subscription [Deprecated]
+*SubscriptionsApi* | [**resume_subscription**](docs/SubscriptionsApi.md#resume_subscription) | **POST** /customers/{id}/subscription/resume | Resume Subscription [Deprecated]
+*SubscriptionsApi* | [**subscription_cancel**](docs/SubscriptionsApi.md#subscription_cancel) | **POST** /customers/{customer_id}/subscriptions/{id}/cancel | Cancel Subscription
+*SubscriptionsApi* | [**subscription_create**](docs/SubscriptionsApi.md#subscription_create) | **POST** /customers/{customer_id}/subscriptions | Create Subscription
+*SubscriptionsApi* | [**subscription_events**](docs/SubscriptionsApi.md#subscription_events) | **GET** /customers/{customer_id}/subscriptions/{id}/events | Get Subscription Events
+*SubscriptionsApi* | [**subscription_list**](docs/SubscriptionsApi.md#subscription_list) | **GET** /customers/{customer_id}/subscriptions | List Subscriptions
+*SubscriptionsApi* | [**subscription_pause**](docs/SubscriptionsApi.md#subscription_pause) | **POST** /customers/{customer_id}/subscriptions/{id}/pause | Pause Subscription
+*SubscriptionsApi* | [**subscription_resume**](docs/SubscriptionsApi.md#subscription_resume) | **POST** /customers/{customer_id}/subscriptions/{id}/resume | Resume Subscription
+*SubscriptionsApi* | [**subscription_update**](docs/SubscriptionsApi.md#subscription_update) | **PUT** /customers/{customer_id}/subscriptions/{id} | Update Subscription
+*SubscriptionsApi* | [**subscriptions_get**](docs/SubscriptionsApi.md#subscriptions_get) | **GET** /customers/{customer_id}/subscriptions/{id} | Get Subscription
+*SubscriptionsApi* | [**subscriptions_retry**](docs/SubscriptionsApi.md#subscriptions_retry) | **POST** /customers/{customer_id}/subscriptions/{id}/retry | Retry Failed Payment
+*SubscriptionsApi* | [**update_subscription**](docs/SubscriptionsApi.md#update_subscription) | **PUT** /customers/{id}/subscription | Update Subscription [Deprecated]
*TaxesApi* | [**orders_create_taxes**](docs/TaxesApi.md#orders_create_taxes) | **POST** /orders/{id}/tax_lines | Create Tax
*TaxesApi* | [**orders_delete_taxes**](docs/TaxesApi.md#orders_delete_taxes) | **DELETE** /orders/{id}/tax_lines/{tax_id} | Delete Tax
*TaxesApi* | [**orders_update_taxes**](docs/TaxesApi.md#orders_update_taxes) | **PUT** /orders/{id}/tax_lines/{tax_id} | Update Tax
@@ -285,8 +294,11 @@ Class | Method | HTTP request | Description
- [LogsResponse](docs/LogsResponse.md)
- [LogsResponseData](docs/LogsResponseData.md)
- [OrderCaptureRequest](docs/OrderCaptureRequest.md)
+ - [OrderChannelResponse](docs/OrderChannelResponse.md)
+ - [OrderChargesResponse](docs/OrderChargesResponse.md)
- [OrderCustomerInfoResponse](docs/OrderCustomerInfoResponse.md)
- [OrderDiscountLinesRequest](docs/OrderDiscountLinesRequest.md)
+ - [OrderDiscountLinesResponse](docs/OrderDiscountLinesResponse.md)
- [OrderFiscalEntityAddressResponse](docs/OrderFiscalEntityAddressResponse.md)
- [OrderFiscalEntityRequest](docs/OrderFiscalEntityRequest.md)
- [OrderFiscalEntityResponse](docs/OrderFiscalEntityResponse.md)
@@ -296,10 +308,8 @@ Class | Method | HTTP request | Description
- [OrderRequest](docs/OrderRequest.md)
- [OrderRequestCustomerInfo](docs/OrderRequestCustomerInfo.md)
- [OrderResponse](docs/OrderResponse.md)
- - [OrderResponseCharges](docs/OrderResponseCharges.md)
- [OrderResponseCheckout](docs/OrderResponseCheckout.md)
- [OrderResponseCustomerInfo](docs/OrderResponseCustomerInfo.md)
- - [OrderResponseDiscountLines](docs/OrderResponseDiscountLines.md)
- [OrderResponseProducts](docs/OrderResponseProducts.md)
- [OrderResponseShippingContact](docs/OrderResponseShippingContact.md)
- [OrderTaxRequest](docs/OrderTaxRequest.md)
@@ -311,12 +321,15 @@ Class | Method | HTTP request | Description
- [Pagination](docs/Pagination.md)
- [PaymentMethod](docs/PaymentMethod.md)
- [PaymentMethodBankTransfer](docs/PaymentMethodBankTransfer.md)
+ - [PaymentMethodBnplPayment](docs/PaymentMethodBnplPayment.md)
+ - [PaymentMethodBnplRequest](docs/PaymentMethodBnplRequest.md)
- [PaymentMethodCard](docs/PaymentMethodCard.md)
- [PaymentMethodCardRequest](docs/PaymentMethodCardRequest.md)
- [PaymentMethodCardResponse](docs/PaymentMethodCardResponse.md)
- [PaymentMethodCash](docs/PaymentMethodCash.md)
- [PaymentMethodCashRequest](docs/PaymentMethodCashRequest.md)
- [PaymentMethodCashResponse](docs/PaymentMethodCashResponse.md)
+ - [PaymentMethodCashResponseAllOfAgreements](docs/PaymentMethodCashResponseAllOfAgreements.md)
- [PaymentMethodGeneralRequest](docs/PaymentMethodGeneralRequest.md)
- [PaymentMethodResponse](docs/PaymentMethodResponse.md)
- [PaymentMethodSpeiRecurrent](docs/PaymentMethodSpeiRecurrent.md)
@@ -335,6 +348,7 @@ Class | Method | HTTP request | Description
- [Product](docs/Product.md)
- [ProductDataResponse](docs/ProductDataResponse.md)
- [ProductOrderResponse](docs/ProductOrderResponse.md)
+ - [ResendRequest](docs/ResendRequest.md)
- [RiskRulesData](docs/RiskRulesData.md)
- [RiskRulesList](docs/RiskRulesList.md)
- [ShippingOrderResponse](docs/ShippingOrderResponse.md)
diff --git a/conekta/__init__.py b/conekta/__init__.py
index 079c075..7174d7b 100644
--- a/conekta/__init__.py
+++ b/conekta/__init__.py
@@ -7,7 +7,7 @@
Conekta sdk
- The version of the OpenAPI document: 2.1.0
+ The version of the OpenAPI document: 2.2.0
Contact: engineering@conekta.com
Generated by OpenAPI Generator (https://openapi-generator.tech)
@@ -144,8 +144,11 @@
from conekta.models.logs_response import LogsResponse
from conekta.models.logs_response_data import LogsResponseData
from conekta.models.order_capture_request import OrderCaptureRequest
+from conekta.models.order_channel_response import OrderChannelResponse
+from conekta.models.order_charges_response import OrderChargesResponse
from conekta.models.order_customer_info_response import OrderCustomerInfoResponse
from conekta.models.order_discount_lines_request import OrderDiscountLinesRequest
+from conekta.models.order_discount_lines_response import OrderDiscountLinesResponse
from conekta.models.order_fiscal_entity_address_response import OrderFiscalEntityAddressResponse
from conekta.models.order_fiscal_entity_request import OrderFiscalEntityRequest
from conekta.models.order_fiscal_entity_response import OrderFiscalEntityResponse
@@ -155,10 +158,8 @@
from conekta.models.order_request import OrderRequest
from conekta.models.order_request_customer_info import OrderRequestCustomerInfo
from conekta.models.order_response import OrderResponse
-from conekta.models.order_response_charges import OrderResponseCharges
from conekta.models.order_response_checkout import OrderResponseCheckout
from conekta.models.order_response_customer_info import OrderResponseCustomerInfo
-from conekta.models.order_response_discount_lines import OrderResponseDiscountLines
from conekta.models.order_response_products import OrderResponseProducts
from conekta.models.order_response_shipping_contact import OrderResponseShippingContact
from conekta.models.order_tax_request import OrderTaxRequest
@@ -170,12 +171,15 @@
from conekta.models.pagination import Pagination
from conekta.models.payment_method import PaymentMethod
from conekta.models.payment_method_bank_transfer import PaymentMethodBankTransfer
+from conekta.models.payment_method_bnpl_payment import PaymentMethodBnplPayment
+from conekta.models.payment_method_bnpl_request import PaymentMethodBnplRequest
from conekta.models.payment_method_card import PaymentMethodCard
from conekta.models.payment_method_card_request import PaymentMethodCardRequest
from conekta.models.payment_method_card_response import PaymentMethodCardResponse
from conekta.models.payment_method_cash import PaymentMethodCash
from conekta.models.payment_method_cash_request import PaymentMethodCashRequest
from conekta.models.payment_method_cash_response import PaymentMethodCashResponse
+from conekta.models.payment_method_cash_response_all_of_agreements import PaymentMethodCashResponseAllOfAgreements
from conekta.models.payment_method_general_request import PaymentMethodGeneralRequest
from conekta.models.payment_method_response import PaymentMethodResponse
from conekta.models.payment_method_spei_recurrent import PaymentMethodSpeiRecurrent
@@ -194,6 +198,7 @@
from conekta.models.product import Product
from conekta.models.product_data_response import ProductDataResponse
from conekta.models.product_order_response import ProductOrderResponse
+from conekta.models.resend_request import ResendRequest
from conekta.models.risk_rules_data import RiskRulesData
from conekta.models.risk_rules_list import RiskRulesList
from conekta.models.shipping_order_response import ShippingOrderResponse
diff --git a/conekta/api/antifraud_api.py b/conekta/api/antifraud_api.py
index 1bbe3b3..b48be76 100644
--- a/conekta/api/antifraud_api.py
+++ b/conekta/api/antifraud_api.py
@@ -5,7 +5,7 @@
Conekta sdk
- The version of the OpenAPI document: 2.1.0
+ The version of the OpenAPI document: 2.2.0
Contact: engineering@conekta.com
Generated by OpenAPI Generator (https://openapi-generator.tech)
@@ -296,7 +296,7 @@ def _create_rule_blacklist_serialize(
if 'Accept' not in _header_params:
_header_params['Accept'] = self.api_client.select_header_accept(
[
- 'application/vnd.conekta-v2.1.0+json'
+ 'application/vnd.conekta-v2.2.0+json'
]
)
@@ -591,7 +591,7 @@ def _create_rule_whitelist_serialize(
if 'Accept' not in _header_params:
_header_params['Accept'] = self.api_client.select_header_accept(
[
- 'application/vnd.conekta-v2.1.0+json'
+ 'application/vnd.conekta-v2.2.0+json'
]
)
@@ -901,7 +901,7 @@ def _delete_rule_blacklist_serialize(
if 'Accept' not in _header_params:
_header_params['Accept'] = self.api_client.select_header_accept(
[
- 'application/vnd.conekta-v2.1.0+json'
+ 'application/vnd.conekta-v2.2.0+json'
]
)
@@ -1201,7 +1201,7 @@ def _delete_rule_whitelist_serialize(
if 'Accept' not in _header_params:
_header_params['Accept'] = self.api_client.select_header_accept(
[
- 'application/vnd.conekta-v2.1.0+json'
+ 'application/vnd.conekta-v2.2.0+json'
]
)
@@ -1468,7 +1468,7 @@ def _get_rule_blacklist_serialize(
if 'Accept' not in _header_params:
_header_params['Accept'] = self.api_client.select_header_accept(
[
- 'application/vnd.conekta-v2.1.0+json'
+ 'application/vnd.conekta-v2.2.0+json'
]
)
@@ -1738,7 +1738,7 @@ def _get_rule_whitelist_serialize(
if 'Accept' not in _header_params:
_header_params['Accept'] = self.api_client.select_header_accept(
[
- 'application/vnd.conekta-v2.1.0+json'
+ 'application/vnd.conekta-v2.2.0+json'
]
)
diff --git a/conekta/api/api_keys_api.py b/conekta/api/api_keys_api.py
index d122899..e606dc3 100644
--- a/conekta/api/api_keys_api.py
+++ b/conekta/api/api_keys_api.py
@@ -5,7 +5,7 @@
Conekta sdk
- The version of the OpenAPI document: 2.1.0
+ The version of the OpenAPI document: 2.2.0
Contact: engineering@conekta.com
Generated by OpenAPI Generator (https://openapi-generator.tech)
@@ -317,7 +317,7 @@ def _create_api_key_serialize(
if 'Accept' not in _header_params:
_header_params['Accept'] = self.api_client.select_header_accept(
[
- 'application/vnd.conekta-v2.1.0+json'
+ 'application/vnd.conekta-v2.2.0+json'
]
)
@@ -615,7 +615,7 @@ def _delete_api_key_serialize(
if 'Accept' not in _header_params:
_header_params['Accept'] = self.api_client.select_header_accept(
[
- 'application/vnd.conekta-v2.1.0+json'
+ 'application/vnd.conekta-v2.2.0+json'
]
)
@@ -915,7 +915,7 @@ def _get_api_key_serialize(
if 'Accept' not in _header_params:
_header_params['Accept'] = self.api_client.select_header_accept(
[
- 'application/vnd.conekta-v2.1.0+json'
+ 'application/vnd.conekta-v2.2.0+json'
]
)
@@ -1265,7 +1265,7 @@ def _get_api_keys_serialize(
if 'Accept' not in _header_params:
_header_params['Accept'] = self.api_client.select_header_accept(
[
- 'application/vnd.conekta-v2.1.0+json'
+ 'application/vnd.conekta-v2.2.0+json'
]
)
@@ -1565,7 +1565,7 @@ def _update_api_key_serialize(
if 'Accept' not in _header_params:
_header_params['Accept'] = self.api_client.select_header_accept(
[
- 'application/vnd.conekta-v2.1.0+json'
+ 'application/vnd.conekta-v2.2.0+json'
]
)
diff --git a/conekta/api/balances_api.py b/conekta/api/balances_api.py
index 6ef0d7a..6366bff 100644
--- a/conekta/api/balances_api.py
+++ b/conekta/api/balances_api.py
@@ -5,7 +5,7 @@
Conekta sdk
- The version of the OpenAPI document: 2.1.0
+ The version of the OpenAPI document: 2.2.0
Contact: engineering@conekta.com
Generated by OpenAPI Generator (https://openapi-generator.tech)
@@ -279,7 +279,7 @@ def _get_balance_serialize(
if 'Accept' not in _header_params:
_header_params['Accept'] = self.api_client.select_header_accept(
[
- 'application/vnd.conekta-v2.1.0+json'
+ 'application/vnd.conekta-v2.2.0+json'
]
)
diff --git a/conekta/api/charges_api.py b/conekta/api/charges_api.py
index 01f6dac..4de20a9 100644
--- a/conekta/api/charges_api.py
+++ b/conekta/api/charges_api.py
@@ -5,7 +5,7 @@
Conekta sdk
- The version of the OpenAPI document: 2.1.0
+ The version of the OpenAPI document: 2.2.0
Contact: engineering@conekta.com
Generated by OpenAPI Generator (https://openapi-generator.tech)
@@ -364,7 +364,7 @@ def _get_charges_serialize(
if 'Accept' not in _header_params:
_header_params['Accept'] = self.api_client.select_header_accept(
[
- 'application/vnd.conekta-v2.1.0+json'
+ 'application/vnd.conekta-v2.2.0+json'
]
)
@@ -682,7 +682,7 @@ def _orders_create_charge_serialize(
if 'Accept' not in _header_params:
_header_params['Accept'] = self.api_client.select_header_accept(
[
- 'application/vnd.conekta-v2.1.0+json'
+ 'application/vnd.conekta-v2.2.0+json'
]
)
@@ -1013,7 +1013,7 @@ def _orders_create_charges_serialize(
if 'Accept' not in _header_params:
_header_params['Accept'] = self.api_client.select_header_accept(
[
- 'application/vnd.conekta-v2.1.0+json'
+ 'application/vnd.conekta-v2.2.0+json'
]
)
@@ -1338,7 +1338,7 @@ def _update_charge_serialize(
if 'Accept' not in _header_params:
_header_params['Accept'] = self.api_client.select_header_accept(
[
- 'application/vnd.conekta-v2.1.0+json'
+ 'application/vnd.conekta-v2.2.0+json'
]
)
diff --git a/conekta/api/companies_api.py b/conekta/api/companies_api.py
index f7da07f..a75498f 100644
--- a/conekta/api/companies_api.py
+++ b/conekta/api/companies_api.py
@@ -5,7 +5,7 @@
Conekta sdk
- The version of the OpenAPI document: 2.1.0
+ The version of the OpenAPI document: 2.2.0
Contact: engineering@conekta.com
Generated by OpenAPI Generator (https://openapi-generator.tech)
@@ -348,7 +348,7 @@ def _get_companies_serialize(
if 'Accept' not in _header_params:
_header_params['Accept'] = self.api_client.select_header_accept(
[
- 'application/vnd.conekta-v2.1.0+json'
+ 'application/vnd.conekta-v2.2.0+json'
]
)
@@ -630,7 +630,7 @@ def _get_company_serialize(
if 'Accept' not in _header_params:
_header_params['Accept'] = self.api_client.select_header_accept(
[
- 'application/vnd.conekta-v2.1.0+json'
+ 'application/vnd.conekta-v2.2.0+json'
]
)
diff --git a/conekta/api/customers_api.py b/conekta/api/customers_api.py
index 9a86c21..3123c09 100644
--- a/conekta/api/customers_api.py
+++ b/conekta/api/customers_api.py
@@ -5,7 +5,7 @@
Conekta sdk
- The version of the OpenAPI document: 2.1.0
+ The version of the OpenAPI document: 2.2.0
Contact: engineering@conekta.com
Generated by OpenAPI Generator (https://openapi-generator.tech)
@@ -322,7 +322,7 @@ def _create_customer_serialize(
if 'Accept' not in _header_params:
_header_params['Accept'] = self.api_client.select_header_accept(
[
- 'application/vnd.conekta-v2.1.0+json'
+ 'application/vnd.conekta-v2.2.0+json'
]
)
@@ -653,7 +653,7 @@ def _create_customer_fiscal_entities_serialize(
if 'Accept' not in _header_params:
_header_params['Accept'] = self.api_client.select_header_accept(
[
- 'application/vnd.conekta-v2.1.0+json'
+ 'application/vnd.conekta-v2.2.0+json'
]
)
@@ -969,7 +969,7 @@ def _delete_customer_by_id_serialize(
if 'Accept' not in _header_params:
_header_params['Accept'] = self.api_client.select_header_accept(
[
- 'application/vnd.conekta-v2.1.0+json'
+ 'application/vnd.conekta-v2.2.0+json'
]
)
@@ -1269,7 +1269,7 @@ def _get_customer_by_id_serialize(
if 'Accept' not in _header_params:
_header_params['Accept'] = self.api_client.select_header_accept(
[
- 'application/vnd.conekta-v2.1.0+json'
+ 'application/vnd.conekta-v2.2.0+json'
]
)
@@ -1619,7 +1619,7 @@ def _get_customers_serialize(
if 'Accept' not in _header_params:
_header_params['Accept'] = self.api_client.select_header_accept(
[
- 'application/vnd.conekta-v2.1.0+json'
+ 'application/vnd.conekta-v2.2.0+json'
]
)
@@ -1937,7 +1937,7 @@ def _update_customer_serialize(
if 'Accept' not in _header_params:
_header_params['Accept'] = self.api_client.select_header_accept(
[
- 'application/vnd.conekta-v2.1.0+json'
+ 'application/vnd.conekta-v2.2.0+json'
]
)
@@ -2283,7 +2283,7 @@ def _update_customer_fiscal_entities_serialize(
if 'Accept' not in _header_params:
_header_params['Accept'] = self.api_client.select_header_accept(
[
- 'application/vnd.conekta-v2.1.0+json'
+ 'application/vnd.conekta-v2.2.0+json'
]
)
diff --git a/conekta/api/discounts_api.py b/conekta/api/discounts_api.py
index 2fb8e1e..c8e5c3c 100644
--- a/conekta/api/discounts_api.py
+++ b/conekta/api/discounts_api.py
@@ -5,7 +5,7 @@
Conekta sdk
- The version of the OpenAPI document: 2.1.0
+ The version of the OpenAPI document: 2.2.0
Contact: engineering@conekta.com
Generated by OpenAPI Generator (https://openapi-generator.tech)
@@ -330,7 +330,7 @@ def _orders_create_discount_line_serialize(
if 'Accept' not in _header_params:
_header_params['Accept'] = self.api_client.select_header_accept(
[
- 'application/vnd.conekta-v2.1.0+json'
+ 'application/vnd.conekta-v2.2.0+json'
]
)
@@ -661,7 +661,7 @@ def _orders_delete_discount_lines_serialize(
if 'Accept' not in _header_params:
_header_params['Accept'] = self.api_client.select_header_accept(
[
- 'application/vnd.conekta-v2.1.0+json'
+ 'application/vnd.conekta-v2.2.0+json'
]
)
@@ -979,7 +979,7 @@ def _orders_get_discount_line_serialize(
if 'Accept' not in _header_params:
_header_params['Accept'] = self.api_client.select_header_accept(
[
- 'application/vnd.conekta-v2.1.0+json'
+ 'application/vnd.conekta-v2.2.0+json'
]
)
@@ -1344,7 +1344,7 @@ def _orders_get_discount_lines_serialize(
if 'Accept' not in _header_params:
_header_params['Accept'] = self.api_client.select_header_accept(
[
- 'application/vnd.conekta-v2.1.0+json'
+ 'application/vnd.conekta-v2.2.0+json'
]
)
@@ -1677,7 +1677,7 @@ def _orders_update_discount_lines_serialize(
if 'Accept' not in _header_params:
_header_params['Accept'] = self.api_client.select_header_accept(
[
- 'application/vnd.conekta-v2.1.0+json'
+ 'application/vnd.conekta-v2.2.0+json'
]
)
diff --git a/conekta/api/events_api.py b/conekta/api/events_api.py
index a5b7dbe..75e3bf6 100644
--- a/conekta/api/events_api.py
+++ b/conekta/api/events_api.py
@@ -5,7 +5,7 @@
Conekta sdk
- The version of the OpenAPI document: 2.1.0
+ The version of the OpenAPI document: 2.2.0
Contact: engineering@conekta.com
Generated by OpenAPI Generator (https://openapi-generator.tech)
@@ -23,6 +23,7 @@
from conekta.models.event_response import EventResponse
from conekta.models.events_resend_response import EventsResendResponse
from conekta.models.get_events_response import GetEventsResponse
+from conekta.models.resend_request import ResendRequest
from conekta.api_client import ApiClient, RequestSerialized
from conekta.api_response import ApiResponse
@@ -314,7 +315,7 @@ def _get_event_serialize(
if 'Accept' not in _header_params:
_header_params['Accept'] = self.api_client.select_header_accept(
[
- 'application/vnd.conekta-v2.1.0+json'
+ 'application/vnd.conekta-v2.2.0+json'
]
)
@@ -661,7 +662,7 @@ def _get_events_serialize(
if 'Accept' not in _header_params:
_header_params['Accept'] = self.api_client.select_header_accept(
[
- 'application/vnd.conekta-v2.1.0+json'
+ 'application/vnd.conekta-v2.2.0+json'
]
)
@@ -693,7 +694,7 @@ def _get_events_serialize(
def resend_event(
self,
event_id: Annotated[StrictStr, Field(description="event identifier")],
- webhook_log_id: Annotated[StrictStr, Field(description="webhook log identifier")],
+ resend_request: Annotated[ResendRequest, Field(description="requested fields for resend an event")],
accept_language: Annotated[Optional[StrictStr], Field(description="Use for knowing which language to use")] = None,
_request_timeout: Union[
None,
@@ -710,12 +711,12 @@ def resend_event(
) -> EventsResendResponse:
"""Resend Event
- Try to send an event
+ Resend event to selected webhooks
:param event_id: event identifier (required)
:type event_id: str
- :param webhook_log_id: webhook log identifier (required)
- :type webhook_log_id: str
+ :param resend_request: requested fields for resend an event (required)
+ :type resend_request: ResendRequest
:param accept_language: Use for knowing which language to use
:type accept_language: str
:param _request_timeout: timeout setting for this request. If one
@@ -742,7 +743,7 @@ def resend_event(
_param = self._resend_event_serialize(
event_id=event_id,
- webhook_log_id=webhook_log_id,
+ resend_request=resend_request,
accept_language=accept_language,
_request_auth=_request_auth,
_content_type=_content_type,
@@ -771,7 +772,7 @@ def resend_event(
def resend_event_with_http_info(
self,
event_id: Annotated[StrictStr, Field(description="event identifier")],
- webhook_log_id: Annotated[StrictStr, Field(description="webhook log identifier")],
+ resend_request: Annotated[ResendRequest, Field(description="requested fields for resend an event")],
accept_language: Annotated[Optional[StrictStr], Field(description="Use for knowing which language to use")] = None,
_request_timeout: Union[
None,
@@ -788,12 +789,12 @@ def resend_event_with_http_info(
) -> ApiResponse[EventsResendResponse]:
"""Resend Event
- Try to send an event
+ Resend event to selected webhooks
:param event_id: event identifier (required)
:type event_id: str
- :param webhook_log_id: webhook log identifier (required)
- :type webhook_log_id: str
+ :param resend_request: requested fields for resend an event (required)
+ :type resend_request: ResendRequest
:param accept_language: Use for knowing which language to use
:type accept_language: str
:param _request_timeout: timeout setting for this request. If one
@@ -820,7 +821,7 @@ def resend_event_with_http_info(
_param = self._resend_event_serialize(
event_id=event_id,
- webhook_log_id=webhook_log_id,
+ resend_request=resend_request,
accept_language=accept_language,
_request_auth=_request_auth,
_content_type=_content_type,
@@ -849,7 +850,7 @@ def resend_event_with_http_info(
def resend_event_without_preload_content(
self,
event_id: Annotated[StrictStr, Field(description="event identifier")],
- webhook_log_id: Annotated[StrictStr, Field(description="webhook log identifier")],
+ resend_request: Annotated[ResendRequest, Field(description="requested fields for resend an event")],
accept_language: Annotated[Optional[StrictStr], Field(description="Use for knowing which language to use")] = None,
_request_timeout: Union[
None,
@@ -866,12 +867,12 @@ def resend_event_without_preload_content(
) -> RESTResponseType:
"""Resend Event
- Try to send an event
+ Resend event to selected webhooks
:param event_id: event identifier (required)
:type event_id: str
- :param webhook_log_id: webhook log identifier (required)
- :type webhook_log_id: str
+ :param resend_request: requested fields for resend an event (required)
+ :type resend_request: ResendRequest
:param accept_language: Use for knowing which language to use
:type accept_language: str
:param _request_timeout: timeout setting for this request. If one
@@ -898,7 +899,7 @@ def resend_event_without_preload_content(
_param = self._resend_event_serialize(
event_id=event_id,
- webhook_log_id=webhook_log_id,
+ resend_request=resend_request,
accept_language=accept_language,
_request_auth=_request_auth,
_content_type=_content_type,
@@ -922,7 +923,7 @@ def resend_event_without_preload_content(
def _resend_event_serialize(
self,
event_id,
- webhook_log_id,
+ resend_request,
accept_language,
_request_auth,
_content_type,
@@ -947,24 +948,37 @@ def _resend_event_serialize(
# process the path parameters
if event_id is not None:
_path_params['event_id'] = event_id
- if webhook_log_id is not None:
- _path_params['webhook_log_id'] = webhook_log_id
# process the query parameters
# process the header parameters
if accept_language is not None:
_header_params['Accept-Language'] = accept_language
# process the form parameters
# process the body parameter
+ if resend_request is not None:
+ _body_params = resend_request
# set the HTTP header `Accept`
if 'Accept' not in _header_params:
_header_params['Accept'] = self.api_client.select_header_accept(
[
- 'application/vnd.conekta-v2.1.0+json'
+ 'application/vnd.conekta-v2.2.0+json'
]
)
+ # set the HTTP header `Content-Type`
+ if _content_type:
+ _header_params['Content-Type'] = _content_type
+ else:
+ _default_content_type = (
+ self.api_client.select_header_content_type(
+ [
+ 'application/json'
+ ]
+ )
+ )
+ if _default_content_type is not None:
+ _header_params['Content-Type'] = _default_content_type
# authentication setting
_auth_settings: List[str] = [
@@ -973,7 +987,7 @@ def _resend_event_serialize(
return self.api_client.param_serialize(
method='POST',
- resource_path='/events/{event_id}/webhook_logs/{webhook_log_id}/resend',
+ resource_path='/events/{event_id}/resend',
path_params=_path_params,
query_params=_query_params,
header_params=_header_params,
diff --git a/conekta/api/logs_api.py b/conekta/api/logs_api.py
index b73766b..dd2725d 100644
--- a/conekta/api/logs_api.py
+++ b/conekta/api/logs_api.py
@@ -5,7 +5,7 @@
Conekta sdk
- The version of the OpenAPI document: 2.1.0
+ The version of the OpenAPI document: 2.2.0
Contact: engineering@conekta.com
Generated by OpenAPI Generator (https://openapi-generator.tech)
@@ -313,7 +313,7 @@ def _get_log_by_id_serialize(
if 'Accept' not in _header_params:
_header_params['Accept'] = self.api_client.select_header_accept(
[
- 'application/vnd.conekta-v2.1.0+json'
+ 'application/vnd.conekta-v2.2.0+json'
]
)
@@ -663,7 +663,7 @@ def _get_logs_serialize(
if 'Accept' not in _header_params:
_header_params['Accept'] = self.api_client.select_header_accept(
[
- 'application/vnd.conekta-v2.1.0+json'
+ 'application/vnd.conekta-v2.2.0+json'
]
)
diff --git a/conekta/api/orders_api.py b/conekta/api/orders_api.py
index ae0c125..ae315e8 100644
--- a/conekta/api/orders_api.py
+++ b/conekta/api/orders_api.py
@@ -5,7 +5,7 @@
Conekta sdk
- The version of the OpenAPI document: 2.1.0
+ The version of the OpenAPI document: 2.2.0
Contact: engineering@conekta.com
Generated by OpenAPI Generator (https://openapi-generator.tech)
@@ -323,7 +323,7 @@ def _cancel_order_serialize(
if 'Accept' not in _header_params:
_header_params['Accept'] = self.api_client.select_header_accept(
[
- 'application/vnd.conekta-v2.1.0+json'
+ 'application/vnd.conekta-v2.2.0+json'
]
)
@@ -626,7 +626,7 @@ def _create_order_serialize(
if 'Accept' not in _header_params:
_header_params['Accept'] = self.api_client.select_header_accept(
[
- 'application/vnd.conekta-v2.1.0+json'
+ 'application/vnd.conekta-v2.2.0+json'
]
)
@@ -939,7 +939,7 @@ def _get_order_by_id_serialize(
if 'Accept' not in _header_params:
_header_params['Accept'] = self.api_client.select_header_accept(
[
- 'application/vnd.conekta-v2.1.0+json'
+ 'application/vnd.conekta-v2.2.0+json'
]
)
@@ -1408,7 +1408,7 @@ def _get_orders_serialize(
if 'Accept' not in _header_params:
_header_params['Accept'] = self.api_client.select_header_accept(
[
- 'application/vnd.conekta-v2.1.0+json'
+ 'application/vnd.conekta-v2.2.0+json'
]
)
@@ -1729,7 +1729,7 @@ def _order_cancel_refund_serialize(
if 'Accept' not in _header_params:
_header_params['Accept'] = self.api_client.select_header_accept(
[
- 'application/vnd.conekta-v2.1.0+json'
+ 'application/vnd.conekta-v2.2.0+json'
]
)
@@ -2050,7 +2050,7 @@ def _order_refund_serialize(
if 'Accept' not in _header_params:
_header_params['Accept'] = self.api_client.select_header_accept(
[
- 'application/vnd.conekta-v2.1.0+json'
+ 'application/vnd.conekta-v2.2.0+json'
]
)
@@ -2381,7 +2381,7 @@ def _orders_create_capture_serialize(
if 'Accept' not in _header_params:
_header_params['Accept'] = self.api_client.select_header_accept(
[
- 'application/vnd.conekta-v2.1.0+json'
+ 'application/vnd.conekta-v2.2.0+json'
]
)
@@ -2697,7 +2697,7 @@ def _update_order_serialize(
if 'Accept' not in _header_params:
_header_params['Accept'] = self.api_client.select_header_accept(
[
- 'application/vnd.conekta-v2.1.0+json'
+ 'application/vnd.conekta-v2.2.0+json'
]
)
diff --git a/conekta/api/payment_link_api.py b/conekta/api/payment_link_api.py
index b01e782..d1cfc84 100644
--- a/conekta/api/payment_link_api.py
+++ b/conekta/api/payment_link_api.py
@@ -5,7 +5,7 @@
Conekta sdk
- The version of the OpenAPI document: 2.1.0
+ The version of the OpenAPI document: 2.2.0
Contact: engineering@conekta.com
Generated by OpenAPI Generator (https://openapi-generator.tech)
@@ -319,7 +319,7 @@ def _cancel_checkout_serialize(
if 'Accept' not in _header_params:
_header_params['Accept'] = self.api_client.select_header_accept(
[
- 'application/vnd.conekta-v2.1.0+json'
+ 'application/vnd.conekta-v2.2.0+json'
]
)
@@ -619,7 +619,7 @@ def _create_checkout_serialize(
if 'Accept' not in _header_params:
_header_params['Accept'] = self.api_client.select_header_accept(
[
- 'application/vnd.conekta-v2.1.0+json'
+ 'application/vnd.conekta-v2.2.0+json'
]
)
@@ -950,7 +950,7 @@ def _email_checkout_serialize(
if 'Accept' not in _header_params:
_header_params['Accept'] = self.api_client.select_header_accept(
[
- 'application/vnd.conekta-v2.1.0+json'
+ 'application/vnd.conekta-v2.2.0+json'
]
)
@@ -1266,7 +1266,7 @@ def _get_checkout_serialize(
if 'Accept' not in _header_params:
_header_params['Accept'] = self.api_client.select_header_accept(
[
- 'application/vnd.conekta-v2.1.0+json'
+ 'application/vnd.conekta-v2.2.0+json'
]
)
@@ -1622,7 +1622,7 @@ def _get_checkouts_serialize(
if 'Accept' not in _header_params:
_header_params['Accept'] = self.api_client.select_header_accept(
[
- 'application/vnd.conekta-v2.1.0+json'
+ 'application/vnd.conekta-v2.2.0+json'
]
)
@@ -1940,7 +1940,7 @@ def _sms_checkout_serialize(
if 'Accept' not in _header_params:
_header_params['Accept'] = self.api_client.select_header_accept(
[
- 'application/vnd.conekta-v2.1.0+json'
+ 'application/vnd.conekta-v2.2.0+json'
]
)
diff --git a/conekta/api/payment_methods_api.py b/conekta/api/payment_methods_api.py
index d38a3f2..a060c8f 100644
--- a/conekta/api/payment_methods_api.py
+++ b/conekta/api/payment_methods_api.py
@@ -5,7 +5,7 @@
Conekta sdk
- The version of the OpenAPI document: 2.1.0
+ The version of the OpenAPI document: 2.2.0
Contact: engineering@conekta.com
Generated by OpenAPI Generator (https://openapi-generator.tech)
@@ -334,7 +334,7 @@ def _create_customer_payment_methods_serialize(
if 'Accept' not in _header_params:
_header_params['Accept'] = self.api_client.select_header_accept(
[
- 'application/vnd.conekta-v2.1.0+json'
+ 'application/vnd.conekta-v2.2.0+json'
]
)
@@ -665,7 +665,7 @@ def _delete_customer_payment_methods_serialize(
if 'Accept' not in _header_params:
_header_params['Accept'] = self.api_client.select_header_accept(
[
- 'application/vnd.conekta-v2.1.0+json'
+ 'application/vnd.conekta-v2.2.0+json'
]
)
@@ -1033,7 +1033,7 @@ def _get_customer_payment_methods_serialize(
if 'Accept' not in _header_params:
_header_params['Accept'] = self.api_client.select_header_accept(
[
- 'application/vnd.conekta-v2.1.0+json'
+ 'application/vnd.conekta-v2.2.0+json'
]
)
@@ -1366,7 +1366,7 @@ def _update_customer_payment_methods_serialize(
if 'Accept' not in _header_params:
_header_params['Accept'] = self.api_client.select_header_accept(
[
- 'application/vnd.conekta-v2.1.0+json'
+ 'application/vnd.conekta-v2.2.0+json'
]
)
diff --git a/conekta/api/payout_orders_api.py b/conekta/api/payout_orders_api.py
index 93591be..3d9e1d9 100644
--- a/conekta/api/payout_orders_api.py
+++ b/conekta/api/payout_orders_api.py
@@ -5,7 +5,7 @@
Conekta sdk
- The version of the OpenAPI document: 2.1.0
+ The version of the OpenAPI document: 2.2.0
Contact: engineering@conekta.com
Generated by OpenAPI Generator (https://openapi-generator.tech)
@@ -299,7 +299,7 @@ def _cancel_payout_order_by_id_serialize(
if 'Accept' not in _header_params:
_header_params['Accept'] = self.api_client.select_header_accept(
[
- 'application/vnd.conekta-v2.1.0+json'
+ 'application/vnd.conekta-v2.2.0+json'
]
)
@@ -590,7 +590,7 @@ def _create_payout_order_serialize(
if 'Accept' not in _header_params:
_header_params['Accept'] = self.api_client.select_header_accept(
[
- 'application/vnd.conekta-v2.1.0+json'
+ 'application/vnd.conekta-v2.2.0+json'
]
)
@@ -888,7 +888,7 @@ def _get_payout_order_by_id_serialize(
if 'Accept' not in _header_params:
_header_params['Accept'] = self.api_client.select_header_accept(
[
- 'application/vnd.conekta-v2.1.0+json'
+ 'application/vnd.conekta-v2.2.0+json'
]
)
@@ -1223,7 +1223,7 @@ def _get_payout_orders_serialize(
if 'Accept' not in _header_params:
_header_params['Accept'] = self.api_client.select_header_accept(
[
- 'application/vnd.conekta-v2.1.0+json'
+ 'application/vnd.conekta-v2.2.0+json'
]
)
diff --git a/conekta/api/plans_api.py b/conekta/api/plans_api.py
index 5214a2f..c0ccc24 100644
--- a/conekta/api/plans_api.py
+++ b/conekta/api/plans_api.py
@@ -5,7 +5,7 @@
Conekta sdk
- The version of the OpenAPI document: 2.1.0
+ The version of the OpenAPI document: 2.2.0
Contact: engineering@conekta.com
Generated by OpenAPI Generator (https://openapi-generator.tech)
@@ -315,7 +315,7 @@ def _create_plan_serialize(
if 'Accept' not in _header_params:
_header_params['Accept'] = self.api_client.select_header_accept(
[
- 'application/vnd.conekta-v2.1.0+json'
+ 'application/vnd.conekta-v2.2.0+json'
]
)
@@ -613,7 +613,7 @@ def _delete_plan_serialize(
if 'Accept' not in _header_params:
_header_params['Accept'] = self.api_client.select_header_accept(
[
- 'application/vnd.conekta-v2.1.0+json'
+ 'application/vnd.conekta-v2.2.0+json'
]
)
@@ -913,7 +913,7 @@ def _get_plan_serialize(
if 'Accept' not in _header_params:
_header_params['Accept'] = self.api_client.select_header_accept(
[
- 'application/vnd.conekta-v2.1.0+json'
+ 'application/vnd.conekta-v2.2.0+json'
]
)
@@ -1263,7 +1263,7 @@ def _get_plans_serialize(
if 'Accept' not in _header_params:
_header_params['Accept'] = self.api_client.select_header_accept(
[
- 'application/vnd.conekta-v2.1.0+json'
+ 'application/vnd.conekta-v2.2.0+json'
]
)
@@ -1578,7 +1578,7 @@ def _update_plan_serialize(
if 'Accept' not in _header_params:
_header_params['Accept'] = self.api_client.select_header_accept(
[
- 'application/vnd.conekta-v2.1.0+json'
+ 'application/vnd.conekta-v2.2.0+json'
]
)
diff --git a/conekta/api/products_api.py b/conekta/api/products_api.py
index 0d42d08..b112933 100644
--- a/conekta/api/products_api.py
+++ b/conekta/api/products_api.py
@@ -5,7 +5,7 @@
Conekta sdk
- The version of the OpenAPI document: 2.1.0
+ The version of the OpenAPI document: 2.2.0
Contact: engineering@conekta.com
Generated by OpenAPI Generator (https://openapi-generator.tech)
@@ -329,7 +329,7 @@ def _orders_create_product_serialize(
if 'Accept' not in _header_params:
_header_params['Accept'] = self.api_client.select_header_accept(
[
- 'application/vnd.conekta-v2.1.0+json'
+ 'application/vnd.conekta-v2.2.0+json'
]
)
@@ -660,7 +660,7 @@ def _orders_delete_product_serialize(
if 'Accept' not in _header_params:
_header_params['Accept'] = self.api_client.select_header_accept(
[
- 'application/vnd.conekta-v2.1.0+json'
+ 'application/vnd.conekta-v2.2.0+json'
]
)
@@ -993,7 +993,7 @@ def _orders_update_product_serialize(
if 'Accept' not in _header_params:
_header_params['Accept'] = self.api_client.select_header_accept(
[
- 'application/vnd.conekta-v2.1.0+json'
+ 'application/vnd.conekta-v2.2.0+json'
]
)
diff --git a/conekta/api/shipping_contacts_api.py b/conekta/api/shipping_contacts_api.py
index cbb2437..78e6a1b 100644
--- a/conekta/api/shipping_contacts_api.py
+++ b/conekta/api/shipping_contacts_api.py
@@ -5,7 +5,7 @@
Conekta sdk
- The version of the OpenAPI document: 2.1.0
+ The version of the OpenAPI document: 2.2.0
Contact: engineering@conekta.com
Generated by OpenAPI Generator (https://openapi-generator.tech)
@@ -332,7 +332,7 @@ def _create_customer_shipping_contacts_serialize(
if 'Accept' not in _header_params:
_header_params['Accept'] = self.api_client.select_header_accept(
[
- 'application/vnd.conekta-v2.1.0+json'
+ 'application/vnd.conekta-v2.2.0+json'
]
)
@@ -663,7 +663,7 @@ def _delete_customer_shipping_contacts_serialize(
if 'Accept' not in _header_params:
_header_params['Accept'] = self.api_client.select_header_accept(
[
- 'application/vnd.conekta-v2.1.0+json'
+ 'application/vnd.conekta-v2.2.0+json'
]
)
@@ -996,7 +996,7 @@ def _update_customer_shipping_contacts_serialize(
if 'Accept' not in _header_params:
_header_params['Accept'] = self.api_client.select_header_accept(
[
- 'application/vnd.conekta-v2.1.0+json'
+ 'application/vnd.conekta-v2.2.0+json'
]
)
diff --git a/conekta/api/shippings_api.py b/conekta/api/shippings_api.py
index 0a8e541..75971db 100644
--- a/conekta/api/shippings_api.py
+++ b/conekta/api/shippings_api.py
@@ -5,7 +5,7 @@
Conekta sdk
- The version of the OpenAPI document: 2.1.0
+ The version of the OpenAPI document: 2.2.0
Contact: engineering@conekta.com
Generated by OpenAPI Generator (https://openapi-generator.tech)
@@ -328,7 +328,7 @@ def _orders_create_shipping_serialize(
if 'Accept' not in _header_params:
_header_params['Accept'] = self.api_client.select_header_accept(
[
- 'application/vnd.conekta-v2.1.0+json'
+ 'application/vnd.conekta-v2.2.0+json'
]
)
@@ -662,7 +662,7 @@ def _orders_delete_shipping_serialize(
if 'Accept' not in _header_params:
_header_params['Accept'] = self.api_client.select_header_accept(
[
- 'application/vnd.conekta-v2.1.0+json'
+ 'application/vnd.conekta-v2.2.0+json'
]
)
@@ -995,7 +995,7 @@ def _orders_update_shipping_serialize(
if 'Accept' not in _header_params:
_header_params['Accept'] = self.api_client.select_header_accept(
[
- 'application/vnd.conekta-v2.1.0+json'
+ 'application/vnd.conekta-v2.2.0+json'
]
)
diff --git a/conekta/api/subscriptions_api.py b/conekta/api/subscriptions_api.py
index 91580f3..27740ae 100644
--- a/conekta/api/subscriptions_api.py
+++ b/conekta/api/subscriptions_api.py
@@ -5,7 +5,7 @@
Conekta sdk
- The version of the OpenAPI document: 2.1.0
+ The version of the OpenAPI document: 2.2.0
Contact: engineering@conekta.com
Generated by OpenAPI Generator (https://openapi-generator.tech)
@@ -62,9 +62,9 @@ def cancel_subscription(
_headers: Optional[Dict[StrictStr, Any]] = None,
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
) -> SubscriptionResponse:
- """Cancel Subscription
+ """(Deprecated) Cancel Subscription [Deprecated]
- You can cancel the subscription to stop the plans that your customers consume
+ DEPRECATED: This endpoint will be removed in version 2.3.0.
:param id: Identifier of the resource (required)
:type id: str
@@ -93,6 +93,7 @@ def cancel_subscription(
:type _host_index: int, optional
:return: Returns the result object.
""" # noqa: E501
+ warnings.warn("POST /customers/{id}/subscription/cancel is deprecated.", DeprecationWarning)
_param = self._cancel_subscription_serialize(
id=id,
@@ -140,9 +141,9 @@ def cancel_subscription_with_http_info(
_headers: Optional[Dict[StrictStr, Any]] = None,
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
) -> ApiResponse[SubscriptionResponse]:
- """Cancel Subscription
+ """(Deprecated) Cancel Subscription [Deprecated]
- You can cancel the subscription to stop the plans that your customers consume
+ DEPRECATED: This endpoint will be removed in version 2.3.0.
:param id: Identifier of the resource (required)
:type id: str
@@ -171,6 +172,7 @@ def cancel_subscription_with_http_info(
:type _host_index: int, optional
:return: Returns the result object.
""" # noqa: E501
+ warnings.warn("POST /customers/{id}/subscription/cancel is deprecated.", DeprecationWarning)
_param = self._cancel_subscription_serialize(
id=id,
@@ -218,9 +220,9 @@ def cancel_subscription_without_preload_content(
_headers: Optional[Dict[StrictStr, Any]] = None,
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
) -> RESTResponseType:
- """Cancel Subscription
+ """(Deprecated) Cancel Subscription [Deprecated]
- You can cancel the subscription to stop the plans that your customers consume
+ DEPRECATED: This endpoint will be removed in version 2.3.0.
:param id: Identifier of the resource (required)
:type id: str
@@ -249,6 +251,7 @@ def cancel_subscription_without_preload_content(
:type _host_index: int, optional
:return: Returns the result object.
""" # noqa: E501
+ warnings.warn("POST /customers/{id}/subscription/cancel is deprecated.", DeprecationWarning)
_param = self._cancel_subscription_serialize(
id=id,
@@ -315,7 +318,7 @@ def _cancel_subscription_serialize(
if 'Accept' not in _header_params:
_header_params['Accept'] = self.api_client.select_header_accept(
[
- 'application/vnd.conekta-v2.1.0+json'
+ 'application/vnd.conekta-v2.2.0+json'
]
)
@@ -363,9 +366,9 @@ def create_subscription(
_headers: Optional[Dict[StrictStr, Any]] = None,
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
) -> SubscriptionResponse:
- """Create Subscription
+ """(Deprecated) Create Subscription [Deprecated]
- You can create the subscription to include the plans that your customers consume
+ DEPRECATED: This endpoint will be removed in version 2.3.0. You can create the subscription to include the plans that your customers consume
:param id: Identifier of the resource (required)
:type id: str
@@ -396,6 +399,7 @@ def create_subscription(
:type _host_index: int, optional
:return: Returns the result object.
""" # noqa: E501
+ warnings.warn("POST /customers/{id}/subscription is deprecated.", DeprecationWarning)
_param = self._create_subscription_serialize(
id=id,
@@ -446,9 +450,9 @@ def create_subscription_with_http_info(
_headers: Optional[Dict[StrictStr, Any]] = None,
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
) -> ApiResponse[SubscriptionResponse]:
- """Create Subscription
+ """(Deprecated) Create Subscription [Deprecated]
- You can create the subscription to include the plans that your customers consume
+ DEPRECATED: This endpoint will be removed in version 2.3.0. You can create the subscription to include the plans that your customers consume
:param id: Identifier of the resource (required)
:type id: str
@@ -479,6 +483,7 @@ def create_subscription_with_http_info(
:type _host_index: int, optional
:return: Returns the result object.
""" # noqa: E501
+ warnings.warn("POST /customers/{id}/subscription is deprecated.", DeprecationWarning)
_param = self._create_subscription_serialize(
id=id,
@@ -529,9 +534,9 @@ def create_subscription_without_preload_content(
_headers: Optional[Dict[StrictStr, Any]] = None,
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
) -> RESTResponseType:
- """Create Subscription
+ """(Deprecated) Create Subscription [Deprecated]
- You can create the subscription to include the plans that your customers consume
+ DEPRECATED: This endpoint will be removed in version 2.3.0. You can create the subscription to include the plans that your customers consume
:param id: Identifier of the resource (required)
:type id: str
@@ -562,6 +567,7 @@ def create_subscription_without_preload_content(
:type _host_index: int, optional
:return: Returns the result object.
""" # noqa: E501
+ warnings.warn("POST /customers/{id}/subscription is deprecated.", DeprecationWarning)
_param = self._create_subscription_serialize(
id=id,
@@ -633,7 +639,7 @@ def _create_subscription_serialize(
if 'Accept' not in _header_params:
_header_params['Accept'] = self.api_client.select_header_accept(
[
- 'application/vnd.conekta-v2.1.0+json'
+ 'application/vnd.conekta-v2.2.0+json'
]
)
@@ -675,11 +681,10 @@ def _create_subscription_serialize(
@validate_call
- def get_all_events_from_subscription(
+ def get_subscription(
self,
id: Annotated[StrictStr, Field(description="Identifier of the resource")],
accept_language: Annotated[Optional[StrictStr], Field(description="Use for knowing which language to use")] = None,
- x_child_company_id: Annotated[Optional[StrictStr], Field(description="In the case of a holding company, the company id of the child company to which will process the request.")] = None,
_request_timeout: Union[
None,
Annotated[StrictFloat, Field(gt=0)],
@@ -692,17 +697,15 @@ def get_all_events_from_subscription(
_content_type: Optional[StrictStr] = None,
_headers: Optional[Dict[StrictStr, Any]] = None,
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
- ) -> SubscriptionEventsResponse:
- """Get Events By Subscription
+ ) -> SubscriptionResponse:
+ """(Deprecated) Get Subscription [Deprecated]
- You can get the events of the subscription(s) of a client, with the customer id
+ DEPRECATED: This endpoint will be removed in version 2.3.0.
:param id: Identifier of the resource (required)
:type id: str
:param accept_language: Use for knowing which language to use
:type accept_language: str
- :param x_child_company_id: In the case of a holding company, the company id of the child company to which will process the request.
- :type x_child_company_id: str
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
@@ -724,11 +727,11 @@ def get_all_events_from_subscription(
:type _host_index: int, optional
:return: Returns the result object.
""" # noqa: E501
+ warnings.warn("GET /customers/{id}/subscription is deprecated.", DeprecationWarning)
- _param = self._get_all_events_from_subscription_serialize(
+ _param = self._get_subscription_serialize(
id=id,
accept_language=accept_language,
- x_child_company_id=x_child_company_id,
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
@@ -736,11 +739,9 @@ def get_all_events_from_subscription(
)
_response_types_map: Dict[str, Optional[str]] = {
- '200': "SubscriptionEventsResponse",
+ '200': "SubscriptionResponse",
'401': "Error",
- '402': "Error",
'404': "Error",
- '422': "Error",
'500': "Error",
}
response_data = self.api_client.call_api(
@@ -755,11 +756,10 @@ def get_all_events_from_subscription(
@validate_call
- def get_all_events_from_subscription_with_http_info(
+ def get_subscription_with_http_info(
self,
id: Annotated[StrictStr, Field(description="Identifier of the resource")],
accept_language: Annotated[Optional[StrictStr], Field(description="Use for knowing which language to use")] = None,
- x_child_company_id: Annotated[Optional[StrictStr], Field(description="In the case of a holding company, the company id of the child company to which will process the request.")] = None,
_request_timeout: Union[
None,
Annotated[StrictFloat, Field(gt=0)],
@@ -772,17 +772,15 @@ def get_all_events_from_subscription_with_http_info(
_content_type: Optional[StrictStr] = None,
_headers: Optional[Dict[StrictStr, Any]] = None,
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
- ) -> ApiResponse[SubscriptionEventsResponse]:
- """Get Events By Subscription
+ ) -> ApiResponse[SubscriptionResponse]:
+ """(Deprecated) Get Subscription [Deprecated]
- You can get the events of the subscription(s) of a client, with the customer id
+ DEPRECATED: This endpoint will be removed in version 2.3.0.
:param id: Identifier of the resource (required)
:type id: str
:param accept_language: Use for knowing which language to use
:type accept_language: str
- :param x_child_company_id: In the case of a holding company, the company id of the child company to which will process the request.
- :type x_child_company_id: str
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
@@ -804,11 +802,11 @@ def get_all_events_from_subscription_with_http_info(
:type _host_index: int, optional
:return: Returns the result object.
""" # noqa: E501
+ warnings.warn("GET /customers/{id}/subscription is deprecated.", DeprecationWarning)
- _param = self._get_all_events_from_subscription_serialize(
+ _param = self._get_subscription_serialize(
id=id,
accept_language=accept_language,
- x_child_company_id=x_child_company_id,
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
@@ -816,11 +814,9 @@ def get_all_events_from_subscription_with_http_info(
)
_response_types_map: Dict[str, Optional[str]] = {
- '200': "SubscriptionEventsResponse",
+ '200': "SubscriptionResponse",
'401': "Error",
- '402': "Error",
'404': "Error",
- '422': "Error",
'500': "Error",
}
response_data = self.api_client.call_api(
@@ -835,11 +831,10 @@ def get_all_events_from_subscription_with_http_info(
@validate_call
- def get_all_events_from_subscription_without_preload_content(
+ def get_subscription_without_preload_content(
self,
id: Annotated[StrictStr, Field(description="Identifier of the resource")],
accept_language: Annotated[Optional[StrictStr], Field(description="Use for knowing which language to use")] = None,
- x_child_company_id: Annotated[Optional[StrictStr], Field(description="In the case of a holding company, the company id of the child company to which will process the request.")] = None,
_request_timeout: Union[
None,
Annotated[StrictFloat, Field(gt=0)],
@@ -853,16 +848,14 @@ def get_all_events_from_subscription_without_preload_content(
_headers: Optional[Dict[StrictStr, Any]] = None,
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
) -> RESTResponseType:
- """Get Events By Subscription
+ """(Deprecated) Get Subscription [Deprecated]
- You can get the events of the subscription(s) of a client, with the customer id
+ DEPRECATED: This endpoint will be removed in version 2.3.0.
:param id: Identifier of the resource (required)
:type id: str
:param accept_language: Use for knowing which language to use
:type accept_language: str
- :param x_child_company_id: In the case of a holding company, the company id of the child company to which will process the request.
- :type x_child_company_id: str
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
@@ -884,11 +877,11 @@ def get_all_events_from_subscription_without_preload_content(
:type _host_index: int, optional
:return: Returns the result object.
""" # noqa: E501
+ warnings.warn("GET /customers/{id}/subscription is deprecated.", DeprecationWarning)
- _param = self._get_all_events_from_subscription_serialize(
+ _param = self._get_subscription_serialize(
id=id,
accept_language=accept_language,
- x_child_company_id=x_child_company_id,
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
@@ -896,11 +889,9 @@ def get_all_events_from_subscription_without_preload_content(
)
_response_types_map: Dict[str, Optional[str]] = {
- '200': "SubscriptionEventsResponse",
+ '200': "SubscriptionResponse",
'401': "Error",
- '402': "Error",
'404': "Error",
- '422': "Error",
'500': "Error",
}
response_data = self.api_client.call_api(
@@ -910,11 +901,10 @@ def get_all_events_from_subscription_without_preload_content(
return response_data.response
- def _get_all_events_from_subscription_serialize(
+ def _get_subscription_serialize(
self,
id,
accept_language,
- x_child_company_id,
_request_auth,
_content_type,
_headers,
@@ -942,8 +932,6 @@ def _get_all_events_from_subscription_serialize(
# process the header parameters
if accept_language is not None:
_header_params['Accept-Language'] = accept_language
- if x_child_company_id is not None:
- _header_params['X-Child-Company-Id'] = x_child_company_id
# process the form parameters
# process the body parameter
@@ -952,7 +940,7 @@ def _get_all_events_from_subscription_serialize(
if 'Accept' not in _header_params:
_header_params['Accept'] = self.api_client.select_header_accept(
[
- 'application/vnd.conekta-v2.1.0+json'
+ 'application/vnd.conekta-v2.2.0+json'
]
)
@@ -964,7 +952,7 @@ def _get_all_events_from_subscription_serialize(
return self.api_client.param_serialize(
method='GET',
- resource_path='/customers/{id}/subscription/events',
+ resource_path='/customers/{id}/subscription',
path_params=_path_params,
query_params=_query_params,
header_params=_header_params,
@@ -981,10 +969,11 @@ def _get_all_events_from_subscription_serialize(
@validate_call
- def get_subscription(
+ def get_subscription_events(
self,
id: Annotated[StrictStr, Field(description="Identifier of the resource")],
accept_language: Annotated[Optional[StrictStr], Field(description="Use for knowing which language to use")] = None,
+ x_child_company_id: Annotated[Optional[StrictStr], Field(description="In the case of a holding company, the company id of the child company to which will process the request.")] = None,
_request_timeout: Union[
None,
Annotated[StrictFloat, Field(gt=0)],
@@ -997,14 +986,17 @@ def get_subscription(
_content_type: Optional[StrictStr] = None,
_headers: Optional[Dict[StrictStr, Any]] = None,
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
- ) -> SubscriptionResponse:
- """Get Subscription
+ ) -> SubscriptionEventsResponse:
+ """(Deprecated) Get Subscription Events [Deprecated]
+ DEPRECATED: This endpoint will be removed in version 2.3.0. You can get the events of the subscription(s) of a client, with the customer id
:param id: Identifier of the resource (required)
:type id: str
:param accept_language: Use for knowing which language to use
:type accept_language: str
+ :param x_child_company_id: In the case of a holding company, the company id of the child company to which will process the request.
+ :type x_child_company_id: str
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
@@ -1026,10 +1018,12 @@ def get_subscription(
:type _host_index: int, optional
:return: Returns the result object.
""" # noqa: E501
+ warnings.warn("GET /customers/{id}/subscription/events is deprecated.", DeprecationWarning)
- _param = self._get_subscription_serialize(
+ _param = self._get_subscription_events_serialize(
id=id,
accept_language=accept_language,
+ x_child_company_id=x_child_company_id,
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
@@ -1037,9 +1031,11 @@ def get_subscription(
)
_response_types_map: Dict[str, Optional[str]] = {
- '200': "SubscriptionResponse",
+ '200': "SubscriptionEventsResponse",
'401': "Error",
+ '402': "Error",
'404': "Error",
+ '422': "Error",
'500': "Error",
}
response_data = self.api_client.call_api(
@@ -1054,10 +1050,11 @@ def get_subscription(
@validate_call
- def get_subscription_with_http_info(
+ def get_subscription_events_with_http_info(
self,
id: Annotated[StrictStr, Field(description="Identifier of the resource")],
accept_language: Annotated[Optional[StrictStr], Field(description="Use for knowing which language to use")] = None,
+ x_child_company_id: Annotated[Optional[StrictStr], Field(description="In the case of a holding company, the company id of the child company to which will process the request.")] = None,
_request_timeout: Union[
None,
Annotated[StrictFloat, Field(gt=0)],
@@ -1070,14 +1067,17 @@ def get_subscription_with_http_info(
_content_type: Optional[StrictStr] = None,
_headers: Optional[Dict[StrictStr, Any]] = None,
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
- ) -> ApiResponse[SubscriptionResponse]:
- """Get Subscription
+ ) -> ApiResponse[SubscriptionEventsResponse]:
+ """(Deprecated) Get Subscription Events [Deprecated]
+ DEPRECATED: This endpoint will be removed in version 2.3.0. You can get the events of the subscription(s) of a client, with the customer id
:param id: Identifier of the resource (required)
:type id: str
:param accept_language: Use for knowing which language to use
:type accept_language: str
+ :param x_child_company_id: In the case of a holding company, the company id of the child company to which will process the request.
+ :type x_child_company_id: str
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
@@ -1099,10 +1099,12 @@ def get_subscription_with_http_info(
:type _host_index: int, optional
:return: Returns the result object.
""" # noqa: E501
+ warnings.warn("GET /customers/{id}/subscription/events is deprecated.", DeprecationWarning)
- _param = self._get_subscription_serialize(
+ _param = self._get_subscription_events_serialize(
id=id,
accept_language=accept_language,
+ x_child_company_id=x_child_company_id,
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
@@ -1110,9 +1112,11 @@ def get_subscription_with_http_info(
)
_response_types_map: Dict[str, Optional[str]] = {
- '200': "SubscriptionResponse",
+ '200': "SubscriptionEventsResponse",
'401': "Error",
+ '402': "Error",
'404': "Error",
+ '422': "Error",
'500': "Error",
}
response_data = self.api_client.call_api(
@@ -1127,10 +1131,11 @@ def get_subscription_with_http_info(
@validate_call
- def get_subscription_without_preload_content(
+ def get_subscription_events_without_preload_content(
self,
id: Annotated[StrictStr, Field(description="Identifier of the resource")],
accept_language: Annotated[Optional[StrictStr], Field(description="Use for knowing which language to use")] = None,
+ x_child_company_id: Annotated[Optional[StrictStr], Field(description="In the case of a holding company, the company id of the child company to which will process the request.")] = None,
_request_timeout: Union[
None,
Annotated[StrictFloat, Field(gt=0)],
@@ -1144,13 +1149,16 @@ def get_subscription_without_preload_content(
_headers: Optional[Dict[StrictStr, Any]] = None,
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
) -> RESTResponseType:
- """Get Subscription
+ """(Deprecated) Get Subscription Events [Deprecated]
+ DEPRECATED: This endpoint will be removed in version 2.3.0. You can get the events of the subscription(s) of a client, with the customer id
:param id: Identifier of the resource (required)
:type id: str
:param accept_language: Use for knowing which language to use
:type accept_language: str
+ :param x_child_company_id: In the case of a holding company, the company id of the child company to which will process the request.
+ :type x_child_company_id: str
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
@@ -1172,10 +1180,12 @@ def get_subscription_without_preload_content(
:type _host_index: int, optional
:return: Returns the result object.
""" # noqa: E501
+ warnings.warn("GET /customers/{id}/subscription/events is deprecated.", DeprecationWarning)
- _param = self._get_subscription_serialize(
+ _param = self._get_subscription_events_serialize(
id=id,
accept_language=accept_language,
+ x_child_company_id=x_child_company_id,
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
@@ -1183,9 +1193,11 @@ def get_subscription_without_preload_content(
)
_response_types_map: Dict[str, Optional[str]] = {
- '200': "SubscriptionResponse",
+ '200': "SubscriptionEventsResponse",
'401': "Error",
+ '402': "Error",
'404': "Error",
+ '422': "Error",
'500': "Error",
}
response_data = self.api_client.call_api(
@@ -1195,10 +1207,11 @@ def get_subscription_without_preload_content(
return response_data.response
- def _get_subscription_serialize(
+ def _get_subscription_events_serialize(
self,
id,
accept_language,
+ x_child_company_id,
_request_auth,
_content_type,
_headers,
@@ -1226,6 +1239,8 @@ def _get_subscription_serialize(
# process the header parameters
if accept_language is not None:
_header_params['Accept-Language'] = accept_language
+ if x_child_company_id is not None:
+ _header_params['X-Child-Company-Id'] = x_child_company_id
# process the form parameters
# process the body parameter
@@ -1234,7 +1249,7 @@ def _get_subscription_serialize(
if 'Accept' not in _header_params:
_header_params['Accept'] = self.api_client.select_header_accept(
[
- 'application/vnd.conekta-v2.1.0+json'
+ 'application/vnd.conekta-v2.2.0+json'
]
)
@@ -1246,7 +1261,7 @@ def _get_subscription_serialize(
return self.api_client.param_serialize(
method='GET',
- resource_path='/customers/{id}/subscription',
+ resource_path='/customers/{id}/subscription/events',
path_params=_path_params,
query_params=_query_params,
header_params=_header_params,
@@ -1281,9 +1296,9 @@ def pause_subscription(
_headers: Optional[Dict[StrictStr, Any]] = None,
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
) -> SubscriptionResponse:
- """Pause Subscription
+ """(Deprecated) Pause Subscription [Deprecated]
- You can pause the subscription to stop the plans that your customers consume
+ DEPRECATED: This endpoint will be removed in version 2.3.0.
:param id: Identifier of the resource (required)
:type id: str
@@ -1312,6 +1327,7 @@ def pause_subscription(
:type _host_index: int, optional
:return: Returns the result object.
""" # noqa: E501
+ warnings.warn("POST /customers/{id}/subscription/pause is deprecated.", DeprecationWarning)
_param = self._pause_subscription_serialize(
id=id,
@@ -1360,9 +1376,9 @@ def pause_subscription_with_http_info(
_headers: Optional[Dict[StrictStr, Any]] = None,
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
) -> ApiResponse[SubscriptionResponse]:
- """Pause Subscription
+ """(Deprecated) Pause Subscription [Deprecated]
- You can pause the subscription to stop the plans that your customers consume
+ DEPRECATED: This endpoint will be removed in version 2.3.0.
:param id: Identifier of the resource (required)
:type id: str
@@ -1391,6 +1407,7 @@ def pause_subscription_with_http_info(
:type _host_index: int, optional
:return: Returns the result object.
""" # noqa: E501
+ warnings.warn("POST /customers/{id}/subscription/pause is deprecated.", DeprecationWarning)
_param = self._pause_subscription_serialize(
id=id,
@@ -1439,9 +1456,9 @@ def pause_subscription_without_preload_content(
_headers: Optional[Dict[StrictStr, Any]] = None,
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
) -> RESTResponseType:
- """Pause Subscription
+ """(Deprecated) Pause Subscription [Deprecated]
- You can pause the subscription to stop the plans that your customers consume
+ DEPRECATED: This endpoint will be removed in version 2.3.0.
:param id: Identifier of the resource (required)
:type id: str
@@ -1470,6 +1487,7 @@ def pause_subscription_without_preload_content(
:type _host_index: int, optional
:return: Returns the result object.
""" # noqa: E501
+ warnings.warn("POST /customers/{id}/subscription/pause is deprecated.", DeprecationWarning)
_param = self._pause_subscription_serialize(
id=id,
@@ -1537,7 +1555,7 @@ def _pause_subscription_serialize(
if 'Accept' not in _header_params:
_header_params['Accept'] = self.api_client.select_header_accept(
[
- 'application/vnd.conekta-v2.1.0+json'
+ 'application/vnd.conekta-v2.2.0+json'
]
)
@@ -1584,9 +1602,9 @@ def resume_subscription(
_headers: Optional[Dict[StrictStr, Any]] = None,
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
) -> SubscriptionResponse:
- """Resume Subscription
+ """(Deprecated) Resume Subscription [Deprecated]
- You can resume the subscription to start the plans that your customers consume
+ DEPRECATED: This endpoint will be removed in version 2.3.0.
:param id: Identifier of the resource (required)
:type id: str
@@ -1615,6 +1633,7 @@ def resume_subscription(
:type _host_index: int, optional
:return: Returns the result object.
""" # noqa: E501
+ warnings.warn("POST /customers/{id}/subscription/resume is deprecated.", DeprecationWarning)
_param = self._resume_subscription_serialize(
id=id,
@@ -1664,9 +1683,9 @@ def resume_subscription_with_http_info(
_headers: Optional[Dict[StrictStr, Any]] = None,
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
) -> ApiResponse[SubscriptionResponse]:
- """Resume Subscription
+ """(Deprecated) Resume Subscription [Deprecated]
- You can resume the subscription to start the plans that your customers consume
+ DEPRECATED: This endpoint will be removed in version 2.3.0.
:param id: Identifier of the resource (required)
:type id: str
@@ -1695,6 +1714,7 @@ def resume_subscription_with_http_info(
:type _host_index: int, optional
:return: Returns the result object.
""" # noqa: E501
+ warnings.warn("POST /customers/{id}/subscription/resume is deprecated.", DeprecationWarning)
_param = self._resume_subscription_serialize(
id=id,
@@ -1744,9 +1764,9 @@ def resume_subscription_without_preload_content(
_headers: Optional[Dict[StrictStr, Any]] = None,
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
) -> RESTResponseType:
- """Resume Subscription
+ """(Deprecated) Resume Subscription [Deprecated]
- You can resume the subscription to start the plans that your customers consume
+ DEPRECATED: This endpoint will be removed in version 2.3.0.
:param id: Identifier of the resource (required)
:type id: str
@@ -1775,6 +1795,7 @@ def resume_subscription_without_preload_content(
:type _host_index: int, optional
:return: Returns the result object.
""" # noqa: E501
+ warnings.warn("POST /customers/{id}/subscription/resume is deprecated.", DeprecationWarning)
_param = self._resume_subscription_serialize(
id=id,
@@ -1843,7 +1864,7 @@ def _resume_subscription_serialize(
if 'Accept' not in _header_params:
_header_params['Accept'] = self.api_client.select_header_accept(
[
- 'application/vnd.conekta-v2.1.0+json'
+ 'application/vnd.conekta-v2.2.0+json'
]
)
@@ -1872,10 +1893,10 @@ def _resume_subscription_serialize(
@validate_call
- def update_subscription(
+ def subscription_cancel(
self,
- id: Annotated[StrictStr, Field(description="Identifier of the resource")],
- subscription_update_request: Annotated[SubscriptionUpdateRequest, Field(description="requested field for update a subscription")],
+ customer_id: Annotated[StrictStr, Field(description="Identifier of the customer resource")],
+ id: Annotated[StrictStr, Field(description="Identifier of the subscription resource")],
accept_language: Annotated[Optional[StrictStr], Field(description="Use for knowing which language to use")] = None,
x_child_company_id: Annotated[Optional[StrictStr], Field(description="In the case of a holding company, the company id of the child company to which will process the request.")] = None,
_request_timeout: Union[
@@ -1891,14 +1912,14 @@ def update_subscription(
_headers: Optional[Dict[StrictStr, Any]] = None,
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
) -> SubscriptionResponse:
- """Update Subscription
+ """Cancel Subscription
- You can modify the subscription to change the plans that your customers consume
+ Cancel a specific subscription
- :param id: Identifier of the resource (required)
+ :param customer_id: Identifier of the customer resource (required)
+ :type customer_id: str
+ :param id: Identifier of the subscription resource (required)
:type id: str
- :param subscription_update_request: requested field for update a subscription (required)
- :type subscription_update_request: SubscriptionUpdateRequest
:param accept_language: Use for knowing which language to use
:type accept_language: str
:param x_child_company_id: In the case of a holding company, the company id of the child company to which will process the request.
@@ -1925,9 +1946,9 @@ def update_subscription(
:return: Returns the result object.
""" # noqa: E501
- _param = self._update_subscription_serialize(
+ _param = self._subscription_cancel_serialize(
+ customer_id=customer_id,
id=id,
- subscription_update_request=subscription_update_request,
accept_language=accept_language,
x_child_company_id=x_child_company_id,
_request_auth=_request_auth,
@@ -1938,7 +1959,6 @@ def update_subscription(
_response_types_map: Dict[str, Optional[str]] = {
'200': "SubscriptionResponse",
- '422': "Error",
'401': "Error",
'404': "Error",
'500': "Error",
@@ -1955,10 +1975,10 @@ def update_subscription(
@validate_call
- def update_subscription_with_http_info(
+ def subscription_cancel_with_http_info(
self,
- id: Annotated[StrictStr, Field(description="Identifier of the resource")],
- subscription_update_request: Annotated[SubscriptionUpdateRequest, Field(description="requested field for update a subscription")],
+ customer_id: Annotated[StrictStr, Field(description="Identifier of the customer resource")],
+ id: Annotated[StrictStr, Field(description="Identifier of the subscription resource")],
accept_language: Annotated[Optional[StrictStr], Field(description="Use for knowing which language to use")] = None,
x_child_company_id: Annotated[Optional[StrictStr], Field(description="In the case of a holding company, the company id of the child company to which will process the request.")] = None,
_request_timeout: Union[
@@ -1974,14 +1994,14 @@ def update_subscription_with_http_info(
_headers: Optional[Dict[StrictStr, Any]] = None,
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
) -> ApiResponse[SubscriptionResponse]:
- """Update Subscription
+ """Cancel Subscription
- You can modify the subscription to change the plans that your customers consume
+ Cancel a specific subscription
- :param id: Identifier of the resource (required)
+ :param customer_id: Identifier of the customer resource (required)
+ :type customer_id: str
+ :param id: Identifier of the subscription resource (required)
:type id: str
- :param subscription_update_request: requested field for update a subscription (required)
- :type subscription_update_request: SubscriptionUpdateRequest
:param accept_language: Use for knowing which language to use
:type accept_language: str
:param x_child_company_id: In the case of a holding company, the company id of the child company to which will process the request.
@@ -2008,9 +2028,9 @@ def update_subscription_with_http_info(
:return: Returns the result object.
""" # noqa: E501
- _param = self._update_subscription_serialize(
+ _param = self._subscription_cancel_serialize(
+ customer_id=customer_id,
id=id,
- subscription_update_request=subscription_update_request,
accept_language=accept_language,
x_child_company_id=x_child_company_id,
_request_auth=_request_auth,
@@ -2021,7 +2041,6 @@ def update_subscription_with_http_info(
_response_types_map: Dict[str, Optional[str]] = {
'200': "SubscriptionResponse",
- '422': "Error",
'401': "Error",
'404': "Error",
'500': "Error",
@@ -2038,10 +2057,10 @@ def update_subscription_with_http_info(
@validate_call
- def update_subscription_without_preload_content(
+ def subscription_cancel_without_preload_content(
self,
- id: Annotated[StrictStr, Field(description="Identifier of the resource")],
- subscription_update_request: Annotated[SubscriptionUpdateRequest, Field(description="requested field for update a subscription")],
+ customer_id: Annotated[StrictStr, Field(description="Identifier of the customer resource")],
+ id: Annotated[StrictStr, Field(description="Identifier of the subscription resource")],
accept_language: Annotated[Optional[StrictStr], Field(description="Use for knowing which language to use")] = None,
x_child_company_id: Annotated[Optional[StrictStr], Field(description="In the case of a holding company, the company id of the child company to which will process the request.")] = None,
_request_timeout: Union[
@@ -2057,9 +2076,3019 @@ def update_subscription_without_preload_content(
_headers: Optional[Dict[StrictStr, Any]] = None,
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
) -> RESTResponseType:
- """Update Subscription
+ """Cancel Subscription
+
+ Cancel a specific subscription
+
+ :param customer_id: Identifier of the customer resource (required)
+ :type customer_id: str
+ :param id: Identifier of the subscription resource (required)
+ :type id: str
+ :param accept_language: Use for knowing which language to use
+ :type accept_language: str
+ :param x_child_company_id: In the case of a holding company, the company id of the child company to which will process the request.
+ :type x_child_company_id: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._subscription_cancel_serialize(
+ customer_id=customer_id,
+ id=id,
+ accept_language=accept_language,
+ x_child_company_id=x_child_company_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "SubscriptionResponse",
+ '401': "Error",
+ '404': "Error",
+ '500': "Error",
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _subscription_cancel_serialize(
+ self,
+ customer_id,
+ id,
+ accept_language,
+ x_child_company_id,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> RequestSerialized:
+
+ _host = None
+
+ _collection_formats: Dict[str, str] = {
+ }
+
+ _path_params: Dict[str, str] = {}
+ _query_params: List[Tuple[str, str]] = []
+ _header_params: Dict[str, Optional[str]] = _headers or {}
+ _form_params: List[Tuple[str, str]] = []
+ _files: Dict[
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
+ ] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ if customer_id is not None:
+ _path_params['customer_id'] = customer_id
+ if id is not None:
+ _path_params['id'] = id
+ # process the query parameters
+ # process the header parameters
+ if accept_language is not None:
+ _header_params['Accept-Language'] = accept_language
+ if x_child_company_id is not None:
+ _header_params['X-Child-Company-Id'] = x_child_company_id
+ # process the form parameters
+ # process the body parameter
+
+
+ # set the HTTP header `Accept`
+ if 'Accept' not in _header_params:
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'application/vnd.conekta-v2.2.0+json'
+ ]
+ )
+
+
+ # authentication setting
+ _auth_settings: List[str] = [
+ 'bearerAuth'
+ ]
+
+ return self.api_client.param_serialize(
+ method='POST',
+ resource_path='/customers/{customer_id}/subscriptions/{id}/cancel',
+ path_params=_path_params,
+ query_params=_query_params,
+ header_params=_header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
+ auth_settings=_auth_settings,
+ collection_formats=_collection_formats,
+ _host=_host,
+ _request_auth=_request_auth
+ )
+
+
+
+
+ @validate_call
+ def subscription_create(
+ self,
+ customer_id: Annotated[StrictStr, Field(description="Identifier of the customer resource")],
+ subscription_request: Annotated[SubscriptionRequest, Field(description="requested field for subscriptions")],
+ accept_language: Annotated[Optional[StrictStr], Field(description="Use for knowing which language to use")] = None,
+ x_child_company_id: Annotated[Optional[StrictStr], Field(description="In the case of a holding company, the company id of the child company to which will process the request.")] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> SubscriptionResponse:
+ """Create Subscription
+
+ Create a new subscription for a customer (keeps existing subscriptions active)
+
+ :param customer_id: Identifier of the customer resource (required)
+ :type customer_id: str
+ :param subscription_request: requested field for subscriptions (required)
+ :type subscription_request: SubscriptionRequest
+ :param accept_language: Use for knowing which language to use
+ :type accept_language: str
+ :param x_child_company_id: In the case of a holding company, the company id of the child company to which will process the request.
+ :type x_child_company_id: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._subscription_create_serialize(
+ customer_id=customer_id,
+ subscription_request=subscription_request,
+ accept_language=accept_language,
+ x_child_company_id=x_child_company_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "SubscriptionResponse",
+ '422': "Error",
+ '401': "Error",
+ '404': "Error",
+ '500': "Error",
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ ).data
+
+
+ @validate_call
+ def subscription_create_with_http_info(
+ self,
+ customer_id: Annotated[StrictStr, Field(description="Identifier of the customer resource")],
+ subscription_request: Annotated[SubscriptionRequest, Field(description="requested field for subscriptions")],
+ accept_language: Annotated[Optional[StrictStr], Field(description="Use for knowing which language to use")] = None,
+ x_child_company_id: Annotated[Optional[StrictStr], Field(description="In the case of a holding company, the company id of the child company to which will process the request.")] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ApiResponse[SubscriptionResponse]:
+ """Create Subscription
+
+ Create a new subscription for a customer (keeps existing subscriptions active)
+
+ :param customer_id: Identifier of the customer resource (required)
+ :type customer_id: str
+ :param subscription_request: requested field for subscriptions (required)
+ :type subscription_request: SubscriptionRequest
+ :param accept_language: Use for knowing which language to use
+ :type accept_language: str
+ :param x_child_company_id: In the case of a holding company, the company id of the child company to which will process the request.
+ :type x_child_company_id: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._subscription_create_serialize(
+ customer_id=customer_id,
+ subscription_request=subscription_request,
+ accept_language=accept_language,
+ x_child_company_id=x_child_company_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "SubscriptionResponse",
+ '422': "Error",
+ '401': "Error",
+ '404': "Error",
+ '500': "Error",
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ )
+
+
+ @validate_call
+ def subscription_create_without_preload_content(
+ self,
+ customer_id: Annotated[StrictStr, Field(description="Identifier of the customer resource")],
+ subscription_request: Annotated[SubscriptionRequest, Field(description="requested field for subscriptions")],
+ accept_language: Annotated[Optional[StrictStr], Field(description="Use for knowing which language to use")] = None,
+ x_child_company_id: Annotated[Optional[StrictStr], Field(description="In the case of a holding company, the company id of the child company to which will process the request.")] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> RESTResponseType:
+ """Create Subscription
+
+ Create a new subscription for a customer (keeps existing subscriptions active)
+
+ :param customer_id: Identifier of the customer resource (required)
+ :type customer_id: str
+ :param subscription_request: requested field for subscriptions (required)
+ :type subscription_request: SubscriptionRequest
+ :param accept_language: Use for knowing which language to use
+ :type accept_language: str
+ :param x_child_company_id: In the case of a holding company, the company id of the child company to which will process the request.
+ :type x_child_company_id: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._subscription_create_serialize(
+ customer_id=customer_id,
+ subscription_request=subscription_request,
+ accept_language=accept_language,
+ x_child_company_id=x_child_company_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "SubscriptionResponse",
+ '422': "Error",
+ '401': "Error",
+ '404': "Error",
+ '500': "Error",
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _subscription_create_serialize(
+ self,
+ customer_id,
+ subscription_request,
+ accept_language,
+ x_child_company_id,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> RequestSerialized:
+
+ _host = None
+
+ _collection_formats: Dict[str, str] = {
+ }
+
+ _path_params: Dict[str, str] = {}
+ _query_params: List[Tuple[str, str]] = []
+ _header_params: Dict[str, Optional[str]] = _headers or {}
+ _form_params: List[Tuple[str, str]] = []
+ _files: Dict[
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
+ ] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ if customer_id is not None:
+ _path_params['customer_id'] = customer_id
+ # process the query parameters
+ # process the header parameters
+ if accept_language is not None:
+ _header_params['Accept-Language'] = accept_language
+ if x_child_company_id is not None:
+ _header_params['X-Child-Company-Id'] = x_child_company_id
+ # process the form parameters
+ # process the body parameter
+ if subscription_request is not None:
+ _body_params = subscription_request
+
+
+ # set the HTTP header `Accept`
+ if 'Accept' not in _header_params:
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'application/vnd.conekta-v2.2.0+json'
+ ]
+ )
+
+ # set the HTTP header `Content-Type`
+ if _content_type:
+ _header_params['Content-Type'] = _content_type
+ else:
+ _default_content_type = (
+ self.api_client.select_header_content_type(
+ [
+ 'application/json'
+ ]
+ )
+ )
+ if _default_content_type is not None:
+ _header_params['Content-Type'] = _default_content_type
+
+ # authentication setting
+ _auth_settings: List[str] = [
+ 'bearerAuth'
+ ]
+
+ return self.api_client.param_serialize(
+ method='POST',
+ resource_path='/customers/{customer_id}/subscriptions',
+ path_params=_path_params,
+ query_params=_query_params,
+ header_params=_header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
+ auth_settings=_auth_settings,
+ collection_formats=_collection_formats,
+ _host=_host,
+ _request_auth=_request_auth
+ )
+
+
+
+
+ @validate_call
+ def subscription_events(
+ self,
+ customer_id: Annotated[StrictStr, Field(description="Identifier of the customer resource")],
+ id: Annotated[StrictStr, Field(description="Identifier of the subscription resource")],
+ accept_language: Annotated[Optional[StrictStr], Field(description="Use for knowing which language to use")] = None,
+ x_child_company_id: Annotated[Optional[StrictStr], Field(description="In the case of a holding company, the company id of the child company to which will process the request.")] = None,
+ limit: Annotated[Optional[Annotated[int, Field(le=250, strict=True, ge=1)]], Field(description="The numbers of items to return, the maximum value is 250")] = None,
+ search: Annotated[Optional[StrictStr], Field(description="General order search, e.g. by mail, reference etc.")] = None,
+ next: Annotated[Optional[StrictStr], Field(description="next page")] = None,
+ previous: Annotated[Optional[StrictStr], Field(description="previous page")] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> SubscriptionEventsResponse:
+ """Get Subscription Events
+
+ Get events for a specific subscription
+
+ :param customer_id: Identifier of the customer resource (required)
+ :type customer_id: str
+ :param id: Identifier of the subscription resource (required)
+ :type id: str
+ :param accept_language: Use for knowing which language to use
+ :type accept_language: str
+ :param x_child_company_id: In the case of a holding company, the company id of the child company to which will process the request.
+ :type x_child_company_id: str
+ :param limit: The numbers of items to return, the maximum value is 250
+ :type limit: int
+ :param search: General order search, e.g. by mail, reference etc.
+ :type search: str
+ :param next: next page
+ :type next: str
+ :param previous: previous page
+ :type previous: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._subscription_events_serialize(
+ customer_id=customer_id,
+ id=id,
+ accept_language=accept_language,
+ x_child_company_id=x_child_company_id,
+ limit=limit,
+ search=search,
+ next=next,
+ previous=previous,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "SubscriptionEventsResponse",
+ '401': "Error",
+ '404': "Error",
+ '500': "Error",
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ ).data
+
+
+ @validate_call
+ def subscription_events_with_http_info(
+ self,
+ customer_id: Annotated[StrictStr, Field(description="Identifier of the customer resource")],
+ id: Annotated[StrictStr, Field(description="Identifier of the subscription resource")],
+ accept_language: Annotated[Optional[StrictStr], Field(description="Use for knowing which language to use")] = None,
+ x_child_company_id: Annotated[Optional[StrictStr], Field(description="In the case of a holding company, the company id of the child company to which will process the request.")] = None,
+ limit: Annotated[Optional[Annotated[int, Field(le=250, strict=True, ge=1)]], Field(description="The numbers of items to return, the maximum value is 250")] = None,
+ search: Annotated[Optional[StrictStr], Field(description="General order search, e.g. by mail, reference etc.")] = None,
+ next: Annotated[Optional[StrictStr], Field(description="next page")] = None,
+ previous: Annotated[Optional[StrictStr], Field(description="previous page")] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ApiResponse[SubscriptionEventsResponse]:
+ """Get Subscription Events
+
+ Get events for a specific subscription
+
+ :param customer_id: Identifier of the customer resource (required)
+ :type customer_id: str
+ :param id: Identifier of the subscription resource (required)
+ :type id: str
+ :param accept_language: Use for knowing which language to use
+ :type accept_language: str
+ :param x_child_company_id: In the case of a holding company, the company id of the child company to which will process the request.
+ :type x_child_company_id: str
+ :param limit: The numbers of items to return, the maximum value is 250
+ :type limit: int
+ :param search: General order search, e.g. by mail, reference etc.
+ :type search: str
+ :param next: next page
+ :type next: str
+ :param previous: previous page
+ :type previous: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._subscription_events_serialize(
+ customer_id=customer_id,
+ id=id,
+ accept_language=accept_language,
+ x_child_company_id=x_child_company_id,
+ limit=limit,
+ search=search,
+ next=next,
+ previous=previous,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "SubscriptionEventsResponse",
+ '401': "Error",
+ '404': "Error",
+ '500': "Error",
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ )
+
+
+ @validate_call
+ def subscription_events_without_preload_content(
+ self,
+ customer_id: Annotated[StrictStr, Field(description="Identifier of the customer resource")],
+ id: Annotated[StrictStr, Field(description="Identifier of the subscription resource")],
+ accept_language: Annotated[Optional[StrictStr], Field(description="Use for knowing which language to use")] = None,
+ x_child_company_id: Annotated[Optional[StrictStr], Field(description="In the case of a holding company, the company id of the child company to which will process the request.")] = None,
+ limit: Annotated[Optional[Annotated[int, Field(le=250, strict=True, ge=1)]], Field(description="The numbers of items to return, the maximum value is 250")] = None,
+ search: Annotated[Optional[StrictStr], Field(description="General order search, e.g. by mail, reference etc.")] = None,
+ next: Annotated[Optional[StrictStr], Field(description="next page")] = None,
+ previous: Annotated[Optional[StrictStr], Field(description="previous page")] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> RESTResponseType:
+ """Get Subscription Events
+
+ Get events for a specific subscription
+
+ :param customer_id: Identifier of the customer resource (required)
+ :type customer_id: str
+ :param id: Identifier of the subscription resource (required)
+ :type id: str
+ :param accept_language: Use for knowing which language to use
+ :type accept_language: str
+ :param x_child_company_id: In the case of a holding company, the company id of the child company to which will process the request.
+ :type x_child_company_id: str
+ :param limit: The numbers of items to return, the maximum value is 250
+ :type limit: int
+ :param search: General order search, e.g. by mail, reference etc.
+ :type search: str
+ :param next: next page
+ :type next: str
+ :param previous: previous page
+ :type previous: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._subscription_events_serialize(
+ customer_id=customer_id,
+ id=id,
+ accept_language=accept_language,
+ x_child_company_id=x_child_company_id,
+ limit=limit,
+ search=search,
+ next=next,
+ previous=previous,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "SubscriptionEventsResponse",
+ '401': "Error",
+ '404': "Error",
+ '500': "Error",
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _subscription_events_serialize(
+ self,
+ customer_id,
+ id,
+ accept_language,
+ x_child_company_id,
+ limit,
+ search,
+ next,
+ previous,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> RequestSerialized:
+
+ _host = None
+
+ _collection_formats: Dict[str, str] = {
+ }
+
+ _path_params: Dict[str, str] = {}
+ _query_params: List[Tuple[str, str]] = []
+ _header_params: Dict[str, Optional[str]] = _headers or {}
+ _form_params: List[Tuple[str, str]] = []
+ _files: Dict[
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
+ ] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ if customer_id is not None:
+ _path_params['customer_id'] = customer_id
+ if id is not None:
+ _path_params['id'] = id
+ # process the query parameters
+ if limit is not None:
+
+ _query_params.append(('limit', limit))
+
+ if search is not None:
+
+ _query_params.append(('search', search))
+
+ if next is not None:
+
+ _query_params.append(('next', next))
+
+ if previous is not None:
+
+ _query_params.append(('previous', previous))
+
+ # process the header parameters
+ if accept_language is not None:
+ _header_params['Accept-Language'] = accept_language
+ if x_child_company_id is not None:
+ _header_params['X-Child-Company-Id'] = x_child_company_id
+ # process the form parameters
+ # process the body parameter
+
+
+ # set the HTTP header `Accept`
+ if 'Accept' not in _header_params:
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'application/vnd.conekta-v2.2.0+json'
+ ]
+ )
+
+
+ # authentication setting
+ _auth_settings: List[str] = [
+ 'bearerAuth'
+ ]
+
+ return self.api_client.param_serialize(
+ method='GET',
+ resource_path='/customers/{customer_id}/subscriptions/{id}/events',
+ path_params=_path_params,
+ query_params=_query_params,
+ header_params=_header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
+ auth_settings=_auth_settings,
+ collection_formats=_collection_formats,
+ _host=_host,
+ _request_auth=_request_auth
+ )
+
+
+
+
+ @validate_call
+ def subscription_list(
+ self,
+ customer_id: Annotated[StrictStr, Field(description="Identifier of the customer resource")],
+ accept_language: Annotated[Optional[StrictStr], Field(description="Use for knowing which language to use")] = None,
+ x_child_company_id: Annotated[Optional[StrictStr], Field(description="In the case of a holding company, the company id of the child company to which will process the request.")] = None,
+ limit: Annotated[Optional[Annotated[int, Field(le=250, strict=True, ge=1)]], Field(description="The numbers of items to return, the maximum value is 250")] = None,
+ search: Annotated[Optional[StrictStr], Field(description="General order search, e.g. by mail, reference etc.")] = None,
+ next: Annotated[Optional[StrictStr], Field(description="next page")] = None,
+ previous: Annotated[Optional[StrictStr], Field(description="previous page")] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> SubscriptionResponse:
+ """List Subscriptions
+
+ Get a list of subscriptions for a customer
+
+ :param customer_id: Identifier of the customer resource (required)
+ :type customer_id: str
+ :param accept_language: Use for knowing which language to use
+ :type accept_language: str
+ :param x_child_company_id: In the case of a holding company, the company id of the child company to which will process the request.
+ :type x_child_company_id: str
+ :param limit: The numbers of items to return, the maximum value is 250
+ :type limit: int
+ :param search: General order search, e.g. by mail, reference etc.
+ :type search: str
+ :param next: next page
+ :type next: str
+ :param previous: previous page
+ :type previous: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._subscription_list_serialize(
+ customer_id=customer_id,
+ accept_language=accept_language,
+ x_child_company_id=x_child_company_id,
+ limit=limit,
+ search=search,
+ next=next,
+ previous=previous,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "SubscriptionResponse",
+ '401': "Error",
+ '404': "Error",
+ '500': "Error",
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ ).data
+
+
+ @validate_call
+ def subscription_list_with_http_info(
+ self,
+ customer_id: Annotated[StrictStr, Field(description="Identifier of the customer resource")],
+ accept_language: Annotated[Optional[StrictStr], Field(description="Use for knowing which language to use")] = None,
+ x_child_company_id: Annotated[Optional[StrictStr], Field(description="In the case of a holding company, the company id of the child company to which will process the request.")] = None,
+ limit: Annotated[Optional[Annotated[int, Field(le=250, strict=True, ge=1)]], Field(description="The numbers of items to return, the maximum value is 250")] = None,
+ search: Annotated[Optional[StrictStr], Field(description="General order search, e.g. by mail, reference etc.")] = None,
+ next: Annotated[Optional[StrictStr], Field(description="next page")] = None,
+ previous: Annotated[Optional[StrictStr], Field(description="previous page")] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ApiResponse[SubscriptionResponse]:
+ """List Subscriptions
+
+ Get a list of subscriptions for a customer
+
+ :param customer_id: Identifier of the customer resource (required)
+ :type customer_id: str
+ :param accept_language: Use for knowing which language to use
+ :type accept_language: str
+ :param x_child_company_id: In the case of a holding company, the company id of the child company to which will process the request.
+ :type x_child_company_id: str
+ :param limit: The numbers of items to return, the maximum value is 250
+ :type limit: int
+ :param search: General order search, e.g. by mail, reference etc.
+ :type search: str
+ :param next: next page
+ :type next: str
+ :param previous: previous page
+ :type previous: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._subscription_list_serialize(
+ customer_id=customer_id,
+ accept_language=accept_language,
+ x_child_company_id=x_child_company_id,
+ limit=limit,
+ search=search,
+ next=next,
+ previous=previous,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "SubscriptionResponse",
+ '401': "Error",
+ '404': "Error",
+ '500': "Error",
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ )
+
+
+ @validate_call
+ def subscription_list_without_preload_content(
+ self,
+ customer_id: Annotated[StrictStr, Field(description="Identifier of the customer resource")],
+ accept_language: Annotated[Optional[StrictStr], Field(description="Use for knowing which language to use")] = None,
+ x_child_company_id: Annotated[Optional[StrictStr], Field(description="In the case of a holding company, the company id of the child company to which will process the request.")] = None,
+ limit: Annotated[Optional[Annotated[int, Field(le=250, strict=True, ge=1)]], Field(description="The numbers of items to return, the maximum value is 250")] = None,
+ search: Annotated[Optional[StrictStr], Field(description="General order search, e.g. by mail, reference etc.")] = None,
+ next: Annotated[Optional[StrictStr], Field(description="next page")] = None,
+ previous: Annotated[Optional[StrictStr], Field(description="previous page")] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> RESTResponseType:
+ """List Subscriptions
+
+ Get a list of subscriptions for a customer
+
+ :param customer_id: Identifier of the customer resource (required)
+ :type customer_id: str
+ :param accept_language: Use for knowing which language to use
+ :type accept_language: str
+ :param x_child_company_id: In the case of a holding company, the company id of the child company to which will process the request.
+ :type x_child_company_id: str
+ :param limit: The numbers of items to return, the maximum value is 250
+ :type limit: int
+ :param search: General order search, e.g. by mail, reference etc.
+ :type search: str
+ :param next: next page
+ :type next: str
+ :param previous: previous page
+ :type previous: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._subscription_list_serialize(
+ customer_id=customer_id,
+ accept_language=accept_language,
+ x_child_company_id=x_child_company_id,
+ limit=limit,
+ search=search,
+ next=next,
+ previous=previous,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "SubscriptionResponse",
+ '401': "Error",
+ '404': "Error",
+ '500': "Error",
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _subscription_list_serialize(
+ self,
+ customer_id,
+ accept_language,
+ x_child_company_id,
+ limit,
+ search,
+ next,
+ previous,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> RequestSerialized:
+
+ _host = None
+
+ _collection_formats: Dict[str, str] = {
+ }
+
+ _path_params: Dict[str, str] = {}
+ _query_params: List[Tuple[str, str]] = []
+ _header_params: Dict[str, Optional[str]] = _headers or {}
+ _form_params: List[Tuple[str, str]] = []
+ _files: Dict[
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
+ ] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ if customer_id is not None:
+ _path_params['customer_id'] = customer_id
+ # process the query parameters
+ if limit is not None:
+
+ _query_params.append(('limit', limit))
+
+ if search is not None:
+
+ _query_params.append(('search', search))
+
+ if next is not None:
+
+ _query_params.append(('next', next))
+
+ if previous is not None:
+
+ _query_params.append(('previous', previous))
+
+ # process the header parameters
+ if accept_language is not None:
+ _header_params['Accept-Language'] = accept_language
+ if x_child_company_id is not None:
+ _header_params['X-Child-Company-Id'] = x_child_company_id
+ # process the form parameters
+ # process the body parameter
+
+
+ # set the HTTP header `Accept`
+ if 'Accept' not in _header_params:
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'application/vnd.conekta-v2.2.0+json'
+ ]
+ )
+
+
+ # authentication setting
+ _auth_settings: List[str] = [
+ 'bearerAuth'
+ ]
+
+ return self.api_client.param_serialize(
+ method='GET',
+ resource_path='/customers/{customer_id}/subscriptions',
+ path_params=_path_params,
+ query_params=_query_params,
+ header_params=_header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
+ auth_settings=_auth_settings,
+ collection_formats=_collection_formats,
+ _host=_host,
+ _request_auth=_request_auth
+ )
+
+
+
+
+ @validate_call
+ def subscription_pause(
+ self,
+ customer_id: Annotated[StrictStr, Field(description="Identifier of the customer resource")],
+ id: Annotated[StrictStr, Field(description="Identifier of the subscription resource")],
+ accept_language: Annotated[Optional[StrictStr], Field(description="Use for knowing which language to use")] = None,
+ x_child_company_id: Annotated[Optional[StrictStr], Field(description="In the case of a holding company, the company id of the child company to which will process the request.")] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> SubscriptionResponse:
+ """Pause Subscription
+
+ Pause a specific subscription
+
+ :param customer_id: Identifier of the customer resource (required)
+ :type customer_id: str
+ :param id: Identifier of the subscription resource (required)
+ :type id: str
+ :param accept_language: Use for knowing which language to use
+ :type accept_language: str
+ :param x_child_company_id: In the case of a holding company, the company id of the child company to which will process the request.
+ :type x_child_company_id: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._subscription_pause_serialize(
+ customer_id=customer_id,
+ id=id,
+ accept_language=accept_language,
+ x_child_company_id=x_child_company_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "SubscriptionResponse",
+ '401': "Error",
+ '404': "Error",
+ '500': "Error",
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ ).data
+
+
+ @validate_call
+ def subscription_pause_with_http_info(
+ self,
+ customer_id: Annotated[StrictStr, Field(description="Identifier of the customer resource")],
+ id: Annotated[StrictStr, Field(description="Identifier of the subscription resource")],
+ accept_language: Annotated[Optional[StrictStr], Field(description="Use for knowing which language to use")] = None,
+ x_child_company_id: Annotated[Optional[StrictStr], Field(description="In the case of a holding company, the company id of the child company to which will process the request.")] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ApiResponse[SubscriptionResponse]:
+ """Pause Subscription
+
+ Pause a specific subscription
+
+ :param customer_id: Identifier of the customer resource (required)
+ :type customer_id: str
+ :param id: Identifier of the subscription resource (required)
+ :type id: str
+ :param accept_language: Use for knowing which language to use
+ :type accept_language: str
+ :param x_child_company_id: In the case of a holding company, the company id of the child company to which will process the request.
+ :type x_child_company_id: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._subscription_pause_serialize(
+ customer_id=customer_id,
+ id=id,
+ accept_language=accept_language,
+ x_child_company_id=x_child_company_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "SubscriptionResponse",
+ '401': "Error",
+ '404': "Error",
+ '500': "Error",
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ )
+
+
+ @validate_call
+ def subscription_pause_without_preload_content(
+ self,
+ customer_id: Annotated[StrictStr, Field(description="Identifier of the customer resource")],
+ id: Annotated[StrictStr, Field(description="Identifier of the subscription resource")],
+ accept_language: Annotated[Optional[StrictStr], Field(description="Use for knowing which language to use")] = None,
+ x_child_company_id: Annotated[Optional[StrictStr], Field(description="In the case of a holding company, the company id of the child company to which will process the request.")] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> RESTResponseType:
+ """Pause Subscription
+
+ Pause a specific subscription
+
+ :param customer_id: Identifier of the customer resource (required)
+ :type customer_id: str
+ :param id: Identifier of the subscription resource (required)
+ :type id: str
+ :param accept_language: Use for knowing which language to use
+ :type accept_language: str
+ :param x_child_company_id: In the case of a holding company, the company id of the child company to which will process the request.
+ :type x_child_company_id: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._subscription_pause_serialize(
+ customer_id=customer_id,
+ id=id,
+ accept_language=accept_language,
+ x_child_company_id=x_child_company_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "SubscriptionResponse",
+ '401': "Error",
+ '404': "Error",
+ '500': "Error",
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _subscription_pause_serialize(
+ self,
+ customer_id,
+ id,
+ accept_language,
+ x_child_company_id,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> RequestSerialized:
+
+ _host = None
+
+ _collection_formats: Dict[str, str] = {
+ }
+
+ _path_params: Dict[str, str] = {}
+ _query_params: List[Tuple[str, str]] = []
+ _header_params: Dict[str, Optional[str]] = _headers or {}
+ _form_params: List[Tuple[str, str]] = []
+ _files: Dict[
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
+ ] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ if customer_id is not None:
+ _path_params['customer_id'] = customer_id
+ if id is not None:
+ _path_params['id'] = id
+ # process the query parameters
+ # process the header parameters
+ if accept_language is not None:
+ _header_params['Accept-Language'] = accept_language
+ if x_child_company_id is not None:
+ _header_params['X-Child-Company-Id'] = x_child_company_id
+ # process the form parameters
+ # process the body parameter
+
+
+ # set the HTTP header `Accept`
+ if 'Accept' not in _header_params:
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'application/vnd.conekta-v2.2.0+json'
+ ]
+ )
+
+
+ # authentication setting
+ _auth_settings: List[str] = [
+ 'bearerAuth'
+ ]
+
+ return self.api_client.param_serialize(
+ method='POST',
+ resource_path='/customers/{customer_id}/subscriptions/{id}/pause',
+ path_params=_path_params,
+ query_params=_query_params,
+ header_params=_header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
+ auth_settings=_auth_settings,
+ collection_formats=_collection_formats,
+ _host=_host,
+ _request_auth=_request_auth
+ )
+
+
+
+
+ @validate_call
+ def subscription_resume(
+ self,
+ customer_id: Annotated[StrictStr, Field(description="Identifier of the customer resource")],
+ id: Annotated[StrictStr, Field(description="Identifier of the subscription resource")],
+ accept_language: Annotated[Optional[StrictStr], Field(description="Use for knowing which language to use")] = None,
+ x_child_company_id: Annotated[Optional[StrictStr], Field(description="In the case of a holding company, the company id of the child company to which will process the request.")] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> SubscriptionResponse:
+ """Resume Subscription
+
+ Resume a specific paused subscription
+
+ :param customer_id: Identifier of the customer resource (required)
+ :type customer_id: str
+ :param id: Identifier of the subscription resource (required)
+ :type id: str
+ :param accept_language: Use for knowing which language to use
+ :type accept_language: str
+ :param x_child_company_id: In the case of a holding company, the company id of the child company to which will process the request.
+ :type x_child_company_id: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._subscription_resume_serialize(
+ customer_id=customer_id,
+ id=id,
+ accept_language=accept_language,
+ x_child_company_id=x_child_company_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "SubscriptionResponse",
+ '401': "Error",
+ '404': "Error",
+ '500': "Error",
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ ).data
+
+
+ @validate_call
+ def subscription_resume_with_http_info(
+ self,
+ customer_id: Annotated[StrictStr, Field(description="Identifier of the customer resource")],
+ id: Annotated[StrictStr, Field(description="Identifier of the subscription resource")],
+ accept_language: Annotated[Optional[StrictStr], Field(description="Use for knowing which language to use")] = None,
+ x_child_company_id: Annotated[Optional[StrictStr], Field(description="In the case of a holding company, the company id of the child company to which will process the request.")] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ApiResponse[SubscriptionResponse]:
+ """Resume Subscription
+
+ Resume a specific paused subscription
+
+ :param customer_id: Identifier of the customer resource (required)
+ :type customer_id: str
+ :param id: Identifier of the subscription resource (required)
+ :type id: str
+ :param accept_language: Use for knowing which language to use
+ :type accept_language: str
+ :param x_child_company_id: In the case of a holding company, the company id of the child company to which will process the request.
+ :type x_child_company_id: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._subscription_resume_serialize(
+ customer_id=customer_id,
+ id=id,
+ accept_language=accept_language,
+ x_child_company_id=x_child_company_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "SubscriptionResponse",
+ '401': "Error",
+ '404': "Error",
+ '500': "Error",
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ )
+
+
+ @validate_call
+ def subscription_resume_without_preload_content(
+ self,
+ customer_id: Annotated[StrictStr, Field(description="Identifier of the customer resource")],
+ id: Annotated[StrictStr, Field(description="Identifier of the subscription resource")],
+ accept_language: Annotated[Optional[StrictStr], Field(description="Use for knowing which language to use")] = None,
+ x_child_company_id: Annotated[Optional[StrictStr], Field(description="In the case of a holding company, the company id of the child company to which will process the request.")] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> RESTResponseType:
+ """Resume Subscription
+
+ Resume a specific paused subscription
+
+ :param customer_id: Identifier of the customer resource (required)
+ :type customer_id: str
+ :param id: Identifier of the subscription resource (required)
+ :type id: str
+ :param accept_language: Use for knowing which language to use
+ :type accept_language: str
+ :param x_child_company_id: In the case of a holding company, the company id of the child company to which will process the request.
+ :type x_child_company_id: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._subscription_resume_serialize(
+ customer_id=customer_id,
+ id=id,
+ accept_language=accept_language,
+ x_child_company_id=x_child_company_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "SubscriptionResponse",
+ '401': "Error",
+ '404': "Error",
+ '500': "Error",
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _subscription_resume_serialize(
+ self,
+ customer_id,
+ id,
+ accept_language,
+ x_child_company_id,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> RequestSerialized:
+
+ _host = None
+
+ _collection_formats: Dict[str, str] = {
+ }
+
+ _path_params: Dict[str, str] = {}
+ _query_params: List[Tuple[str, str]] = []
+ _header_params: Dict[str, Optional[str]] = _headers or {}
+ _form_params: List[Tuple[str, str]] = []
+ _files: Dict[
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
+ ] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ if customer_id is not None:
+ _path_params['customer_id'] = customer_id
+ if id is not None:
+ _path_params['id'] = id
+ # process the query parameters
+ # process the header parameters
+ if accept_language is not None:
+ _header_params['Accept-Language'] = accept_language
+ if x_child_company_id is not None:
+ _header_params['X-Child-Company-Id'] = x_child_company_id
+ # process the form parameters
+ # process the body parameter
+
+
+ # set the HTTP header `Accept`
+ if 'Accept' not in _header_params:
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'application/vnd.conekta-v2.2.0+json'
+ ]
+ )
+
+
+ # authentication setting
+ _auth_settings: List[str] = [
+ 'bearerAuth'
+ ]
+
+ return self.api_client.param_serialize(
+ method='POST',
+ resource_path='/customers/{customer_id}/subscriptions/{id}/resume',
+ path_params=_path_params,
+ query_params=_query_params,
+ header_params=_header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
+ auth_settings=_auth_settings,
+ collection_formats=_collection_formats,
+ _host=_host,
+ _request_auth=_request_auth
+ )
+
+
+
+
+ @validate_call
+ def subscription_update(
+ self,
+ customer_id: Annotated[StrictStr, Field(description="Identifier of the customer resource")],
+ id: Annotated[StrictStr, Field(description="Identifier of the subscription resource")],
+ subscription_update_request: Annotated[SubscriptionUpdateRequest, Field(description="requested field for update a subscription")],
+ accept_language: Annotated[Optional[StrictStr], Field(description="Use for knowing which language to use")] = None,
+ x_child_company_id: Annotated[Optional[StrictStr], Field(description="In the case of a holding company, the company id of the child company to which will process the request.")] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> SubscriptionResponse:
+ """Update Subscription
+
+ Update a specific subscription
+
+ :param customer_id: Identifier of the customer resource (required)
+ :type customer_id: str
+ :param id: Identifier of the subscription resource (required)
+ :type id: str
+ :param subscription_update_request: requested field for update a subscription (required)
+ :type subscription_update_request: SubscriptionUpdateRequest
+ :param accept_language: Use for knowing which language to use
+ :type accept_language: str
+ :param x_child_company_id: In the case of a holding company, the company id of the child company to which will process the request.
+ :type x_child_company_id: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._subscription_update_serialize(
+ customer_id=customer_id,
+ id=id,
+ subscription_update_request=subscription_update_request,
+ accept_language=accept_language,
+ x_child_company_id=x_child_company_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "SubscriptionResponse",
+ '422': "Error",
+ '401': "Error",
+ '404': "Error",
+ '500': "Error",
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ ).data
+
+
+ @validate_call
+ def subscription_update_with_http_info(
+ self,
+ customer_id: Annotated[StrictStr, Field(description="Identifier of the customer resource")],
+ id: Annotated[StrictStr, Field(description="Identifier of the subscription resource")],
+ subscription_update_request: Annotated[SubscriptionUpdateRequest, Field(description="requested field for update a subscription")],
+ accept_language: Annotated[Optional[StrictStr], Field(description="Use for knowing which language to use")] = None,
+ x_child_company_id: Annotated[Optional[StrictStr], Field(description="In the case of a holding company, the company id of the child company to which will process the request.")] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ApiResponse[SubscriptionResponse]:
+ """Update Subscription
+
+ Update a specific subscription
+
+ :param customer_id: Identifier of the customer resource (required)
+ :type customer_id: str
+ :param id: Identifier of the subscription resource (required)
+ :type id: str
+ :param subscription_update_request: requested field for update a subscription (required)
+ :type subscription_update_request: SubscriptionUpdateRequest
+ :param accept_language: Use for knowing which language to use
+ :type accept_language: str
+ :param x_child_company_id: In the case of a holding company, the company id of the child company to which will process the request.
+ :type x_child_company_id: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._subscription_update_serialize(
+ customer_id=customer_id,
+ id=id,
+ subscription_update_request=subscription_update_request,
+ accept_language=accept_language,
+ x_child_company_id=x_child_company_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "SubscriptionResponse",
+ '422': "Error",
+ '401': "Error",
+ '404': "Error",
+ '500': "Error",
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ )
+
+
+ @validate_call
+ def subscription_update_without_preload_content(
+ self,
+ customer_id: Annotated[StrictStr, Field(description="Identifier of the customer resource")],
+ id: Annotated[StrictStr, Field(description="Identifier of the subscription resource")],
+ subscription_update_request: Annotated[SubscriptionUpdateRequest, Field(description="requested field for update a subscription")],
+ accept_language: Annotated[Optional[StrictStr], Field(description="Use for knowing which language to use")] = None,
+ x_child_company_id: Annotated[Optional[StrictStr], Field(description="In the case of a holding company, the company id of the child company to which will process the request.")] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> RESTResponseType:
+ """Update Subscription
+
+ Update a specific subscription
+
+ :param customer_id: Identifier of the customer resource (required)
+ :type customer_id: str
+ :param id: Identifier of the subscription resource (required)
+ :type id: str
+ :param subscription_update_request: requested field for update a subscription (required)
+ :type subscription_update_request: SubscriptionUpdateRequest
+ :param accept_language: Use for knowing which language to use
+ :type accept_language: str
+ :param x_child_company_id: In the case of a holding company, the company id of the child company to which will process the request.
+ :type x_child_company_id: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._subscription_update_serialize(
+ customer_id=customer_id,
+ id=id,
+ subscription_update_request=subscription_update_request,
+ accept_language=accept_language,
+ x_child_company_id=x_child_company_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "SubscriptionResponse",
+ '422': "Error",
+ '401': "Error",
+ '404': "Error",
+ '500': "Error",
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _subscription_update_serialize(
+ self,
+ customer_id,
+ id,
+ subscription_update_request,
+ accept_language,
+ x_child_company_id,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> RequestSerialized:
+
+ _host = None
+
+ _collection_formats: Dict[str, str] = {
+ }
+
+ _path_params: Dict[str, str] = {}
+ _query_params: List[Tuple[str, str]] = []
+ _header_params: Dict[str, Optional[str]] = _headers or {}
+ _form_params: List[Tuple[str, str]] = []
+ _files: Dict[
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
+ ] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ if customer_id is not None:
+ _path_params['customer_id'] = customer_id
+ if id is not None:
+ _path_params['id'] = id
+ # process the query parameters
+ # process the header parameters
+ if accept_language is not None:
+ _header_params['Accept-Language'] = accept_language
+ if x_child_company_id is not None:
+ _header_params['X-Child-Company-Id'] = x_child_company_id
+ # process the form parameters
+ # process the body parameter
+ if subscription_update_request is not None:
+ _body_params = subscription_update_request
+
+
+ # set the HTTP header `Accept`
+ if 'Accept' not in _header_params:
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'application/vnd.conekta-v2.2.0+json'
+ ]
+ )
+
+ # set the HTTP header `Content-Type`
+ if _content_type:
+ _header_params['Content-Type'] = _content_type
+ else:
+ _default_content_type = (
+ self.api_client.select_header_content_type(
+ [
+ 'application/json'
+ ]
+ )
+ )
+ if _default_content_type is not None:
+ _header_params['Content-Type'] = _default_content_type
+
+ # authentication setting
+ _auth_settings: List[str] = [
+ 'bearerAuth'
+ ]
+
+ return self.api_client.param_serialize(
+ method='PUT',
+ resource_path='/customers/{customer_id}/subscriptions/{id}',
+ path_params=_path_params,
+ query_params=_query_params,
+ header_params=_header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
+ auth_settings=_auth_settings,
+ collection_formats=_collection_formats,
+ _host=_host,
+ _request_auth=_request_auth
+ )
+
+
+
+
+ @validate_call
+ def subscriptions_get(
+ self,
+ customer_id: Annotated[StrictStr, Field(description="Identifier of the customer resource")],
+ id: Annotated[StrictStr, Field(description="Identifier of the subscription resource")],
+ accept_language: Annotated[Optional[StrictStr], Field(description="Use for knowing which language to use")] = None,
+ x_child_company_id: Annotated[Optional[StrictStr], Field(description="In the case of a holding company, the company id of the child company to which will process the request.")] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> SubscriptionResponse:
+ """Get Subscription
+
+ Retrieve a specific subscription
+
+ :param customer_id: Identifier of the customer resource (required)
+ :type customer_id: str
+ :param id: Identifier of the subscription resource (required)
+ :type id: str
+ :param accept_language: Use for knowing which language to use
+ :type accept_language: str
+ :param x_child_company_id: In the case of a holding company, the company id of the child company to which will process the request.
+ :type x_child_company_id: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._subscriptions_get_serialize(
+ customer_id=customer_id,
+ id=id,
+ accept_language=accept_language,
+ x_child_company_id=x_child_company_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "SubscriptionResponse",
+ '401': "Error",
+ '404': "Error",
+ '500': "Error",
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ ).data
+
+
+ @validate_call
+ def subscriptions_get_with_http_info(
+ self,
+ customer_id: Annotated[StrictStr, Field(description="Identifier of the customer resource")],
+ id: Annotated[StrictStr, Field(description="Identifier of the subscription resource")],
+ accept_language: Annotated[Optional[StrictStr], Field(description="Use for knowing which language to use")] = None,
+ x_child_company_id: Annotated[Optional[StrictStr], Field(description="In the case of a holding company, the company id of the child company to which will process the request.")] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ApiResponse[SubscriptionResponse]:
+ """Get Subscription
+
+ Retrieve a specific subscription
+
+ :param customer_id: Identifier of the customer resource (required)
+ :type customer_id: str
+ :param id: Identifier of the subscription resource (required)
+ :type id: str
+ :param accept_language: Use for knowing which language to use
+ :type accept_language: str
+ :param x_child_company_id: In the case of a holding company, the company id of the child company to which will process the request.
+ :type x_child_company_id: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._subscriptions_get_serialize(
+ customer_id=customer_id,
+ id=id,
+ accept_language=accept_language,
+ x_child_company_id=x_child_company_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "SubscriptionResponse",
+ '401': "Error",
+ '404': "Error",
+ '500': "Error",
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ )
+
+
+ @validate_call
+ def subscriptions_get_without_preload_content(
+ self,
+ customer_id: Annotated[StrictStr, Field(description="Identifier of the customer resource")],
+ id: Annotated[StrictStr, Field(description="Identifier of the subscription resource")],
+ accept_language: Annotated[Optional[StrictStr], Field(description="Use for knowing which language to use")] = None,
+ x_child_company_id: Annotated[Optional[StrictStr], Field(description="In the case of a holding company, the company id of the child company to which will process the request.")] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> RESTResponseType:
+ """Get Subscription
+
+ Retrieve a specific subscription
+
+ :param customer_id: Identifier of the customer resource (required)
+ :type customer_id: str
+ :param id: Identifier of the subscription resource (required)
+ :type id: str
+ :param accept_language: Use for knowing which language to use
+ :type accept_language: str
+ :param x_child_company_id: In the case of a holding company, the company id of the child company to which will process the request.
+ :type x_child_company_id: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._subscriptions_get_serialize(
+ customer_id=customer_id,
+ id=id,
+ accept_language=accept_language,
+ x_child_company_id=x_child_company_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "SubscriptionResponse",
+ '401': "Error",
+ '404': "Error",
+ '500': "Error",
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _subscriptions_get_serialize(
+ self,
+ customer_id,
+ id,
+ accept_language,
+ x_child_company_id,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> RequestSerialized:
+
+ _host = None
+
+ _collection_formats: Dict[str, str] = {
+ }
+
+ _path_params: Dict[str, str] = {}
+ _query_params: List[Tuple[str, str]] = []
+ _header_params: Dict[str, Optional[str]] = _headers or {}
+ _form_params: List[Tuple[str, str]] = []
+ _files: Dict[
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
+ ] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ if customer_id is not None:
+ _path_params['customer_id'] = customer_id
+ if id is not None:
+ _path_params['id'] = id
+ # process the query parameters
+ # process the header parameters
+ if accept_language is not None:
+ _header_params['Accept-Language'] = accept_language
+ if x_child_company_id is not None:
+ _header_params['X-Child-Company-Id'] = x_child_company_id
+ # process the form parameters
+ # process the body parameter
+
+
+ # set the HTTP header `Accept`
+ if 'Accept' not in _header_params:
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'application/vnd.conekta-v2.2.0+json'
+ ]
+ )
+
+
+ # authentication setting
+ _auth_settings: List[str] = [
+ 'bearerAuth'
+ ]
+
+ return self.api_client.param_serialize(
+ method='GET',
+ resource_path='/customers/{customer_id}/subscriptions/{id}',
+ path_params=_path_params,
+ query_params=_query_params,
+ header_params=_header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
+ auth_settings=_auth_settings,
+ collection_formats=_collection_formats,
+ _host=_host,
+ _request_auth=_request_auth
+ )
+
+
+
+
+ @validate_call
+ def subscriptions_retry(
+ self,
+ customer_id: Annotated[StrictStr, Field(description="Identifier of the customer resource")],
+ id: Annotated[StrictStr, Field(description="Identifier of the subscription resource")],
+ accept_language: Annotated[Optional[StrictStr], Field(description="Use for knowing which language to use")] = None,
+ x_child_company_id: Annotated[Optional[StrictStr], Field(description="In the case of a holding company, the company id of the child company to which will process the request.")] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> SubscriptionResponse:
+ """Retry Failed Payment
+
+ Retry a failed payment for a specific subscription
+
+ :param customer_id: Identifier of the customer resource (required)
+ :type customer_id: str
+ :param id: Identifier of the subscription resource (required)
+ :type id: str
+ :param accept_language: Use for knowing which language to use
+ :type accept_language: str
+ :param x_child_company_id: In the case of a holding company, the company id of the child company to which will process the request.
+ :type x_child_company_id: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._subscriptions_retry_serialize(
+ customer_id=customer_id,
+ id=id,
+ accept_language=accept_language,
+ x_child_company_id=x_child_company_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "SubscriptionResponse",
+ '401': "Error",
+ '404': "Error",
+ '422': "Error",
+ '500': "Error",
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ ).data
+
+
+ @validate_call
+ def subscriptions_retry_with_http_info(
+ self,
+ customer_id: Annotated[StrictStr, Field(description="Identifier of the customer resource")],
+ id: Annotated[StrictStr, Field(description="Identifier of the subscription resource")],
+ accept_language: Annotated[Optional[StrictStr], Field(description="Use for knowing which language to use")] = None,
+ x_child_company_id: Annotated[Optional[StrictStr], Field(description="In the case of a holding company, the company id of the child company to which will process the request.")] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ApiResponse[SubscriptionResponse]:
+ """Retry Failed Payment
+
+ Retry a failed payment for a specific subscription
+
+ :param customer_id: Identifier of the customer resource (required)
+ :type customer_id: str
+ :param id: Identifier of the subscription resource (required)
+ :type id: str
+ :param accept_language: Use for knowing which language to use
+ :type accept_language: str
+ :param x_child_company_id: In the case of a holding company, the company id of the child company to which will process the request.
+ :type x_child_company_id: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._subscriptions_retry_serialize(
+ customer_id=customer_id,
+ id=id,
+ accept_language=accept_language,
+ x_child_company_id=x_child_company_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "SubscriptionResponse",
+ '401': "Error",
+ '404': "Error",
+ '422': "Error",
+ '500': "Error",
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ )
+
+
+ @validate_call
+ def subscriptions_retry_without_preload_content(
+ self,
+ customer_id: Annotated[StrictStr, Field(description="Identifier of the customer resource")],
+ id: Annotated[StrictStr, Field(description="Identifier of the subscription resource")],
+ accept_language: Annotated[Optional[StrictStr], Field(description="Use for knowing which language to use")] = None,
+ x_child_company_id: Annotated[Optional[StrictStr], Field(description="In the case of a holding company, the company id of the child company to which will process the request.")] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> RESTResponseType:
+ """Retry Failed Payment
+
+ Retry a failed payment for a specific subscription
+
+ :param customer_id: Identifier of the customer resource (required)
+ :type customer_id: str
+ :param id: Identifier of the subscription resource (required)
+ :type id: str
+ :param accept_language: Use for knowing which language to use
+ :type accept_language: str
+ :param x_child_company_id: In the case of a holding company, the company id of the child company to which will process the request.
+ :type x_child_company_id: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._subscriptions_retry_serialize(
+ customer_id=customer_id,
+ id=id,
+ accept_language=accept_language,
+ x_child_company_id=x_child_company_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "SubscriptionResponse",
+ '401': "Error",
+ '404': "Error",
+ '422': "Error",
+ '500': "Error",
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _subscriptions_retry_serialize(
+ self,
+ customer_id,
+ id,
+ accept_language,
+ x_child_company_id,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> RequestSerialized:
+
+ _host = None
+
+ _collection_formats: Dict[str, str] = {
+ }
+
+ _path_params: Dict[str, str] = {}
+ _query_params: List[Tuple[str, str]] = []
+ _header_params: Dict[str, Optional[str]] = _headers or {}
+ _form_params: List[Tuple[str, str]] = []
+ _files: Dict[
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
+ ] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ if customer_id is not None:
+ _path_params['customer_id'] = customer_id
+ if id is not None:
+ _path_params['id'] = id
+ # process the query parameters
+ # process the header parameters
+ if accept_language is not None:
+ _header_params['Accept-Language'] = accept_language
+ if x_child_company_id is not None:
+ _header_params['X-Child-Company-Id'] = x_child_company_id
+ # process the form parameters
+ # process the body parameter
+
+
+ # set the HTTP header `Accept`
+ if 'Accept' not in _header_params:
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'application/vnd.conekta-v2.2.0+json'
+ ]
+ )
+
+
+ # authentication setting
+ _auth_settings: List[str] = [
+ 'bearerAuth'
+ ]
+
+ return self.api_client.param_serialize(
+ method='POST',
+ resource_path='/customers/{customer_id}/subscriptions/{id}/retry',
+ path_params=_path_params,
+ query_params=_query_params,
+ header_params=_header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
+ auth_settings=_auth_settings,
+ collection_formats=_collection_formats,
+ _host=_host,
+ _request_auth=_request_auth
+ )
+
+
+
+
+ @validate_call
+ def update_subscription(
+ self,
+ id: Annotated[StrictStr, Field(description="Identifier of the resource")],
+ subscription_update_request: Annotated[SubscriptionUpdateRequest, Field(description="requested field for update a subscription")],
+ accept_language: Annotated[Optional[StrictStr], Field(description="Use for knowing which language to use")] = None,
+ x_child_company_id: Annotated[Optional[StrictStr], Field(description="In the case of a holding company, the company id of the child company to which will process the request.")] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> SubscriptionResponse:
+ """(Deprecated) Update Subscription [Deprecated]
+
+ DEPRECATED: This endpoint will be removed in version 2.3.0. You can modify the subscription to change the plans that your customers consume
+
+ :param id: Identifier of the resource (required)
+ :type id: str
+ :param subscription_update_request: requested field for update a subscription (required)
+ :type subscription_update_request: SubscriptionUpdateRequest
+ :param accept_language: Use for knowing which language to use
+ :type accept_language: str
+ :param x_child_company_id: In the case of a holding company, the company id of the child company to which will process the request.
+ :type x_child_company_id: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+ warnings.warn("PUT /customers/{id}/subscription is deprecated.", DeprecationWarning)
+
+ _param = self._update_subscription_serialize(
+ id=id,
+ subscription_update_request=subscription_update_request,
+ accept_language=accept_language,
+ x_child_company_id=x_child_company_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "SubscriptionResponse",
+ '422': "Error",
+ '401': "Error",
+ '404': "Error",
+ '500': "Error",
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ ).data
+
+
+ @validate_call
+ def update_subscription_with_http_info(
+ self,
+ id: Annotated[StrictStr, Field(description="Identifier of the resource")],
+ subscription_update_request: Annotated[SubscriptionUpdateRequest, Field(description="requested field for update a subscription")],
+ accept_language: Annotated[Optional[StrictStr], Field(description="Use for knowing which language to use")] = None,
+ x_child_company_id: Annotated[Optional[StrictStr], Field(description="In the case of a holding company, the company id of the child company to which will process the request.")] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ApiResponse[SubscriptionResponse]:
+ """(Deprecated) Update Subscription [Deprecated]
+
+ DEPRECATED: This endpoint will be removed in version 2.3.0. You can modify the subscription to change the plans that your customers consume
+
+ :param id: Identifier of the resource (required)
+ :type id: str
+ :param subscription_update_request: requested field for update a subscription (required)
+ :type subscription_update_request: SubscriptionUpdateRequest
+ :param accept_language: Use for knowing which language to use
+ :type accept_language: str
+ :param x_child_company_id: In the case of a holding company, the company id of the child company to which will process the request.
+ :type x_child_company_id: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+ warnings.warn("PUT /customers/{id}/subscription is deprecated.", DeprecationWarning)
+
+ _param = self._update_subscription_serialize(
+ id=id,
+ subscription_update_request=subscription_update_request,
+ accept_language=accept_language,
+ x_child_company_id=x_child_company_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "SubscriptionResponse",
+ '422': "Error",
+ '401': "Error",
+ '404': "Error",
+ '500': "Error",
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ )
+
+
+ @validate_call
+ def update_subscription_without_preload_content(
+ self,
+ id: Annotated[StrictStr, Field(description="Identifier of the resource")],
+ subscription_update_request: Annotated[SubscriptionUpdateRequest, Field(description="requested field for update a subscription")],
+ accept_language: Annotated[Optional[StrictStr], Field(description="Use for knowing which language to use")] = None,
+ x_child_company_id: Annotated[Optional[StrictStr], Field(description="In the case of a holding company, the company id of the child company to which will process the request.")] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> RESTResponseType:
+ """(Deprecated) Update Subscription [Deprecated]
- You can modify the subscription to change the plans that your customers consume
+ DEPRECATED: This endpoint will be removed in version 2.3.0. You can modify the subscription to change the plans that your customers consume
:param id: Identifier of the resource (required)
:type id: str
@@ -2090,6 +5119,7 @@ def update_subscription_without_preload_content(
:type _host_index: int, optional
:return: Returns the result object.
""" # noqa: E501
+ warnings.warn("PUT /customers/{id}/subscription is deprecated.", DeprecationWarning)
_param = self._update_subscription_serialize(
id=id,
@@ -2161,7 +5191,7 @@ def _update_subscription_serialize(
if 'Accept' not in _header_params:
_header_params['Accept'] = self.api_client.select_header_accept(
[
- 'application/vnd.conekta-v2.1.0+json'
+ 'application/vnd.conekta-v2.2.0+json'
]
)
diff --git a/conekta/api/taxes_api.py b/conekta/api/taxes_api.py
index 2849a9d..ae1aab6 100644
--- a/conekta/api/taxes_api.py
+++ b/conekta/api/taxes_api.py
@@ -5,7 +5,7 @@
Conekta sdk
- The version of the OpenAPI document: 2.1.0
+ The version of the OpenAPI document: 2.2.0
Contact: engineering@conekta.com
Generated by OpenAPI Generator (https://openapi-generator.tech)
@@ -329,7 +329,7 @@ def _orders_create_taxes_serialize(
if 'Accept' not in _header_params:
_header_params['Accept'] = self.api_client.select_header_accept(
[
- 'application/vnd.conekta-v2.1.0+json'
+ 'application/vnd.conekta-v2.2.0+json'
]
)
@@ -660,7 +660,7 @@ def _orders_delete_taxes_serialize(
if 'Accept' not in _header_params:
_header_params['Accept'] = self.api_client.select_header_accept(
[
- 'application/vnd.conekta-v2.1.0+json'
+ 'application/vnd.conekta-v2.2.0+json'
]
)
@@ -993,7 +993,7 @@ def _orders_update_taxes_serialize(
if 'Accept' not in _header_params:
_header_params['Accept'] = self.api_client.select_header_accept(
[
- 'application/vnd.conekta-v2.1.0+json'
+ 'application/vnd.conekta-v2.2.0+json'
]
)
diff --git a/conekta/api/tokens_api.py b/conekta/api/tokens_api.py
index 2950215..d0ee3e1 100644
--- a/conekta/api/tokens_api.py
+++ b/conekta/api/tokens_api.py
@@ -5,7 +5,7 @@
Conekta sdk
- The version of the OpenAPI document: 2.1.0
+ The version of the OpenAPI document: 2.2.0
Contact: engineering@conekta.com
Generated by OpenAPI Generator (https://openapi-generator.tech)
@@ -298,7 +298,7 @@ def _create_token_serialize(
if 'Accept' not in _header_params:
_header_params['Accept'] = self.api_client.select_header_accept(
[
- 'application/vnd.conekta-v2.1.0+json'
+ 'application/vnd.conekta-v2.2.0+json'
]
)
diff --git a/conekta/api/transactions_api.py b/conekta/api/transactions_api.py
index 422f3d9..54c5c51 100644
--- a/conekta/api/transactions_api.py
+++ b/conekta/api/transactions_api.py
@@ -5,7 +5,7 @@
Conekta sdk
- The version of the OpenAPI document: 2.1.0
+ The version of the OpenAPI document: 2.2.0
Contact: engineering@conekta.com
Generated by OpenAPI Generator (https://openapi-generator.tech)
@@ -313,7 +313,7 @@ def _get_transaction_serialize(
if 'Accept' not in _header_params:
_header_params['Accept'] = self.api_client.select_header_accept(
[
- 'application/vnd.conekta-v2.1.0+json'
+ 'application/vnd.conekta-v2.2.0+json'
]
)
@@ -714,7 +714,7 @@ def _get_transactions_serialize(
if 'Accept' not in _header_params:
_header_params['Accept'] = self.api_client.select_header_accept(
[
- 'application/vnd.conekta-v2.1.0+json'
+ 'application/vnd.conekta-v2.2.0+json'
]
)
diff --git a/conekta/api/transfers_api.py b/conekta/api/transfers_api.py
index 1f769b1..163bd3d 100644
--- a/conekta/api/transfers_api.py
+++ b/conekta/api/transfers_api.py
@@ -5,7 +5,7 @@
Conekta sdk
- The version of the OpenAPI document: 2.1.0
+ The version of the OpenAPI document: 2.2.0
Contact: engineering@conekta.com
Generated by OpenAPI Generator (https://openapi-generator.tech)
@@ -313,7 +313,7 @@ def _get_transfer_serialize(
if 'Accept' not in _header_params:
_header_params['Accept'] = self.api_client.select_header_accept(
[
- 'application/vnd.conekta-v2.1.0+json'
+ 'application/vnd.conekta-v2.2.0+json'
]
)
@@ -663,7 +663,7 @@ def _get_transfers_serialize(
if 'Accept' not in _header_params:
_header_params['Accept'] = self.api_client.select_header_accept(
[
- 'application/vnd.conekta-v2.1.0+json'
+ 'application/vnd.conekta-v2.2.0+json'
]
)
diff --git a/conekta/api/webhook_keys_api.py b/conekta/api/webhook_keys_api.py
index a51ea1f..50d4cf3 100644
--- a/conekta/api/webhook_keys_api.py
+++ b/conekta/api/webhook_keys_api.py
@@ -5,7 +5,7 @@
Conekta sdk
- The version of the OpenAPI document: 2.1.0
+ The version of the OpenAPI document: 2.2.0
Contact: engineering@conekta.com
Generated by OpenAPI Generator (https://openapi-generator.tech)
@@ -299,7 +299,7 @@ def _create_webhook_key_serialize(
if 'Accept' not in _header_params:
_header_params['Accept'] = self.api_client.select_header_accept(
[
- 'application/vnd.conekta-v2.1.0+json'
+ 'application/vnd.conekta-v2.2.0+json'
]
)
@@ -594,7 +594,7 @@ def _delete_webhook_key_serialize(
if 'Accept' not in _header_params:
_header_params['Accept'] = self.api_client.select_header_accept(
[
- 'application/vnd.conekta-v2.1.0+json'
+ 'application/vnd.conekta-v2.2.0+json'
]
)
@@ -891,7 +891,7 @@ def _get_webhook_key_serialize(
if 'Accept' not in _header_params:
_header_params['Accept'] = self.api_client.select_header_accept(
[
- 'application/vnd.conekta-v2.1.0+json'
+ 'application/vnd.conekta-v2.2.0+json'
]
)
@@ -1241,7 +1241,7 @@ def _get_webhook_keys_serialize(
if 'Accept' not in _header_params:
_header_params['Accept'] = self.api_client.select_header_accept(
[
- 'application/vnd.conekta-v2.1.0+json'
+ 'application/vnd.conekta-v2.2.0+json'
]
)
@@ -1541,7 +1541,7 @@ def _update_webhook_key_serialize(
if 'Accept' not in _header_params:
_header_params['Accept'] = self.api_client.select_header_accept(
[
- 'application/vnd.conekta-v2.1.0+json'
+ 'application/vnd.conekta-v2.2.0+json'
]
)
diff --git a/conekta/api/webhooks_api.py b/conekta/api/webhooks_api.py
index 5cdc9db..a6632b6 100644
--- a/conekta/api/webhooks_api.py
+++ b/conekta/api/webhooks_api.py
@@ -5,7 +5,7 @@
Conekta sdk
- The version of the OpenAPI document: 2.1.0
+ The version of the OpenAPI document: 2.2.0
Contact: engineering@conekta.com
Generated by OpenAPI Generator (https://openapi-generator.tech)
@@ -297,7 +297,7 @@ def _create_webhook_serialize(
if 'Accept' not in _header_params:
_header_params['Accept'] = self.api_client.select_header_accept(
[
- 'application/vnd.conekta-v2.1.0+json'
+ 'application/vnd.conekta-v2.2.0+json'
]
)
@@ -592,7 +592,7 @@ def _delete_webhook_serialize(
if 'Accept' not in _header_params:
_header_params['Accept'] = self.api_client.select_header_accept(
[
- 'application/vnd.conekta-v2.1.0+json'
+ 'application/vnd.conekta-v2.2.0+json'
]
)
@@ -889,7 +889,7 @@ def _get_webhook_serialize(
if 'Accept' not in _header_params:
_header_params['Accept'] = self.api_client.select_header_accept(
[
- 'application/vnd.conekta-v2.1.0+json'
+ 'application/vnd.conekta-v2.2.0+json'
]
)
@@ -1256,7 +1256,7 @@ def _get_webhooks_serialize(
if 'Accept' not in _header_params:
_header_params['Accept'] = self.api_client.select_header_accept(
[
- 'application/vnd.conekta-v2.1.0+json'
+ 'application/vnd.conekta-v2.2.0+json'
]
)
@@ -1541,7 +1541,7 @@ def _test_webhook_serialize(
if 'Accept' not in _header_params:
_header_params['Accept'] = self.api_client.select_header_accept(
[
- 'application/vnd.conekta-v2.1.0+json'
+ 'application/vnd.conekta-v2.2.0+json'
]
)
@@ -1856,7 +1856,7 @@ def _update_webhook_serialize(
if 'Accept' not in _header_params:
_header_params['Accept'] = self.api_client.select_header_accept(
[
- 'application/vnd.conekta-v2.1.0+json'
+ 'application/vnd.conekta-v2.2.0+json'
]
)
diff --git a/conekta/api_client.py b/conekta/api_client.py
index 0ffb2d2..fdcac75 100644
--- a/conekta/api_client.py
+++ b/conekta/api_client.py
@@ -5,7 +5,7 @@
Conekta sdk
- The version of the OpenAPI document: 2.1.0
+ The version of the OpenAPI document: 2.2.0
Contact: engineering@conekta.com
Generated by OpenAPI Generator (https://openapi-generator.tech)
diff --git a/conekta/configuration.py b/conekta/configuration.py
index 71e93a0..72fdcd5 100644
--- a/conekta/configuration.py
+++ b/conekta/configuration.py
@@ -5,7 +5,7 @@
Conekta sdk
- The version of the OpenAPI document: 2.1.0
+ The version of the OpenAPI document: 2.2.0
Contact: engineering@conekta.com
Generated by OpenAPI Generator (https://openapi-generator.tech)
@@ -392,7 +392,7 @@ def to_debug_report(self):
return "Python SDK Debug Report:\n"\
"OS: {env}\n"\
"Python Version: {pyversion}\n"\
- "Version of the API: 2.1.0\n"\
+ "Version of the API: 2.2.0\n"\
"SDK Package Version: 6.0.4".\
format(env=sys.platform, pyversion=sys.version)
diff --git a/conekta/exceptions.py b/conekta/exceptions.py
index 26a42df..11e3dfb 100644
--- a/conekta/exceptions.py
+++ b/conekta/exceptions.py
@@ -5,7 +5,7 @@
Conekta sdk
- The version of the OpenAPI document: 2.1.0
+ The version of the OpenAPI document: 2.2.0
Contact: engineering@conekta.com
Generated by OpenAPI Generator (https://openapi-generator.tech)
diff --git a/conekta/models/__init__.py b/conekta/models/__init__.py
index d887153..ab06e47 100644
--- a/conekta/models/__init__.py
+++ b/conekta/models/__init__.py
@@ -6,7 +6,7 @@
Conekta sdk
- The version of the OpenAPI document: 2.1.0
+ The version of the OpenAPI document: 2.2.0
Contact: engineering@conekta.com
Generated by OpenAPI Generator (https://openapi-generator.tech)
@@ -104,8 +104,11 @@
from conekta.models.logs_response import LogsResponse
from conekta.models.logs_response_data import LogsResponseData
from conekta.models.order_capture_request import OrderCaptureRequest
+from conekta.models.order_channel_response import OrderChannelResponse
+from conekta.models.order_charges_response import OrderChargesResponse
from conekta.models.order_customer_info_response import OrderCustomerInfoResponse
from conekta.models.order_discount_lines_request import OrderDiscountLinesRequest
+from conekta.models.order_discount_lines_response import OrderDiscountLinesResponse
from conekta.models.order_fiscal_entity_address_response import OrderFiscalEntityAddressResponse
from conekta.models.order_fiscal_entity_request import OrderFiscalEntityRequest
from conekta.models.order_fiscal_entity_response import OrderFiscalEntityResponse
@@ -115,10 +118,8 @@
from conekta.models.order_request import OrderRequest
from conekta.models.order_request_customer_info import OrderRequestCustomerInfo
from conekta.models.order_response import OrderResponse
-from conekta.models.order_response_charges import OrderResponseCharges
from conekta.models.order_response_checkout import OrderResponseCheckout
from conekta.models.order_response_customer_info import OrderResponseCustomerInfo
-from conekta.models.order_response_discount_lines import OrderResponseDiscountLines
from conekta.models.order_response_products import OrderResponseProducts
from conekta.models.order_response_shipping_contact import OrderResponseShippingContact
from conekta.models.order_tax_request import OrderTaxRequest
@@ -130,12 +131,15 @@
from conekta.models.pagination import Pagination
from conekta.models.payment_method import PaymentMethod
from conekta.models.payment_method_bank_transfer import PaymentMethodBankTransfer
+from conekta.models.payment_method_bnpl_payment import PaymentMethodBnplPayment
+from conekta.models.payment_method_bnpl_request import PaymentMethodBnplRequest
from conekta.models.payment_method_card import PaymentMethodCard
from conekta.models.payment_method_card_request import PaymentMethodCardRequest
from conekta.models.payment_method_card_response import PaymentMethodCardResponse
from conekta.models.payment_method_cash import PaymentMethodCash
from conekta.models.payment_method_cash_request import PaymentMethodCashRequest
from conekta.models.payment_method_cash_response import PaymentMethodCashResponse
+from conekta.models.payment_method_cash_response_all_of_agreements import PaymentMethodCashResponseAllOfAgreements
from conekta.models.payment_method_general_request import PaymentMethodGeneralRequest
from conekta.models.payment_method_response import PaymentMethodResponse
from conekta.models.payment_method_spei_recurrent import PaymentMethodSpeiRecurrent
@@ -154,6 +158,7 @@
from conekta.models.product import Product
from conekta.models.product_data_response import ProductDataResponse
from conekta.models.product_order_response import ProductOrderResponse
+from conekta.models.resend_request import ResendRequest
from conekta.models.risk_rules_data import RiskRulesData
from conekta.models.risk_rules_list import RiskRulesList
from conekta.models.shipping_order_response import ShippingOrderResponse
diff --git a/conekta/models/api_key_create_response.py b/conekta/models/api_key_create_response.py
index e2ece0e..8b0c239 100644
--- a/conekta/models/api_key_create_response.py
+++ b/conekta/models/api_key_create_response.py
@@ -5,7 +5,7 @@
Conekta sdk
- The version of the OpenAPI document: 2.1.0
+ The version of the OpenAPI document: 2.2.0
Contact: engineering@conekta.com
Generated by OpenAPI Generator (https://openapi-generator.tech)
@@ -31,15 +31,15 @@ class ApiKeyCreateResponse(BaseModel):
created_at: Optional[StrictInt] = Field(default=None, description="Unix timestamp in seconds of when the api key was created")
updated_at: Optional[StrictInt] = Field(default=None, description="Unix timestamp in seconds of when the api key was last updated")
deactivated_at: Optional[StrictInt] = Field(default=None, description="Unix timestamp in seconds of when the api key was deleted")
+ last_used_at: Optional[StrictInt] = Field(default=None, description="Unix timestamp in seconds with the api key was used")
description: Optional[StrictStr] = Field(default=None, description="A name or brief explanation of what this api key is used for")
id: Optional[StrictStr] = Field(default=None, description="Unique identifier of the api key")
livemode: Optional[StrictBool] = Field(default=None, description="Indicates if the api key is in production")
- deleted: Optional[StrictBool] = Field(default=None, description="Indicates if the api key was deleted")
object: Optional[StrictStr] = Field(default=None, description="Object name, value is 'api_key'")
prefix: Optional[StrictStr] = Field(default=None, description="The first few characters of the authentication_token")
role: Optional[StrictStr] = Field(default=None, description="Indicates if the api key is private or public")
authentication_token: Optional[StrictStr] = Field(default=None, description="It is occupied as a user when authenticated with basic authentication, with a blank password. This value will only appear once, in the request to create a new key. Copy and save it in a safe place.")
- __properties: ClassVar[List[str]] = ["active", "created_at", "updated_at", "deactivated_at", "description", "id", "livemode", "deleted", "object", "prefix", "role", "authentication_token"]
+ __properties: ClassVar[List[str]] = ["active", "created_at", "updated_at", "deactivated_at", "last_used_at", "description", "id", "livemode", "object", "prefix", "role", "authentication_token"]
model_config = ConfigDict(
populate_by_name=True,
@@ -85,6 +85,11 @@ def to_dict(self) -> Dict[str, Any]:
if self.deactivated_at is None and "deactivated_at" in self.model_fields_set:
_dict['deactivated_at'] = None
+ # set to None if last_used_at (nullable) is None
+ # and model_fields_set contains the field
+ if self.last_used_at is None and "last_used_at" in self.model_fields_set:
+ _dict['last_used_at'] = None
+
return _dict
@classmethod
@@ -101,10 +106,10 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
"created_at": obj.get("created_at"),
"updated_at": obj.get("updated_at"),
"deactivated_at": obj.get("deactivated_at"),
+ "last_used_at": obj.get("last_used_at"),
"description": obj.get("description"),
"id": obj.get("id"),
"livemode": obj.get("livemode"),
- "deleted": obj.get("deleted"),
"object": obj.get("object"),
"prefix": obj.get("prefix"),
"role": obj.get("role"),
diff --git a/conekta/models/api_key_request.py b/conekta/models/api_key_request.py
index 85df331..1aad549 100644
--- a/conekta/models/api_key_request.py
+++ b/conekta/models/api_key_request.py
@@ -5,7 +5,7 @@
Conekta sdk
- The version of the OpenAPI document: 2.1.0
+ The version of the OpenAPI document: 2.2.0
Contact: engineering@conekta.com
Generated by OpenAPI Generator (https://openapi-generator.tech)
diff --git a/conekta/models/api_key_response.py b/conekta/models/api_key_response.py
index 02a4341..547c285 100644
--- a/conekta/models/api_key_response.py
+++ b/conekta/models/api_key_response.py
@@ -5,7 +5,7 @@
Conekta sdk
- The version of the OpenAPI document: 2.1.0
+ The version of the OpenAPI document: 2.2.0
Contact: engineering@conekta.com
Generated by OpenAPI Generator (https://openapi-generator.tech)
@@ -31,14 +31,14 @@ class ApiKeyResponse(BaseModel):
created_at: Optional[StrictInt] = Field(default=None, description="Unix timestamp in seconds of when the api key was created")
updated_at: Optional[StrictInt] = Field(default=None, description="Unix timestamp in seconds of when the api key was last updated")
deactivated_at: Optional[StrictInt] = Field(default=None, description="Unix timestamp in seconds of when the api key was deleted")
+ last_used_at: Optional[StrictInt] = Field(default=None, description="Unix timestamp in seconds with the api key was used")
description: Optional[StrictStr] = Field(default=None, description="A name or brief explanation of what this api key is used for")
id: Optional[StrictStr] = Field(default=None, description="Unique identifier of the api key")
livemode: Optional[StrictBool] = Field(default=None, description="Indicates if the api key is in production")
- deleted: Optional[StrictBool] = Field(default=None, description="Indicates if the api key was deleted")
object: Optional[StrictStr] = Field(default=None, description="Object name, value is 'api_key'")
prefix: Optional[StrictStr] = Field(default=None, description="The first few characters of the authentication_token")
role: Optional[StrictStr] = Field(default=None, description="Indicates if the api key is private or public")
- __properties: ClassVar[List[str]] = ["active", "created_at", "updated_at", "deactivated_at", "description", "id", "livemode", "deleted", "object", "prefix", "role"]
+ __properties: ClassVar[List[str]] = ["active", "created_at", "updated_at", "deactivated_at", "last_used_at", "description", "id", "livemode", "object", "prefix", "role"]
model_config = ConfigDict(
populate_by_name=True,
@@ -84,6 +84,11 @@ def to_dict(self) -> Dict[str, Any]:
if self.deactivated_at is None and "deactivated_at" in self.model_fields_set:
_dict['deactivated_at'] = None
+ # set to None if last_used_at (nullable) is None
+ # and model_fields_set contains the field
+ if self.last_used_at is None and "last_used_at" in self.model_fields_set:
+ _dict['last_used_at'] = None
+
return _dict
@classmethod
@@ -100,10 +105,10 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
"created_at": obj.get("created_at"),
"updated_at": obj.get("updated_at"),
"deactivated_at": obj.get("deactivated_at"),
+ "last_used_at": obj.get("last_used_at"),
"description": obj.get("description"),
"id": obj.get("id"),
"livemode": obj.get("livemode"),
- "deleted": obj.get("deleted"),
"object": obj.get("object"),
"prefix": obj.get("prefix"),
"role": obj.get("role")
diff --git a/conekta/models/api_key_response_on_delete.py b/conekta/models/api_key_response_on_delete.py
index 16e021e..417d367 100644
--- a/conekta/models/api_key_response_on_delete.py
+++ b/conekta/models/api_key_response_on_delete.py
@@ -5,7 +5,7 @@
Conekta sdk
- The version of the OpenAPI document: 2.1.0
+ The version of the OpenAPI document: 2.2.0
Contact: engineering@conekta.com
Generated by OpenAPI Generator (https://openapi-generator.tech)
@@ -34,9 +34,9 @@ class ApiKeyResponseOnDelete(BaseModel):
prefix: Optional[StrictStr] = Field(default=None, description="The first few characters of the authentication_token")
id: Optional[StrictStr] = Field(default=None, description="Unique identifier of the api key")
object: Optional[StrictStr] = Field(default=None, description="Object name, value is 'api_key'")
- deleted: Optional[StrictBool] = Field(default=None, description="Indicates if the api key was deleted")
+ last_used_at: Optional[StrictInt] = Field(default=None, description="Unix timestamp in seconds with the api key was used")
role: Optional[StrictStr] = Field(default=None, description="Indicates if the api key is private or public")
- __properties: ClassVar[List[str]] = ["active", "created_at", "description", "livemode", "prefix", "id", "object", "deleted", "role"]
+ __properties: ClassVar[List[str]] = ["active", "created_at", "description", "livemode", "prefix", "id", "object", "last_used_at", "role"]
model_config = ConfigDict(
populate_by_name=True,
@@ -77,6 +77,11 @@ def to_dict(self) -> Dict[str, Any]:
exclude=excluded_fields,
exclude_none=True,
)
+ # set to None if last_used_at (nullable) is None
+ # and model_fields_set contains the field
+ if self.last_used_at is None and "last_used_at" in self.model_fields_set:
+ _dict['last_used_at'] = None
+
return _dict
@classmethod
@@ -96,7 +101,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
"prefix": obj.get("prefix"),
"id": obj.get("id"),
"object": obj.get("object"),
- "deleted": obj.get("deleted"),
+ "last_used_at": obj.get("last_used_at"),
"role": obj.get("role")
})
return _obj
diff --git a/conekta/models/api_key_update_request.py b/conekta/models/api_key_update_request.py
index 4f2840b..f5368bb 100644
--- a/conekta/models/api_key_update_request.py
+++ b/conekta/models/api_key_update_request.py
@@ -5,7 +5,7 @@
Conekta sdk
- The version of the OpenAPI document: 2.1.0
+ The version of the OpenAPI document: 2.2.0
Contact: engineering@conekta.com
Generated by OpenAPI Generator (https://openapi-generator.tech)
diff --git a/conekta/models/balance_common_field.py b/conekta/models/balance_common_field.py
index 99bf422..5ae5c88 100644
--- a/conekta/models/balance_common_field.py
+++ b/conekta/models/balance_common_field.py
@@ -5,7 +5,7 @@
Conekta sdk
- The version of the OpenAPI document: 2.1.0
+ The version of the OpenAPI document: 2.2.0
Contact: engineering@conekta.com
Generated by OpenAPI Generator (https://openapi-generator.tech)
diff --git a/conekta/models/balance_response.py b/conekta/models/balance_response.py
index 15ae447..cadc9d2 100644
--- a/conekta/models/balance_response.py
+++ b/conekta/models/balance_response.py
@@ -5,7 +5,7 @@
Conekta sdk
- The version of the OpenAPI document: 2.1.0
+ The version of the OpenAPI document: 2.2.0
Contact: engineering@conekta.com
Generated by OpenAPI Generator (https://openapi-generator.tech)
diff --git a/conekta/models/blacklist_rule_response.py b/conekta/models/blacklist_rule_response.py
index c233822..856a60b 100644
--- a/conekta/models/blacklist_rule_response.py
+++ b/conekta/models/blacklist_rule_response.py
@@ -5,7 +5,7 @@
Conekta sdk
- The version of the OpenAPI document: 2.1.0
+ The version of the OpenAPI document: 2.2.0
Contact: engineering@conekta.com
Generated by OpenAPI Generator (https://openapi-generator.tech)
diff --git a/conekta/models/charge_order_response.py b/conekta/models/charge_order_response.py
index cab229b..56c0f3a 100644
--- a/conekta/models/charge_order_response.py
+++ b/conekta/models/charge_order_response.py
@@ -5,7 +5,7 @@
Conekta sdk
- The version of the OpenAPI document: 2.1.0
+ The version of the OpenAPI document: 2.2.0
Contact: engineering@conekta.com
Generated by OpenAPI Generator (https://openapi-generator.tech)
diff --git a/conekta/models/charge_order_response_payment_method.py b/conekta/models/charge_order_response_payment_method.py
index 97f5bef..80202f0 100644
--- a/conekta/models/charge_order_response_payment_method.py
+++ b/conekta/models/charge_order_response_payment_method.py
@@ -5,7 +5,7 @@
Conekta sdk
- The version of the OpenAPI document: 2.1.0
+ The version of the OpenAPI document: 2.2.0
Contact: engineering@conekta.com
Generated by OpenAPI Generator (https://openapi-generator.tech)
@@ -19,13 +19,14 @@
from pydantic import BaseModel, ConfigDict, Field, StrictStr, ValidationError, field_validator
from typing import Any, List, Optional
from conekta.models.payment_method_bank_transfer import PaymentMethodBankTransfer
+from conekta.models.payment_method_bnpl_payment import PaymentMethodBnplPayment
from conekta.models.payment_method_card import PaymentMethodCard
from conekta.models.payment_method_cash import PaymentMethodCash
from pydantic import StrictStr, Field
from typing import Union, List, Set, Optional, Dict
from typing_extensions import Literal, Self
-CHARGEORDERRESPONSEPAYMENTMETHOD_ONE_OF_SCHEMAS = ["PaymentMethodBankTransfer", "PaymentMethodCard", "PaymentMethodCash"]
+CHARGEORDERRESPONSEPAYMENTMETHOD_ONE_OF_SCHEMAS = ["PaymentMethodBankTransfer", "PaymentMethodBnplPayment", "PaymentMethodCard", "PaymentMethodCash"]
class ChargeOrderResponsePaymentMethod(BaseModel):
"""
@@ -37,8 +38,10 @@ class ChargeOrderResponsePaymentMethod(BaseModel):
oneof_schema_2_validator: Optional[PaymentMethodCard] = None
# data type: PaymentMethodBankTransfer
oneof_schema_3_validator: Optional[PaymentMethodBankTransfer] = None
- actual_instance: Optional[Union[PaymentMethodBankTransfer, PaymentMethodCard, PaymentMethodCash]] = None
- one_of_schemas: Set[str] = { "PaymentMethodBankTransfer", "PaymentMethodCard", "PaymentMethodCash" }
+ # data type: PaymentMethodBnplPayment
+ oneof_schema_4_validator: Optional[PaymentMethodBnplPayment] = None
+ actual_instance: Optional[Union[PaymentMethodBankTransfer, PaymentMethodBnplPayment, PaymentMethodCard, PaymentMethodCash]] = None
+ one_of_schemas: Set[str] = { "PaymentMethodBankTransfer", "PaymentMethodBnplPayment", "PaymentMethodCard", "PaymentMethodCash" }
model_config = ConfigDict(
validate_assignment=True,
@@ -79,12 +82,17 @@ def actual_instance_must_validate_oneof(cls, v):
error_messages.append(f"Error! Input type `{type(v)}` is not `PaymentMethodBankTransfer`")
else:
match += 1
+ # validate data type: PaymentMethodBnplPayment
+ if not isinstance(v, PaymentMethodBnplPayment):
+ error_messages.append(f"Error! Input type `{type(v)}` is not `PaymentMethodBnplPayment`")
+ else:
+ match += 1
if match > 1:
# more than 1 match
- raise ValueError("Multiple matches found when setting `actual_instance` in ChargeOrderResponsePaymentMethod with oneOf schemas: PaymentMethodBankTransfer, PaymentMethodCard, PaymentMethodCash. Details: " + ", ".join(error_messages))
+ raise ValueError("Multiple matches found when setting `actual_instance` in ChargeOrderResponsePaymentMethod with oneOf schemas: PaymentMethodBankTransfer, PaymentMethodBnplPayment, PaymentMethodCard, PaymentMethodCash. Details: " + ", ".join(error_messages))
elif match == 0:
# no match
- raise ValueError("No match found when setting `actual_instance` in ChargeOrderResponsePaymentMethod with oneOf schemas: PaymentMethodBankTransfer, PaymentMethodCard, PaymentMethodCash. Details: " + ", ".join(error_messages))
+ raise ValueError("No match found when setting `actual_instance` in ChargeOrderResponsePaymentMethod with oneOf schemas: PaymentMethodBankTransfer, PaymentMethodBnplPayment, PaymentMethodCard, PaymentMethodCash. Details: " + ", ".join(error_messages))
else:
return v
@@ -109,6 +117,11 @@ def from_json(cls, json_str: str) -> Self:
instance.actual_instance = PaymentMethodBankTransfer.from_json(json_str)
return instance
+ # check if data type is `PaymentMethodBnplPayment`
+ if _data_type == "bnpl_payment":
+ instance.actual_instance = PaymentMethodBnplPayment.from_json(json_str)
+ return instance
+
# check if data type is `PaymentMethodCard`
if _data_type == "card_payment":
instance.actual_instance = PaymentMethodCard.from_json(json_str)
@@ -124,6 +137,11 @@ def from_json(cls, json_str: str) -> Self:
instance.actual_instance = PaymentMethodBankTransfer.from_json(json_str)
return instance
+ # check if data type is `PaymentMethodBnplPayment`
+ if _data_type == "payment_method_bnpl_payment":
+ instance.actual_instance = PaymentMethodBnplPayment.from_json(json_str)
+ return instance
+
# check if data type is `PaymentMethodCard`
if _data_type == "payment_method_card":
instance.actual_instance = PaymentMethodCard.from_json(json_str)
@@ -152,13 +170,19 @@ def from_json(cls, json_str: str) -> Self:
match += 1
except (ValidationError, ValueError) as e:
error_messages.append(str(e))
+ # deserialize data into PaymentMethodBnplPayment
+ try:
+ instance.actual_instance = PaymentMethodBnplPayment.from_json(json_str)
+ match += 1
+ except (ValidationError, ValueError) as e:
+ error_messages.append(str(e))
if match > 1:
# more than 1 match
- raise ValueError("Multiple matches found when deserializing the JSON string into ChargeOrderResponsePaymentMethod with oneOf schemas: PaymentMethodBankTransfer, PaymentMethodCard, PaymentMethodCash. Details: " + ", ".join(error_messages))
+ raise ValueError("Multiple matches found when deserializing the JSON string into ChargeOrderResponsePaymentMethod with oneOf schemas: PaymentMethodBankTransfer, PaymentMethodBnplPayment, PaymentMethodCard, PaymentMethodCash. Details: " + ", ".join(error_messages))
elif match == 0:
# no match
- raise ValueError("No match found when deserializing the JSON string into ChargeOrderResponsePaymentMethod with oneOf schemas: PaymentMethodBankTransfer, PaymentMethodCard, PaymentMethodCash. Details: " + ", ".join(error_messages))
+ raise ValueError("No match found when deserializing the JSON string into ChargeOrderResponsePaymentMethod with oneOf schemas: PaymentMethodBankTransfer, PaymentMethodBnplPayment, PaymentMethodCard, PaymentMethodCash. Details: " + ", ".join(error_messages))
else:
return instance
@@ -172,7 +196,7 @@ def to_json(self) -> str:
else:
return json.dumps(self.actual_instance)
- def to_dict(self) -> Optional[Union[Dict[str, Any], PaymentMethodBankTransfer, PaymentMethodCard, PaymentMethodCash]]:
+ def to_dict(self) -> Optional[Union[Dict[str, Any], PaymentMethodBankTransfer, PaymentMethodBnplPayment, PaymentMethodCard, PaymentMethodCash]]:
"""Returns the dict representation of the actual instance"""
if self.actual_instance is None:
return None
diff --git a/conekta/models/charge_request.py b/conekta/models/charge_request.py
index d906329..a295f35 100644
--- a/conekta/models/charge_request.py
+++ b/conekta/models/charge_request.py
@@ -5,7 +5,7 @@
Conekta sdk
- The version of the OpenAPI document: 2.1.0
+ The version of the OpenAPI document: 2.2.0
Contact: engineering@conekta.com
Generated by OpenAPI Generator (https://openapi-generator.tech)
diff --git a/conekta/models/charge_request_payment_method.py b/conekta/models/charge_request_payment_method.py
index a094522..7a0629a 100644
--- a/conekta/models/charge_request_payment_method.py
+++ b/conekta/models/charge_request_payment_method.py
@@ -5,7 +5,7 @@
Conekta sdk
- The version of the OpenAPI document: 2.1.0
+ The version of the OpenAPI document: 2.2.0
Contact: engineering@conekta.com
Generated by OpenAPI Generator (https://openapi-generator.tech)
@@ -18,24 +18,27 @@
import pprint
from pydantic import BaseModel, ConfigDict, Field, StrictStr, ValidationError, field_validator
from typing import Any, List, Optional
+from conekta.models.payment_method_bnpl_request import PaymentMethodBnplRequest
from conekta.models.payment_method_card_request import PaymentMethodCardRequest
from conekta.models.payment_method_general_request import PaymentMethodGeneralRequest
from pydantic import StrictStr, Field
from typing import Union, List, Set, Optional, Dict
from typing_extensions import Literal, Self
-CHARGEREQUESTPAYMENTMETHOD_ONE_OF_SCHEMAS = ["PaymentMethodCardRequest", "PaymentMethodGeneralRequest"]
+CHARGEREQUESTPAYMENTMETHOD_ONE_OF_SCHEMAS = ["PaymentMethodBnplRequest", "PaymentMethodCardRequest", "PaymentMethodGeneralRequest"]
class ChargeRequestPaymentMethod(BaseModel):
"""
ChargeRequestPaymentMethod
"""
+ # data type: PaymentMethodBnplRequest
+ oneof_schema_1_validator: Optional[PaymentMethodBnplRequest] = None
# data type: PaymentMethodCardRequest
- oneof_schema_1_validator: Optional[PaymentMethodCardRequest] = None
+ oneof_schema_2_validator: Optional[PaymentMethodCardRequest] = None
# data type: PaymentMethodGeneralRequest
- oneof_schema_2_validator: Optional[PaymentMethodGeneralRequest] = None
- actual_instance: Optional[Union[PaymentMethodCardRequest, PaymentMethodGeneralRequest]] = None
- one_of_schemas: Set[str] = { "PaymentMethodCardRequest", "PaymentMethodGeneralRequest" }
+ oneof_schema_3_validator: Optional[PaymentMethodGeneralRequest] = None
+ actual_instance: Optional[Union[PaymentMethodBnplRequest, PaymentMethodCardRequest, PaymentMethodGeneralRequest]] = None
+ one_of_schemas: Set[str] = { "PaymentMethodBnplRequest", "PaymentMethodCardRequest", "PaymentMethodGeneralRequest" }
model_config = ConfigDict(
validate_assignment=True,
@@ -58,6 +61,11 @@ def actual_instance_must_validate_oneof(cls, v):
instance = ChargeRequestPaymentMethod.model_construct()
error_messages = []
match = 0
+ # validate data type: PaymentMethodBnplRequest
+ if not isinstance(v, PaymentMethodBnplRequest):
+ error_messages.append(f"Error! Input type `{type(v)}` is not `PaymentMethodBnplRequest`")
+ else:
+ match += 1
# validate data type: PaymentMethodCardRequest
if not isinstance(v, PaymentMethodCardRequest):
error_messages.append(f"Error! Input type `{type(v)}` is not `PaymentMethodCardRequest`")
@@ -70,10 +78,10 @@ def actual_instance_must_validate_oneof(cls, v):
match += 1
if match > 1:
# more than 1 match
- raise ValueError("Multiple matches found when setting `actual_instance` in ChargeRequestPaymentMethod with oneOf schemas: PaymentMethodCardRequest, PaymentMethodGeneralRequest. Details: " + ", ".join(error_messages))
+ raise ValueError("Multiple matches found when setting `actual_instance` in ChargeRequestPaymentMethod with oneOf schemas: PaymentMethodBnplRequest, PaymentMethodCardRequest, PaymentMethodGeneralRequest. Details: " + ", ".join(error_messages))
elif match == 0:
# no match
- raise ValueError("No match found when setting `actual_instance` in ChargeRequestPaymentMethod with oneOf schemas: PaymentMethodCardRequest, PaymentMethodGeneralRequest. Details: " + ", ".join(error_messages))
+ raise ValueError("No match found when setting `actual_instance` in ChargeRequestPaymentMethod with oneOf schemas: PaymentMethodBnplRequest, PaymentMethodCardRequest, PaymentMethodGeneralRequest. Details: " + ", ".join(error_messages))
else:
return v
@@ -88,6 +96,12 @@ def from_json(cls, json_str: str) -> Self:
error_messages = []
match = 0
+ # deserialize data into PaymentMethodBnplRequest
+ try:
+ instance.actual_instance = PaymentMethodBnplRequest.from_json(json_str)
+ match += 1
+ except (ValidationError, ValueError) as e:
+ error_messages.append(str(e))
# deserialize data into PaymentMethodCardRequest
try:
instance.actual_instance = PaymentMethodCardRequest.from_json(json_str)
@@ -103,10 +117,10 @@ def from_json(cls, json_str: str) -> Self:
if match > 1:
# more than 1 match
- raise ValueError("Multiple matches found when deserializing the JSON string into ChargeRequestPaymentMethod with oneOf schemas: PaymentMethodCardRequest, PaymentMethodGeneralRequest. Details: " + ", ".join(error_messages))
+ raise ValueError("Multiple matches found when deserializing the JSON string into ChargeRequestPaymentMethod with oneOf schemas: PaymentMethodBnplRequest, PaymentMethodCardRequest, PaymentMethodGeneralRequest. Details: " + ", ".join(error_messages))
elif match == 0:
# no match
- raise ValueError("No match found when deserializing the JSON string into ChargeRequestPaymentMethod with oneOf schemas: PaymentMethodCardRequest, PaymentMethodGeneralRequest. Details: " + ", ".join(error_messages))
+ raise ValueError("No match found when deserializing the JSON string into ChargeRequestPaymentMethod with oneOf schemas: PaymentMethodBnplRequest, PaymentMethodCardRequest, PaymentMethodGeneralRequest. Details: " + ", ".join(error_messages))
else:
return instance
@@ -120,7 +134,7 @@ def to_json(self) -> str:
else:
return json.dumps(self.actual_instance)
- def to_dict(self) -> Optional[Union[Dict[str, Any], PaymentMethodCardRequest, PaymentMethodGeneralRequest]]:
+ def to_dict(self) -> Optional[Union[Dict[str, Any], PaymentMethodBnplRequest, PaymentMethodCardRequest, PaymentMethodGeneralRequest]]:
"""Returns the dict representation of the actual instance"""
if self.actual_instance is None:
return None
diff --git a/conekta/models/charge_response.py b/conekta/models/charge_response.py
index 3e5167e..056556a 100644
--- a/conekta/models/charge_response.py
+++ b/conekta/models/charge_response.py
@@ -5,7 +5,7 @@
Conekta sdk
- The version of the OpenAPI document: 2.1.0
+ The version of the OpenAPI document: 2.2.0
Contact: engineering@conekta.com
Generated by OpenAPI Generator (https://openapi-generator.tech)
@@ -30,24 +30,24 @@ class ChargeResponse(BaseModel):
"""
ChargeResponse
""" # noqa: E501
- amount: Optional[StrictInt] = None
+ amount: StrictInt
channel: Optional[ChargeResponseChannel] = None
- created_at: Optional[StrictInt] = None
- currency: Optional[StrictStr] = None
+ created_at: StrictInt
+ currency: StrictStr
customer_id: Optional[StrictStr] = None
description: Optional[StrictStr] = None
device_fingerprint: Optional[StrictStr] = None
failure_code: Optional[StrictStr] = None
failure_message: Optional[StrictStr] = None
- id: Optional[StrictStr] = Field(default=None, description="Charge ID")
- livemode: Optional[StrictBool] = Field(default=None, description="Whether the charge was made in live mode or not")
- object: Optional[StrictStr] = None
- order_id: Optional[StrictStr] = Field(default=None, description="Order ID")
+ id: StrictStr = Field(description="Charge ID")
+ livemode: StrictBool = Field(description="Whether the charge was made in live mode or not")
+ object: StrictStr
+ order_id: StrictStr = Field(description="Order ID")
paid_at: Optional[StrictInt] = Field(default=None, description="Payment date")
payment_method: Optional[ChargeResponsePaymentMethod] = None
reference_id: Optional[StrictStr] = Field(default=None, description="Reference ID of the charge")
refunds: Optional[ChargeResponseRefunds] = None
- status: Optional[StrictStr] = None
+ status: StrictStr = Field(description="Charge status")
__properties: ClassVar[List[str]] = ["amount", "channel", "created_at", "currency", "customer_id", "description", "device_fingerprint", "failure_code", "failure_message", "id", "livemode", "object", "order_id", "paid_at", "payment_method", "reference_id", "refunds", "status"]
model_config = ConfigDict(
diff --git a/conekta/models/charge_response_channel.py b/conekta/models/charge_response_channel.py
index 3af1b72..a13181c 100644
--- a/conekta/models/charge_response_channel.py
+++ b/conekta/models/charge_response_channel.py
@@ -5,7 +5,7 @@
Conekta sdk
- The version of the OpenAPI document: 2.1.0
+ The version of the OpenAPI document: 2.2.0
Contact: engineering@conekta.com
Generated by OpenAPI Generator (https://openapi-generator.tech)
diff --git a/conekta/models/charge_response_payment_method.py b/conekta/models/charge_response_payment_method.py
index 1bd339c..cb79a2f 100644
--- a/conekta/models/charge_response_payment_method.py
+++ b/conekta/models/charge_response_payment_method.py
@@ -5,7 +5,7 @@
Conekta sdk
- The version of the OpenAPI document: 2.1.0
+ The version of the OpenAPI document: 2.2.0
Contact: engineering@conekta.com
Generated by OpenAPI Generator (https://openapi-generator.tech)
@@ -19,13 +19,14 @@
from pydantic import BaseModel, ConfigDict, Field, StrictStr, ValidationError, field_validator
from typing import Any, List, Optional
from conekta.models.payment_method_bank_transfer import PaymentMethodBankTransfer
+from conekta.models.payment_method_bnpl_payment import PaymentMethodBnplPayment
from conekta.models.payment_method_card import PaymentMethodCard
from conekta.models.payment_method_cash import PaymentMethodCash
from pydantic import StrictStr, Field
from typing import Union, List, Set, Optional, Dict
from typing_extensions import Literal, Self
-CHARGERESPONSEPAYMENTMETHOD_ONE_OF_SCHEMAS = ["PaymentMethodBankTransfer", "PaymentMethodCard", "PaymentMethodCash"]
+CHARGERESPONSEPAYMENTMETHOD_ONE_OF_SCHEMAS = ["PaymentMethodBankTransfer", "PaymentMethodBnplPayment", "PaymentMethodCard", "PaymentMethodCash"]
class ChargeResponsePaymentMethod(BaseModel):
"""
@@ -37,8 +38,10 @@ class ChargeResponsePaymentMethod(BaseModel):
oneof_schema_2_validator: Optional[PaymentMethodCard] = None
# data type: PaymentMethodBankTransfer
oneof_schema_3_validator: Optional[PaymentMethodBankTransfer] = None
- actual_instance: Optional[Union[PaymentMethodBankTransfer, PaymentMethodCard, PaymentMethodCash]] = None
- one_of_schemas: Set[str] = { "PaymentMethodBankTransfer", "PaymentMethodCard", "PaymentMethodCash" }
+ # data type: PaymentMethodBnplPayment
+ oneof_schema_4_validator: Optional[PaymentMethodBnplPayment] = None
+ actual_instance: Optional[Union[PaymentMethodBankTransfer, PaymentMethodBnplPayment, PaymentMethodCard, PaymentMethodCash]] = None
+ one_of_schemas: Set[str] = { "PaymentMethodBankTransfer", "PaymentMethodBnplPayment", "PaymentMethodCard", "PaymentMethodCash" }
model_config = ConfigDict(
validate_assignment=True,
@@ -79,12 +82,17 @@ def actual_instance_must_validate_oneof(cls, v):
error_messages.append(f"Error! Input type `{type(v)}` is not `PaymentMethodBankTransfer`")
else:
match += 1
+ # validate data type: PaymentMethodBnplPayment
+ if not isinstance(v, PaymentMethodBnplPayment):
+ error_messages.append(f"Error! Input type `{type(v)}` is not `PaymentMethodBnplPayment`")
+ else:
+ match += 1
if match > 1:
# more than 1 match
- raise ValueError("Multiple matches found when setting `actual_instance` in ChargeResponsePaymentMethod with oneOf schemas: PaymentMethodBankTransfer, PaymentMethodCard, PaymentMethodCash. Details: " + ", ".join(error_messages))
+ raise ValueError("Multiple matches found when setting `actual_instance` in ChargeResponsePaymentMethod with oneOf schemas: PaymentMethodBankTransfer, PaymentMethodBnplPayment, PaymentMethodCard, PaymentMethodCash. Details: " + ", ".join(error_messages))
elif match == 0:
# no match
- raise ValueError("No match found when setting `actual_instance` in ChargeResponsePaymentMethod with oneOf schemas: PaymentMethodBankTransfer, PaymentMethodCard, PaymentMethodCash. Details: " + ", ".join(error_messages))
+ raise ValueError("No match found when setting `actual_instance` in ChargeResponsePaymentMethod with oneOf schemas: PaymentMethodBankTransfer, PaymentMethodBnplPayment, PaymentMethodCard, PaymentMethodCash. Details: " + ", ".join(error_messages))
else:
return v
@@ -109,6 +117,11 @@ def from_json(cls, json_str: str) -> Self:
instance.actual_instance = PaymentMethodBankTransfer.from_json(json_str)
return instance
+ # check if data type is `PaymentMethodBnplPayment`
+ if _data_type == "bnpl_payment":
+ instance.actual_instance = PaymentMethodBnplPayment.from_json(json_str)
+ return instance
+
# check if data type is `PaymentMethodCard`
if _data_type == "card_payment":
instance.actual_instance = PaymentMethodCard.from_json(json_str)
@@ -124,6 +137,11 @@ def from_json(cls, json_str: str) -> Self:
instance.actual_instance = PaymentMethodBankTransfer.from_json(json_str)
return instance
+ # check if data type is `PaymentMethodBnplPayment`
+ if _data_type == "payment_method_bnpl_payment":
+ instance.actual_instance = PaymentMethodBnplPayment.from_json(json_str)
+ return instance
+
# check if data type is `PaymentMethodCard`
if _data_type == "payment_method_card":
instance.actual_instance = PaymentMethodCard.from_json(json_str)
@@ -152,13 +170,19 @@ def from_json(cls, json_str: str) -> Self:
match += 1
except (ValidationError, ValueError) as e:
error_messages.append(str(e))
+ # deserialize data into PaymentMethodBnplPayment
+ try:
+ instance.actual_instance = PaymentMethodBnplPayment.from_json(json_str)
+ match += 1
+ except (ValidationError, ValueError) as e:
+ error_messages.append(str(e))
if match > 1:
# more than 1 match
- raise ValueError("Multiple matches found when deserializing the JSON string into ChargeResponsePaymentMethod with oneOf schemas: PaymentMethodBankTransfer, PaymentMethodCard, PaymentMethodCash. Details: " + ", ".join(error_messages))
+ raise ValueError("Multiple matches found when deserializing the JSON string into ChargeResponsePaymentMethod with oneOf schemas: PaymentMethodBankTransfer, PaymentMethodBnplPayment, PaymentMethodCard, PaymentMethodCash. Details: " + ", ".join(error_messages))
elif match == 0:
# no match
- raise ValueError("No match found when deserializing the JSON string into ChargeResponsePaymentMethod with oneOf schemas: PaymentMethodBankTransfer, PaymentMethodCard, PaymentMethodCash. Details: " + ", ".join(error_messages))
+ raise ValueError("No match found when deserializing the JSON string into ChargeResponsePaymentMethod with oneOf schemas: PaymentMethodBankTransfer, PaymentMethodBnplPayment, PaymentMethodCard, PaymentMethodCash. Details: " + ", ".join(error_messages))
else:
return instance
@@ -172,7 +196,7 @@ def to_json(self) -> str:
else:
return json.dumps(self.actual_instance)
- def to_dict(self) -> Optional[Union[Dict[str, Any], PaymentMethodBankTransfer, PaymentMethodCard, PaymentMethodCash]]:
+ def to_dict(self) -> Optional[Union[Dict[str, Any], PaymentMethodBankTransfer, PaymentMethodBnplPayment, PaymentMethodCard, PaymentMethodCash]]:
"""Returns the dict representation of the actual instance"""
if self.actual_instance is None:
return None
diff --git a/conekta/models/charge_response_refunds.py b/conekta/models/charge_response_refunds.py
index aa2fda9..41ed877 100644
--- a/conekta/models/charge_response_refunds.py
+++ b/conekta/models/charge_response_refunds.py
@@ -5,7 +5,7 @@
Conekta sdk
- The version of the OpenAPI document: 2.1.0
+ The version of the OpenAPI document: 2.2.0
Contact: engineering@conekta.com
Generated by OpenAPI Generator (https://openapi-generator.tech)
diff --git a/conekta/models/charge_response_refunds_data.py b/conekta/models/charge_response_refunds_data.py
index d512026..cfe2102 100644
--- a/conekta/models/charge_response_refunds_data.py
+++ b/conekta/models/charge_response_refunds_data.py
@@ -5,7 +5,7 @@
Conekta sdk
- The version of the OpenAPI document: 2.1.0
+ The version of the OpenAPI document: 2.2.0
Contact: engineering@conekta.com
Generated by OpenAPI Generator (https://openapi-generator.tech)
diff --git a/conekta/models/charge_update_request.py b/conekta/models/charge_update_request.py
index 73c6c01..97747d3 100644
--- a/conekta/models/charge_update_request.py
+++ b/conekta/models/charge_update_request.py
@@ -5,7 +5,7 @@
Conekta sdk
- The version of the OpenAPI document: 2.1.0
+ The version of the OpenAPI document: 2.2.0
Contact: engineering@conekta.com
Generated by OpenAPI Generator (https://openapi-generator.tech)
diff --git a/conekta/models/charges_data_response.py b/conekta/models/charges_data_response.py
index be3aa6d..cd1dc00 100644
--- a/conekta/models/charges_data_response.py
+++ b/conekta/models/charges_data_response.py
@@ -5,7 +5,7 @@
Conekta sdk
- The version of the OpenAPI document: 2.1.0
+ The version of the OpenAPI document: 2.2.0
Contact: engineering@conekta.com
Generated by OpenAPI Generator (https://openapi-generator.tech)
@@ -30,24 +30,24 @@ class ChargesDataResponse(BaseModel):
"""
ChargesDataResponse
""" # noqa: E501
- amount: Optional[StrictInt] = None
+ amount: StrictInt
channel: Optional[ChargeResponseChannel] = None
- created_at: Optional[StrictInt] = None
- currency: Optional[StrictStr] = None
+ created_at: StrictInt
+ currency: StrictStr
customer_id: Optional[StrictStr] = None
description: Optional[StrictStr] = None
device_fingerprint: Optional[StrictStr] = None
failure_code: Optional[StrictStr] = None
failure_message: Optional[StrictStr] = None
- id: Optional[StrictStr] = Field(default=None, description="Charge ID")
- livemode: Optional[StrictBool] = Field(default=None, description="Whether the charge was made in live mode or not")
- object: Optional[StrictStr] = None
- order_id: Optional[StrictStr] = Field(default=None, description="Order ID")
+ id: StrictStr = Field(description="Charge ID")
+ livemode: StrictBool = Field(description="Whether the charge was made in live mode or not")
+ object: StrictStr
+ order_id: StrictStr = Field(description="Order ID")
paid_at: Optional[StrictInt] = Field(default=None, description="Payment date")
payment_method: Optional[ChargeResponsePaymentMethod] = None
reference_id: Optional[StrictStr] = Field(default=None, description="Reference ID of the charge")
refunds: Optional[ChargeResponseRefunds] = None
- status: Optional[StrictStr] = None
+ status: StrictStr = Field(description="Charge status")
__properties: ClassVar[List[str]] = ["amount", "channel", "created_at", "currency", "customer_id", "description", "device_fingerprint", "failure_code", "failure_message", "id", "livemode", "object", "order_id", "paid_at", "payment_method", "reference_id", "refunds", "status"]
model_config = ConfigDict(
diff --git a/conekta/models/charges_order_response.py b/conekta/models/charges_order_response.py
index df5c93a..f5cac19 100644
--- a/conekta/models/charges_order_response.py
+++ b/conekta/models/charges_order_response.py
@@ -5,7 +5,7 @@
Conekta sdk
- The version of the OpenAPI document: 2.1.0
+ The version of the OpenAPI document: 2.2.0
Contact: engineering@conekta.com
Generated by OpenAPI Generator (https://openapi-generator.tech)
diff --git a/conekta/models/charges_order_response_all_of_data.py b/conekta/models/charges_order_response_all_of_data.py
index 53a2955..c82003e 100644
--- a/conekta/models/charges_order_response_all_of_data.py
+++ b/conekta/models/charges_order_response_all_of_data.py
@@ -5,7 +5,7 @@
Conekta sdk
- The version of the OpenAPI document: 2.1.0
+ The version of the OpenAPI document: 2.2.0
Contact: engineering@conekta.com
Generated by OpenAPI Generator (https://openapi-generator.tech)
@@ -30,24 +30,24 @@ class ChargesOrderResponseAllOfData(BaseModel):
"""
ChargesOrderResponseAllOfData
""" # noqa: E501
- amount: Optional[StrictInt] = None
+ amount: StrictInt
channel: Optional[ChargeResponseChannel] = None
- created_at: Optional[StrictInt] = None
- currency: Optional[StrictStr] = None
+ created_at: StrictInt
+ currency: StrictStr
customer_id: Optional[StrictStr] = None
description: Optional[StrictStr] = None
device_fingerprint: Optional[StrictStr] = None
failure_code: Optional[StrictStr] = None
failure_message: Optional[StrictStr] = None
- id: Optional[StrictStr] = Field(default=None, description="Charge ID")
- livemode: Optional[StrictBool] = Field(default=None, description="Whether the charge was made in live mode or not")
- object: Optional[StrictStr] = None
- order_id: Optional[StrictStr] = Field(default=None, description="Order ID")
+ id: StrictStr = Field(description="Charge ID")
+ livemode: StrictBool = Field(description="Whether the charge was made in live mode or not")
+ object: StrictStr
+ order_id: StrictStr = Field(description="Order ID")
paid_at: Optional[StrictInt] = Field(default=None, description="Payment date")
payment_method: Optional[ChargeResponsePaymentMethod] = None
reference_id: Optional[StrictStr] = Field(default=None, description="Reference ID of the charge")
refunds: Optional[ChargeResponseRefunds] = None
- status: Optional[StrictStr] = None
+ status: StrictStr = Field(description="Charge status")
__properties: ClassVar[List[str]] = ["amount", "channel", "created_at", "currency", "customer_id", "description", "device_fingerprint", "failure_code", "failure_message", "id", "livemode", "object", "order_id", "paid_at", "payment_method", "reference_id", "refunds", "status"]
model_config = ConfigDict(
diff --git a/conekta/models/checkout.py b/conekta/models/checkout.py
index 13f96cc..e3bcf55 100644
--- a/conekta/models/checkout.py
+++ b/conekta/models/checkout.py
@@ -5,7 +5,7 @@
Conekta sdk
- The version of the OpenAPI document: 2.1.0
+ The version of the OpenAPI document: 2.2.0
Contact: engineering@conekta.com
Generated by OpenAPI Generator (https://openapi-generator.tech)
diff --git a/conekta/models/checkout_order_template.py b/conekta/models/checkout_order_template.py
index fad831b..61fcd23 100644
--- a/conekta/models/checkout_order_template.py
+++ b/conekta/models/checkout_order_template.py
@@ -5,7 +5,7 @@
Conekta sdk
- The version of the OpenAPI document: 2.1.0
+ The version of the OpenAPI document: 2.2.0
Contact: engineering@conekta.com
Generated by OpenAPI Generator (https://openapi-generator.tech)
diff --git a/conekta/models/checkout_order_template_customer_info.py b/conekta/models/checkout_order_template_customer_info.py
index 1175ed8..801efe8 100644
--- a/conekta/models/checkout_order_template_customer_info.py
+++ b/conekta/models/checkout_order_template_customer_info.py
@@ -5,7 +5,7 @@
Conekta sdk
- The version of the OpenAPI document: 2.1.0
+ The version of the OpenAPI document: 2.2.0
Contact: engineering@conekta.com
Generated by OpenAPI Generator (https://openapi-generator.tech)
diff --git a/conekta/models/checkout_request.py b/conekta/models/checkout_request.py
index 412d687..89f8342 100644
--- a/conekta/models/checkout_request.py
+++ b/conekta/models/checkout_request.py
@@ -5,7 +5,7 @@
Conekta sdk
- The version of the OpenAPI document: 2.1.0
+ The version of the OpenAPI document: 2.2.0
Contact: engineering@conekta.com
Generated by OpenAPI Generator (https://openapi-generator.tech)
@@ -25,7 +25,7 @@
class CheckoutRequest(BaseModel):
"""
- [Checkout](https://developers.conekta.com/v2.1.0/reference/payment-link) details
+ [Checkout](https://developers.conekta.com/v2.2.0/reference/payment-link) details
""" # noqa: E501
allowed_payment_methods: List[StrictStr] = Field(description="Are the payment methods available for this link")
expires_at: Optional[StrictInt] = Field(default=None, description="Unix timestamp of checkout expiration")
diff --git a/conekta/models/checkout_response.py b/conekta/models/checkout_response.py
index 4b1240f..2d45f8f 100644
--- a/conekta/models/checkout_response.py
+++ b/conekta/models/checkout_response.py
@@ -5,7 +5,7 @@
Conekta sdk
- The version of the OpenAPI document: 2.1.0
+ The version of the OpenAPI document: 2.2.0
Contact: engineering@conekta.com
Generated by OpenAPI Generator (https://openapi-generator.tech)
@@ -27,7 +27,7 @@ class CheckoutResponse(BaseModel):
"""
checkout response
""" # noqa: E501
- allowed_payment_methods: Optional[List[StrictStr]] = None
+ allowed_payment_methods: Optional[List[StrictStr]] = Field(default=None, description="Are the payment methods available for this link")
can_not_expire: Optional[StrictBool] = None
emails_sent: Optional[StrictInt] = None
exclude_card_networks: Optional[List[Dict[str, Any]]] = None
diff --git a/conekta/models/checkouts_response.py b/conekta/models/checkouts_response.py
index 724ce22..0ba46c9 100644
--- a/conekta/models/checkouts_response.py
+++ b/conekta/models/checkouts_response.py
@@ -5,7 +5,7 @@
Conekta sdk
- The version of the OpenAPI document: 2.1.0
+ The version of the OpenAPI document: 2.2.0
Contact: engineering@conekta.com
Generated by OpenAPI Generator (https://openapi-generator.tech)
diff --git a/conekta/models/company_fiscal_info_address_response.py b/conekta/models/company_fiscal_info_address_response.py
index 6a4ee3d..0e3ac4c 100644
--- a/conekta/models/company_fiscal_info_address_response.py
+++ b/conekta/models/company_fiscal_info_address_response.py
@@ -5,7 +5,7 @@
Conekta sdk
- The version of the OpenAPI document: 2.1.0
+ The version of the OpenAPI document: 2.2.0
Contact: engineering@conekta.com
Generated by OpenAPI Generator (https://openapi-generator.tech)
diff --git a/conekta/models/company_fiscal_info_response.py b/conekta/models/company_fiscal_info_response.py
index 9c450db..6adc99e 100644
--- a/conekta/models/company_fiscal_info_response.py
+++ b/conekta/models/company_fiscal_info_response.py
@@ -5,7 +5,7 @@
Conekta sdk
- The version of the OpenAPI document: 2.1.0
+ The version of the OpenAPI document: 2.2.0
Contact: engineering@conekta.com
Generated by OpenAPI Generator (https://openapi-generator.tech)
diff --git a/conekta/models/company_payout_destination_response.py b/conekta/models/company_payout_destination_response.py
index 8746801..452003c 100644
--- a/conekta/models/company_payout_destination_response.py
+++ b/conekta/models/company_payout_destination_response.py
@@ -5,7 +5,7 @@
Conekta sdk
- The version of the OpenAPI document: 2.1.0
+ The version of the OpenAPI document: 2.2.0
Contact: engineering@conekta.com
Generated by OpenAPI Generator (https://openapi-generator.tech)
diff --git a/conekta/models/company_response.py b/conekta/models/company_response.py
index fa2ad18..9075fd9 100644
--- a/conekta/models/company_response.py
+++ b/conekta/models/company_response.py
@@ -5,7 +5,7 @@
Conekta sdk
- The version of the OpenAPI document: 2.1.0
+ The version of the OpenAPI document: 2.2.0
Contact: engineering@conekta.com
Generated by OpenAPI Generator (https://openapi-generator.tech)
diff --git a/conekta/models/create_customer_fiscal_entities_response.py b/conekta/models/create_customer_fiscal_entities_response.py
index 9d9e8cf..d4d518c 100644
--- a/conekta/models/create_customer_fiscal_entities_response.py
+++ b/conekta/models/create_customer_fiscal_entities_response.py
@@ -5,7 +5,7 @@
Conekta sdk
- The version of the OpenAPI document: 2.1.0
+ The version of the OpenAPI document: 2.2.0
Contact: engineering@conekta.com
Generated by OpenAPI Generator (https://openapi-generator.tech)
diff --git a/conekta/models/create_customer_payment_methods_request.py b/conekta/models/create_customer_payment_methods_request.py
index 3ccd743..1ce44ea 100644
--- a/conekta/models/create_customer_payment_methods_request.py
+++ b/conekta/models/create_customer_payment_methods_request.py
@@ -5,7 +5,7 @@
Conekta sdk
- The version of the OpenAPI document: 2.1.0
+ The version of the OpenAPI document: 2.2.0
Contact: engineering@conekta.com
Generated by OpenAPI Generator (https://openapi-generator.tech)
diff --git a/conekta/models/create_customer_payment_methods_response.py b/conekta/models/create_customer_payment_methods_response.py
index 53089f1..8ba2c21 100644
--- a/conekta/models/create_customer_payment_methods_response.py
+++ b/conekta/models/create_customer_payment_methods_response.py
@@ -5,7 +5,7 @@
Conekta sdk
- The version of the OpenAPI document: 2.1.0
+ The version of the OpenAPI document: 2.2.0
Contact: engineering@conekta.com
Generated by OpenAPI Generator (https://openapi-generator.tech)
@@ -114,6 +114,11 @@ def from_json(cls, json_str: str) -> Self:
instance.actual_instance = PaymentMethodCashResponse.from_json(json_str)
return instance
+ # check if data type is `PaymentMethodCashResponse`
+ if _data_type == "cash_recurrent":
+ instance.actual_instance = PaymentMethodCashResponse.from_json(json_str)
+ return instance
+
# check if data type is `PaymentMethodCashResponse`
if _data_type == "oxxo_recurrent":
instance.actual_instance = PaymentMethodCashResponse.from_json(json_str)
diff --git a/conekta/models/create_risk_rules_data.py b/conekta/models/create_risk_rules_data.py
index bca8b8b..29e0018 100644
--- a/conekta/models/create_risk_rules_data.py
+++ b/conekta/models/create_risk_rules_data.py
@@ -5,7 +5,7 @@
Conekta sdk
- The version of the OpenAPI document: 2.1.0
+ The version of the OpenAPI document: 2.2.0
Contact: engineering@conekta.com
Generated by OpenAPI Generator (https://openapi-generator.tech)
diff --git a/conekta/models/customer.py b/conekta/models/customer.py
index 48fca66..f82eaac 100644
--- a/conekta/models/customer.py
+++ b/conekta/models/customer.py
@@ -5,7 +5,7 @@
Conekta sdk
- The version of the OpenAPI document: 2.1.0
+ The version of the OpenAPI document: 2.2.0
Contact: engineering@conekta.com
Generated by OpenAPI Generator (https://openapi-generator.tech)
diff --git a/conekta/models/customer_address.py b/conekta/models/customer_address.py
index eeb6ccf..fcd1c1c 100644
--- a/conekta/models/customer_address.py
+++ b/conekta/models/customer_address.py
@@ -5,7 +5,7 @@
Conekta sdk
- The version of the OpenAPI document: 2.1.0
+ The version of the OpenAPI document: 2.2.0
Contact: engineering@conekta.com
Generated by OpenAPI Generator (https://openapi-generator.tech)
diff --git a/conekta/models/customer_antifraud_info.py b/conekta/models/customer_antifraud_info.py
index 7321303..fe8b611 100644
--- a/conekta/models/customer_antifraud_info.py
+++ b/conekta/models/customer_antifraud_info.py
@@ -5,7 +5,7 @@
Conekta sdk
- The version of the OpenAPI document: 2.1.0
+ The version of the OpenAPI document: 2.2.0
Contact: engineering@conekta.com
Generated by OpenAPI Generator (https://openapi-generator.tech)
diff --git a/conekta/models/customer_antifraud_info_response.py b/conekta/models/customer_antifraud_info_response.py
index 3874a69..e9b63a2 100644
--- a/conekta/models/customer_antifraud_info_response.py
+++ b/conekta/models/customer_antifraud_info_response.py
@@ -5,7 +5,7 @@
Conekta sdk
- The version of the OpenAPI document: 2.1.0
+ The version of the OpenAPI document: 2.2.0
Contact: engineering@conekta.com
Generated by OpenAPI Generator (https://openapi-generator.tech)
diff --git a/conekta/models/customer_fiscal_entities_data_response.py b/conekta/models/customer_fiscal_entities_data_response.py
index cd962e4..830e240 100644
--- a/conekta/models/customer_fiscal_entities_data_response.py
+++ b/conekta/models/customer_fiscal_entities_data_response.py
@@ -5,7 +5,7 @@
Conekta sdk
- The version of the OpenAPI document: 2.1.0
+ The version of the OpenAPI document: 2.2.0
Contact: engineering@conekta.com
Generated by OpenAPI Generator (https://openapi-generator.tech)
diff --git a/conekta/models/customer_fiscal_entities_request.py b/conekta/models/customer_fiscal_entities_request.py
index ff51474..9be9177 100644
--- a/conekta/models/customer_fiscal_entities_request.py
+++ b/conekta/models/customer_fiscal_entities_request.py
@@ -5,7 +5,7 @@
Conekta sdk
- The version of the OpenAPI document: 2.1.0
+ The version of the OpenAPI document: 2.2.0
Contact: engineering@conekta.com
Generated by OpenAPI Generator (https://openapi-generator.tech)
diff --git a/conekta/models/customer_fiscal_entities_response.py b/conekta/models/customer_fiscal_entities_response.py
index 2e0b4e7..2f567ae 100644
--- a/conekta/models/customer_fiscal_entities_response.py
+++ b/conekta/models/customer_fiscal_entities_response.py
@@ -5,7 +5,7 @@
Conekta sdk
- The version of the OpenAPI document: 2.1.0
+ The version of the OpenAPI document: 2.2.0
Contact: engineering@conekta.com
Generated by OpenAPI Generator (https://openapi-generator.tech)
diff --git a/conekta/models/customer_info.py b/conekta/models/customer_info.py
index e769c75..893be9e 100644
--- a/conekta/models/customer_info.py
+++ b/conekta/models/customer_info.py
@@ -5,7 +5,7 @@
Conekta sdk
- The version of the OpenAPI document: 2.1.0
+ The version of the OpenAPI document: 2.2.0
Contact: engineering@conekta.com
Generated by OpenAPI Generator (https://openapi-generator.tech)
diff --git a/conekta/models/customer_info_just_customer_id.py b/conekta/models/customer_info_just_customer_id.py
index f1f4822..71fe272 100644
--- a/conekta/models/customer_info_just_customer_id.py
+++ b/conekta/models/customer_info_just_customer_id.py
@@ -5,7 +5,7 @@
Conekta sdk
- The version of the OpenAPI document: 2.1.0
+ The version of the OpenAPI document: 2.2.0
Contact: engineering@conekta.com
Generated by OpenAPI Generator (https://openapi-generator.tech)
diff --git a/conekta/models/customer_info_just_customer_id_response.py b/conekta/models/customer_info_just_customer_id_response.py
index 156a909..638f676 100644
--- a/conekta/models/customer_info_just_customer_id_response.py
+++ b/conekta/models/customer_info_just_customer_id_response.py
@@ -5,7 +5,7 @@
Conekta sdk
- The version of the OpenAPI document: 2.1.0
+ The version of the OpenAPI document: 2.2.0
Contact: engineering@conekta.com
Generated by OpenAPI Generator (https://openapi-generator.tech)
diff --git a/conekta/models/customer_payment_method_request.py b/conekta/models/customer_payment_method_request.py
index 6889049..d4a7fcc 100644
--- a/conekta/models/customer_payment_method_request.py
+++ b/conekta/models/customer_payment_method_request.py
@@ -5,7 +5,7 @@
Conekta sdk
- The version of the OpenAPI document: 2.1.0
+ The version of the OpenAPI document: 2.2.0
Contact: engineering@conekta.com
Generated by OpenAPI Generator (https://openapi-generator.tech)
diff --git a/conekta/models/customer_payment_methods_data.py b/conekta/models/customer_payment_methods_data.py
index faca08a..e6ef912 100644
--- a/conekta/models/customer_payment_methods_data.py
+++ b/conekta/models/customer_payment_methods_data.py
@@ -5,7 +5,7 @@
Conekta sdk
- The version of the OpenAPI document: 2.1.0
+ The version of the OpenAPI document: 2.2.0
Contact: engineering@conekta.com
Generated by OpenAPI Generator (https://openapi-generator.tech)
@@ -114,6 +114,11 @@ def from_json(cls, json_str: str) -> Self:
instance.actual_instance = PaymentMethodCashResponse.from_json(json_str)
return instance
+ # check if data type is `PaymentMethodCashResponse`
+ if _data_type == "cash_recurrent":
+ instance.actual_instance = PaymentMethodCashResponse.from_json(json_str)
+ return instance
+
# check if data type is `PaymentMethodCashResponse`
if _data_type == "oxxo_recurrent":
instance.actual_instance = PaymentMethodCashResponse.from_json(json_str)
diff --git a/conekta/models/customer_payment_methods_request.py b/conekta/models/customer_payment_methods_request.py
index 56e793d..b449a5e 100644
--- a/conekta/models/customer_payment_methods_request.py
+++ b/conekta/models/customer_payment_methods_request.py
@@ -5,7 +5,7 @@
Conekta sdk
- The version of the OpenAPI document: 2.1.0
+ The version of the OpenAPI document: 2.2.0
Contact: engineering@conekta.com
Generated by OpenAPI Generator (https://openapi-generator.tech)
diff --git a/conekta/models/customer_payment_methods_response.py b/conekta/models/customer_payment_methods_response.py
index 64b8a8e..0a9195d 100644
--- a/conekta/models/customer_payment_methods_response.py
+++ b/conekta/models/customer_payment_methods_response.py
@@ -5,7 +5,7 @@
Conekta sdk
- The version of the OpenAPI document: 2.1.0
+ The version of the OpenAPI document: 2.2.0
Contact: engineering@conekta.com
Generated by OpenAPI Generator (https://openapi-generator.tech)
diff --git a/conekta/models/customer_response.py b/conekta/models/customer_response.py
index 60f356c..16f6c20 100644
--- a/conekta/models/customer_response.py
+++ b/conekta/models/customer_response.py
@@ -5,7 +5,7 @@
Conekta sdk
- The version of the OpenAPI document: 2.1.0
+ The version of the OpenAPI document: 2.2.0
Contact: engineering@conekta.com
Generated by OpenAPI Generator (https://openapi-generator.tech)
diff --git a/conekta/models/customer_response_shipping_contacts.py b/conekta/models/customer_response_shipping_contacts.py
index 780f3ee..9434587 100644
--- a/conekta/models/customer_response_shipping_contacts.py
+++ b/conekta/models/customer_response_shipping_contacts.py
@@ -5,7 +5,7 @@
Conekta sdk
- The version of the OpenAPI document: 2.1.0
+ The version of the OpenAPI document: 2.2.0
Contact: engineering@conekta.com
Generated by OpenAPI Generator (https://openapi-generator.tech)
diff --git a/conekta/models/customer_shipping_contacts.py b/conekta/models/customer_shipping_contacts.py
index bee6bd0..59b628b 100644
--- a/conekta/models/customer_shipping_contacts.py
+++ b/conekta/models/customer_shipping_contacts.py
@@ -5,7 +5,7 @@
Conekta sdk
- The version of the OpenAPI document: 2.1.0
+ The version of the OpenAPI document: 2.2.0
Contact: engineering@conekta.com
Generated by OpenAPI Generator (https://openapi-generator.tech)
@@ -26,7 +26,7 @@
class CustomerShippingContacts(BaseModel):
"""
- [Shipping](https://developers.conekta.com/v2.1.0/reference/createcustomershippingcontacts) details, required in case of sending a shipping. If we do not receive a shipping_contact on the order, the default shipping_contact of the customer will be used.
+ [Shipping](https://developers.conekta.com/v2.2.0/reference/createcustomershippingcontacts) details, required in case of sending a shipping. If we do not receive a shipping_contact on the order, the default shipping_contact of the customer will be used.
""" # noqa: E501
phone: Optional[StrictStr] = Field(default=None, description="Phone contact")
receiver: Optional[StrictStr] = Field(default=None, description="Name of the person who will receive the order")
diff --git a/conekta/models/customer_shipping_contacts_address.py b/conekta/models/customer_shipping_contacts_address.py
index 7999c3c..c02af66 100644
--- a/conekta/models/customer_shipping_contacts_address.py
+++ b/conekta/models/customer_shipping_contacts_address.py
@@ -5,7 +5,7 @@
Conekta sdk
- The version of the OpenAPI document: 2.1.0
+ The version of the OpenAPI document: 2.2.0
Contact: engineering@conekta.com
Generated by OpenAPI Generator (https://openapi-generator.tech)
diff --git a/conekta/models/customer_shipping_contacts_data_response.py b/conekta/models/customer_shipping_contacts_data_response.py
index 4deffe7..69e625d 100644
--- a/conekta/models/customer_shipping_contacts_data_response.py
+++ b/conekta/models/customer_shipping_contacts_data_response.py
@@ -5,7 +5,7 @@
Conekta sdk
- The version of the OpenAPI document: 2.1.0
+ The version of the OpenAPI document: 2.2.0
Contact: engineering@conekta.com
Generated by OpenAPI Generator (https://openapi-generator.tech)
diff --git a/conekta/models/customer_shipping_contacts_response.py b/conekta/models/customer_shipping_contacts_response.py
index 0dd4c63..fa644f9 100644
--- a/conekta/models/customer_shipping_contacts_response.py
+++ b/conekta/models/customer_shipping_contacts_response.py
@@ -5,7 +5,7 @@
Conekta sdk
- The version of the OpenAPI document: 2.1.0
+ The version of the OpenAPI document: 2.2.0
Contact: engineering@conekta.com
Generated by OpenAPI Generator (https://openapi-generator.tech)
diff --git a/conekta/models/customer_shipping_contacts_response_address.py b/conekta/models/customer_shipping_contacts_response_address.py
index f8a06ae..db0c5ce 100644
--- a/conekta/models/customer_shipping_contacts_response_address.py
+++ b/conekta/models/customer_shipping_contacts_response_address.py
@@ -5,7 +5,7 @@
Conekta sdk
- The version of the OpenAPI document: 2.1.0
+ The version of the OpenAPI document: 2.2.0
Contact: engineering@conekta.com
Generated by OpenAPI Generator (https://openapi-generator.tech)
diff --git a/conekta/models/customer_update_fiscal_entities_request.py b/conekta/models/customer_update_fiscal_entities_request.py
index db627dc..1e535a5 100644
--- a/conekta/models/customer_update_fiscal_entities_request.py
+++ b/conekta/models/customer_update_fiscal_entities_request.py
@@ -5,7 +5,7 @@
Conekta sdk
- The version of the OpenAPI document: 2.1.0
+ The version of the OpenAPI document: 2.2.0
Contact: engineering@conekta.com
Generated by OpenAPI Generator (https://openapi-generator.tech)
diff --git a/conekta/models/customer_update_shipping_contacts.py b/conekta/models/customer_update_shipping_contacts.py
index 916ec8c..eb33e0a 100644
--- a/conekta/models/customer_update_shipping_contacts.py
+++ b/conekta/models/customer_update_shipping_contacts.py
@@ -5,7 +5,7 @@
Conekta sdk
- The version of the OpenAPI document: 2.1.0
+ The version of the OpenAPI document: 2.2.0
Contact: engineering@conekta.com
Generated by OpenAPI Generator (https://openapi-generator.tech)
@@ -26,7 +26,7 @@
class CustomerUpdateShippingContacts(BaseModel):
"""
- [Shipping](https://developers.conekta.com/v2.1.0/reference/createcustomershippingcontacts) details, required in case of sending a shipping. If we do not receive a shipping_contact on the order, the default shipping_contact of the customer will be used.
+ [Shipping](https://developers.conekta.com/v2.2.0/reference/createcustomershippingcontacts) details, required in case of sending a shipping. If we do not receive a shipping_contact on the order, the default shipping_contact of the customer will be used.
""" # noqa: E501
phone: Optional[StrictStr] = Field(default=None, description="Phone contact")
receiver: Optional[StrictStr] = Field(default=None, description="Name of the person who will receive the order")
diff --git a/conekta/models/customers_response.py b/conekta/models/customers_response.py
index 3b3c1b3..d6a0964 100644
--- a/conekta/models/customers_response.py
+++ b/conekta/models/customers_response.py
@@ -5,7 +5,7 @@
Conekta sdk
- The version of the OpenAPI document: 2.1.0
+ The version of the OpenAPI document: 2.2.0
Contact: engineering@conekta.com
Generated by OpenAPI Generator (https://openapi-generator.tech)
diff --git a/conekta/models/delete_api_keys_response.py b/conekta/models/delete_api_keys_response.py
index 83ae9b7..b27bc8b 100644
--- a/conekta/models/delete_api_keys_response.py
+++ b/conekta/models/delete_api_keys_response.py
@@ -5,7 +5,7 @@
Conekta sdk
- The version of the OpenAPI document: 2.1.0
+ The version of the OpenAPI document: 2.2.0
Contact: engineering@conekta.com
Generated by OpenAPI Generator (https://openapi-generator.tech)
@@ -34,9 +34,10 @@ class DeleteApiKeysResponse(BaseModel):
prefix: Optional[StrictStr] = Field(default=None, description="The first few characters of the authentication_token")
id: Optional[StrictStr] = Field(default=None, description="Unique identifier of the api key")
object: Optional[StrictStr] = Field(default=None, description="Object name, value is 'api_key'")
- deleted: Optional[StrictBool] = None
+ last_used_at: Optional[StrictInt] = Field(default=None, description="Unix timestamp in seconds with the api key was used")
role: Optional[StrictStr] = Field(default=None, description="Indicates if the api key is private or public")
- __properties: ClassVar[List[str]] = ["active", "created_at", "description", "livemode", "prefix", "id", "object", "deleted", "role"]
+ deleted: Optional[StrictBool] = None
+ __properties: ClassVar[List[str]] = ["active", "created_at", "description", "livemode", "prefix", "id", "object", "last_used_at", "role", "deleted"]
model_config = ConfigDict(
populate_by_name=True,
@@ -77,6 +78,11 @@ def to_dict(self) -> Dict[str, Any]:
exclude=excluded_fields,
exclude_none=True,
)
+ # set to None if last_used_at (nullable) is None
+ # and model_fields_set contains the field
+ if self.last_used_at is None and "last_used_at" in self.model_fields_set:
+ _dict['last_used_at'] = None
+
return _dict
@classmethod
@@ -96,8 +102,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
"prefix": obj.get("prefix"),
"id": obj.get("id"),
"object": obj.get("object"),
- "deleted": obj.get("deleted"),
- "role": obj.get("role")
+ "last_used_at": obj.get("last_used_at"),
+ "role": obj.get("role"),
+ "deleted": obj.get("deleted")
})
return _obj
diff --git a/conekta/models/deleted_blacklist_rule_response.py b/conekta/models/deleted_blacklist_rule_response.py
index f22e1b7..f337f1e 100644
--- a/conekta/models/deleted_blacklist_rule_response.py
+++ b/conekta/models/deleted_blacklist_rule_response.py
@@ -5,7 +5,7 @@
Conekta sdk
- The version of the OpenAPI document: 2.1.0
+ The version of the OpenAPI document: 2.2.0
Contact: engineering@conekta.com
Generated by OpenAPI Generator (https://openapi-generator.tech)
diff --git a/conekta/models/deleted_whitelist_rule_response.py b/conekta/models/deleted_whitelist_rule_response.py
index cacf797..5d354b0 100644
--- a/conekta/models/deleted_whitelist_rule_response.py
+++ b/conekta/models/deleted_whitelist_rule_response.py
@@ -5,7 +5,7 @@
Conekta sdk
- The version of the OpenAPI document: 2.1.0
+ The version of the OpenAPI document: 2.2.0
Contact: engineering@conekta.com
Generated by OpenAPI Generator (https://openapi-generator.tech)
diff --git a/conekta/models/details.py b/conekta/models/details.py
index 161c377..326c040 100644
--- a/conekta/models/details.py
+++ b/conekta/models/details.py
@@ -5,7 +5,7 @@
Conekta sdk
- The version of the OpenAPI document: 2.1.0
+ The version of the OpenAPI document: 2.2.0
Contact: engineering@conekta.com
Generated by OpenAPI Generator (https://openapi-generator.tech)
diff --git a/conekta/models/details_error.py b/conekta/models/details_error.py
index 6d05d1d..1205f9e 100644
--- a/conekta/models/details_error.py
+++ b/conekta/models/details_error.py
@@ -5,7 +5,7 @@
Conekta sdk
- The version of the OpenAPI document: 2.1.0
+ The version of the OpenAPI document: 2.2.0
Contact: engineering@conekta.com
Generated by OpenAPI Generator (https://openapi-generator.tech)
diff --git a/conekta/models/discount_lines_data_response.py b/conekta/models/discount_lines_data_response.py
index df3a4d2..e455046 100644
--- a/conekta/models/discount_lines_data_response.py
+++ b/conekta/models/discount_lines_data_response.py
@@ -5,7 +5,7 @@
Conekta sdk
- The version of the OpenAPI document: 2.1.0
+ The version of the OpenAPI document: 2.2.0
Contact: engineering@conekta.com
Generated by OpenAPI Generator (https://openapi-generator.tech)
diff --git a/conekta/models/discount_lines_response.py b/conekta/models/discount_lines_response.py
index b72a0a4..7004f1f 100644
--- a/conekta/models/discount_lines_response.py
+++ b/conekta/models/discount_lines_response.py
@@ -5,7 +5,7 @@
Conekta sdk
- The version of the OpenAPI document: 2.1.0
+ The version of the OpenAPI document: 2.2.0
Contact: engineering@conekta.com
Generated by OpenAPI Generator (https://openapi-generator.tech)
diff --git a/conekta/models/email_checkout_request.py b/conekta/models/email_checkout_request.py
index 4a13d79..10b63f1 100644
--- a/conekta/models/email_checkout_request.py
+++ b/conekta/models/email_checkout_request.py
@@ -5,7 +5,7 @@
Conekta sdk
- The version of the OpenAPI document: 2.1.0
+ The version of the OpenAPI document: 2.2.0
Contact: engineering@conekta.com
Generated by OpenAPI Generator (https://openapi-generator.tech)
diff --git a/conekta/models/error.py b/conekta/models/error.py
index 917f6db..52f89f2 100644
--- a/conekta/models/error.py
+++ b/conekta/models/error.py
@@ -5,7 +5,7 @@
Conekta sdk
- The version of the OpenAPI document: 2.1.0
+ The version of the OpenAPI document: 2.2.0
Contact: engineering@conekta.com
Generated by OpenAPI Generator (https://openapi-generator.tech)
diff --git a/conekta/models/event_response.py b/conekta/models/event_response.py
index 87b8336..466bb24 100644
--- a/conekta/models/event_response.py
+++ b/conekta/models/event_response.py
@@ -5,7 +5,7 @@
Conekta sdk
- The version of the OpenAPI document: 2.1.0
+ The version of the OpenAPI document: 2.2.0
Contact: engineering@conekta.com
Generated by OpenAPI Generator (https://openapi-generator.tech)
diff --git a/conekta/models/event_types.py b/conekta/models/event_types.py
index 1ec6b39..40b6230 100644
--- a/conekta/models/event_types.py
+++ b/conekta/models/event_types.py
@@ -5,7 +5,7 @@
Conekta sdk
- The version of the OpenAPI document: 2.1.0
+ The version of the OpenAPI document: 2.2.0
Contact: engineering@conekta.com
Generated by OpenAPI Generator (https://openapi-generator.tech)
diff --git a/conekta/models/events_resend_response.py b/conekta/models/events_resend_response.py
index f8d770e..6bac1e5 100644
--- a/conekta/models/events_resend_response.py
+++ b/conekta/models/events_resend_response.py
@@ -5,7 +5,7 @@
Conekta sdk
- The version of the OpenAPI document: 2.1.0
+ The version of the OpenAPI document: 2.2.0
Contact: engineering@conekta.com
Generated by OpenAPI Generator (https://openapi-generator.tech)
diff --git a/conekta/models/fiscal_entity_address.py b/conekta/models/fiscal_entity_address.py
index bcbecbe..61a4b9b 100644
--- a/conekta/models/fiscal_entity_address.py
+++ b/conekta/models/fiscal_entity_address.py
@@ -5,7 +5,7 @@
Conekta sdk
- The version of the OpenAPI document: 2.1.0
+ The version of the OpenAPI document: 2.2.0
Contact: engineering@conekta.com
Generated by OpenAPI Generator (https://openapi-generator.tech)
diff --git a/conekta/models/get_api_keys_response.py b/conekta/models/get_api_keys_response.py
index e200af2..44da54f 100644
--- a/conekta/models/get_api_keys_response.py
+++ b/conekta/models/get_api_keys_response.py
@@ -5,7 +5,7 @@
Conekta sdk
- The version of the OpenAPI document: 2.1.0
+ The version of the OpenAPI document: 2.2.0
Contact: engineering@conekta.com
Generated by OpenAPI Generator (https://openapi-generator.tech)
diff --git a/conekta/models/get_charges_response.py b/conekta/models/get_charges_response.py
index 908d123..3e71853 100644
--- a/conekta/models/get_charges_response.py
+++ b/conekta/models/get_charges_response.py
@@ -5,7 +5,7 @@
Conekta sdk
- The version of the OpenAPI document: 2.1.0
+ The version of the OpenAPI document: 2.2.0
Contact: engineering@conekta.com
Generated by OpenAPI Generator (https://openapi-generator.tech)
diff --git a/conekta/models/get_companies_response.py b/conekta/models/get_companies_response.py
index 45f9d3f..8a6b406 100644
--- a/conekta/models/get_companies_response.py
+++ b/conekta/models/get_companies_response.py
@@ -5,7 +5,7 @@
Conekta sdk
- The version of the OpenAPI document: 2.1.0
+ The version of the OpenAPI document: 2.2.0
Contact: engineering@conekta.com
Generated by OpenAPI Generator (https://openapi-generator.tech)
diff --git a/conekta/models/get_customer_payment_method_data_response.py b/conekta/models/get_customer_payment_method_data_response.py
index d0a0af5..7bb03a3 100644
--- a/conekta/models/get_customer_payment_method_data_response.py
+++ b/conekta/models/get_customer_payment_method_data_response.py
@@ -5,7 +5,7 @@
Conekta sdk
- The version of the OpenAPI document: 2.1.0
+ The version of the OpenAPI document: 2.2.0
Contact: engineering@conekta.com
Generated by OpenAPI Generator (https://openapi-generator.tech)
@@ -114,6 +114,11 @@ def from_json(cls, json_str: str) -> Self:
instance.actual_instance = PaymentMethodCashResponse.from_json(json_str)
return instance
+ # check if data type is `PaymentMethodCashResponse`
+ if _data_type == "cash_recurrent":
+ instance.actual_instance = PaymentMethodCashResponse.from_json(json_str)
+ return instance
+
# check if data type is `PaymentMethodCashResponse`
if _data_type == "oxxo_recurrent":
instance.actual_instance = PaymentMethodCashResponse.from_json(json_str)
diff --git a/conekta/models/get_events_response.py b/conekta/models/get_events_response.py
index 7c09c59..bb041ba 100644
--- a/conekta/models/get_events_response.py
+++ b/conekta/models/get_events_response.py
@@ -5,7 +5,7 @@
Conekta sdk
- The version of the OpenAPI document: 2.1.0
+ The version of the OpenAPI document: 2.2.0
Contact: engineering@conekta.com
Generated by OpenAPI Generator (https://openapi-generator.tech)
diff --git a/conekta/models/get_order_discount_lines_response.py b/conekta/models/get_order_discount_lines_response.py
index ad9860d..0b47b73 100644
--- a/conekta/models/get_order_discount_lines_response.py
+++ b/conekta/models/get_order_discount_lines_response.py
@@ -5,7 +5,7 @@
Conekta sdk
- The version of the OpenAPI document: 2.1.0
+ The version of the OpenAPI document: 2.2.0
Contact: engineering@conekta.com
Generated by OpenAPI Generator (https://openapi-generator.tech)
diff --git a/conekta/models/get_orders_response.py b/conekta/models/get_orders_response.py
index 7928460..64e1f70 100644
--- a/conekta/models/get_orders_response.py
+++ b/conekta/models/get_orders_response.py
@@ -5,7 +5,7 @@
Conekta sdk
- The version of the OpenAPI document: 2.1.0
+ The version of the OpenAPI document: 2.2.0
Contact: engineering@conekta.com
Generated by OpenAPI Generator (https://openapi-generator.tech)
diff --git a/conekta/models/get_payment_method_response.py b/conekta/models/get_payment_method_response.py
index 97e4d76..e547a47 100644
--- a/conekta/models/get_payment_method_response.py
+++ b/conekta/models/get_payment_method_response.py
@@ -5,7 +5,7 @@
Conekta sdk
- The version of the OpenAPI document: 2.1.0
+ The version of the OpenAPI document: 2.2.0
Contact: engineering@conekta.com
Generated by OpenAPI Generator (https://openapi-generator.tech)
diff --git a/conekta/models/get_plans_response.py b/conekta/models/get_plans_response.py
index 0a6b2c1..057affc 100644
--- a/conekta/models/get_plans_response.py
+++ b/conekta/models/get_plans_response.py
@@ -5,7 +5,7 @@
Conekta sdk
- The version of the OpenAPI document: 2.1.0
+ The version of the OpenAPI document: 2.2.0
Contact: engineering@conekta.com
Generated by OpenAPI Generator (https://openapi-generator.tech)
diff --git a/conekta/models/get_transactions_response.py b/conekta/models/get_transactions_response.py
index 09c3d83..4553164 100644
--- a/conekta/models/get_transactions_response.py
+++ b/conekta/models/get_transactions_response.py
@@ -5,7 +5,7 @@
Conekta sdk
- The version of the OpenAPI document: 2.1.0
+ The version of the OpenAPI document: 2.2.0
Contact: engineering@conekta.com
Generated by OpenAPI Generator (https://openapi-generator.tech)
diff --git a/conekta/models/get_transfers_response.py b/conekta/models/get_transfers_response.py
index ba25b28..86a253c 100644
--- a/conekta/models/get_transfers_response.py
+++ b/conekta/models/get_transfers_response.py
@@ -5,7 +5,7 @@
Conekta sdk
- The version of the OpenAPI document: 2.1.0
+ The version of the OpenAPI document: 2.2.0
Contact: engineering@conekta.com
Generated by OpenAPI Generator (https://openapi-generator.tech)
diff --git a/conekta/models/get_webhook_keys_response.py b/conekta/models/get_webhook_keys_response.py
index 1d96708..dbd68d7 100644
--- a/conekta/models/get_webhook_keys_response.py
+++ b/conekta/models/get_webhook_keys_response.py
@@ -5,7 +5,7 @@
Conekta sdk
- The version of the OpenAPI document: 2.1.0
+ The version of the OpenAPI document: 2.2.0
Contact: engineering@conekta.com
Generated by OpenAPI Generator (https://openapi-generator.tech)
diff --git a/conekta/models/get_webhooks_response.py b/conekta/models/get_webhooks_response.py
index 636fbc5..c69a02f 100644
--- a/conekta/models/get_webhooks_response.py
+++ b/conekta/models/get_webhooks_response.py
@@ -5,7 +5,7 @@
Conekta sdk
- The version of the OpenAPI document: 2.1.0
+ The version of the OpenAPI document: 2.2.0
Contact: engineering@conekta.com
Generated by OpenAPI Generator (https://openapi-generator.tech)
diff --git a/conekta/models/log_response.py b/conekta/models/log_response.py
index 0f95c81..5c75d48 100644
--- a/conekta/models/log_response.py
+++ b/conekta/models/log_response.py
@@ -5,7 +5,7 @@
Conekta sdk
- The version of the OpenAPI document: 2.1.0
+ The version of the OpenAPI document: 2.2.0
Contact: engineering@conekta.com
Generated by OpenAPI Generator (https://openapi-generator.tech)
diff --git a/conekta/models/logs_response.py b/conekta/models/logs_response.py
index da1cd37..537fd1e 100644
--- a/conekta/models/logs_response.py
+++ b/conekta/models/logs_response.py
@@ -5,7 +5,7 @@
Conekta sdk
- The version of the OpenAPI document: 2.1.0
+ The version of the OpenAPI document: 2.2.0
Contact: engineering@conekta.com
Generated by OpenAPI Generator (https://openapi-generator.tech)
diff --git a/conekta/models/logs_response_data.py b/conekta/models/logs_response_data.py
index bb3c40b..d03dda1 100644
--- a/conekta/models/logs_response_data.py
+++ b/conekta/models/logs_response_data.py
@@ -5,7 +5,7 @@
Conekta sdk
- The version of the OpenAPI document: 2.1.0
+ The version of the OpenAPI document: 2.2.0
Contact: engineering@conekta.com
Generated by OpenAPI Generator (https://openapi-generator.tech)
diff --git a/conekta/models/order_capture_request.py b/conekta/models/order_capture_request.py
index d452cee..c413804 100644
--- a/conekta/models/order_capture_request.py
+++ b/conekta/models/order_capture_request.py
@@ -5,7 +5,7 @@
Conekta sdk
- The version of the OpenAPI document: 2.1.0
+ The version of the OpenAPI document: 2.2.0
Contact: engineering@conekta.com
Generated by OpenAPI Generator (https://openapi-generator.tech)
diff --git a/conekta/models/order_channel_response.py b/conekta/models/order_channel_response.py
new file mode 100644
index 0000000..2ff94ee
--- /dev/null
+++ b/conekta/models/order_channel_response.py
@@ -0,0 +1,94 @@
+# coding: utf-8
+
+"""
+ Conekta API
+
+ Conekta sdk
+
+ The version of the OpenAPI document: 2.2.0
+ Contact: engineering@conekta.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, StrictStr
+from typing import Any, ClassVar, Dict, List, Optional
+from typing import Optional, Set
+from typing_extensions import Self
+
+class OrderChannelResponse(BaseModel):
+ """
+ OrderChannelResponse
+ """ # noqa: E501
+ segment: Optional[StrictStr] = None
+ checkout_request_id: Optional[StrictStr] = None
+ checkout_request_type: Optional[StrictStr] = None
+ id: Optional[StrictStr] = None
+ __properties: ClassVar[List[str]] = ["segment", "checkout_request_id", "checkout_request_type", "id"]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of OrderChannelResponse from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of OrderChannelResponse from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "segment": obj.get("segment"),
+ "checkout_request_id": obj.get("checkout_request_id"),
+ "checkout_request_type": obj.get("checkout_request_type"),
+ "id": obj.get("id")
+ })
+ return _obj
+
+
diff --git a/conekta/models/order_response_charges.py b/conekta/models/order_charges_response.py
similarity index 93%
rename from conekta/models/order_response_charges.py
rename to conekta/models/order_charges_response.py
index edc9ea7..f28d983 100644
--- a/conekta/models/order_response_charges.py
+++ b/conekta/models/order_charges_response.py
@@ -5,7 +5,7 @@
Conekta sdk
- The version of the OpenAPI document: 2.1.0
+ The version of the OpenAPI document: 2.2.0
Contact: engineering@conekta.com
Generated by OpenAPI Generator (https://openapi-generator.tech)
@@ -24,7 +24,7 @@
from typing import Optional, Set
from typing_extensions import Self
-class OrderResponseCharges(BaseModel):
+class OrderChargesResponse(BaseModel):
"""
The charges associated with the order
""" # noqa: E501
@@ -51,7 +51,7 @@ def to_json(self) -> str:
@classmethod
def from_json(cls, json_str: str) -> Optional[Self]:
- """Create an instance of OrderResponseCharges from a JSON string"""
+ """Create an instance of OrderChargesResponse from a JSON string"""
return cls.from_dict(json.loads(json_str))
def to_dict(self) -> Dict[str, Any]:
@@ -83,7 +83,7 @@ def to_dict(self) -> Dict[str, Any]:
@classmethod
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
- """Create an instance of OrderResponseCharges from a dict"""
+ """Create an instance of OrderChargesResponse from a dict"""
if obj is None:
return None
diff --git a/conekta/models/order_customer_info_response.py b/conekta/models/order_customer_info_response.py
index f485b2e..799a897 100644
--- a/conekta/models/order_customer_info_response.py
+++ b/conekta/models/order_customer_info_response.py
@@ -5,7 +5,7 @@
Conekta sdk
- The version of the OpenAPI document: 2.1.0
+ The version of the OpenAPI document: 2.2.0
Contact: engineering@conekta.com
Generated by OpenAPI Generator (https://openapi-generator.tech)
diff --git a/conekta/models/order_discount_lines_request.py b/conekta/models/order_discount_lines_request.py
index a4ea41f..74d061e 100644
--- a/conekta/models/order_discount_lines_request.py
+++ b/conekta/models/order_discount_lines_request.py
@@ -5,7 +5,7 @@
Conekta sdk
- The version of the OpenAPI document: 2.1.0
+ The version of the OpenAPI document: 2.2.0
Contact: engineering@conekta.com
Generated by OpenAPI Generator (https://openapi-generator.tech)
diff --git a/conekta/models/order_response_discount_lines.py b/conekta/models/order_discount_lines_response.py
similarity index 92%
rename from conekta/models/order_response_discount_lines.py
rename to conekta/models/order_discount_lines_response.py
index 3d0bc6f..5d7f6f6 100644
--- a/conekta/models/order_response_discount_lines.py
+++ b/conekta/models/order_discount_lines_response.py
@@ -5,7 +5,7 @@
Conekta sdk
- The version of the OpenAPI document: 2.1.0
+ The version of the OpenAPI document: 2.2.0
Contact: engineering@conekta.com
Generated by OpenAPI Generator (https://openapi-generator.tech)
@@ -24,9 +24,9 @@
from typing import Optional, Set
from typing_extensions import Self
-class OrderResponseDiscountLines(BaseModel):
+class OrderDiscountLinesResponse(BaseModel):
"""
- OrderResponseDiscountLines
+ OrderDiscountLinesResponse
""" # noqa: E501
has_more: StrictBool = Field(description="Indicates if there are more pages to be requested")
object: StrictStr = Field(description="Object type, in this case is list")
@@ -51,7 +51,7 @@ def to_json(self) -> str:
@classmethod
def from_json(cls, json_str: str) -> Optional[Self]:
- """Create an instance of OrderResponseDiscountLines from a JSON string"""
+ """Create an instance of OrderDiscountLinesResponse from a JSON string"""
return cls.from_dict(json.loads(json_str))
def to_dict(self) -> Dict[str, Any]:
@@ -83,7 +83,7 @@ def to_dict(self) -> Dict[str, Any]:
@classmethod
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
- """Create an instance of OrderResponseDiscountLines from a dict"""
+ """Create an instance of OrderDiscountLinesResponse from a dict"""
if obj is None:
return None
diff --git a/conekta/models/order_fiscal_entity_address_response.py b/conekta/models/order_fiscal_entity_address_response.py
index 7750d51..c68d498 100644
--- a/conekta/models/order_fiscal_entity_address_response.py
+++ b/conekta/models/order_fiscal_entity_address_response.py
@@ -5,7 +5,7 @@
Conekta sdk
- The version of the OpenAPI document: 2.1.0
+ The version of the OpenAPI document: 2.2.0
Contact: engineering@conekta.com
Generated by OpenAPI Generator (https://openapi-generator.tech)
diff --git a/conekta/models/order_fiscal_entity_request.py b/conekta/models/order_fiscal_entity_request.py
index f7eca3e..8abd60c 100644
--- a/conekta/models/order_fiscal_entity_request.py
+++ b/conekta/models/order_fiscal_entity_request.py
@@ -5,7 +5,7 @@
Conekta sdk
- The version of the OpenAPI document: 2.1.0
+ The version of the OpenAPI document: 2.2.0
Contact: engineering@conekta.com
Generated by OpenAPI Generator (https://openapi-generator.tech)
diff --git a/conekta/models/order_fiscal_entity_response.py b/conekta/models/order_fiscal_entity_response.py
index 466c50b..a725be6 100644
--- a/conekta/models/order_fiscal_entity_response.py
+++ b/conekta/models/order_fiscal_entity_response.py
@@ -5,7 +5,7 @@
Conekta sdk
- The version of the OpenAPI document: 2.1.0
+ The version of the OpenAPI document: 2.2.0
Contact: engineering@conekta.com
Generated by OpenAPI Generator (https://openapi-generator.tech)
diff --git a/conekta/models/order_next_action_response.py b/conekta/models/order_next_action_response.py
index e920fce..026ca7a 100644
--- a/conekta/models/order_next_action_response.py
+++ b/conekta/models/order_next_action_response.py
@@ -5,7 +5,7 @@
Conekta sdk
- The version of the OpenAPI document: 2.1.0
+ The version of the OpenAPI document: 2.2.0
Contact: engineering@conekta.com
Generated by OpenAPI Generator (https://openapi-generator.tech)
diff --git a/conekta/models/order_next_action_response_redirect_to_url.py b/conekta/models/order_next_action_response_redirect_to_url.py
index 3149634..d7d4864 100644
--- a/conekta/models/order_next_action_response_redirect_to_url.py
+++ b/conekta/models/order_next_action_response_redirect_to_url.py
@@ -5,7 +5,7 @@
Conekta sdk
- The version of the OpenAPI document: 2.1.0
+ The version of the OpenAPI document: 2.2.0
Contact: engineering@conekta.com
Generated by OpenAPI Generator (https://openapi-generator.tech)
diff --git a/conekta/models/order_refund_request.py b/conekta/models/order_refund_request.py
index c3ac02c..ac2b3e0 100644
--- a/conekta/models/order_refund_request.py
+++ b/conekta/models/order_refund_request.py
@@ -5,7 +5,7 @@
Conekta sdk
- The version of the OpenAPI document: 2.1.0
+ The version of the OpenAPI document: 2.2.0
Contact: engineering@conekta.com
Generated by OpenAPI Generator (https://openapi-generator.tech)
diff --git a/conekta/models/order_request.py b/conekta/models/order_request.py
index 8d41806..4b6aa90 100644
--- a/conekta/models/order_request.py
+++ b/conekta/models/order_request.py
@@ -5,7 +5,7 @@
Conekta sdk
- The version of the OpenAPI document: 2.1.0
+ The version of the OpenAPI document: 2.2.0
Contact: engineering@conekta.com
Generated by OpenAPI Generator (https://openapi-generator.tech)
@@ -37,21 +37,21 @@ class OrderRequest(BaseModel):
"""
a order
""" # noqa: E501
- charges: Optional[List[ChargeRequest]] = Field(default=None, description="List of [charges](https://developers.conekta.com/v2.1.0/reference/orderscreatecharge) that are applied to the order")
+ charges: Optional[List[ChargeRequest]] = Field(default=None, description="List of [charges](https://developers.conekta.com/v2.2.0/reference/orderscreatecharge) that are applied to the order")
checkout: Optional[CheckoutRequest] = None
currency: Annotated[str, Field(strict=True, max_length=3)] = Field(description="Currency with which the payment will be made. It uses the 3-letter code of the [International Standard ISO 4217.](https://es.wikipedia.org/wiki/ISO_4217)")
customer_info: OrderRequestCustomerInfo
- discount_lines: Optional[List[OrderDiscountLinesRequest]] = Field(default=None, description="List of [discounts](https://developers.conekta.com/v2.1.0/reference/orderscreatediscountline) that are applied to the order. You must have at least one discount.")
+ discount_lines: Optional[List[OrderDiscountLinesRequest]] = Field(default=None, description="List of [discounts](https://developers.conekta.com/v2.2.0/reference/orderscreatediscountline) that are applied to the order. You must have at least one discount.")
fiscal_entity: Optional[OrderFiscalEntityRequest] = None
- line_items: List[Product] = Field(description="List of [products](https://developers.conekta.com/v2.1.0/reference/orderscreateproduct) that are sold in the order. You must have at least one product.")
+ line_items: List[Product] = Field(description="List of [products](https://developers.conekta.com/v2.2.0/reference/orderscreateproduct) that are sold in the order. You must have at least one product.")
metadata: Optional[Dict[str, Any]] = Field(default=None, description="Metadata associated with the order")
needs_shipping_contact: Optional[StrictBool] = Field(default=None, description="Allows you to fill out the shipping information at checkout")
pre_authorize: Optional[StrictBool] = Field(default=False, description="Indicates whether the order charges must be preauthorized")
processing_mode: Optional[StrictStr] = Field(default=None, description="Indicates the processing mode for the order, either ecommerce, recurrent or validation.")
return_url: Optional[StrictStr] = Field(default=None, description="Indicates the redirection callback upon completion of the 3DS2 flow. Do not use this parameter if your order has a checkout parameter")
shipping_contact: Optional[CustomerShippingContacts] = None
- shipping_lines: Optional[List[ShippingRequest]] = Field(default=None, description="List of [shipping costs](https://developers.conekta.com/v2.1.0/reference/orderscreateshipping). If the online store offers digital products.")
- tax_lines: Optional[List[OrderTaxRequest]] = Field(default=None, description="List of [taxes](https://developers.conekta.com/v2.1.0/reference/orderscreatetaxes) that are applied to the order.")
+ shipping_lines: Optional[List[ShippingRequest]] = Field(default=None, description="List of [shipping costs](https://developers.conekta.com/v2.2.0/reference/orderscreateshipping). If the online store offers digital products.")
+ tax_lines: Optional[List[OrderTaxRequest]] = Field(default=None, description="List of [taxes](https://developers.conekta.com/v2.2.0/reference/orderscreatetaxes) that are applied to the order.")
three_ds_mode: Optional[StrictStr] = Field(default=None, description="Indicates the 3DS2 mode for the order, either smart or strict.")
__properties: ClassVar[List[str]] = ["charges", "checkout", "currency", "customer_info", "discount_lines", "fiscal_entity", "line_items", "metadata", "needs_shipping_contact", "pre_authorize", "processing_mode", "return_url", "shipping_contact", "shipping_lines", "tax_lines", "three_ds_mode"]
diff --git a/conekta/models/order_request_customer_info.py b/conekta/models/order_request_customer_info.py
index 0f19aeb..6418410 100644
--- a/conekta/models/order_request_customer_info.py
+++ b/conekta/models/order_request_customer_info.py
@@ -5,7 +5,7 @@
Conekta sdk
- The version of the OpenAPI document: 2.1.0
+ The version of the OpenAPI document: 2.2.0
Contact: engineering@conekta.com
Generated by OpenAPI Generator (https://openapi-generator.tech)
diff --git a/conekta/models/order_response.py b/conekta/models/order_response.py
index 52477c8..adfcf29 100644
--- a/conekta/models/order_response.py
+++ b/conekta/models/order_response.py
@@ -5,7 +5,7 @@
Conekta sdk
- The version of the OpenAPI document: 2.1.0
+ The version of the OpenAPI document: 2.2.0
Contact: engineering@conekta.com
Generated by OpenAPI Generator (https://openapi-generator.tech)
@@ -20,13 +20,13 @@
from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr
from typing import Any, ClassVar, Dict, List, Optional
-from conekta.models.charge_response_channel import ChargeResponseChannel
+from conekta.models.order_channel_response import OrderChannelResponse
+from conekta.models.order_charges_response import OrderChargesResponse
+from conekta.models.order_discount_lines_response import OrderDiscountLinesResponse
from conekta.models.order_fiscal_entity_response import OrderFiscalEntityResponse
from conekta.models.order_next_action_response import OrderNextActionResponse
-from conekta.models.order_response_charges import OrderResponseCharges
from conekta.models.order_response_checkout import OrderResponseCheckout
from conekta.models.order_response_customer_info import OrderResponseCustomerInfo
-from conekta.models.order_response_discount_lines import OrderResponseDiscountLines
from conekta.models.order_response_products import OrderResponseProducts
from conekta.models.order_response_shipping_contact import OrderResponseShippingContact
from typing import Optional, Set
@@ -38,13 +38,13 @@ class OrderResponse(BaseModel):
""" # noqa: E501
amount: Optional[StrictInt] = Field(default=None, description="The total amount to be collected in cents")
amount_refunded: Optional[StrictInt] = Field(default=None, description="The total amount refunded in cents")
- channel: Optional[ChargeResponseChannel] = None
- charges: Optional[OrderResponseCharges] = None
+ channel: Optional[OrderChannelResponse] = None
+ charges: Optional[OrderChargesResponse] = None
checkout: Optional[OrderResponseCheckout] = None
created_at: Optional[StrictInt] = Field(default=None, description="The time at which the object was created in seconds since the Unix epoch")
currency: Optional[StrictStr] = Field(default=None, description="The three-letter ISO 4217 currency code. The currency of the order.")
customer_info: Optional[OrderResponseCustomerInfo] = None
- discount_lines: Optional[OrderResponseDiscountLines] = None
+ discount_lines: Optional[OrderDiscountLinesResponse] = None
fiscal_entity: Optional[OrderFiscalEntityResponse] = None
id: Optional[StrictStr] = None
is_refundable: Optional[StrictBool] = None
@@ -144,13 +144,13 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
_obj = cls.model_validate({
"amount": obj.get("amount"),
"amount_refunded": obj.get("amount_refunded"),
- "channel": ChargeResponseChannel.from_dict(obj["channel"]) if obj.get("channel") is not None else None,
- "charges": OrderResponseCharges.from_dict(obj["charges"]) if obj.get("charges") is not None else None,
+ "channel": OrderChannelResponse.from_dict(obj["channel"]) if obj.get("channel") is not None else None,
+ "charges": OrderChargesResponse.from_dict(obj["charges"]) if obj.get("charges") is not None else None,
"checkout": OrderResponseCheckout.from_dict(obj["checkout"]) if obj.get("checkout") is not None else None,
"created_at": obj.get("created_at"),
"currency": obj.get("currency"),
"customer_info": OrderResponseCustomerInfo.from_dict(obj["customer_info"]) if obj.get("customer_info") is not None else None,
- "discount_lines": OrderResponseDiscountLines.from_dict(obj["discount_lines"]) if obj.get("discount_lines") is not None else None,
+ "discount_lines": OrderDiscountLinesResponse.from_dict(obj["discount_lines"]) if obj.get("discount_lines") is not None else None,
"fiscal_entity": OrderFiscalEntityResponse.from_dict(obj["fiscal_entity"]) if obj.get("fiscal_entity") is not None else None,
"id": obj.get("id"),
"is_refundable": obj.get("is_refundable"),
diff --git a/conekta/models/order_response_checkout.py b/conekta/models/order_response_checkout.py
index 5efafb5..2ad9ff1 100644
--- a/conekta/models/order_response_checkout.py
+++ b/conekta/models/order_response_checkout.py
@@ -5,7 +5,7 @@
Conekta sdk
- The version of the OpenAPI document: 2.1.0
+ The version of the OpenAPI document: 2.2.0
Contact: engineering@conekta.com
Generated by OpenAPI Generator (https://openapi-generator.tech)
@@ -27,7 +27,7 @@ class OrderResponseCheckout(BaseModel):
"""
OrderResponseCheckout
""" # noqa: E501
- allowed_payment_methods: Optional[List[StrictStr]] = None
+ allowed_payment_methods: Optional[List[StrictStr]] = Field(default=None, description="Are the payment methods available for this link")
can_not_expire: Optional[StrictBool] = None
emails_sent: Optional[StrictInt] = None
exclude_card_networks: Optional[List[Dict[str, Any]]] = None
diff --git a/conekta/models/order_response_customer_info.py b/conekta/models/order_response_customer_info.py
index e6ea6ae..c7e16ce 100644
--- a/conekta/models/order_response_customer_info.py
+++ b/conekta/models/order_response_customer_info.py
@@ -5,7 +5,7 @@
Conekta sdk
- The version of the OpenAPI document: 2.1.0
+ The version of the OpenAPI document: 2.2.0
Contact: engineering@conekta.com
Generated by OpenAPI Generator (https://openapi-generator.tech)
diff --git a/conekta/models/order_response_products.py b/conekta/models/order_response_products.py
index a3c82ef..f9f038b 100644
--- a/conekta/models/order_response_products.py
+++ b/conekta/models/order_response_products.py
@@ -5,7 +5,7 @@
Conekta sdk
- The version of the OpenAPI document: 2.1.0
+ The version of the OpenAPI document: 2.2.0
Contact: engineering@conekta.com
Generated by OpenAPI Generator (https://openapi-generator.tech)
diff --git a/conekta/models/order_response_shipping_contact.py b/conekta/models/order_response_shipping_contact.py
index 46de159..124f76d 100644
--- a/conekta/models/order_response_shipping_contact.py
+++ b/conekta/models/order_response_shipping_contact.py
@@ -5,7 +5,7 @@
Conekta sdk
- The version of the OpenAPI document: 2.1.0
+ The version of the OpenAPI document: 2.2.0
Contact: engineering@conekta.com
Generated by OpenAPI Generator (https://openapi-generator.tech)
diff --git a/conekta/models/order_tax_request.py b/conekta/models/order_tax_request.py
index f591a05..fcfbcbd 100644
--- a/conekta/models/order_tax_request.py
+++ b/conekta/models/order_tax_request.py
@@ -5,7 +5,7 @@
Conekta sdk
- The version of the OpenAPI document: 2.1.0
+ The version of the OpenAPI document: 2.2.0
Contact: engineering@conekta.com
Generated by OpenAPI Generator (https://openapi-generator.tech)
diff --git a/conekta/models/order_update_fiscal_entity_request.py b/conekta/models/order_update_fiscal_entity_request.py
index b306ce6..7744718 100644
--- a/conekta/models/order_update_fiscal_entity_request.py
+++ b/conekta/models/order_update_fiscal_entity_request.py
@@ -5,7 +5,7 @@
Conekta sdk
- The version of the OpenAPI document: 2.1.0
+ The version of the OpenAPI document: 2.2.0
Contact: engineering@conekta.com
Generated by OpenAPI Generator (https://openapi-generator.tech)
diff --git a/conekta/models/order_update_request.py b/conekta/models/order_update_request.py
index f4bac6b..9d9235c 100644
--- a/conekta/models/order_update_request.py
+++ b/conekta/models/order_update_request.py
@@ -5,7 +5,7 @@
Conekta sdk
- The version of the OpenAPI document: 2.1.0
+ The version of the OpenAPI document: 2.2.0
Contact: engineering@conekta.com
Generated by OpenAPI Generator (https://openapi-generator.tech)
@@ -41,13 +41,13 @@ class OrderUpdateRequest(BaseModel):
checkout: Optional[CheckoutRequest] = None
currency: Optional[Annotated[str, Field(strict=True, max_length=3)]] = Field(default=None, description="Currency with which the payment will be made. It uses the 3-letter code of the [International Standard ISO 4217.](https://es.wikipedia.org/wiki/ISO_4217)")
customer_info: Optional[OrderUpdateRequestCustomerInfo] = None
- discount_lines: Optional[List[OrderDiscountLinesRequest]] = Field(default=None, description="List of [discounts](https://developers.conekta.com/v2.1.0/reference/orderscreatediscountline) that are applied to the order. You must have at least one discount.")
+ discount_lines: Optional[List[OrderDiscountLinesRequest]] = Field(default=None, description="List of [discounts](https://developers.conekta.com/v2.2.0/reference/orderscreatediscountline) that are applied to the order. You must have at least one discount.")
fiscal_entity: Optional[OrderUpdateFiscalEntityRequest] = None
- line_items: Optional[List[Product]] = Field(default=None, description="List of [products](https://developers.conekta.com/v2.1.0/reference/orderscreateproduct) that are sold in the order. You must have at least one product.")
+ line_items: Optional[List[Product]] = Field(default=None, description="List of [products](https://developers.conekta.com/v2.2.0/reference/orderscreateproduct) that are sold in the order. You must have at least one product.")
metadata: Optional[Dict[str, StrictStr]] = None
pre_authorize: Optional[StrictBool] = Field(default=False, description="Indicates whether the order charges must be preauthorized")
shipping_contact: Optional[CustomerShippingContacts] = None
- shipping_lines: Optional[List[ShippingRequest]] = Field(default=None, description="List of [shipping costs](https://developers.conekta.com/v2.1.0/reference/orderscreateshipping). If the online store offers digital products.")
+ shipping_lines: Optional[List[ShippingRequest]] = Field(default=None, description="List of [shipping costs](https://developers.conekta.com/v2.2.0/reference/orderscreateshipping). If the online store offers digital products.")
tax_lines: Optional[List[OrderTaxRequest]] = None
__properties: ClassVar[List[str]] = ["charges", "checkout", "currency", "customer_info", "discount_lines", "fiscal_entity", "line_items", "metadata", "pre_authorize", "shipping_contact", "shipping_lines", "tax_lines"]
diff --git a/conekta/models/order_update_request_customer_info.py b/conekta/models/order_update_request_customer_info.py
index 5dd9949..5b280be 100644
--- a/conekta/models/order_update_request_customer_info.py
+++ b/conekta/models/order_update_request_customer_info.py
@@ -5,7 +5,7 @@
Conekta sdk
- The version of the OpenAPI document: 2.1.0
+ The version of the OpenAPI document: 2.2.0
Contact: engineering@conekta.com
Generated by OpenAPI Generator (https://openapi-generator.tech)
diff --git a/conekta/models/orders_response.py b/conekta/models/orders_response.py
index 68a83c8..dad1f28 100644
--- a/conekta/models/orders_response.py
+++ b/conekta/models/orders_response.py
@@ -5,7 +5,7 @@
Conekta sdk
- The version of the OpenAPI document: 2.1.0
+ The version of the OpenAPI document: 2.2.0
Contact: engineering@conekta.com
Generated by OpenAPI Generator (https://openapi-generator.tech)
diff --git a/conekta/models/page.py b/conekta/models/page.py
index 881c5e1..fb66c68 100644
--- a/conekta/models/page.py
+++ b/conekta/models/page.py
@@ -5,7 +5,7 @@
Conekta sdk
- The version of the OpenAPI document: 2.1.0
+ The version of the OpenAPI document: 2.2.0
Contact: engineering@conekta.com
Generated by OpenAPI Generator (https://openapi-generator.tech)
diff --git a/conekta/models/pagination.py b/conekta/models/pagination.py
index 17cd7e2..5d4e5a9 100644
--- a/conekta/models/pagination.py
+++ b/conekta/models/pagination.py
@@ -5,7 +5,7 @@
Conekta sdk
- The version of the OpenAPI document: 2.1.0
+ The version of the OpenAPI document: 2.2.0
Contact: engineering@conekta.com
Generated by OpenAPI Generator (https://openapi-generator.tech)
diff --git a/conekta/models/payment_method.py b/conekta/models/payment_method.py
index 0d73fc4..69ea94d 100644
--- a/conekta/models/payment_method.py
+++ b/conekta/models/payment_method.py
@@ -5,7 +5,7 @@
Conekta sdk
- The version of the OpenAPI document: 2.1.0
+ The version of the OpenAPI document: 2.2.0
Contact: engineering@conekta.com
Generated by OpenAPI Generator (https://openapi-generator.tech)
diff --git a/conekta/models/payment_method_bank_transfer.py b/conekta/models/payment_method_bank_transfer.py
index a4ac76d..686912d 100644
--- a/conekta/models/payment_method_bank_transfer.py
+++ b/conekta/models/payment_method_bank_transfer.py
@@ -5,7 +5,7 @@
Conekta sdk
- The version of the OpenAPI document: 2.1.0
+ The version of the OpenAPI document: 2.2.0
Contact: engineering@conekta.com
Generated by OpenAPI Generator (https://openapi-generator.tech)
@@ -32,7 +32,7 @@ class PaymentMethodBankTransfer(BaseModel):
bank: Optional[StrictStr] = None
clabe: Optional[StrictStr] = None
description: Optional[StrictStr] = None
- executed_at: Optional[StrictInt] = None
+ executed_at: Optional[StrictStr] = None
expires_at: Optional[StrictInt] = None
issuing_account_bank: Optional[StrictStr] = None
issuing_account_number: Optional[StrictStr] = None
diff --git a/conekta/models/payment_method_bnpl_payment.py b/conekta/models/payment_method_bnpl_payment.py
new file mode 100644
index 0000000..947f9bb
--- /dev/null
+++ b/conekta/models/payment_method_bnpl_payment.py
@@ -0,0 +1,102 @@
+# coding: utf-8
+
+"""
+ Conekta API
+
+ Conekta sdk
+
+ The version of the OpenAPI document: 2.2.0
+ Contact: engineering@conekta.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr
+from typing import Any, ClassVar, Dict, List, Optional
+from typing import Optional, Set
+from typing_extensions import Self
+
+class PaymentMethodBnplPayment(BaseModel):
+ """
+ PaymentMethodBnplPayment
+ """ # noqa: E501
+ type: Optional[StrictStr] = None
+ object: StrictStr
+ cancel_url: Optional[StrictStr] = Field(default=None, description="URL to redirect the customer after a canceled payment")
+ expires_at: StrictInt = Field(description="Expiration date of the charge")
+ failure_url: Optional[StrictStr] = Field(default=None, description="URL to redirect the customer after a failed payment")
+ product_type: StrictStr = Field(description="Product type of the charge")
+ redirect_url: Optional[StrictStr] = Field(default=None, description="URL to redirect the customer to complete the payment")
+ success_url: Optional[StrictStr] = Field(default=None, description="URL to redirect the customer after a successful payment")
+ __properties: ClassVar[List[str]] = ["type", "object", "cancel_url", "expires_at", "failure_url", "product_type", "redirect_url", "success_url"]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of PaymentMethodBnplPayment from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of PaymentMethodBnplPayment from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "type": obj.get("type"),
+ "object": obj.get("object"),
+ "cancel_url": obj.get("cancel_url"),
+ "expires_at": obj.get("expires_at"),
+ "failure_url": obj.get("failure_url"),
+ "product_type": obj.get("product_type"),
+ "redirect_url": obj.get("redirect_url"),
+ "success_url": obj.get("success_url")
+ })
+ return _obj
+
+
diff --git a/conekta/models/payment_method_bnpl_request.py b/conekta/models/payment_method_bnpl_request.py
new file mode 100644
index 0000000..39c5bb6
--- /dev/null
+++ b/conekta/models/payment_method_bnpl_request.py
@@ -0,0 +1,105 @@
+# coding: utf-8
+
+"""
+ Conekta API
+
+ Conekta sdk
+
+ The version of the OpenAPI document: 2.2.0
+ Contact: engineering@conekta.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr, field_validator
+from typing import Any, ClassVar, Dict, List
+from typing import Optional, Set
+from typing_extensions import Self
+
+class PaymentMethodBnplRequest(BaseModel):
+ """
+ PaymentMethodBnplRequest
+ """ # noqa: E501
+ type: StrictStr = Field(description="Type of the payment method")
+ cancel_url: StrictStr = Field(description="URL to redirect the customer after a canceled payment")
+ can_not_expire: StrictBool = Field(description="Indicates if the payment method can not expire")
+ failure_url: StrictStr = Field(description="URL to redirect the customer after a failed payment")
+ product_type: StrictStr = Field(description="Product type of the payment method, use for the payment method to know the product type")
+ success_url: StrictStr = Field(description="URL to redirect the customer after a successful payment")
+ __properties: ClassVar[List[str]] = ["type", "cancel_url", "can_not_expire", "failure_url", "product_type", "success_url"]
+
+ @field_validator('product_type')
+ def product_type_validate_enum(cls, value):
+ """Validates the enum"""
+ if value not in set(['klarna_bnpl', 'creditea_bnpl']):
+ raise ValueError("must be one of enum values ('klarna_bnpl', 'creditea_bnpl')")
+ return value
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of PaymentMethodBnplRequest from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of PaymentMethodBnplRequest from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "type": obj.get("type"),
+ "cancel_url": obj.get("cancel_url"),
+ "can_not_expire": obj.get("can_not_expire"),
+ "failure_url": obj.get("failure_url"),
+ "product_type": obj.get("product_type"),
+ "success_url": obj.get("success_url")
+ })
+ return _obj
+
+
diff --git a/conekta/models/payment_method_card.py b/conekta/models/payment_method_card.py
index 30e45ca..0bd9b91 100644
--- a/conekta/models/payment_method_card.py
+++ b/conekta/models/payment_method_card.py
@@ -5,7 +5,7 @@
Conekta sdk
- The version of the OpenAPI document: 2.1.0
+ The version of the OpenAPI document: 2.2.0
Contact: engineering@conekta.com
Generated by OpenAPI Generator (https://openapi-generator.tech)
diff --git a/conekta/models/payment_method_card_request.py b/conekta/models/payment_method_card_request.py
index 7089524..5baae03 100644
--- a/conekta/models/payment_method_card_request.py
+++ b/conekta/models/payment_method_card_request.py
@@ -5,7 +5,7 @@
Conekta sdk
- The version of the OpenAPI document: 2.1.0
+ The version of the OpenAPI document: 2.2.0
Contact: engineering@conekta.com
Generated by OpenAPI Generator (https://openapi-generator.tech)
diff --git a/conekta/models/payment_method_card_response.py b/conekta/models/payment_method_card_response.py
index a950274..8ce88ca 100644
--- a/conekta/models/payment_method_card_response.py
+++ b/conekta/models/payment_method_card_response.py
@@ -5,7 +5,7 @@
Conekta sdk
- The version of the OpenAPI document: 2.1.0
+ The version of the OpenAPI document: 2.2.0
Contact: engineering@conekta.com
Generated by OpenAPI Generator (https://openapi-generator.tech)
diff --git a/conekta/models/payment_method_cash.py b/conekta/models/payment_method_cash.py
index 747000d..17faf71 100644
--- a/conekta/models/payment_method_cash.py
+++ b/conekta/models/payment_method_cash.py
@@ -5,7 +5,7 @@
Conekta sdk
- The version of the OpenAPI document: 2.1.0
+ The version of the OpenAPI document: 2.2.0
Contact: engineering@conekta.com
Generated by OpenAPI Generator (https://openapi-generator.tech)
diff --git a/conekta/models/payment_method_cash_request.py b/conekta/models/payment_method_cash_request.py
index 2223d91..6983eaf 100644
--- a/conekta/models/payment_method_cash_request.py
+++ b/conekta/models/payment_method_cash_request.py
@@ -5,7 +5,7 @@
Conekta sdk
- The version of the OpenAPI document: 2.1.0
+ The version of the OpenAPI document: 2.2.0
Contact: engineering@conekta.com
Generated by OpenAPI Generator (https://openapi-generator.tech)
diff --git a/conekta/models/payment_method_cash_response.py b/conekta/models/payment_method_cash_response.py
index 140f500..f29707c 100644
--- a/conekta/models/payment_method_cash_response.py
+++ b/conekta/models/payment_method_cash_response.py
@@ -5,7 +5,7 @@
Conekta sdk
- The version of the OpenAPI document: 2.1.0
+ The version of the OpenAPI document: 2.2.0
Contact: engineering@conekta.com
Generated by OpenAPI Generator (https://openapi-generator.tech)
@@ -18,8 +18,9 @@
import re # noqa: F401
import json
-from pydantic import BaseModel, ConfigDict, StrictInt, StrictStr
+from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr
from typing import Any, ClassVar, Dict, List, Optional
+from conekta.models.payment_method_cash_response_all_of_agreements import PaymentMethodCashResponseAllOfAgreements
from typing import Optional, Set
from typing_extensions import Self
@@ -32,12 +33,13 @@ class PaymentMethodCashResponse(BaseModel):
object: StrictStr
created_at: StrictInt
parent_id: Optional[StrictStr] = None
+ agreements: Optional[List[PaymentMethodCashResponseAllOfAgreements]] = None
reference: Optional[StrictStr] = None
barcode: Optional[StrictStr] = None
- barcode_url: Optional[StrictStr] = None
+ barcode_url: Optional[StrictStr] = Field(default=None, description="URL to the barcode image, reference is the same as barcode")
expires_at: Optional[StrictInt] = None
provider: Optional[StrictStr] = None
- __properties: ClassVar[List[str]] = ["type", "id", "object", "created_at", "parent_id", "reference", "barcode", "barcode_url", "expires_at", "provider"]
+ __properties: ClassVar[List[str]] = ["type", "id", "object", "created_at", "parent_id", "agreements", "reference", "barcode", "barcode_url", "expires_at", "provider"]
model_config = ConfigDict(
populate_by_name=True,
@@ -78,6 +80,13 @@ def to_dict(self) -> Dict[str, Any]:
exclude=excluded_fields,
exclude_none=True,
)
+ # override the default output from pydantic by calling `to_dict()` of each item in agreements (list)
+ _items = []
+ if self.agreements:
+ for _item_agreements in self.agreements:
+ if _item_agreements:
+ _items.append(_item_agreements.to_dict())
+ _dict['agreements'] = _items
return _dict
@classmethod
@@ -95,6 +104,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
"object": obj.get("object"),
"created_at": obj.get("created_at"),
"parent_id": obj.get("parent_id"),
+ "agreements": [PaymentMethodCashResponseAllOfAgreements.from_dict(_item) for _item in obj["agreements"]] if obj.get("agreements") is not None else None,
"reference": obj.get("reference"),
"barcode": obj.get("barcode"),
"barcode_url": obj.get("barcode_url"),
diff --git a/conekta/models/payment_method_cash_response_all_of_agreements.py b/conekta/models/payment_method_cash_response_all_of_agreements.py
new file mode 100644
index 0000000..b955506
--- /dev/null
+++ b/conekta/models/payment_method_cash_response_all_of_agreements.py
@@ -0,0 +1,90 @@
+# coding: utf-8
+
+"""
+ Conekta API
+
+ Conekta sdk
+
+ The version of the OpenAPI document: 2.2.0
+ Contact: engineering@conekta.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, Field, StrictStr
+from typing import Any, ClassVar, Dict, List, Optional
+from typing import Optional, Set
+from typing_extensions import Self
+
+class PaymentMethodCashResponseAllOfAgreements(BaseModel):
+ """
+ PaymentMethodCashResponseAllOfAgreements
+ """ # noqa: E501
+ agreement: Optional[StrictStr] = Field(default=None, description="Agreement number, you can use this number to pay in the store/bbva")
+ provider: Optional[StrictStr] = Field(default=None, description="Provider name, you can use this to know where to pay")
+ __properties: ClassVar[List[str]] = ["agreement", "provider"]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of PaymentMethodCashResponseAllOfAgreements from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of PaymentMethodCashResponseAllOfAgreements from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "agreement": obj.get("agreement"),
+ "provider": obj.get("provider")
+ })
+ return _obj
+
+
diff --git a/conekta/models/payment_method_general_request.py b/conekta/models/payment_method_general_request.py
index d594b5d..c3ab109 100644
--- a/conekta/models/payment_method_general_request.py
+++ b/conekta/models/payment_method_general_request.py
@@ -5,7 +5,7 @@
Conekta sdk
- The version of the OpenAPI document: 2.1.0
+ The version of the OpenAPI document: 2.2.0
Contact: engineering@conekta.com
Generated by OpenAPI Generator (https://openapi-generator.tech)
diff --git a/conekta/models/payment_method_response.py b/conekta/models/payment_method_response.py
index feeca59..7bac8fe 100644
--- a/conekta/models/payment_method_response.py
+++ b/conekta/models/payment_method_response.py
@@ -5,7 +5,7 @@
Conekta sdk
- The version of the OpenAPI document: 2.1.0
+ The version of the OpenAPI document: 2.2.0
Contact: engineering@conekta.com
Generated by OpenAPI Generator (https://openapi-generator.tech)
diff --git a/conekta/models/payment_method_spei_recurrent.py b/conekta/models/payment_method_spei_recurrent.py
index c13941a..18d72ff 100644
--- a/conekta/models/payment_method_spei_recurrent.py
+++ b/conekta/models/payment_method_spei_recurrent.py
@@ -5,7 +5,7 @@
Conekta sdk
- The version of the OpenAPI document: 2.1.0
+ The version of the OpenAPI document: 2.2.0
Contact: engineering@conekta.com
Generated by OpenAPI Generator (https://openapi-generator.tech)
diff --git a/conekta/models/payment_method_spei_request.py b/conekta/models/payment_method_spei_request.py
index 4a67797..a9e01d9 100644
--- a/conekta/models/payment_method_spei_request.py
+++ b/conekta/models/payment_method_spei_request.py
@@ -5,7 +5,7 @@
Conekta sdk
- The version of the OpenAPI document: 2.1.0
+ The version of the OpenAPI document: 2.2.0
Contact: engineering@conekta.com
Generated by OpenAPI Generator (https://openapi-generator.tech)
diff --git a/conekta/models/payment_method_token_request.py b/conekta/models/payment_method_token_request.py
index 3105c4a..ee70f4e 100644
--- a/conekta/models/payment_method_token_request.py
+++ b/conekta/models/payment_method_token_request.py
@@ -5,7 +5,7 @@
Conekta sdk
- The version of the OpenAPI document: 2.1.0
+ The version of the OpenAPI document: 2.2.0
Contact: engineering@conekta.com
Generated by OpenAPI Generator (https://openapi-generator.tech)
@@ -28,7 +28,7 @@ class PaymentMethodTokenRequest(BaseModel):
PaymentMethodTokenRequest
""" # noqa: E501
type: StrictStr = Field(description="Type of payment method")
- token_id: StrictStr = Field(description="Token id that will be used to create a \"card\" type payment method. See the (subscriptions)[https://developers.conekta.com/v2.1.0/reference/createsubscription] tutorial for more information on how to tokenize cards.")
+ token_id: StrictStr = Field(description="Token id that will be used to create a \"card\" type payment method. See the (subscriptions)[https://developers.conekta.com/v2.2.0/reference/createsubscription] tutorial for more information on how to tokenize cards.")
__properties: ClassVar[List[str]] = ["type", "token_id"]
model_config = ConfigDict(
diff --git a/conekta/models/payout.py b/conekta/models/payout.py
index 8aa9d21..6bf9b0a 100644
--- a/conekta/models/payout.py
+++ b/conekta/models/payout.py
@@ -5,7 +5,7 @@
Conekta sdk
- The version of the OpenAPI document: 2.1.0
+ The version of the OpenAPI document: 2.2.0
Contact: engineering@conekta.com
Generated by OpenAPI Generator (https://openapi-generator.tech)
diff --git a/conekta/models/payout_method.py b/conekta/models/payout_method.py
index c581754..4222370 100644
--- a/conekta/models/payout_method.py
+++ b/conekta/models/payout_method.py
@@ -5,7 +5,7 @@
Conekta sdk
- The version of the OpenAPI document: 2.1.0
+ The version of the OpenAPI document: 2.2.0
Contact: engineering@conekta.com
Generated by OpenAPI Generator (https://openapi-generator.tech)
diff --git a/conekta/models/payout_order.py b/conekta/models/payout_order.py
index 62963f1..3f517a6 100644
--- a/conekta/models/payout_order.py
+++ b/conekta/models/payout_order.py
@@ -5,7 +5,7 @@
Conekta sdk
- The version of the OpenAPI document: 2.1.0
+ The version of the OpenAPI document: 2.2.0
Contact: engineering@conekta.com
Generated by OpenAPI Generator (https://openapi-generator.tech)
diff --git a/conekta/models/payout_order_payouts_item.py b/conekta/models/payout_order_payouts_item.py
index 5aed4da..7d2eb76 100644
--- a/conekta/models/payout_order_payouts_item.py
+++ b/conekta/models/payout_order_payouts_item.py
@@ -5,7 +5,7 @@
Conekta sdk
- The version of the OpenAPI document: 2.1.0
+ The version of the OpenAPI document: 2.2.0
Contact: engineering@conekta.com
Generated by OpenAPI Generator (https://openapi-generator.tech)
diff --git a/conekta/models/payout_order_response.py b/conekta/models/payout_order_response.py
index 0168067..55cf99d 100644
--- a/conekta/models/payout_order_response.py
+++ b/conekta/models/payout_order_response.py
@@ -5,7 +5,7 @@
Conekta sdk
- The version of the OpenAPI document: 2.1.0
+ The version of the OpenAPI document: 2.2.0
Contact: engineering@conekta.com
Generated by OpenAPI Generator (https://openapi-generator.tech)
diff --git a/conekta/models/payout_order_response_customer_info.py b/conekta/models/payout_order_response_customer_info.py
index ace7291..e49f1b8 100644
--- a/conekta/models/payout_order_response_customer_info.py
+++ b/conekta/models/payout_order_response_customer_info.py
@@ -5,7 +5,7 @@
Conekta sdk
- The version of the OpenAPI document: 2.1.0
+ The version of the OpenAPI document: 2.2.0
Contact: engineering@conekta.com
Generated by OpenAPI Generator (https://openapi-generator.tech)
diff --git a/conekta/models/payout_orders_response.py b/conekta/models/payout_orders_response.py
index 5bc5d50..fbfa910 100644
--- a/conekta/models/payout_orders_response.py
+++ b/conekta/models/payout_orders_response.py
@@ -5,7 +5,7 @@
Conekta sdk
- The version of the OpenAPI document: 2.1.0
+ The version of the OpenAPI document: 2.2.0
Contact: engineering@conekta.com
Generated by OpenAPI Generator (https://openapi-generator.tech)
diff --git a/conekta/models/plan_request.py b/conekta/models/plan_request.py
index 5c2fa12..0b60dd2 100644
--- a/conekta/models/plan_request.py
+++ b/conekta/models/plan_request.py
@@ -5,7 +5,7 @@
Conekta sdk
- The version of the OpenAPI document: 2.1.0
+ The version of the OpenAPI document: 2.2.0
Contact: engineering@conekta.com
Generated by OpenAPI Generator (https://openapi-generator.tech)
@@ -36,7 +36,9 @@ class PlanRequest(BaseModel):
interval: StrictStr = Field(description="The interval of time between each charge.")
name: StrictStr = Field(description="The name of the plan.")
trial_period_days: Optional[StrictInt] = Field(default=None, description="The number of days the customer will have a free trial.")
- __properties: ClassVar[List[str]] = ["amount", "currency", "expiry_count", "frequency", "id", "interval", "name", "trial_period_days"]
+ max_retries: Optional[Annotated[int, Field(strict=True, ge=3)]] = Field(default=None, description="(optional) Specifies the maximum number of retry attempts for a subscription payment before it is canceled.")
+ retry_delay_hours: Optional[Annotated[int, Field(strict=True, ge=48)]] = Field(default=None, description="(optional) Defines the number of hours between subscription payment retry attempts.")
+ __properties: ClassVar[List[str]] = ["amount", "currency", "expiry_count", "frequency", "id", "interval", "name", "trial_period_days", "max_retries", "retry_delay_hours"]
@field_validator('interval')
def interval_validate_enum(cls, value):
@@ -103,7 +105,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
"id": obj.get("id"),
"interval": obj.get("interval"),
"name": obj.get("name"),
- "trial_period_days": obj.get("trial_period_days")
+ "trial_period_days": obj.get("trial_period_days"),
+ "max_retries": obj.get("max_retries"),
+ "retry_delay_hours": obj.get("retry_delay_hours")
})
return _obj
diff --git a/conekta/models/plan_response.py b/conekta/models/plan_response.py
index 5a802cc..27bd197 100644
--- a/conekta/models/plan_response.py
+++ b/conekta/models/plan_response.py
@@ -5,7 +5,7 @@
Conekta sdk
- The version of the OpenAPI document: 2.1.0
+ The version of the OpenAPI document: 2.2.0
Contact: engineering@conekta.com
Generated by OpenAPI Generator (https://openapi-generator.tech)
@@ -39,7 +39,9 @@ class PlanResponse(BaseModel):
name: Optional[StrictStr] = None
object: Optional[StrictStr] = None
trial_period_days: Optional[StrictInt] = None
- __properties: ClassVar[List[str]] = ["amount", "created_at", "currency", "expiry_count", "frequency", "id", "interval", "livemode", "name", "object", "trial_period_days"]
+ max_retries: Optional[StrictInt] = None
+ retry_delay_hours: Optional[StrictInt] = None
+ __properties: ClassVar[List[str]] = ["amount", "created_at", "currency", "expiry_count", "frequency", "id", "interval", "livemode", "name", "object", "trial_period_days", "max_retries", "retry_delay_hours"]
model_config = ConfigDict(
populate_by_name=True,
@@ -112,7 +114,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
"livemode": obj.get("livemode"),
"name": obj.get("name"),
"object": obj.get("object"),
- "trial_period_days": obj.get("trial_period_days")
+ "trial_period_days": obj.get("trial_period_days"),
+ "max_retries": obj.get("max_retries"),
+ "retry_delay_hours": obj.get("retry_delay_hours")
})
return _obj
diff --git a/conekta/models/plan_update_request.py b/conekta/models/plan_update_request.py
index e96295a..b2f51c8 100644
--- a/conekta/models/plan_update_request.py
+++ b/conekta/models/plan_update_request.py
@@ -5,7 +5,7 @@
Conekta sdk
- The version of the OpenAPI document: 2.1.0
+ The version of the OpenAPI document: 2.2.0
Contact: engineering@conekta.com
Generated by OpenAPI Generator (https://openapi-generator.tech)
diff --git a/conekta/models/product.py b/conekta/models/product.py
index f56f14c..3e2b030 100644
--- a/conekta/models/product.py
+++ b/conekta/models/product.py
@@ -5,7 +5,7 @@
Conekta sdk
- The version of the OpenAPI document: 2.1.0
+ The version of the OpenAPI document: 2.2.0
Contact: engineering@conekta.com
Generated by OpenAPI Generator (https://openapi-generator.tech)
diff --git a/conekta/models/product_data_response.py b/conekta/models/product_data_response.py
index 391cf54..b18d62e 100644
--- a/conekta/models/product_data_response.py
+++ b/conekta/models/product_data_response.py
@@ -5,7 +5,7 @@
Conekta sdk
- The version of the OpenAPI document: 2.1.0
+ The version of the OpenAPI document: 2.2.0
Contact: engineering@conekta.com
Generated by OpenAPI Generator (https://openapi-generator.tech)
diff --git a/conekta/models/product_order_response.py b/conekta/models/product_order_response.py
index 814c7c4..86050fc 100644
--- a/conekta/models/product_order_response.py
+++ b/conekta/models/product_order_response.py
@@ -5,7 +5,7 @@
Conekta sdk
- The version of the OpenAPI document: 2.1.0
+ The version of the OpenAPI document: 2.2.0
Contact: engineering@conekta.com
Generated by OpenAPI Generator (https://openapi-generator.tech)
diff --git a/conekta/models/resend_request.py b/conekta/models/resend_request.py
new file mode 100644
index 0000000..5f4593e
--- /dev/null
+++ b/conekta/models/resend_request.py
@@ -0,0 +1,88 @@
+# coding: utf-8
+
+"""
+ Conekta API
+
+ Conekta sdk
+
+ The version of the OpenAPI document: 2.2.0
+ Contact: engineering@conekta.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, Field, StrictStr
+from typing import Any, ClassVar, Dict, List
+from typing import Optional, Set
+from typing_extensions import Self
+
+class ResendRequest(BaseModel):
+ """
+ ResendRequest
+ """ # noqa: E501
+ webhooks_ids: List[StrictStr] = Field(description="webhooks ids to resend event")
+ __properties: ClassVar[List[str]] = ["webhooks_ids"]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of ResendRequest from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of ResendRequest from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "webhooks_ids": obj.get("webhooks_ids")
+ })
+ return _obj
+
+
diff --git a/conekta/models/risk_rules_data.py b/conekta/models/risk_rules_data.py
index b6e4c20..3301abc 100644
--- a/conekta/models/risk_rules_data.py
+++ b/conekta/models/risk_rules_data.py
@@ -5,7 +5,7 @@
Conekta sdk
- The version of the OpenAPI document: 2.1.0
+ The version of the OpenAPI document: 2.2.0
Contact: engineering@conekta.com
Generated by OpenAPI Generator (https://openapi-generator.tech)
diff --git a/conekta/models/risk_rules_list.py b/conekta/models/risk_rules_list.py
index b6740be..f76328a 100644
--- a/conekta/models/risk_rules_list.py
+++ b/conekta/models/risk_rules_list.py
@@ -5,7 +5,7 @@
Conekta sdk
- The version of the OpenAPI document: 2.1.0
+ The version of the OpenAPI document: 2.2.0
Contact: engineering@conekta.com
Generated by OpenAPI Generator (https://openapi-generator.tech)
diff --git a/conekta/models/shipping_order_response.py b/conekta/models/shipping_order_response.py
index 6ffe769..7382942 100644
--- a/conekta/models/shipping_order_response.py
+++ b/conekta/models/shipping_order_response.py
@@ -5,7 +5,7 @@
Conekta sdk
- The version of the OpenAPI document: 2.1.0
+ The version of the OpenAPI document: 2.2.0
Contact: engineering@conekta.com
Generated by OpenAPI Generator (https://openapi-generator.tech)
diff --git a/conekta/models/shipping_request.py b/conekta/models/shipping_request.py
index ebb5edf..bc3c0a6 100644
--- a/conekta/models/shipping_request.py
+++ b/conekta/models/shipping_request.py
@@ -5,7 +5,7 @@
Conekta sdk
- The version of the OpenAPI document: 2.1.0
+ The version of the OpenAPI document: 2.2.0
Contact: engineering@conekta.com
Generated by OpenAPI Generator (https://openapi-generator.tech)
diff --git a/conekta/models/sms_checkout_request.py b/conekta/models/sms_checkout_request.py
index 1acc5bc..4d07a55 100644
--- a/conekta/models/sms_checkout_request.py
+++ b/conekta/models/sms_checkout_request.py
@@ -5,7 +5,7 @@
Conekta sdk
- The version of the OpenAPI document: 2.1.0
+ The version of the OpenAPI document: 2.2.0
Contact: engineering@conekta.com
Generated by OpenAPI Generator (https://openapi-generator.tech)
diff --git a/conekta/models/subscription_events_response.py b/conekta/models/subscription_events_response.py
index 032218b..d293403 100644
--- a/conekta/models/subscription_events_response.py
+++ b/conekta/models/subscription_events_response.py
@@ -5,7 +5,7 @@
Conekta sdk
- The version of the OpenAPI document: 2.1.0
+ The version of the OpenAPI document: 2.2.0
Contact: engineering@conekta.com
Generated by OpenAPI Generator (https://openapi-generator.tech)
diff --git a/conekta/models/subscription_request.py b/conekta/models/subscription_request.py
index b27c6af..561dafc 100644
--- a/conekta/models/subscription_request.py
+++ b/conekta/models/subscription_request.py
@@ -5,7 +5,7 @@
Conekta sdk
- The version of the OpenAPI document: 2.1.0
+ The version of the OpenAPI document: 2.2.0
Contact: engineering@conekta.com
Generated by OpenAPI Generator (https://openapi-generator.tech)
diff --git a/conekta/models/subscription_response.py b/conekta/models/subscription_response.py
index 2d7e7fa..e313d85 100644
--- a/conekta/models/subscription_response.py
+++ b/conekta/models/subscription_response.py
@@ -5,7 +5,7 @@
Conekta sdk
- The version of the OpenAPI document: 2.1.0
+ The version of the OpenAPI document: 2.2.0
Contact: engineering@conekta.com
Generated by OpenAPI Generator (https://openapi-generator.tech)
diff --git a/conekta/models/subscription_update_request.py b/conekta/models/subscription_update_request.py
index 15944fb..de775eb 100644
--- a/conekta/models/subscription_update_request.py
+++ b/conekta/models/subscription_update_request.py
@@ -5,7 +5,7 @@
Conekta sdk
- The version of the OpenAPI document: 2.1.0
+ The version of the OpenAPI document: 2.2.0
Contact: engineering@conekta.com
Generated by OpenAPI Generator (https://openapi-generator.tech)
diff --git a/conekta/models/token.py b/conekta/models/token.py
index 3f2758b..9ea374d 100644
--- a/conekta/models/token.py
+++ b/conekta/models/token.py
@@ -5,7 +5,7 @@
Conekta sdk
- The version of the OpenAPI document: 2.1.0
+ The version of the OpenAPI document: 2.2.0
Contact: engineering@conekta.com
Generated by OpenAPI Generator (https://openapi-generator.tech)
diff --git a/conekta/models/token_card.py b/conekta/models/token_card.py
index 2ac2c73..d7539c5 100644
--- a/conekta/models/token_card.py
+++ b/conekta/models/token_card.py
@@ -5,7 +5,7 @@
Conekta sdk
- The version of the OpenAPI document: 2.1.0
+ The version of the OpenAPI document: 2.2.0
Contact: engineering@conekta.com
Generated by OpenAPI Generator (https://openapi-generator.tech)
diff --git a/conekta/models/token_checkout.py b/conekta/models/token_checkout.py
index 9048445..64bb8a7 100644
--- a/conekta/models/token_checkout.py
+++ b/conekta/models/token_checkout.py
@@ -5,7 +5,7 @@
Conekta sdk
- The version of the OpenAPI document: 2.1.0
+ The version of the OpenAPI document: 2.2.0
Contact: engineering@conekta.com
Generated by OpenAPI Generator (https://openapi-generator.tech)
diff --git a/conekta/models/token_response.py b/conekta/models/token_response.py
index c1afd31..e5750a2 100644
--- a/conekta/models/token_response.py
+++ b/conekta/models/token_response.py
@@ -5,7 +5,7 @@
Conekta sdk
- The version of the OpenAPI document: 2.1.0
+ The version of the OpenAPI document: 2.2.0
Contact: engineering@conekta.com
Generated by OpenAPI Generator (https://openapi-generator.tech)
diff --git a/conekta/models/token_response_checkout.py b/conekta/models/token_response_checkout.py
index aead8dc..1a886b5 100644
--- a/conekta/models/token_response_checkout.py
+++ b/conekta/models/token_response_checkout.py
@@ -5,7 +5,7 @@
Conekta sdk
- The version of the OpenAPI document: 2.1.0
+ The version of the OpenAPI document: 2.2.0
Contact: engineering@conekta.com
Generated by OpenAPI Generator (https://openapi-generator.tech)
diff --git a/conekta/models/transaction_response.py b/conekta/models/transaction_response.py
index 2567431..fc26982 100644
--- a/conekta/models/transaction_response.py
+++ b/conekta/models/transaction_response.py
@@ -5,7 +5,7 @@
Conekta sdk
- The version of the OpenAPI document: 2.1.0
+ The version of the OpenAPI document: 2.2.0
Contact: engineering@conekta.com
Generated by OpenAPI Generator (https://openapi-generator.tech)
diff --git a/conekta/models/transfer_destination_response.py b/conekta/models/transfer_destination_response.py
index 1774e25..8a67d5c 100644
--- a/conekta/models/transfer_destination_response.py
+++ b/conekta/models/transfer_destination_response.py
@@ -5,7 +5,7 @@
Conekta sdk
- The version of the OpenAPI document: 2.1.0
+ The version of the OpenAPI document: 2.2.0
Contact: engineering@conekta.com
Generated by OpenAPI Generator (https://openapi-generator.tech)
diff --git a/conekta/models/transfer_method_response.py b/conekta/models/transfer_method_response.py
index d36d868..65c6962 100644
--- a/conekta/models/transfer_method_response.py
+++ b/conekta/models/transfer_method_response.py
@@ -5,7 +5,7 @@
Conekta sdk
- The version of the OpenAPI document: 2.1.0
+ The version of the OpenAPI document: 2.2.0
Contact: engineering@conekta.com
Generated by OpenAPI Generator (https://openapi-generator.tech)
diff --git a/conekta/models/transfer_response.py b/conekta/models/transfer_response.py
index a595a95..3c4afa2 100644
--- a/conekta/models/transfer_response.py
+++ b/conekta/models/transfer_response.py
@@ -5,7 +5,7 @@
Conekta sdk
- The version of the OpenAPI document: 2.1.0
+ The version of the OpenAPI document: 2.2.0
Contact: engineering@conekta.com
Generated by OpenAPI Generator (https://openapi-generator.tech)
diff --git a/conekta/models/transfers_response.py b/conekta/models/transfers_response.py
index 129ffbc..6cef6f7 100644
--- a/conekta/models/transfers_response.py
+++ b/conekta/models/transfers_response.py
@@ -5,7 +5,7 @@
Conekta sdk
- The version of the OpenAPI document: 2.1.0
+ The version of the OpenAPI document: 2.2.0
Contact: engineering@conekta.com
Generated by OpenAPI Generator (https://openapi-generator.tech)
diff --git a/conekta/models/update_customer.py b/conekta/models/update_customer.py
index 8f0ed76..0b8a938 100644
--- a/conekta/models/update_customer.py
+++ b/conekta/models/update_customer.py
@@ -5,7 +5,7 @@
Conekta sdk
- The version of the OpenAPI document: 2.1.0
+ The version of the OpenAPI document: 2.2.0
Contact: engineering@conekta.com
Generated by OpenAPI Generator (https://openapi-generator.tech)
diff --git a/conekta/models/update_customer_antifraud_info.py b/conekta/models/update_customer_antifraud_info.py
index b7dbeb0..6cc94b8 100644
--- a/conekta/models/update_customer_antifraud_info.py
+++ b/conekta/models/update_customer_antifraud_info.py
@@ -5,7 +5,7 @@
Conekta sdk
- The version of the OpenAPI document: 2.1.0
+ The version of the OpenAPI document: 2.2.0
Contact: engineering@conekta.com
Generated by OpenAPI Generator (https://openapi-generator.tech)
diff --git a/conekta/models/update_customer_fiscal_entities_response.py b/conekta/models/update_customer_fiscal_entities_response.py
index 2882862..561df3b 100644
--- a/conekta/models/update_customer_fiscal_entities_response.py
+++ b/conekta/models/update_customer_fiscal_entities_response.py
@@ -5,7 +5,7 @@
Conekta sdk
- The version of the OpenAPI document: 2.1.0
+ The version of the OpenAPI document: 2.2.0
Contact: engineering@conekta.com
Generated by OpenAPI Generator (https://openapi-generator.tech)
diff --git a/conekta/models/update_customer_payment_methods_response.py b/conekta/models/update_customer_payment_methods_response.py
index dd695f3..321a933 100644
--- a/conekta/models/update_customer_payment_methods_response.py
+++ b/conekta/models/update_customer_payment_methods_response.py
@@ -5,7 +5,7 @@
Conekta sdk
- The version of the OpenAPI document: 2.1.0
+ The version of the OpenAPI document: 2.2.0
Contact: engineering@conekta.com
Generated by OpenAPI Generator (https://openapi-generator.tech)
@@ -114,6 +114,11 @@ def from_json(cls, json_str: str) -> Self:
instance.actual_instance = PaymentMethodCashResponse.from_json(json_str)
return instance
+ # check if data type is `PaymentMethodCashResponse`
+ if _data_type == "cash_recurrent":
+ instance.actual_instance = PaymentMethodCashResponse.from_json(json_str)
+ return instance
+
# check if data type is `PaymentMethodCashResponse`
if _data_type == "oxxo_recurrent":
instance.actual_instance = PaymentMethodCashResponse.from_json(json_str)
diff --git a/conekta/models/update_order_discount_lines_request.py b/conekta/models/update_order_discount_lines_request.py
index 24bc757..ab507db 100644
--- a/conekta/models/update_order_discount_lines_request.py
+++ b/conekta/models/update_order_discount_lines_request.py
@@ -5,7 +5,7 @@
Conekta sdk
- The version of the OpenAPI document: 2.1.0
+ The version of the OpenAPI document: 2.2.0
Contact: engineering@conekta.com
Generated by OpenAPI Generator (https://openapi-generator.tech)
diff --git a/conekta/models/update_order_tax_request.py b/conekta/models/update_order_tax_request.py
index cac3e11..1220566 100644
--- a/conekta/models/update_order_tax_request.py
+++ b/conekta/models/update_order_tax_request.py
@@ -5,7 +5,7 @@
Conekta sdk
- The version of the OpenAPI document: 2.1.0
+ The version of the OpenAPI document: 2.2.0
Contact: engineering@conekta.com
Generated by OpenAPI Generator (https://openapi-generator.tech)
diff --git a/conekta/models/update_order_tax_response.py b/conekta/models/update_order_tax_response.py
index 310ce93..1d8773a 100644
--- a/conekta/models/update_order_tax_response.py
+++ b/conekta/models/update_order_tax_response.py
@@ -5,7 +5,7 @@
Conekta sdk
- The version of the OpenAPI document: 2.1.0
+ The version of the OpenAPI document: 2.2.0
Contact: engineering@conekta.com
Generated by OpenAPI Generator (https://openapi-generator.tech)
diff --git a/conekta/models/update_payment_methods.py b/conekta/models/update_payment_methods.py
index 030c8db..761dda3 100644
--- a/conekta/models/update_payment_methods.py
+++ b/conekta/models/update_payment_methods.py
@@ -5,7 +5,7 @@
Conekta sdk
- The version of the OpenAPI document: 2.1.0
+ The version of the OpenAPI document: 2.2.0
Contact: engineering@conekta.com
Generated by OpenAPI Generator (https://openapi-generator.tech)
diff --git a/conekta/models/update_product.py b/conekta/models/update_product.py
index 70a6046..b7ef81c 100644
--- a/conekta/models/update_product.py
+++ b/conekta/models/update_product.py
@@ -5,7 +5,7 @@
Conekta sdk
- The version of the OpenAPI document: 2.1.0
+ The version of the OpenAPI document: 2.2.0
Contact: engineering@conekta.com
Generated by OpenAPI Generator (https://openapi-generator.tech)
diff --git a/conekta/models/webhook_key_create_response.py b/conekta/models/webhook_key_create_response.py
index c96ac0a..7c8134c 100644
--- a/conekta/models/webhook_key_create_response.py
+++ b/conekta/models/webhook_key_create_response.py
@@ -5,7 +5,7 @@
Conekta sdk
- The version of the OpenAPI document: 2.1.0
+ The version of the OpenAPI document: 2.2.0
Contact: engineering@conekta.com
Generated by OpenAPI Generator (https://openapi-generator.tech)
diff --git a/conekta/models/webhook_key_delete_response.py b/conekta/models/webhook_key_delete_response.py
index 37c74ca..a17c0a4 100644
--- a/conekta/models/webhook_key_delete_response.py
+++ b/conekta/models/webhook_key_delete_response.py
@@ -5,7 +5,7 @@
Conekta sdk
- The version of the OpenAPI document: 2.1.0
+ The version of the OpenAPI document: 2.2.0
Contact: engineering@conekta.com
Generated by OpenAPI Generator (https://openapi-generator.tech)
diff --git a/conekta/models/webhook_key_request.py b/conekta/models/webhook_key_request.py
index 4591be0..a76d04f 100644
--- a/conekta/models/webhook_key_request.py
+++ b/conekta/models/webhook_key_request.py
@@ -5,7 +5,7 @@
Conekta sdk
- The version of the OpenAPI document: 2.1.0
+ The version of the OpenAPI document: 2.2.0
Contact: engineering@conekta.com
Generated by OpenAPI Generator (https://openapi-generator.tech)
diff --git a/conekta/models/webhook_key_response.py b/conekta/models/webhook_key_response.py
index 0cd487c..5efa20b 100644
--- a/conekta/models/webhook_key_response.py
+++ b/conekta/models/webhook_key_response.py
@@ -5,7 +5,7 @@
Conekta sdk
- The version of the OpenAPI document: 2.1.0
+ The version of the OpenAPI document: 2.2.0
Contact: engineering@conekta.com
Generated by OpenAPI Generator (https://openapi-generator.tech)
diff --git a/conekta/models/webhook_key_update_request.py b/conekta/models/webhook_key_update_request.py
index 14f1cdb..f05c5cb 100644
--- a/conekta/models/webhook_key_update_request.py
+++ b/conekta/models/webhook_key_update_request.py
@@ -5,7 +5,7 @@
Conekta sdk
- The version of the OpenAPI document: 2.1.0
+ The version of the OpenAPI document: 2.2.0
Contact: engineering@conekta.com
Generated by OpenAPI Generator (https://openapi-generator.tech)
diff --git a/conekta/models/webhook_log.py b/conekta/models/webhook_log.py
index da55eec..bd371c8 100644
--- a/conekta/models/webhook_log.py
+++ b/conekta/models/webhook_log.py
@@ -5,7 +5,7 @@
Conekta sdk
- The version of the OpenAPI document: 2.1.0
+ The version of the OpenAPI document: 2.2.0
Contact: engineering@conekta.com
Generated by OpenAPI Generator (https://openapi-generator.tech)
diff --git a/conekta/models/webhook_request.py b/conekta/models/webhook_request.py
index 1eb0379..1e107b4 100644
--- a/conekta/models/webhook_request.py
+++ b/conekta/models/webhook_request.py
@@ -5,7 +5,7 @@
Conekta sdk
- The version of the OpenAPI document: 2.1.0
+ The version of the OpenAPI document: 2.2.0
Contact: engineering@conekta.com
Generated by OpenAPI Generator (https://openapi-generator.tech)
@@ -18,8 +18,8 @@
import re # noqa: F401
import json
-from pydantic import BaseModel, ConfigDict, Field, StrictBool, field_validator
-from typing import Any, ClassVar, Dict, List
+from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator
+from typing import Any, ClassVar, Dict, List, Optional
from typing_extensions import Annotated
from typing import Optional, Set
from typing_extensions import Self
@@ -29,8 +29,8 @@ class WebhookRequest(BaseModel):
a webhook
""" # noqa: E501
url: Annotated[str, Field(strict=True)] = Field(description="Here you must place the URL of your Webhook remember that you must program what you will do with the events received. Also do not forget to handle the HTTPS protocol for greater security.")
- synchronous: StrictBool = Field(description="It is a value that allows to decide if the events will be synchronous or asynchronous. We recommend asynchronous = false")
- __properties: ClassVar[List[str]] = ["url", "synchronous"]
+ subscribed_events: Optional[List[StrictStr]] = Field(default=None, description="events that will be sent to the webhook")
+ __properties: ClassVar[List[str]] = ["url", "subscribed_events"]
@field_validator('url')
def url_validate_regular_expression(cls, value):
@@ -91,7 +91,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
_obj = cls.model_validate({
"url": obj.get("url"),
- "synchronous": obj.get("synchronous") if obj.get("synchronous") is not None else False
+ "subscribed_events": obj.get("subscribed_events")
})
return _obj
diff --git a/conekta/models/webhook_response.py b/conekta/models/webhook_response.py
index fac87aa..be3baaa 100644
--- a/conekta/models/webhook_response.py
+++ b/conekta/models/webhook_response.py
@@ -5,7 +5,7 @@
Conekta sdk
- The version of the OpenAPI document: 2.1.0
+ The version of the OpenAPI document: 2.2.0
Contact: engineering@conekta.com
Generated by OpenAPI Generator (https://openapi-generator.tech)
@@ -18,7 +18,7 @@
import re # noqa: F401
import json
-from pydantic import BaseModel, ConfigDict, StrictBool, StrictStr
+from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr
from typing import Any, ClassVar, Dict, List, Optional
from typing import Optional, Set
from typing_extensions import Self
@@ -27,17 +27,15 @@ class WebhookResponse(BaseModel):
"""
webhooks model
""" # noqa: E501
- deleted: Optional[StrictBool] = None
- development_enabled: Optional[StrictBool] = None
- id: Optional[StrictStr] = None
- livemode: Optional[StrictBool] = None
- object: Optional[StrictStr] = None
- production_enabled: Optional[StrictBool] = None
- status: Optional[StrictStr] = None
- subscribed_events: Optional[List[StrictStr]] = None
- synchronous: Optional[StrictBool] = None
- url: Optional[StrictStr] = None
- __properties: ClassVar[List[str]] = ["deleted", "development_enabled", "id", "livemode", "object", "production_enabled", "status", "subscribed_events", "synchronous", "url"]
+ id: Optional[StrictStr] = Field(default=None, description="id of the webhook")
+ description: Optional[StrictStr] = Field(default=None, description="A name or brief explanation of what this webhook is used for")
+ livemode: Optional[StrictBool] = Field(default=None, description="Indicates if the webhook is in production")
+ active: Optional[StrictBool] = Field(default=None, description="Indicates if the webhook is actived or not")
+ object: Optional[StrictStr] = Field(default=None, description="Object name, value is 'webhook'")
+ status: Optional[StrictStr] = Field(default=None, description="Indicates if the webhook is ready to receive events or failing")
+ subscribed_events: Optional[List[StrictStr]] = Field(default=None, description="lists the events that will be sent to the webhook")
+ url: Optional[StrictStr] = Field(default=None, description="url or endpoint of the webhook")
+ __properties: ClassVar[List[str]] = ["id", "description", "livemode", "active", "object", "status", "subscribed_events", "url"]
model_config = ConfigDict(
populate_by_name=True,
@@ -78,11 +76,6 @@ def to_dict(self) -> Dict[str, Any]:
exclude=excluded_fields,
exclude_none=True,
)
- # set to None if deleted (nullable) is None
- # and model_fields_set contains the field
- if self.deleted is None and "deleted" in self.model_fields_set:
- _dict['deleted'] = None
-
return _dict
@classmethod
@@ -95,15 +88,13 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
return cls.model_validate(obj)
_obj = cls.model_validate({
- "deleted": obj.get("deleted"),
- "development_enabled": obj.get("development_enabled"),
"id": obj.get("id"),
+ "description": obj.get("description"),
"livemode": obj.get("livemode"),
+ "active": obj.get("active"),
"object": obj.get("object"),
- "production_enabled": obj.get("production_enabled"),
"status": obj.get("status"),
"subscribed_events": obj.get("subscribed_events"),
- "synchronous": obj.get("synchronous"),
"url": obj.get("url")
})
return _obj
diff --git a/conekta/models/webhook_update_request.py b/conekta/models/webhook_update_request.py
index 607353d..1e4fa01 100644
--- a/conekta/models/webhook_update_request.py
+++ b/conekta/models/webhook_update_request.py
@@ -5,7 +5,7 @@
Conekta sdk
- The version of the OpenAPI document: 2.1.0
+ The version of the OpenAPI document: 2.2.0
Contact: engineering@conekta.com
Generated by OpenAPI Generator (https://openapi-generator.tech)
@@ -28,14 +28,17 @@ class WebhookUpdateRequest(BaseModel):
"""
an updated webhook
""" # noqa: E501
- url: Annotated[str, Field(strict=True)] = Field(description="Here you must place the URL of your Webhook remember that you must program what you will do with the events received. Also do not forget to handle the HTTPS protocol for greater security.")
- synchronous: Optional[StrictBool] = Field(default=False, description="It is a value that allows to decide if the events will be synchronous or asynchronous. We recommend asynchronous = false")
- events: Optional[List[StrictStr]] = None
- __properties: ClassVar[List[str]] = ["url", "synchronous", "events"]
+ url: Optional[Annotated[str, Field(strict=True)]] = Field(default=None, description="Here you must place the URL of your Webhook remember that you must program what you will do with the events received. Also do not forget to handle the HTTPS protocol for greater security.")
+ subscribed_events: Optional[List[StrictStr]] = Field(default=None, description="events that will be sent to the webhook")
+ active: Optional[StrictBool] = Field(default=None, description="whether the webhook is active or not")
+ __properties: ClassVar[List[str]] = ["url", "subscribed_events", "active"]
@field_validator('url')
def url_validate_regular_expression(cls, value):
"""Validates the regular expression"""
+ if value is None:
+ return value
+
if not re.match(r"^(?!.*(localhost|127\.0\.0\.1)).*$", value):
raise ValueError(r"must validate the regular expression /^(?!.*(localhost|127\.0\.0\.1)).*$/")
return value
@@ -92,8 +95,8 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
_obj = cls.model_validate({
"url": obj.get("url"),
- "synchronous": obj.get("synchronous") if obj.get("synchronous") is not None else False,
- "events": obj.get("events")
+ "subscribed_events": obj.get("subscribed_events"),
+ "active": obj.get("active")
})
return _obj
diff --git a/conekta/models/whitelistlist_rule_response.py b/conekta/models/whitelistlist_rule_response.py
index 5670440..6eb833f 100644
--- a/conekta/models/whitelistlist_rule_response.py
+++ b/conekta/models/whitelistlist_rule_response.py
@@ -5,7 +5,7 @@
Conekta sdk
- The version of the OpenAPI document: 2.1.0
+ The version of the OpenAPI document: 2.2.0
Contact: engineering@conekta.com
Generated by OpenAPI Generator (https://openapi-generator.tech)
diff --git a/conekta/rest.py b/conekta/rest.py
index 08aa9a5..ba6be74 100644
--- a/conekta/rest.py
+++ b/conekta/rest.py
@@ -5,7 +5,7 @@
Conekta sdk
- The version of the OpenAPI document: 2.1.0
+ The version of the OpenAPI document: 2.2.0
Contact: engineering@conekta.com
Generated by OpenAPI Generator (https://openapi-generator.tech)
diff --git a/docs/AntifraudApi.md b/docs/AntifraudApi.md
index 3ef4443..f34e8c4 100644
--- a/docs/AntifraudApi.md
+++ b/docs/AntifraudApi.md
@@ -81,7 +81,7 @@ Name | Type | Description | Notes
### HTTP request headers
- **Content-Type**: application/json
- - **Accept**: application/vnd.conekta-v2.1.0+json
+ - **Accept**: application/vnd.conekta-v2.2.0+json
### HTTP response details
@@ -162,7 +162,7 @@ Name | Type | Description | Notes
### HTTP request headers
- **Content-Type**: application/json
- - **Accept**: application/vnd.conekta-v2.1.0+json
+ - **Accept**: application/vnd.conekta-v2.2.0+json
### HTTP response details
@@ -245,7 +245,7 @@ Name | Type | Description | Notes
### HTTP request headers
- **Content-Type**: Not defined
- - **Accept**: application/vnd.conekta-v2.1.0+json
+ - **Accept**: application/vnd.conekta-v2.2.0+json
### HTTP response details
@@ -328,7 +328,7 @@ Name | Type | Description | Notes
### HTTP request headers
- **Content-Type**: Not defined
- - **Accept**: application/vnd.conekta-v2.1.0+json
+ - **Accept**: application/vnd.conekta-v2.2.0+json
### HTTP response details
@@ -410,7 +410,7 @@ Name | Type | Description | Notes
### HTTP request headers
- **Content-Type**: Not defined
- - **Accept**: application/vnd.conekta-v2.1.0+json
+ - **Accept**: application/vnd.conekta-v2.2.0+json
### HTTP response details
@@ -490,7 +490,7 @@ Name | Type | Description | Notes
### HTTP request headers
- **Content-Type**: Not defined
- - **Accept**: application/vnd.conekta-v2.1.0+json
+ - **Accept**: application/vnd.conekta-v2.2.0+json
### HTTP response details
diff --git a/docs/ApiKeyCreateResponse.md b/docs/ApiKeyCreateResponse.md
index fdd19db..d6bd300 100644
--- a/docs/ApiKeyCreateResponse.md
+++ b/docs/ApiKeyCreateResponse.md
@@ -9,10 +9,10 @@ Name | Type | Description | Notes
**created_at** | **int** | Unix timestamp in seconds of when the api key was created | [optional]
**updated_at** | **int** | Unix timestamp in seconds of when the api key was last updated | [optional]
**deactivated_at** | **int** | Unix timestamp in seconds of when the api key was deleted | [optional]
+**last_used_at** | **int** | Unix timestamp in seconds with the api key was used | [optional]
**description** | **str** | A name or brief explanation of what this api key is used for | [optional]
**id** | **str** | Unique identifier of the api key | [optional]
**livemode** | **bool** | Indicates if the api key is in production | [optional]
-**deleted** | **bool** | Indicates if the api key was deleted | [optional]
**object** | **str** | Object name, value is 'api_key' | [optional]
**prefix** | **str** | The first few characters of the authentication_token | [optional]
**role** | **str** | Indicates if the api key is private or public | [optional]
diff --git a/docs/ApiKeyResponse.md b/docs/ApiKeyResponse.md
index 4fb4874..528792d 100644
--- a/docs/ApiKeyResponse.md
+++ b/docs/ApiKeyResponse.md
@@ -10,10 +10,10 @@ Name | Type | Description | Notes
**created_at** | **int** | Unix timestamp in seconds of when the api key was created | [optional]
**updated_at** | **int** | Unix timestamp in seconds of when the api key was last updated | [optional]
**deactivated_at** | **int** | Unix timestamp in seconds of when the api key was deleted | [optional]
+**last_used_at** | **int** | Unix timestamp in seconds with the api key was used | [optional]
**description** | **str** | A name or brief explanation of what this api key is used for | [optional]
**id** | **str** | Unique identifier of the api key | [optional]
**livemode** | **bool** | Indicates if the api key is in production | [optional]
-**deleted** | **bool** | Indicates if the api key was deleted | [optional]
**object** | **str** | Object name, value is 'api_key' | [optional]
**prefix** | **str** | The first few characters of the authentication_token | [optional]
**role** | **str** | Indicates if the api key is private or public | [optional]
diff --git a/docs/ApiKeyResponseOnDelete.md b/docs/ApiKeyResponseOnDelete.md
index cb8e7b7..e6a8d57 100644
--- a/docs/ApiKeyResponseOnDelete.md
+++ b/docs/ApiKeyResponseOnDelete.md
@@ -13,7 +13,7 @@ Name | Type | Description | Notes
**prefix** | **str** | The first few characters of the authentication_token | [optional]
**id** | **str** | Unique identifier of the api key | [optional]
**object** | **str** | Object name, value is 'api_key' | [optional]
-**deleted** | **bool** | Indicates if the api key was deleted | [optional]
+**last_used_at** | **int** | Unix timestamp in seconds with the api key was used | [optional]
**role** | **str** | Indicates if the api key is private or public | [optional]
## Example
diff --git a/docs/ApiKeysApi.md b/docs/ApiKeysApi.md
index a1a54a2..90bf80e 100644
--- a/docs/ApiKeysApi.md
+++ b/docs/ApiKeysApi.md
@@ -84,7 +84,7 @@ Name | Type | Description | Notes
### HTTP request headers
- **Content-Type**: application/json
- - **Accept**: application/vnd.conekta-v2.1.0+json
+ - **Accept**: application/vnd.conekta-v2.2.0+json
### HTTP response details
@@ -167,7 +167,7 @@ Name | Type | Description | Notes
### HTTP request headers
- **Content-Type**: Not defined
- - **Accept**: application/vnd.conekta-v2.1.0+json
+ - **Accept**: application/vnd.conekta-v2.2.0+json
### HTTP response details
@@ -252,7 +252,7 @@ Name | Type | Description | Notes
### HTTP request headers
- **Content-Type**: Not defined
- - **Accept**: application/vnd.conekta-v2.1.0+json
+ - **Accept**: application/vnd.conekta-v2.2.0+json
### HTTP response details
@@ -343,7 +343,7 @@ Name | Type | Description | Notes
### HTTP request headers
- **Content-Type**: Not defined
- - **Accept**: application/vnd.conekta-v2.1.0+json
+ - **Accept**: application/vnd.conekta-v2.2.0+json
### HTTP response details
@@ -428,7 +428,7 @@ Name | Type | Description | Notes
### HTTP request headers
- **Content-Type**: application/json
- - **Accept**: application/vnd.conekta-v2.1.0+json
+ - **Accept**: application/vnd.conekta-v2.2.0+json
### HTTP response details
diff --git a/docs/BalancesApi.md b/docs/BalancesApi.md
index 96aa3f8..8c8930e 100644
--- a/docs/BalancesApi.md
+++ b/docs/BalancesApi.md
@@ -75,7 +75,7 @@ Name | Type | Description | Notes
### HTTP request headers
- **Content-Type**: Not defined
- - **Accept**: application/vnd.conekta-v2.1.0+json
+ - **Accept**: application/vnd.conekta-v2.2.0+json
### HTTP response details
diff --git a/docs/ChargeOrderResponsePaymentMethod.md b/docs/ChargeOrderResponsePaymentMethod.md
index e6a3e1a..26009ba 100644
--- a/docs/ChargeOrderResponsePaymentMethod.md
+++ b/docs/ChargeOrderResponsePaymentMethod.md
@@ -12,8 +12,8 @@ Name | Type | Description | Notes
**cashier_id** | **str** | | [optional]
**reference** | **str** | | [optional]
**barcode_url** | **str** | | [optional]
-**expires_at** | **int** | | [optional]
-**product_type** | **str** | Product type, e.g. bbva_cash_in, cash_in, pespay_cash_in, etc. | [optional]
+**expires_at** | **int** | Expiration date of the charge |
+**product_type** | **str** | Product type of the charge |
**service_name** | **str** | | [optional]
**store** | **str** | | [optional]
**store_name** | **str** | | [optional]
@@ -31,7 +31,7 @@ Name | Type | Description | Notes
**bank** | **str** | | [optional]
**clabe** | **str** | | [optional]
**description** | **str** | | [optional]
-**executed_at** | **int** | | [optional]
+**executed_at** | **str** | | [optional]
**issuing_account_bank** | **str** | | [optional]
**issuing_account_number** | **str** | | [optional]
**issuing_account_holder_name** | **str** | | [optional]
@@ -43,6 +43,10 @@ Name | Type | Description | Notes
**receiving_account_tax_id** | **str** | | [optional]
**reference_number** | **str** | | [optional]
**tracking_code** | **str** | | [optional]
+**cancel_url** | **str** | URL to redirect the customer after a canceled payment | [optional]
+**failure_url** | **str** | URL to redirect the customer after a failed payment | [optional]
+**redirect_url** | **str** | URL to redirect the customer to complete the payment | [optional]
+**success_url** | **str** | URL to redirect the customer after a successful payment | [optional]
## Example
diff --git a/docs/ChargeRequestPaymentMethod.md b/docs/ChargeRequestPaymentMethod.md
index 0e143b4..50a1cdd 100644
--- a/docs/ChargeRequestPaymentMethod.md
+++ b/docs/ChargeRequestPaymentMethod.md
@@ -6,6 +6,11 @@
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**type** | **str** | Type of payment method |
+**cancel_url** | **str** | URL to redirect the customer after a canceled payment |
+**can_not_expire** | **bool** | Indicates if the payment method can not expire |
+**failure_url** | **str** | URL to redirect the customer after a failed payment |
+**product_type** | **str** | Product type of the payment method, use for the payment method to know the product type |
+**success_url** | **str** | URL to redirect the customer after a successful payment |
**cvc** | **str** | Optional, It is a value that allows identifying the security code of the card. Only for PCI merchants |
**exp_month** | **str** | Card expiration month |
**exp_year** | **str** | Card expiration year |
diff --git a/docs/ChargeResponse.md b/docs/ChargeResponse.md
index 2eb3c7f..1f573bd 100644
--- a/docs/ChargeResponse.md
+++ b/docs/ChargeResponse.md
@@ -5,24 +5,24 @@
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
-**amount** | **int** | | [optional]
+**amount** | **int** | |
**channel** | [**ChargeResponseChannel**](ChargeResponseChannel.md) | | [optional]
-**created_at** | **int** | | [optional]
-**currency** | **str** | | [optional]
+**created_at** | **int** | |
+**currency** | **str** | |
**customer_id** | **str** | | [optional]
**description** | **str** | | [optional]
**device_fingerprint** | **str** | | [optional]
**failure_code** | **str** | | [optional]
**failure_message** | **str** | | [optional]
-**id** | **str** | Charge ID | [optional]
-**livemode** | **bool** | Whether the charge was made in live mode or not | [optional]
-**object** | **str** | | [optional]
-**order_id** | **str** | Order ID | [optional]
+**id** | **str** | Charge ID |
+**livemode** | **bool** | Whether the charge was made in live mode or not |
+**object** | **str** | |
+**order_id** | **str** | Order ID |
**paid_at** | **int** | Payment date | [optional]
**payment_method** | [**ChargeResponsePaymentMethod**](ChargeResponsePaymentMethod.md) | | [optional]
**reference_id** | **str** | Reference ID of the charge | [optional]
**refunds** | [**ChargeResponseRefunds**](ChargeResponseRefunds.md) | | [optional]
-**status** | **str** | | [optional]
+**status** | **str** | Charge status |
## Example
diff --git a/docs/ChargeResponsePaymentMethod.md b/docs/ChargeResponsePaymentMethod.md
index 403778b..398ce5b 100644
--- a/docs/ChargeResponsePaymentMethod.md
+++ b/docs/ChargeResponsePaymentMethod.md
@@ -12,8 +12,8 @@ Name | Type | Description | Notes
**cashier_id** | **str** | | [optional]
**reference** | **str** | | [optional]
**barcode_url** | **str** | | [optional]
-**expires_at** | **int** | | [optional]
-**product_type** | **str** | Product type, e.g. bbva_cash_in, cash_in, pespay_cash_in, etc. | [optional]
+**expires_at** | **int** | Expiration date of the charge |
+**product_type** | **str** | Product type of the charge |
**service_name** | **str** | | [optional]
**store** | **str** | | [optional]
**store_name** | **str** | | [optional]
@@ -31,7 +31,7 @@ Name | Type | Description | Notes
**bank** | **str** | | [optional]
**clabe** | **str** | | [optional]
**description** | **str** | | [optional]
-**executed_at** | **int** | | [optional]
+**executed_at** | **str** | | [optional]
**issuing_account_bank** | **str** | | [optional]
**issuing_account_number** | **str** | | [optional]
**issuing_account_holder_name** | **str** | | [optional]
@@ -43,6 +43,10 @@ Name | Type | Description | Notes
**receiving_account_tax_id** | **str** | | [optional]
**reference_number** | **str** | | [optional]
**tracking_code** | **str** | | [optional]
+**cancel_url** | **str** | URL to redirect the customer after a canceled payment | [optional]
+**failure_url** | **str** | URL to redirect the customer after a failed payment | [optional]
+**redirect_url** | **str** | URL to redirect the customer to complete the payment | [optional]
+**success_url** | **str** | URL to redirect the customer after a successful payment | [optional]
## Example
diff --git a/docs/ChargesApi.md b/docs/ChargesApi.md
index 7c50e9e..359ff36 100644
--- a/docs/ChargesApi.md
+++ b/docs/ChargesApi.md
@@ -86,7 +86,7 @@ Name | Type | Description | Notes
### HTTP request headers
- **Content-Type**: Not defined
- - **Accept**: application/vnd.conekta-v2.1.0+json
+ - **Accept**: application/vnd.conekta-v2.2.0+json
### HTTP response details
@@ -173,7 +173,7 @@ Name | Type | Description | Notes
### HTTP request headers
- **Content-Type**: application/json
- - **Accept**: application/vnd.conekta-v2.1.0+json
+ - **Accept**: application/vnd.conekta-v2.2.0+json
### HTTP response details
@@ -262,7 +262,7 @@ Name | Type | Description | Notes
### HTTP request headers
- **Content-Type**: application/json
- - **Accept**: application/vnd.conekta-v2.1.0+json
+ - **Accept**: application/vnd.conekta-v2.2.0+json
### HTTP response details
@@ -349,7 +349,7 @@ Name | Type | Description | Notes
### HTTP request headers
- **Content-Type**: application/json
- - **Accept**: application/vnd.conekta-v2.1.0+json
+ - **Accept**: application/vnd.conekta-v2.2.0+json
### HTTP response details
diff --git a/docs/ChargesDataResponse.md b/docs/ChargesDataResponse.md
index 5d1d21a..78973cd 100644
--- a/docs/ChargesDataResponse.md
+++ b/docs/ChargesDataResponse.md
@@ -5,24 +5,24 @@
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
-**amount** | **int** | | [optional]
+**amount** | **int** | |
**channel** | [**ChargeResponseChannel**](ChargeResponseChannel.md) | | [optional]
-**created_at** | **int** | | [optional]
-**currency** | **str** | | [optional]
+**created_at** | **int** | |
+**currency** | **str** | |
**customer_id** | **str** | | [optional]
**description** | **str** | | [optional]
**device_fingerprint** | **str** | | [optional]
**failure_code** | **str** | | [optional]
**failure_message** | **str** | | [optional]
-**id** | **str** | Charge ID | [optional]
-**livemode** | **bool** | Whether the charge was made in live mode or not | [optional]
-**object** | **str** | | [optional]
-**order_id** | **str** | Order ID | [optional]
+**id** | **str** | Charge ID |
+**livemode** | **bool** | Whether the charge was made in live mode or not |
+**object** | **str** | |
+**order_id** | **str** | Order ID |
**paid_at** | **int** | Payment date | [optional]
**payment_method** | [**ChargeResponsePaymentMethod**](ChargeResponsePaymentMethod.md) | | [optional]
**reference_id** | **str** | Reference ID of the charge | [optional]
**refunds** | [**ChargeResponseRefunds**](ChargeResponseRefunds.md) | | [optional]
-**status** | **str** | | [optional]
+**status** | **str** | Charge status |
## Example
diff --git a/docs/ChargesOrderResponseAllOfData.md b/docs/ChargesOrderResponseAllOfData.md
index 91ae218..30f8bdc 100644
--- a/docs/ChargesOrderResponseAllOfData.md
+++ b/docs/ChargesOrderResponseAllOfData.md
@@ -5,24 +5,24 @@
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
-**amount** | **int** | | [optional]
+**amount** | **int** | |
**channel** | [**ChargeResponseChannel**](ChargeResponseChannel.md) | | [optional]
-**created_at** | **int** | | [optional]
-**currency** | **str** | | [optional]
+**created_at** | **int** | |
+**currency** | **str** | |
**customer_id** | **str** | | [optional]
**description** | **str** | | [optional]
**device_fingerprint** | **str** | | [optional]
**failure_code** | **str** | | [optional]
**failure_message** | **str** | | [optional]
-**id** | **str** | Charge ID | [optional]
-**livemode** | **bool** | Whether the charge was made in live mode or not | [optional]
-**object** | **str** | | [optional]
-**order_id** | **str** | Order ID | [optional]
+**id** | **str** | Charge ID |
+**livemode** | **bool** | Whether the charge was made in live mode or not |
+**object** | **str** | |
+**order_id** | **str** | Order ID |
**paid_at** | **int** | Payment date | [optional]
**payment_method** | [**ChargeResponsePaymentMethod**](ChargeResponsePaymentMethod.md) | | [optional]
**reference_id** | **str** | Reference ID of the charge | [optional]
**refunds** | [**ChargeResponseRefunds**](ChargeResponseRefunds.md) | | [optional]
-**status** | **str** | | [optional]
+**status** | **str** | Charge status |
## Example
diff --git a/docs/CheckoutRequest.md b/docs/CheckoutRequest.md
index e4db4da..076aa24 100644
--- a/docs/CheckoutRequest.md
+++ b/docs/CheckoutRequest.md
@@ -1,6 +1,6 @@
# CheckoutRequest
-[Checkout](https://developers.conekta.com/v2.1.0/reference/payment-link) details
+[Checkout](https://developers.conekta.com/v2.2.0/reference/payment-link) details
## Properties
diff --git a/docs/CheckoutResponse.md b/docs/CheckoutResponse.md
index 52a463b..7e6a3ee 100644
--- a/docs/CheckoutResponse.md
+++ b/docs/CheckoutResponse.md
@@ -6,7 +6,7 @@ checkout response
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
-**allowed_payment_methods** | **List[str]** | | [optional]
+**allowed_payment_methods** | **List[str]** | Are the payment methods available for this link | [optional]
**can_not_expire** | **bool** | | [optional]
**emails_sent** | **int** | | [optional]
**exclude_card_networks** | **List[object]** | | [optional]
diff --git a/docs/CompaniesApi.md b/docs/CompaniesApi.md
index 54200f5..3aca56e 100644
--- a/docs/CompaniesApi.md
+++ b/docs/CompaniesApi.md
@@ -84,7 +84,7 @@ Name | Type | Description | Notes
### HTTP request headers
- **Content-Type**: Not defined
- - **Accept**: application/vnd.conekta-v2.1.0+json
+ - **Accept**: application/vnd.conekta-v2.2.0+json
### HTTP response details
@@ -164,7 +164,7 @@ Name | Type | Description | Notes
### HTTP request headers
- **Content-Type**: Not defined
- - **Accept**: application/vnd.conekta-v2.1.0+json
+ - **Accept**: application/vnd.conekta-v2.2.0+json
### HTTP response details
diff --git a/docs/CreateCustomerPaymentMethodsRequest.md b/docs/CreateCustomerPaymentMethodsRequest.md
index f602602..241cea6 100644
--- a/docs/CreateCustomerPaymentMethodsRequest.md
+++ b/docs/CreateCustomerPaymentMethodsRequest.md
@@ -7,7 +7,7 @@ Contains details of the payment methods that the customer has active or has used
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**type** | **str** | Type of payment method |
-**token_id** | **str** | Token id that will be used to create a \"card\" type payment method. See the (subscriptions)[https://developers.conekta.com/v2.1.0/reference/createsubscription] tutorial for more information on how to tokenize cards. |
+**token_id** | **str** | Token id that will be used to create a \"card\" type payment method. See the (subscriptions)[https://developers.conekta.com/v2.2.0/reference/createsubscription] tutorial for more information on how to tokenize cards. |
**expires_at** | **int** | | [optional]
## Example
diff --git a/docs/CreateCustomerPaymentMethodsResponse.md b/docs/CreateCustomerPaymentMethodsResponse.md
index 779f048..6922cdd 100644
--- a/docs/CreateCustomerPaymentMethodsResponse.md
+++ b/docs/CreateCustomerPaymentMethodsResponse.md
@@ -10,9 +10,10 @@ Name | Type | Description | Notes
**object** | **str** | |
**created_at** | **int** | |
**parent_id** | **str** | | [optional]
+**agreements** | [**List[PaymentMethodCashResponseAllOfAgreements]**](PaymentMethodCashResponseAllOfAgreements.md) | | [optional]
**reference** | **str** | | [optional]
**barcode** | **str** | | [optional]
-**barcode_url** | **str** | | [optional]
+**barcode_url** | **str** | URL to the barcode image, reference is the same as barcode | [optional]
**expires_at** | **str** | | [optional]
**provider** | **str** | | [optional]
**last4** | **str** | | [optional]
diff --git a/docs/CustomerPaymentMethodsData.md b/docs/CustomerPaymentMethodsData.md
index 0197451..7b155c6 100644
--- a/docs/CustomerPaymentMethodsData.md
+++ b/docs/CustomerPaymentMethodsData.md
@@ -10,9 +10,10 @@ Name | Type | Description | Notes
**object** | **str** | |
**created_at** | **int** | |
**parent_id** | **str** | | [optional]
+**agreements** | [**List[PaymentMethodCashResponseAllOfAgreements]**](PaymentMethodCashResponseAllOfAgreements.md) | | [optional]
**reference** | **str** | | [optional]
**barcode** | **str** | | [optional]
-**barcode_url** | **str** | | [optional]
+**barcode_url** | **str** | URL to the barcode image, reference is the same as barcode | [optional]
**expires_at** | **str** | | [optional]
**provider** | **str** | | [optional]
**last4** | **str** | | [optional]
diff --git a/docs/CustomerPaymentMethodsRequest.md b/docs/CustomerPaymentMethodsRequest.md
index e0385af..36c7c53 100644
--- a/docs/CustomerPaymentMethodsRequest.md
+++ b/docs/CustomerPaymentMethodsRequest.md
@@ -6,7 +6,7 @@
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**type** | **str** | Type of payment method |
-**token_id** | **str** | Token id that will be used to create a \"card\" type payment method. See the (subscriptions)[https://developers.conekta.com/v2.1.0/reference/createsubscription] tutorial for more information on how to tokenize cards. |
+**token_id** | **str** | Token id that will be used to create a \"card\" type payment method. See the (subscriptions)[https://developers.conekta.com/v2.2.0/reference/createsubscription] tutorial for more information on how to tokenize cards. |
**expires_at** | **int** | | [optional]
## Example
diff --git a/docs/CustomerShippingContacts.md b/docs/CustomerShippingContacts.md
index e3fbbe2..54fe45d 100644
--- a/docs/CustomerShippingContacts.md
+++ b/docs/CustomerShippingContacts.md
@@ -1,6 +1,6 @@
# CustomerShippingContacts
-[Shipping](https://developers.conekta.com/v2.1.0/reference/createcustomershippingcontacts) details, required in case of sending a shipping. If we do not receive a shipping_contact on the order, the default shipping_contact of the customer will be used.
+[Shipping](https://developers.conekta.com/v2.2.0/reference/createcustomershippingcontacts) details, required in case of sending a shipping. If we do not receive a shipping_contact on the order, the default shipping_contact of the customer will be used.
## Properties
diff --git a/docs/CustomerUpdateShippingContacts.md b/docs/CustomerUpdateShippingContacts.md
index 0cdcdaa..bd5f707 100644
--- a/docs/CustomerUpdateShippingContacts.md
+++ b/docs/CustomerUpdateShippingContacts.md
@@ -1,6 +1,6 @@
# CustomerUpdateShippingContacts
-[Shipping](https://developers.conekta.com/v2.1.0/reference/createcustomershippingcontacts) details, required in case of sending a shipping. If we do not receive a shipping_contact on the order, the default shipping_contact of the customer will be used.
+[Shipping](https://developers.conekta.com/v2.2.0/reference/createcustomershippingcontacts) details, required in case of sending a shipping. If we do not receive a shipping_contact on the order, the default shipping_contact of the customer will be used.
## Properties
diff --git a/docs/CustomersApi.md b/docs/CustomersApi.md
index 4d094d5..ef4c14a 100644
--- a/docs/CustomersApi.md
+++ b/docs/CustomersApi.md
@@ -86,7 +86,7 @@ Name | Type | Description | Notes
### HTTP request headers
- **Content-Type**: application/json
- - **Accept**: application/vnd.conekta-v2.1.0+json
+ - **Accept**: application/vnd.conekta-v2.2.0+json
### HTTP response details
@@ -175,7 +175,7 @@ Name | Type | Description | Notes
### HTTP request headers
- **Content-Type**: application/json
- - **Accept**: application/vnd.conekta-v2.1.0+json
+ - **Accept**: application/vnd.conekta-v2.2.0+json
### HTTP response details
@@ -261,7 +261,7 @@ Name | Type | Description | Notes
### HTTP request headers
- **Content-Type**: Not defined
- - **Accept**: application/vnd.conekta-v2.1.0+json
+ - **Accept**: application/vnd.conekta-v2.2.0+json
### HTTP response details
@@ -347,7 +347,7 @@ Name | Type | Description | Notes
### HTTP request headers
- **Content-Type**: Not defined
- - **Accept**: application/vnd.conekta-v2.1.0+json
+ - **Accept**: application/vnd.conekta-v2.2.0+json
### HTTP response details
@@ -438,7 +438,7 @@ Name | Type | Description | Notes
### HTTP request headers
- **Content-Type**: Not defined
- - **Accept**: application/vnd.conekta-v2.1.0+json
+ - **Accept**: application/vnd.conekta-v2.2.0+json
### HTTP response details
@@ -525,7 +525,7 @@ Name | Type | Description | Notes
### HTTP request headers
- **Content-Type**: application/json
- - **Accept**: application/vnd.conekta-v2.1.0+json
+ - **Accept**: application/vnd.conekta-v2.2.0+json
### HTTP response details
@@ -616,7 +616,7 @@ Name | Type | Description | Notes
### HTTP request headers
- **Content-Type**: application/json
- - **Accept**: application/vnd.conekta-v2.1.0+json
+ - **Accept**: application/vnd.conekta-v2.2.0+json
### HTTP response details
diff --git a/docs/DeleteApiKeysResponse.md b/docs/DeleteApiKeysResponse.md
index 33cf6c9..c144ff2 100644
--- a/docs/DeleteApiKeysResponse.md
+++ b/docs/DeleteApiKeysResponse.md
@@ -12,8 +12,9 @@ Name | Type | Description | Notes
**prefix** | **str** | The first few characters of the authentication_token | [optional]
**id** | **str** | Unique identifier of the api key | [optional]
**object** | **str** | Object name, value is 'api_key' | [optional]
-**deleted** | **bool** | | [optional]
+**last_used_at** | **int** | Unix timestamp in seconds with the api key was used | [optional]
**role** | **str** | Indicates if the api key is private or public | [optional]
+**deleted** | **bool** | | [optional]
## Example
diff --git a/docs/DiscountsApi.md b/docs/DiscountsApi.md
index 25e800c..0fa08de 100644
--- a/docs/DiscountsApi.md
+++ b/docs/DiscountsApi.md
@@ -86,7 +86,7 @@ Name | Type | Description | Notes
### HTTP request headers
- **Content-Type**: application/json
- - **Accept**: application/vnd.conekta-v2.1.0+json
+ - **Accept**: application/vnd.conekta-v2.2.0+json
### HTTP response details
@@ -173,7 +173,7 @@ Name | Type | Description | Notes
### HTTP request headers
- **Content-Type**: Not defined
- - **Accept**: application/vnd.conekta-v2.1.0+json
+ - **Accept**: application/vnd.conekta-v2.2.0+json
### HTTP response details
@@ -261,7 +261,7 @@ Name | Type | Description | Notes
### HTTP request headers
- **Content-Type**: Not defined
- - **Accept**: application/vnd.conekta-v2.1.0+json
+ - **Accept**: application/vnd.conekta-v2.2.0+json
### HTTP response details
@@ -355,7 +355,7 @@ Name | Type | Description | Notes
### HTTP request headers
- **Content-Type**: Not defined
- - **Accept**: application/vnd.conekta-v2.1.0+json
+ - **Accept**: application/vnd.conekta-v2.2.0+json
### HTTP response details
@@ -444,7 +444,7 @@ Name | Type | Description | Notes
### HTTP request headers
- **Content-Type**: application/json
- - **Accept**: application/vnd.conekta-v2.1.0+json
+ - **Accept**: application/vnd.conekta-v2.2.0+json
### HTTP response details
diff --git a/docs/EventsApi.md b/docs/EventsApi.md
index 47147fc..484823d 100644
--- a/docs/EventsApi.md
+++ b/docs/EventsApi.md
@@ -6,7 +6,7 @@ Method | HTTP request | Description
------------- | ------------- | -------------
[**get_event**](EventsApi.md#get_event) | **GET** /events/{id} | Get Event
[**get_events**](EventsApi.md#get_events) | **GET** /events | Get list of Events
-[**resend_event**](EventsApi.md#resend_event) | **POST** /events/{event_id}/webhook_logs/{webhook_log_id}/resend | Resend Event
+[**resend_event**](EventsApi.md#resend_event) | **POST** /events/{event_id}/resend | Resend Event
# **get_event**
@@ -81,7 +81,7 @@ Name | Type | Description | Notes
### HTTP request headers
- **Content-Type**: Not defined
- - **Accept**: application/vnd.conekta-v2.1.0+json
+ - **Accept**: application/vnd.conekta-v2.2.0+json
### HTTP response details
@@ -170,7 +170,7 @@ Name | Type | Description | Notes
### HTTP request headers
- **Content-Type**: Not defined
- - **Accept**: application/vnd.conekta-v2.1.0+json
+ - **Accept**: application/vnd.conekta-v2.2.0+json
### HTTP response details
@@ -183,11 +183,11 @@ Name | Type | Description | Notes
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **resend_event**
-> EventsResendResponse resend_event(event_id, webhook_log_id, accept_language=accept_language)
+> EventsResendResponse resend_event(event_id, resend_request, accept_language=accept_language)
Resend Event
-Try to send an event
+Resend event to selected webhooks
### Example
@@ -196,6 +196,7 @@ Try to send an event
```python
import conekta
from conekta.models.events_resend_response import EventsResendResponse
+from conekta.models.resend_request import ResendRequest
from conekta.rest import ApiException
from pprint import pprint
@@ -220,12 +221,12 @@ with conekta.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = conekta.EventsApi(api_client)
event_id = '6463d6e35a4c3e001819e760' # str | event identifier
- webhook_log_id = 'webhl_2tsv6NzWJHBWCkqGt' # str | webhook log identifier
+ resend_request = conekta.ResendRequest() # ResendRequest | requested fields for resend an event
accept_language = es # str | Use for knowing which language to use (optional) (default to es)
try:
# Resend Event
- api_response = api_instance.resend_event(event_id, webhook_log_id, accept_language=accept_language)
+ api_response = api_instance.resend_event(event_id, resend_request, accept_language=accept_language)
print("The response of EventsApi->resend_event:\n")
pprint(api_response)
except Exception as e:
@@ -240,7 +241,7 @@ with conekta.ApiClient(configuration) as api_client:
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**event_id** | **str**| event identifier |
- **webhook_log_id** | **str**| webhook log identifier |
+ **resend_request** | [**ResendRequest**](ResendRequest.md)| requested fields for resend an event |
**accept_language** | **str**| Use for knowing which language to use | [optional] [default to es]
### Return type
@@ -253,8 +254,8 @@ Name | Type | Description | Notes
### HTTP request headers
- - **Content-Type**: Not defined
- - **Accept**: application/vnd.conekta-v2.1.0+json
+ - **Content-Type**: application/json
+ - **Accept**: application/vnd.conekta-v2.2.0+json
### HTTP response details
diff --git a/docs/GetCustomerPaymentMethodDataResponse.md b/docs/GetCustomerPaymentMethodDataResponse.md
index ec9e97e..431d21d 100644
--- a/docs/GetCustomerPaymentMethodDataResponse.md
+++ b/docs/GetCustomerPaymentMethodDataResponse.md
@@ -10,9 +10,10 @@ Name | Type | Description | Notes
**object** | **str** | |
**created_at** | **int** | |
**parent_id** | **str** | | [optional]
+**agreements** | [**List[PaymentMethodCashResponseAllOfAgreements]**](PaymentMethodCashResponseAllOfAgreements.md) | | [optional]
**reference** | **str** | | [optional]
**barcode** | **str** | | [optional]
-**barcode_url** | **str** | | [optional]
+**barcode_url** | **str** | URL to the barcode image, reference is the same as barcode | [optional]
**expires_at** | **str** | | [optional]
**provider** | **str** | | [optional]
**last4** | **str** | | [optional]
diff --git a/docs/LogsApi.md b/docs/LogsApi.md
index b8cabbf..7e5e71a 100644
--- a/docs/LogsApi.md
+++ b/docs/LogsApi.md
@@ -80,7 +80,7 @@ Name | Type | Description | Notes
### HTTP request headers
- **Content-Type**: Not defined
- - **Accept**: application/vnd.conekta-v2.1.0+json
+ - **Accept**: application/vnd.conekta-v2.2.0+json
### HTTP response details
@@ -171,7 +171,7 @@ Name | Type | Description | Notes
### HTTP request headers
- **Content-Type**: Not defined
- - **Accept**: application/vnd.conekta-v2.1.0+json
+ - **Accept**: application/vnd.conekta-v2.2.0+json
### HTTP response details
diff --git a/docs/OrderChannelResponse.md b/docs/OrderChannelResponse.md
new file mode 100644
index 0000000..bb749a1
--- /dev/null
+++ b/docs/OrderChannelResponse.md
@@ -0,0 +1,32 @@
+# OrderChannelResponse
+
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**segment** | **str** | | [optional]
+**checkout_request_id** | **str** | | [optional]
+**checkout_request_type** | **str** | | [optional]
+**id** | **str** | | [optional]
+
+## Example
+
+```python
+from conekta.models.order_channel_response import OrderChannelResponse
+
+# TODO update the JSON string below
+json = "{}"
+# create an instance of OrderChannelResponse from a JSON string
+order_channel_response_instance = OrderChannelResponse.from_json(json)
+# print the JSON string representation of the object
+print(OrderChannelResponse.to_json())
+
+# convert the object into a dict
+order_channel_response_dict = order_channel_response_instance.to_dict()
+# create an instance of OrderChannelResponse from a dict
+order_channel_response_from_dict = OrderChannelResponse.from_dict(order_channel_response_dict)
+```
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/docs/OrderResponseCharges.md b/docs/OrderChargesResponse.md
similarity index 60%
rename from docs/OrderResponseCharges.md
rename to docs/OrderChargesResponse.md
index f9cd2c2..097302b 100644
--- a/docs/OrderResponseCharges.md
+++ b/docs/OrderChargesResponse.md
@@ -1,4 +1,4 @@
-# OrderResponseCharges
+# OrderChargesResponse
The charges associated with the order
@@ -13,19 +13,19 @@ Name | Type | Description | Notes
## Example
```python
-from conekta.models.order_response_charges import OrderResponseCharges
+from conekta.models.order_charges_response import OrderChargesResponse
# TODO update the JSON string below
json = "{}"
-# create an instance of OrderResponseCharges from a JSON string
-order_response_charges_instance = OrderResponseCharges.from_json(json)
+# create an instance of OrderChargesResponse from a JSON string
+order_charges_response_instance = OrderChargesResponse.from_json(json)
# print the JSON string representation of the object
-print(OrderResponseCharges.to_json())
+print(OrderChargesResponse.to_json())
# convert the object into a dict
-order_response_charges_dict = order_response_charges_instance.to_dict()
-# create an instance of OrderResponseCharges from a dict
-order_response_charges_from_dict = OrderResponseCharges.from_dict(order_response_charges_dict)
+order_charges_response_dict = order_charges_response_instance.to_dict()
+# create an instance of OrderChargesResponse from a dict
+order_charges_response_from_dict = OrderChargesResponse.from_dict(order_charges_response_dict)
```
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
diff --git a/docs/OrderResponseDiscountLines.md b/docs/OrderDiscountLinesResponse.md
similarity index 54%
rename from docs/OrderResponseDiscountLines.md
rename to docs/OrderDiscountLinesResponse.md
index 8a18e7c..20464ca 100644
--- a/docs/OrderResponseDiscountLines.md
+++ b/docs/OrderDiscountLinesResponse.md
@@ -1,4 +1,4 @@
-# OrderResponseDiscountLines
+# OrderDiscountLinesResponse
## Properties
@@ -12,19 +12,19 @@ Name | Type | Description | Notes
## Example
```python
-from conekta.models.order_response_discount_lines import OrderResponseDiscountLines
+from conekta.models.order_discount_lines_response import OrderDiscountLinesResponse
# TODO update the JSON string below
json = "{}"
-# create an instance of OrderResponseDiscountLines from a JSON string
-order_response_discount_lines_instance = OrderResponseDiscountLines.from_json(json)
+# create an instance of OrderDiscountLinesResponse from a JSON string
+order_discount_lines_response_instance = OrderDiscountLinesResponse.from_json(json)
# print the JSON string representation of the object
-print(OrderResponseDiscountLines.to_json())
+print(OrderDiscountLinesResponse.to_json())
# convert the object into a dict
-order_response_discount_lines_dict = order_response_discount_lines_instance.to_dict()
-# create an instance of OrderResponseDiscountLines from a dict
-order_response_discount_lines_from_dict = OrderResponseDiscountLines.from_dict(order_response_discount_lines_dict)
+order_discount_lines_response_dict = order_discount_lines_response_instance.to_dict()
+# create an instance of OrderDiscountLinesResponse from a dict
+order_discount_lines_response_from_dict = OrderDiscountLinesResponse.from_dict(order_discount_lines_response_dict)
```
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
diff --git a/docs/OrderRequest.md b/docs/OrderRequest.md
index b4a39e9..f217919 100644
--- a/docs/OrderRequest.md
+++ b/docs/OrderRequest.md
@@ -6,21 +6,21 @@ a order
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
-**charges** | [**List[ChargeRequest]**](ChargeRequest.md) | List of [charges](https://developers.conekta.com/v2.1.0/reference/orderscreatecharge) that are applied to the order | [optional]
+**charges** | [**List[ChargeRequest]**](ChargeRequest.md) | List of [charges](https://developers.conekta.com/v2.2.0/reference/orderscreatecharge) that are applied to the order | [optional]
**checkout** | [**CheckoutRequest**](CheckoutRequest.md) | | [optional]
**currency** | **str** | Currency with which the payment will be made. It uses the 3-letter code of the [International Standard ISO 4217.](https://es.wikipedia.org/wiki/ISO_4217) |
**customer_info** | [**OrderRequestCustomerInfo**](OrderRequestCustomerInfo.md) | |
-**discount_lines** | [**List[OrderDiscountLinesRequest]**](OrderDiscountLinesRequest.md) | List of [discounts](https://developers.conekta.com/v2.1.0/reference/orderscreatediscountline) that are applied to the order. You must have at least one discount. | [optional]
+**discount_lines** | [**List[OrderDiscountLinesRequest]**](OrderDiscountLinesRequest.md) | List of [discounts](https://developers.conekta.com/v2.2.0/reference/orderscreatediscountline) that are applied to the order. You must have at least one discount. | [optional]
**fiscal_entity** | [**OrderFiscalEntityRequest**](OrderFiscalEntityRequest.md) | | [optional]
-**line_items** | [**List[Product]**](Product.md) | List of [products](https://developers.conekta.com/v2.1.0/reference/orderscreateproduct) that are sold in the order. You must have at least one product. |
+**line_items** | [**List[Product]**](Product.md) | List of [products](https://developers.conekta.com/v2.2.0/reference/orderscreateproduct) that are sold in the order. You must have at least one product. |
**metadata** | **Dict[str, object]** | Metadata associated with the order | [optional]
**needs_shipping_contact** | **bool** | Allows you to fill out the shipping information at checkout | [optional]
**pre_authorize** | **bool** | Indicates whether the order charges must be preauthorized | [optional] [default to False]
**processing_mode** | **str** | Indicates the processing mode for the order, either ecommerce, recurrent or validation. | [optional]
**return_url** | **str** | Indicates the redirection callback upon completion of the 3DS2 flow. Do not use this parameter if your order has a checkout parameter | [optional]
**shipping_contact** | [**CustomerShippingContacts**](CustomerShippingContacts.md) | | [optional]
-**shipping_lines** | [**List[ShippingRequest]**](ShippingRequest.md) | List of [shipping costs](https://developers.conekta.com/v2.1.0/reference/orderscreateshipping). If the online store offers digital products. | [optional]
-**tax_lines** | [**List[OrderTaxRequest]**](OrderTaxRequest.md) | List of [taxes](https://developers.conekta.com/v2.1.0/reference/orderscreatetaxes) that are applied to the order. | [optional]
+**shipping_lines** | [**List[ShippingRequest]**](ShippingRequest.md) | List of [shipping costs](https://developers.conekta.com/v2.2.0/reference/orderscreateshipping). If the online store offers digital products. | [optional]
+**tax_lines** | [**List[OrderTaxRequest]**](OrderTaxRequest.md) | List of [taxes](https://developers.conekta.com/v2.2.0/reference/orderscreatetaxes) that are applied to the order. | [optional]
**three_ds_mode** | **str** | Indicates the 3DS2 mode for the order, either smart or strict. | [optional]
## Example
diff --git a/docs/OrderResponse.md b/docs/OrderResponse.md
index 804e336..1aa0600 100644
--- a/docs/OrderResponse.md
+++ b/docs/OrderResponse.md
@@ -8,13 +8,13 @@ Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**amount** | **int** | The total amount to be collected in cents | [optional]
**amount_refunded** | **int** | The total amount refunded in cents | [optional]
-**channel** | [**ChargeResponseChannel**](ChargeResponseChannel.md) | | [optional]
-**charges** | [**OrderResponseCharges**](OrderResponseCharges.md) | | [optional]
+**channel** | [**OrderChannelResponse**](OrderChannelResponse.md) | | [optional]
+**charges** | [**OrderChargesResponse**](OrderChargesResponse.md) | | [optional]
**checkout** | [**OrderResponseCheckout**](OrderResponseCheckout.md) | | [optional]
**created_at** | **int** | The time at which the object was created in seconds since the Unix epoch | [optional]
**currency** | **str** | The three-letter ISO 4217 currency code. The currency of the order. | [optional]
**customer_info** | [**OrderResponseCustomerInfo**](OrderResponseCustomerInfo.md) | | [optional]
-**discount_lines** | [**OrderResponseDiscountLines**](OrderResponseDiscountLines.md) | | [optional]
+**discount_lines** | [**OrderDiscountLinesResponse**](OrderDiscountLinesResponse.md) | | [optional]
**fiscal_entity** | [**OrderFiscalEntityResponse**](OrderFiscalEntityResponse.md) | | [optional]
**id** | **str** | | [optional]
**is_refundable** | **bool** | | [optional]
diff --git a/docs/OrderResponseCheckout.md b/docs/OrderResponseCheckout.md
index c64d469..58e7e20 100644
--- a/docs/OrderResponseCheckout.md
+++ b/docs/OrderResponseCheckout.md
@@ -5,7 +5,7 @@
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
-**allowed_payment_methods** | **List[str]** | | [optional]
+**allowed_payment_methods** | **List[str]** | Are the payment methods available for this link | [optional]
**can_not_expire** | **bool** | | [optional]
**emails_sent** | **int** | | [optional]
**exclude_card_networks** | **List[object]** | | [optional]
diff --git a/docs/OrderUpdateRequest.md b/docs/OrderUpdateRequest.md
index 2bfc744..e976d6b 100644
--- a/docs/OrderUpdateRequest.md
+++ b/docs/OrderUpdateRequest.md
@@ -10,13 +10,13 @@ Name | Type | Description | Notes
**checkout** | [**CheckoutRequest**](CheckoutRequest.md) | | [optional]
**currency** | **str** | Currency with which the payment will be made. It uses the 3-letter code of the [International Standard ISO 4217.](https://es.wikipedia.org/wiki/ISO_4217) | [optional]
**customer_info** | [**OrderUpdateRequestCustomerInfo**](OrderUpdateRequestCustomerInfo.md) | | [optional]
-**discount_lines** | [**List[OrderDiscountLinesRequest]**](OrderDiscountLinesRequest.md) | List of [discounts](https://developers.conekta.com/v2.1.0/reference/orderscreatediscountline) that are applied to the order. You must have at least one discount. | [optional]
+**discount_lines** | [**List[OrderDiscountLinesRequest]**](OrderDiscountLinesRequest.md) | List of [discounts](https://developers.conekta.com/v2.2.0/reference/orderscreatediscountline) that are applied to the order. You must have at least one discount. | [optional]
**fiscal_entity** | [**OrderUpdateFiscalEntityRequest**](OrderUpdateFiscalEntityRequest.md) | | [optional]
-**line_items** | [**List[Product]**](Product.md) | List of [products](https://developers.conekta.com/v2.1.0/reference/orderscreateproduct) that are sold in the order. You must have at least one product. | [optional]
+**line_items** | [**List[Product]**](Product.md) | List of [products](https://developers.conekta.com/v2.2.0/reference/orderscreateproduct) that are sold in the order. You must have at least one product. | [optional]
**metadata** | **Dict[str, str]** | | [optional]
**pre_authorize** | **bool** | Indicates whether the order charges must be preauthorized | [optional] [default to False]
**shipping_contact** | [**CustomerShippingContacts**](CustomerShippingContacts.md) | | [optional]
-**shipping_lines** | [**List[ShippingRequest]**](ShippingRequest.md) | List of [shipping costs](https://developers.conekta.com/v2.1.0/reference/orderscreateshipping). If the online store offers digital products. | [optional]
+**shipping_lines** | [**List[ShippingRequest]**](ShippingRequest.md) | List of [shipping costs](https://developers.conekta.com/v2.2.0/reference/orderscreateshipping). If the online store offers digital products. | [optional]
**tax_lines** | [**List[OrderTaxRequest]**](OrderTaxRequest.md) | | [optional]
## Example
diff --git a/docs/OrdersApi.md b/docs/OrdersApi.md
index 5afbf8f..9ca14d6 100644
--- a/docs/OrdersApi.md
+++ b/docs/OrdersApi.md
@@ -86,7 +86,7 @@ Name | Type | Description | Notes
### HTTP request headers
- **Content-Type**: Not defined
- - **Accept**: application/vnd.conekta-v2.1.0+json
+ - **Accept**: application/vnd.conekta-v2.2.0+json
### HTTP response details
@@ -174,7 +174,7 @@ Name | Type | Description | Notes
### HTTP request headers
- **Content-Type**: application/json
- - **Accept**: application/vnd.conekta-v2.1.0+json
+ - **Accept**: application/vnd.conekta-v2.2.0+json
### HTTP response details
@@ -260,7 +260,7 @@ Name | Type | Description | Notes
### HTTP request headers
- **Content-Type**: Not defined
- - **Accept**: application/vnd.conekta-v2.1.0+json
+ - **Accept**: application/vnd.conekta-v2.2.0+json
### HTTP response details
@@ -365,7 +365,7 @@ Name | Type | Description | Notes
### HTTP request headers
- **Content-Type**: Not defined
- - **Accept**: application/vnd.conekta-v2.1.0+json
+ - **Accept**: application/vnd.conekta-v2.2.0+json
### HTTP response details
@@ -451,7 +451,7 @@ Name | Type | Description | Notes
### HTTP request headers
- **Content-Type**: Not defined
- - **Accept**: application/vnd.conekta-v2.1.0+json
+ - **Accept**: application/vnd.conekta-v2.2.0+json
### HTTP response details
@@ -541,7 +541,7 @@ Name | Type | Description | Notes
### HTTP request headers
- **Content-Type**: application/json
- - **Accept**: application/vnd.conekta-v2.1.0+json
+ - **Accept**: application/vnd.conekta-v2.2.0+json
### HTTP response details
@@ -631,7 +631,7 @@ Name | Type | Description | Notes
### HTTP request headers
- **Content-Type**: application/json
- - **Accept**: application/vnd.conekta-v2.1.0+json
+ - **Accept**: application/vnd.conekta-v2.2.0+json
### HTTP response details
@@ -718,7 +718,7 @@ Name | Type | Description | Notes
### HTTP request headers
- **Content-Type**: application/json
- - **Accept**: application/vnd.conekta-v2.1.0+json
+ - **Accept**: application/vnd.conekta-v2.2.0+json
### HTTP response details
diff --git a/docs/PaymentLinkApi.md b/docs/PaymentLinkApi.md
index c7830c2..8c57b6a 100644
--- a/docs/PaymentLinkApi.md
+++ b/docs/PaymentLinkApi.md
@@ -82,7 +82,7 @@ Name | Type | Description | Notes
### HTTP request headers
- **Content-Type**: Not defined
- - **Accept**: application/vnd.conekta-v2.1.0+json
+ - **Accept**: application/vnd.conekta-v2.2.0+json
### HTTP response details
@@ -168,7 +168,7 @@ Name | Type | Description | Notes
### HTTP request headers
- **Content-Type**: application/json
- - **Accept**: application/vnd.conekta-v2.1.0+json
+ - **Accept**: application/vnd.conekta-v2.2.0+json
### HTTP response details
@@ -255,7 +255,7 @@ Name | Type | Description | Notes
### HTTP request headers
- **Content-Type**: application/json
- - **Accept**: application/vnd.conekta-v2.1.0+json
+ - **Accept**: application/vnd.conekta-v2.2.0+json
### HTTP response details
@@ -340,7 +340,7 @@ Name | Type | Description | Notes
### HTTP request headers
- **Content-Type**: Not defined
- - **Accept**: application/vnd.conekta-v2.1.0+json
+ - **Accept**: application/vnd.conekta-v2.2.0+json
### HTTP response details
@@ -433,7 +433,7 @@ Name | Type | Description | Notes
### HTTP request headers
- **Content-Type**: Not defined
- - **Accept**: application/vnd.conekta-v2.1.0+json
+ - **Accept**: application/vnd.conekta-v2.2.0+json
### HTTP response details
@@ -520,7 +520,7 @@ Name | Type | Description | Notes
### HTTP request headers
- **Content-Type**: application/json
- - **Accept**: application/vnd.conekta-v2.1.0+json
+ - **Accept**: application/vnd.conekta-v2.2.0+json
### HTTP response details
diff --git a/docs/PaymentMethodBankTransfer.md b/docs/PaymentMethodBankTransfer.md
index 0971941..47f3c4f 100644
--- a/docs/PaymentMethodBankTransfer.md
+++ b/docs/PaymentMethodBankTransfer.md
@@ -10,7 +10,7 @@ Name | Type | Description | Notes
**bank** | **str** | | [optional]
**clabe** | **str** | | [optional]
**description** | **str** | | [optional]
-**executed_at** | **int** | | [optional]
+**executed_at** | **str** | | [optional]
**expires_at** | **int** | | [optional]
**issuing_account_bank** | **str** | | [optional]
**issuing_account_number** | **str** | | [optional]
diff --git a/docs/PaymentMethodBnplPayment.md b/docs/PaymentMethodBnplPayment.md
new file mode 100644
index 0000000..1779067
--- /dev/null
+++ b/docs/PaymentMethodBnplPayment.md
@@ -0,0 +1,36 @@
+# PaymentMethodBnplPayment
+
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**type** | **str** | | [optional]
+**object** | **str** | |
+**cancel_url** | **str** | URL to redirect the customer after a canceled payment | [optional]
+**expires_at** | **int** | Expiration date of the charge |
+**failure_url** | **str** | URL to redirect the customer after a failed payment | [optional]
+**product_type** | **str** | Product type of the charge |
+**redirect_url** | **str** | URL to redirect the customer to complete the payment | [optional]
+**success_url** | **str** | URL to redirect the customer after a successful payment | [optional]
+
+## Example
+
+```python
+from conekta.models.payment_method_bnpl_payment import PaymentMethodBnplPayment
+
+# TODO update the JSON string below
+json = "{}"
+# create an instance of PaymentMethodBnplPayment from a JSON string
+payment_method_bnpl_payment_instance = PaymentMethodBnplPayment.from_json(json)
+# print the JSON string representation of the object
+print(PaymentMethodBnplPayment.to_json())
+
+# convert the object into a dict
+payment_method_bnpl_payment_dict = payment_method_bnpl_payment_instance.to_dict()
+# create an instance of PaymentMethodBnplPayment from a dict
+payment_method_bnpl_payment_from_dict = PaymentMethodBnplPayment.from_dict(payment_method_bnpl_payment_dict)
+```
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/docs/PaymentMethodBnplRequest.md b/docs/PaymentMethodBnplRequest.md
new file mode 100644
index 0000000..1bc909b
--- /dev/null
+++ b/docs/PaymentMethodBnplRequest.md
@@ -0,0 +1,34 @@
+# PaymentMethodBnplRequest
+
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**type** | **str** | Type of the payment method |
+**cancel_url** | **str** | URL to redirect the customer after a canceled payment |
+**can_not_expire** | **bool** | Indicates if the payment method can not expire |
+**failure_url** | **str** | URL to redirect the customer after a failed payment |
+**product_type** | **str** | Product type of the payment method, use for the payment method to know the product type |
+**success_url** | **str** | URL to redirect the customer after a successful payment |
+
+## Example
+
+```python
+from conekta.models.payment_method_bnpl_request import PaymentMethodBnplRequest
+
+# TODO update the JSON string below
+json = "{}"
+# create an instance of PaymentMethodBnplRequest from a JSON string
+payment_method_bnpl_request_instance = PaymentMethodBnplRequest.from_json(json)
+# print the JSON string representation of the object
+print(PaymentMethodBnplRequest.to_json())
+
+# convert the object into a dict
+payment_method_bnpl_request_dict = payment_method_bnpl_request_instance.to_dict()
+# create an instance of PaymentMethodBnplRequest from a dict
+payment_method_bnpl_request_from_dict = PaymentMethodBnplRequest.from_dict(payment_method_bnpl_request_dict)
+```
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/docs/PaymentMethodCashResponse.md b/docs/PaymentMethodCashResponse.md
index 7a807a9..53412db 100644
--- a/docs/PaymentMethodCashResponse.md
+++ b/docs/PaymentMethodCashResponse.md
@@ -10,9 +10,10 @@ Name | Type | Description | Notes
**object** | **str** | |
**created_at** | **int** | |
**parent_id** | **str** | | [optional]
+**agreements** | [**List[PaymentMethodCashResponseAllOfAgreements]**](PaymentMethodCashResponseAllOfAgreements.md) | | [optional]
**reference** | **str** | | [optional]
**barcode** | **str** | | [optional]
-**barcode_url** | **str** | | [optional]
+**barcode_url** | **str** | URL to the barcode image, reference is the same as barcode | [optional]
**expires_at** | **int** | | [optional]
**provider** | **str** | | [optional]
diff --git a/docs/PaymentMethodCashResponseAllOfAgreements.md b/docs/PaymentMethodCashResponseAllOfAgreements.md
new file mode 100644
index 0000000..a971f54
--- /dev/null
+++ b/docs/PaymentMethodCashResponseAllOfAgreements.md
@@ -0,0 +1,30 @@
+# PaymentMethodCashResponseAllOfAgreements
+
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**agreement** | **str** | Agreement number, you can use this number to pay in the store/bbva | [optional]
+**provider** | **str** | Provider name, you can use this to know where to pay | [optional]
+
+## Example
+
+```python
+from conekta.models.payment_method_cash_response_all_of_agreements import PaymentMethodCashResponseAllOfAgreements
+
+# TODO update the JSON string below
+json = "{}"
+# create an instance of PaymentMethodCashResponseAllOfAgreements from a JSON string
+payment_method_cash_response_all_of_agreements_instance = PaymentMethodCashResponseAllOfAgreements.from_json(json)
+# print the JSON string representation of the object
+print(PaymentMethodCashResponseAllOfAgreements.to_json())
+
+# convert the object into a dict
+payment_method_cash_response_all_of_agreements_dict = payment_method_cash_response_all_of_agreements_instance.to_dict()
+# create an instance of PaymentMethodCashResponseAllOfAgreements from a dict
+payment_method_cash_response_all_of_agreements_from_dict = PaymentMethodCashResponseAllOfAgreements.from_dict(payment_method_cash_response_all_of_agreements_dict)
+```
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/docs/PaymentMethodTokenRequest.md b/docs/PaymentMethodTokenRequest.md
index 74eb01b..1a729ae 100644
--- a/docs/PaymentMethodTokenRequest.md
+++ b/docs/PaymentMethodTokenRequest.md
@@ -6,7 +6,7 @@
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**type** | **str** | Type of payment method |
-**token_id** | **str** | Token id that will be used to create a \"card\" type payment method. See the (subscriptions)[https://developers.conekta.com/v2.1.0/reference/createsubscription] tutorial for more information on how to tokenize cards. |
+**token_id** | **str** | Token id that will be used to create a \"card\" type payment method. See the (subscriptions)[https://developers.conekta.com/v2.2.0/reference/createsubscription] tutorial for more information on how to tokenize cards. |
## Example
diff --git a/docs/PaymentMethodsApi.md b/docs/PaymentMethodsApi.md
index 3055020..e6195ba 100644
--- a/docs/PaymentMethodsApi.md
+++ b/docs/PaymentMethodsApi.md
@@ -85,7 +85,7 @@ Name | Type | Description | Notes
### HTTP request headers
- **Content-Type**: application/json
- - **Accept**: application/vnd.conekta-v2.1.0+json
+ - **Accept**: application/vnd.conekta-v2.2.0+json
### HTTP response details
@@ -173,7 +173,7 @@ Name | Type | Description | Notes
### HTTP request headers
- **Content-Type**: Not defined
- - **Accept**: application/vnd.conekta-v2.1.0+json
+ - **Accept**: application/vnd.conekta-v2.2.0+json
### HTTP response details
@@ -267,7 +267,7 @@ Name | Type | Description | Notes
### HTTP request headers
- **Content-Type**: Not defined
- - **Accept**: application/vnd.conekta-v2.1.0+json
+ - **Accept**: application/vnd.conekta-v2.2.0+json
### HTTP response details
@@ -357,7 +357,7 @@ Name | Type | Description | Notes
### HTTP request headers
- **Content-Type**: application/json
- - **Accept**: application/vnd.conekta-v2.1.0+json
+ - **Accept**: application/vnd.conekta-v2.2.0+json
### HTTP response details
diff --git a/docs/PayoutOrdersApi.md b/docs/PayoutOrdersApi.md
index 765be3c..4cc9ba1 100644
--- a/docs/PayoutOrdersApi.md
+++ b/docs/PayoutOrdersApi.md
@@ -80,7 +80,7 @@ Name | Type | Description | Notes
### HTTP request headers
- **Content-Type**: Not defined
- - **Accept**: application/vnd.conekta-v2.1.0+json
+ - **Accept**: application/vnd.conekta-v2.2.0+json
### HTTP response details
@@ -164,7 +164,7 @@ Name | Type | Description | Notes
### HTTP request headers
- **Content-Type**: application/json
- - **Accept**: application/vnd.conekta-v2.1.0+json
+ - **Accept**: application/vnd.conekta-v2.2.0+json
### HTTP response details
@@ -249,7 +249,7 @@ Name | Type | Description | Notes
### HTTP request headers
- **Content-Type**: Not defined
- - **Accept**: application/vnd.conekta-v2.1.0+json
+ - **Accept**: application/vnd.conekta-v2.2.0+json
### HTTP response details
@@ -338,7 +338,7 @@ Name | Type | Description | Notes
### HTTP request headers
- **Content-Type**: Not defined
- - **Accept**: application/vnd.conekta-v2.1.0+json
+ - **Accept**: application/vnd.conekta-v2.2.0+json
### HTTP response details
diff --git a/docs/PlanRequest.md b/docs/PlanRequest.md
index 63352b1..cbc2c7c 100644
--- a/docs/PlanRequest.md
+++ b/docs/PlanRequest.md
@@ -14,6 +14,8 @@ Name | Type | Description | Notes
**interval** | **str** | The interval of time between each charge. |
**name** | **str** | The name of the plan. |
**trial_period_days** | **int** | The number of days the customer will have a free trial. | [optional]
+**max_retries** | **int** | (optional) Specifies the maximum number of retry attempts for a subscription payment before it is canceled. | [optional]
+**retry_delay_hours** | **int** | (optional) Defines the number of hours between subscription payment retry attempts. | [optional]
## Example
diff --git a/docs/PlanResponse.md b/docs/PlanResponse.md
index 6673a25..864fde8 100644
--- a/docs/PlanResponse.md
+++ b/docs/PlanResponse.md
@@ -17,6 +17,8 @@ Name | Type | Description | Notes
**name** | **str** | | [optional]
**object** | **str** | | [optional]
**trial_period_days** | **int** | | [optional]
+**max_retries** | **int** | | [optional]
+**retry_delay_hours** | **int** | | [optional]
## Example
diff --git a/docs/PlansApi.md b/docs/PlansApi.md
index 6646d53..6d632b1 100644
--- a/docs/PlansApi.md
+++ b/docs/PlansApi.md
@@ -84,7 +84,7 @@ Name | Type | Description | Notes
### HTTP request headers
- **Content-Type**: application/json
- - **Accept**: application/vnd.conekta-v2.1.0+json
+ - **Accept**: application/vnd.conekta-v2.2.0+json
### HTTP response details
@@ -165,7 +165,7 @@ Name | Type | Description | Notes
### HTTP request headers
- **Content-Type**: Not defined
- - **Accept**: application/vnd.conekta-v2.1.0+json
+ - **Accept**: application/vnd.conekta-v2.2.0+json
### HTTP response details
@@ -249,7 +249,7 @@ Name | Type | Description | Notes
### HTTP request headers
- **Content-Type**: Not defined
- - **Accept**: application/vnd.conekta-v2.1.0+json
+ - **Accept**: application/vnd.conekta-v2.2.0+json
### HTTP response details
@@ -339,7 +339,7 @@ Name | Type | Description | Notes
### HTTP request headers
- **Content-Type**: Not defined
- - **Accept**: application/vnd.conekta-v2.1.0+json
+ - **Accept**: application/vnd.conekta-v2.2.0+json
### HTTP response details
@@ -425,7 +425,7 @@ Name | Type | Description | Notes
### HTTP request headers
- **Content-Type**: application/json
- - **Accept**: application/vnd.conekta-v2.1.0+json
+ - **Accept**: application/vnd.conekta-v2.2.0+json
### HTTP response details
diff --git a/docs/ProductsApi.md b/docs/ProductsApi.md
index 3bb9b46..d85de80 100644
--- a/docs/ProductsApi.md
+++ b/docs/ProductsApi.md
@@ -84,7 +84,7 @@ Name | Type | Description | Notes
### HTTP request headers
- **Content-Type**: application/json
- - **Accept**: application/vnd.conekta-v2.1.0+json
+ - **Accept**: application/vnd.conekta-v2.2.0+json
### HTTP response details
@@ -171,7 +171,7 @@ Name | Type | Description | Notes
### HTTP request headers
- **Content-Type**: Not defined
- - **Accept**: application/vnd.conekta-v2.1.0+json
+ - **Accept**: application/vnd.conekta-v2.2.0+json
### HTTP response details
@@ -262,7 +262,7 @@ Name | Type | Description | Notes
### HTTP request headers
- **Content-Type**: application/json
- - **Accept**: application/vnd.conekta-v2.1.0+json
+ - **Accept**: application/vnd.conekta-v2.2.0+json
### HTTP response details
diff --git a/docs/ResendRequest.md b/docs/ResendRequest.md
new file mode 100644
index 0000000..2c4569c
--- /dev/null
+++ b/docs/ResendRequest.md
@@ -0,0 +1,29 @@
+# ResendRequest
+
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**webhooks_ids** | **List[str]** | webhooks ids to resend event |
+
+## Example
+
+```python
+from conekta.models.resend_request import ResendRequest
+
+# TODO update the JSON string below
+json = "{}"
+# create an instance of ResendRequest from a JSON string
+resend_request_instance = ResendRequest.from_json(json)
+# print the JSON string representation of the object
+print(ResendRequest.to_json())
+
+# convert the object into a dict
+resend_request_dict = resend_request_instance.to_dict()
+# create an instance of ResendRequest from a dict
+resend_request_from_dict = ResendRequest.from_dict(resend_request_dict)
+```
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/docs/ShippingContactsApi.md b/docs/ShippingContactsApi.md
index e97fb5e..c0f370e 100644
--- a/docs/ShippingContactsApi.md
+++ b/docs/ShippingContactsApi.md
@@ -84,7 +84,7 @@ Name | Type | Description | Notes
### HTTP request headers
- **Content-Type**: application/json
- - **Accept**: application/vnd.conekta-v2.1.0+json
+ - **Accept**: application/vnd.conekta-v2.2.0+json
### HTTP response details
@@ -172,7 +172,7 @@ Name | Type | Description | Notes
### HTTP request headers
- **Content-Type**: Not defined
- - **Accept**: application/vnd.conekta-v2.1.0+json
+ - **Accept**: application/vnd.conekta-v2.2.0+json
### HTTP response details
@@ -263,7 +263,7 @@ Name | Type | Description | Notes
### HTTP request headers
- **Content-Type**: application/json
- - **Accept**: application/vnd.conekta-v2.1.0+json
+ - **Accept**: application/vnd.conekta-v2.2.0+json
### HTTP response details
diff --git a/docs/ShippingsApi.md b/docs/ShippingsApi.md
index 32e3df7..5f8c7ae 100644
--- a/docs/ShippingsApi.md
+++ b/docs/ShippingsApi.md
@@ -84,7 +84,7 @@ Name | Type | Description | Notes
### HTTP request headers
- **Content-Type**: application/json
- - **Accept**: application/vnd.conekta-v2.1.0+json
+ - **Accept**: application/vnd.conekta-v2.2.0+json
### HTTP response details
@@ -171,7 +171,7 @@ Name | Type | Description | Notes
### HTTP request headers
- **Content-Type**: Not defined
- - **Accept**: application/vnd.conekta-v2.1.0+json
+ - **Accept**: application/vnd.conekta-v2.2.0+json
### HTTP response details
@@ -263,7 +263,7 @@ Name | Type | Description | Notes
### HTTP request headers
- **Content-Type**: application/json
- - **Accept**: application/vnd.conekta-v2.1.0+json
+ - **Accept**: application/vnd.conekta-v2.2.0+json
### HTTP response details
diff --git a/docs/SubscriptionsApi.md b/docs/SubscriptionsApi.md
index b17a837..6e3af92 100644
--- a/docs/SubscriptionsApi.md
+++ b/docs/SubscriptionsApi.md
@@ -4,21 +4,30 @@ All URIs are relative to *https://api.conekta.io*
Method | HTTP request | Description
------------- | ------------- | -------------
-[**cancel_subscription**](SubscriptionsApi.md#cancel_subscription) | **POST** /customers/{id}/subscription/cancel | Cancel Subscription
-[**create_subscription**](SubscriptionsApi.md#create_subscription) | **POST** /customers/{id}/subscription | Create Subscription
-[**get_all_events_from_subscription**](SubscriptionsApi.md#get_all_events_from_subscription) | **GET** /customers/{id}/subscription/events | Get Events By Subscription
-[**get_subscription**](SubscriptionsApi.md#get_subscription) | **GET** /customers/{id}/subscription | Get Subscription
-[**pause_subscription**](SubscriptionsApi.md#pause_subscription) | **POST** /customers/{id}/subscription/pause | Pause Subscription
-[**resume_subscription**](SubscriptionsApi.md#resume_subscription) | **POST** /customers/{id}/subscription/resume | Resume Subscription
-[**update_subscription**](SubscriptionsApi.md#update_subscription) | **PUT** /customers/{id}/subscription | Update Subscription
+[**cancel_subscription**](SubscriptionsApi.md#cancel_subscription) | **POST** /customers/{id}/subscription/cancel | Cancel Subscription [Deprecated]
+[**create_subscription**](SubscriptionsApi.md#create_subscription) | **POST** /customers/{id}/subscription | Create Subscription [Deprecated]
+[**get_subscription**](SubscriptionsApi.md#get_subscription) | **GET** /customers/{id}/subscription | Get Subscription [Deprecated]
+[**get_subscription_events**](SubscriptionsApi.md#get_subscription_events) | **GET** /customers/{id}/subscription/events | Get Subscription Events [Deprecated]
+[**pause_subscription**](SubscriptionsApi.md#pause_subscription) | **POST** /customers/{id}/subscription/pause | Pause Subscription [Deprecated]
+[**resume_subscription**](SubscriptionsApi.md#resume_subscription) | **POST** /customers/{id}/subscription/resume | Resume Subscription [Deprecated]
+[**subscription_cancel**](SubscriptionsApi.md#subscription_cancel) | **POST** /customers/{customer_id}/subscriptions/{id}/cancel | Cancel Subscription
+[**subscription_create**](SubscriptionsApi.md#subscription_create) | **POST** /customers/{customer_id}/subscriptions | Create Subscription
+[**subscription_events**](SubscriptionsApi.md#subscription_events) | **GET** /customers/{customer_id}/subscriptions/{id}/events | Get Subscription Events
+[**subscription_list**](SubscriptionsApi.md#subscription_list) | **GET** /customers/{customer_id}/subscriptions | List Subscriptions
+[**subscription_pause**](SubscriptionsApi.md#subscription_pause) | **POST** /customers/{customer_id}/subscriptions/{id}/pause | Pause Subscription
+[**subscription_resume**](SubscriptionsApi.md#subscription_resume) | **POST** /customers/{customer_id}/subscriptions/{id}/resume | Resume Subscription
+[**subscription_update**](SubscriptionsApi.md#subscription_update) | **PUT** /customers/{customer_id}/subscriptions/{id} | Update Subscription
+[**subscriptions_get**](SubscriptionsApi.md#subscriptions_get) | **GET** /customers/{customer_id}/subscriptions/{id} | Get Subscription
+[**subscriptions_retry**](SubscriptionsApi.md#subscriptions_retry) | **POST** /customers/{customer_id}/subscriptions/{id}/retry | Retry Failed Payment
+[**update_subscription**](SubscriptionsApi.md#update_subscription) | **PUT** /customers/{id}/subscription | Update Subscription [Deprecated]
# **cancel_subscription**
> SubscriptionResponse cancel_subscription(id, accept_language=accept_language, x_child_company_id=x_child_company_id)
-Cancel Subscription
+Cancel Subscription [Deprecated]
-You can cancel the subscription to stop the plans that your customers consume
+DEPRECATED: This endpoint will be removed in version 2.3.0.
### Example
@@ -55,7 +64,7 @@ with conekta.ApiClient(configuration) as api_client:
x_child_company_id = '6441b6376b60c3a638da80af' # str | In the case of a holding company, the company id of the child company to which will process the request. (optional)
try:
- # Cancel Subscription
+ # Cancel Subscription [Deprecated]
api_response = api_instance.cancel_subscription(id, accept_language=accept_language, x_child_company_id=x_child_company_id)
print("The response of SubscriptionsApi->cancel_subscription:\n")
pprint(api_response)
@@ -85,7 +94,7 @@ Name | Type | Description | Notes
### HTTP request headers
- **Content-Type**: Not defined
- - **Accept**: application/vnd.conekta-v2.1.0+json
+ - **Accept**: application/vnd.conekta-v2.2.0+json
### HTTP response details
@@ -101,9 +110,9 @@ Name | Type | Description | Notes
# **create_subscription**
> SubscriptionResponse create_subscription(id, subscription_request, accept_language=accept_language, x_child_company_id=x_child_company_id)
-Create Subscription
+Create Subscription [Deprecated]
-You can create the subscription to include the plans that your customers consume
+DEPRECATED: This endpoint will be removed in version 2.3.0. You can create the subscription to include the plans that your customers consume
### Example
@@ -142,7 +151,7 @@ with conekta.ApiClient(configuration) as api_client:
x_child_company_id = '6441b6376b60c3a638da80af' # str | In the case of a holding company, the company id of the child company to which will process the request. (optional)
try:
- # Create Subscription
+ # Create Subscription [Deprecated]
api_response = api_instance.create_subscription(id, subscription_request, accept_language=accept_language, x_child_company_id=x_child_company_id)
print("The response of SubscriptionsApi->create_subscription:\n")
pprint(api_response)
@@ -173,7 +182,7 @@ Name | Type | Description | Notes
### HTTP request headers
- **Content-Type**: application/json
- - **Accept**: application/vnd.conekta-v2.1.0+json
+ - **Accept**: application/vnd.conekta-v2.2.0+json
### HTTP response details
@@ -187,12 +196,12 @@ Name | Type | Description | Notes
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
-# **get_all_events_from_subscription**
-> SubscriptionEventsResponse get_all_events_from_subscription(id, accept_language=accept_language, x_child_company_id=x_child_company_id)
+# **get_subscription**
+> SubscriptionResponse get_subscription(id, accept_language=accept_language)
-Get Events By Subscription
+Get Subscription [Deprecated]
-You can get the events of the subscription(s) of a client, with the customer id
+DEPRECATED: This endpoint will be removed in version 2.3.0.
### Example
@@ -200,7 +209,7 @@ You can get the events of the subscription(s) of a client, with the customer id
```python
import conekta
-from conekta.models.subscription_events_response import SubscriptionEventsResponse
+from conekta.models.subscription_response import SubscriptionResponse
from conekta.rest import ApiException
from pprint import pprint
@@ -226,15 +235,14 @@ with conekta.ApiClient(configuration) as api_client:
api_instance = conekta.SubscriptionsApi(api_client)
id = '6307a60c41de27127515a575' # str | Identifier of the resource
accept_language = es # str | Use for knowing which language to use (optional) (default to es)
- x_child_company_id = '6441b6376b60c3a638da80af' # str | In the case of a holding company, the company id of the child company to which will process the request. (optional)
try:
- # Get Events By Subscription
- api_response = api_instance.get_all_events_from_subscription(id, accept_language=accept_language, x_child_company_id=x_child_company_id)
- print("The response of SubscriptionsApi->get_all_events_from_subscription:\n")
+ # Get Subscription [Deprecated]
+ api_response = api_instance.get_subscription(id, accept_language=accept_language)
+ print("The response of SubscriptionsApi->get_subscription:\n")
pprint(api_response)
except Exception as e:
- print("Exception when calling SubscriptionsApi->get_all_events_from_subscription: %s\n" % e)
+ print("Exception when calling SubscriptionsApi->get_subscription: %s\n" % e)
```
@@ -246,11 +254,10 @@ Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**id** | **str**| Identifier of the resource |
**accept_language** | **str**| Use for knowing which language to use | [optional] [default to es]
- **x_child_company_id** | **str**| In the case of a holding company, the company id of the child company to which will process the request. | [optional]
### Return type
-[**SubscriptionEventsResponse**](SubscriptionEventsResponse.md)
+[**SubscriptionResponse**](SubscriptionResponse.md)
### Authorization
@@ -259,7 +266,7 @@ Name | Type | Description | Notes
### HTTP request headers
- **Content-Type**: Not defined
- - **Accept**: application/vnd.conekta-v2.1.0+json
+ - **Accept**: application/vnd.conekta-v2.2.0+json
### HTTP response details
@@ -267,17 +274,17 @@ Name | Type | Description | Notes
|-------------|-------------|------------------|
**200** | successful | * Date - The date and time that the response was sent
* Content-Type - The format of the response body
* Content-Length - The length of the response body in bytes
* Connection - The type of connection used to transfer the response
* Conekta-Media-Type -
|
**401** | authentication error | - |
-**402** | payment required error | - |
**404** | not found entity | - |
-**422** | parameter validation error | - |
**500** | internal server error | - |
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
-# **get_subscription**
-> SubscriptionResponse get_subscription(id, accept_language=accept_language)
+# **get_subscription_events**
+> SubscriptionEventsResponse get_subscription_events(id, accept_language=accept_language, x_child_company_id=x_child_company_id)
-Get Subscription
+Get Subscription Events [Deprecated]
+
+DEPRECATED: This endpoint will be removed in version 2.3.0. You can get the events of the subscription(s) of a client, with the customer id
### Example
@@ -285,7 +292,7 @@ Get Subscription
```python
import conekta
-from conekta.models.subscription_response import SubscriptionResponse
+from conekta.models.subscription_events_response import SubscriptionEventsResponse
from conekta.rest import ApiException
from pprint import pprint
@@ -311,14 +318,15 @@ with conekta.ApiClient(configuration) as api_client:
api_instance = conekta.SubscriptionsApi(api_client)
id = '6307a60c41de27127515a575' # str | Identifier of the resource
accept_language = es # str | Use for knowing which language to use (optional) (default to es)
+ x_child_company_id = '6441b6376b60c3a638da80af' # str | In the case of a holding company, the company id of the child company to which will process the request. (optional)
try:
- # Get Subscription
- api_response = api_instance.get_subscription(id, accept_language=accept_language)
- print("The response of SubscriptionsApi->get_subscription:\n")
+ # Get Subscription Events [Deprecated]
+ api_response = api_instance.get_subscription_events(id, accept_language=accept_language, x_child_company_id=x_child_company_id)
+ print("The response of SubscriptionsApi->get_subscription_events:\n")
pprint(api_response)
except Exception as e:
- print("Exception when calling SubscriptionsApi->get_subscription: %s\n" % e)
+ print("Exception when calling SubscriptionsApi->get_subscription_events: %s\n" % e)
```
@@ -330,10 +338,11 @@ Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**id** | **str**| Identifier of the resource |
**accept_language** | **str**| Use for knowing which language to use | [optional] [default to es]
+ **x_child_company_id** | **str**| In the case of a holding company, the company id of the child company to which will process the request. | [optional]
### Return type
-[**SubscriptionResponse**](SubscriptionResponse.md)
+[**SubscriptionEventsResponse**](SubscriptionEventsResponse.md)
### Authorization
@@ -342,7 +351,7 @@ Name | Type | Description | Notes
### HTTP request headers
- **Content-Type**: Not defined
- - **Accept**: application/vnd.conekta-v2.1.0+json
+ - **Accept**: application/vnd.conekta-v2.2.0+json
### HTTP response details
@@ -350,7 +359,9 @@ Name | Type | Description | Notes
|-------------|-------------|------------------|
**200** | successful | * Date - The date and time that the response was sent
* Content-Type - The format of the response body
* Content-Length - The length of the response body in bytes
* Connection - The type of connection used to transfer the response
* Conekta-Media-Type -
|
**401** | authentication error | - |
+**402** | payment required error | - |
**404** | not found entity | - |
+**422** | parameter validation error | - |
**500** | internal server error | - |
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
@@ -358,9 +369,9 @@ Name | Type | Description | Notes
# **pause_subscription**
> SubscriptionResponse pause_subscription(id, accept_language=accept_language, x_child_company_id=x_child_company_id)
-Pause Subscription
+Pause Subscription [Deprecated]
-You can pause the subscription to stop the plans that your customers consume
+DEPRECATED: This endpoint will be removed in version 2.3.0.
### Example
@@ -397,7 +408,7 @@ with conekta.ApiClient(configuration) as api_client:
x_child_company_id = '6441b6376b60c3a638da80af' # str | In the case of a holding company, the company id of the child company to which will process the request. (optional)
try:
- # Pause Subscription
+ # Pause Subscription [Deprecated]
api_response = api_instance.pause_subscription(id, accept_language=accept_language, x_child_company_id=x_child_company_id)
print("The response of SubscriptionsApi->pause_subscription:\n")
pprint(api_response)
@@ -427,7 +438,7 @@ Name | Type | Description | Notes
### HTTP request headers
- **Content-Type**: Not defined
- - **Accept**: application/vnd.conekta-v2.1.0+json
+ - **Accept**: application/vnd.conekta-v2.2.0+json
### HTTP response details
@@ -444,9 +455,9 @@ Name | Type | Description | Notes
# **resume_subscription**
> SubscriptionResponse resume_subscription(id, accept_language=accept_language, x_child_company_id=x_child_company_id)
-Resume Subscription
+Resume Subscription [Deprecated]
-You can resume the subscription to start the plans that your customers consume
+DEPRECATED: This endpoint will be removed in version 2.3.0.
### Example
@@ -483,7 +494,7 @@ with conekta.ApiClient(configuration) as api_client:
x_child_company_id = '6441b6376b60c3a638da80af' # str | In the case of a holding company, the company id of the child company to which will process the request. (optional)
try:
- # Resume Subscription
+ # Resume Subscription [Deprecated]
api_response = api_instance.resume_subscription(id, accept_language=accept_language, x_child_company_id=x_child_company_id)
print("The response of SubscriptionsApi->resume_subscription:\n")
pprint(api_response)
@@ -513,7 +524,7 @@ Name | Type | Description | Notes
### HTTP request headers
- **Content-Type**: Not defined
- - **Accept**: application/vnd.conekta-v2.1.0+json
+ - **Accept**: application/vnd.conekta-v2.2.0+json
### HTTP response details
@@ -528,12 +539,12 @@ Name | Type | Description | Notes
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
-# **update_subscription**
-> SubscriptionResponse update_subscription(id, subscription_update_request, accept_language=accept_language, x_child_company_id=x_child_company_id)
+# **subscription_cancel**
+> SubscriptionResponse subscription_cancel(customer_id, id, accept_language=accept_language, x_child_company_id=x_child_company_id)
-Update Subscription
+Cancel Subscription
-You can modify the subscription to change the plans that your customers consume
+Cancel a specific subscription
### Example
@@ -542,7 +553,6 @@ You can modify the subscription to change the plans that your customers consume
```python
import conekta
from conekta.models.subscription_response import SubscriptionResponse
-from conekta.models.subscription_update_request import SubscriptionUpdateRequest
from conekta.rest import ApiException
from pprint import pprint
@@ -566,13 +576,818 @@ configuration = conekta.Configuration(
with conekta.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = conekta.SubscriptionsApi(api_client)
- id = '6307a60c41de27127515a575' # str | Identifier of the resource
- subscription_update_request = conekta.SubscriptionUpdateRequest() # SubscriptionUpdateRequest | requested field for update a subscription
+ customer_id = 'cus_2tGzG1GxtDAZHEGPH' # str | Identifier of the customer resource
+ id = 'sub_2tGzG1GxtDAZHEGPH' # str | Identifier of the subscription resource
accept_language = es # str | Use for knowing which language to use (optional) (default to es)
x_child_company_id = '6441b6376b60c3a638da80af' # str | In the case of a holding company, the company id of the child company to which will process the request. (optional)
try:
- # Update Subscription
+ # Cancel Subscription
+ api_response = api_instance.subscription_cancel(customer_id, id, accept_language=accept_language, x_child_company_id=x_child_company_id)
+ print("The response of SubscriptionsApi->subscription_cancel:\n")
+ pprint(api_response)
+ except Exception as e:
+ print("Exception when calling SubscriptionsApi->subscription_cancel: %s\n" % e)
+```
+
+
+
+### Parameters
+
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **customer_id** | **str**| Identifier of the customer resource |
+ **id** | **str**| Identifier of the subscription resource |
+ **accept_language** | **str**| Use for knowing which language to use | [optional] [default to es]
+ **x_child_company_id** | **str**| In the case of a holding company, the company id of the child company to which will process the request. | [optional]
+
+### Return type
+
+[**SubscriptionResponse**](SubscriptionResponse.md)
+
+### Authorization
+
+[bearerAuth](../README.md#bearerAuth)
+
+### HTTP request headers
+
+ - **Content-Type**: Not defined
+ - **Accept**: application/vnd.conekta-v2.2.0+json
+
+### HTTP response details
+
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+**200** | successful | * Date - The date and time that the response was sent
* Content-Type - The format of the response body
* Content-Length - The length of the response body in bytes
* Connection - The type of connection used to transfer the response
* Conekta-Media-Type -
|
+**401** | authentication error | - |
+**404** | not found entity | - |
+**500** | internal server error | - |
+
+[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
+
+# **subscription_create**
+> SubscriptionResponse subscription_create(customer_id, subscription_request, accept_language=accept_language, x_child_company_id=x_child_company_id)
+
+Create Subscription
+
+Create a new subscription for a customer (keeps existing subscriptions active)
+
+### Example
+
+* Bearer Authentication (bearerAuth):
+
+```python
+import conekta
+from conekta.models.subscription_request import SubscriptionRequest
+from conekta.models.subscription_response import SubscriptionResponse
+from conekta.rest import ApiException
+from pprint import pprint
+
+# Defining the host is optional and defaults to https://api.conekta.io
+# See configuration.py for a list of all supported configuration parameters.
+configuration = conekta.Configuration(
+ host = "https://api.conekta.io"
+)
+
+# The client must configure the authentication and authorization parameters
+# in accordance with the API server security policy.
+# Examples for each auth method are provided below, use the example that
+# satisfies your auth use case.
+
+# Configure Bearer authorization: bearerAuth
+configuration = conekta.Configuration(
+ access_token = os.environ["BEARER_TOKEN"]
+)
+
+# Enter a context with an instance of the API client
+with conekta.ApiClient(configuration) as api_client:
+ # Create an instance of the API class
+ api_instance = conekta.SubscriptionsApi(api_client)
+ customer_id = 'cus_2tGzG1GxtDAZHEGPH' # str | Identifier of the customer resource
+ subscription_request = conekta.SubscriptionRequest() # SubscriptionRequest | requested field for subscriptions
+ accept_language = es # str | Use for knowing which language to use (optional) (default to es)
+ x_child_company_id = '6441b6376b60c3a638da80af' # str | In the case of a holding company, the company id of the child company to which will process the request. (optional)
+
+ try:
+ # Create Subscription
+ api_response = api_instance.subscription_create(customer_id, subscription_request, accept_language=accept_language, x_child_company_id=x_child_company_id)
+ print("The response of SubscriptionsApi->subscription_create:\n")
+ pprint(api_response)
+ except Exception as e:
+ print("Exception when calling SubscriptionsApi->subscription_create: %s\n" % e)
+```
+
+
+
+### Parameters
+
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **customer_id** | **str**| Identifier of the customer resource |
+ **subscription_request** | [**SubscriptionRequest**](SubscriptionRequest.md)| requested field for subscriptions |
+ **accept_language** | **str**| Use for knowing which language to use | [optional] [default to es]
+ **x_child_company_id** | **str**| In the case of a holding company, the company id of the child company to which will process the request. | [optional]
+
+### Return type
+
+[**SubscriptionResponse**](SubscriptionResponse.md)
+
+### Authorization
+
+[bearerAuth](../README.md#bearerAuth)
+
+### HTTP request headers
+
+ - **Content-Type**: application/json
+ - **Accept**: application/vnd.conekta-v2.2.0+json
+
+### HTTP response details
+
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+**200** | successful | * Date - The date and time that the response was sent
* Content-Type - The format of the response body
* Content-Length - The length of the response body in bytes
* Connection - The type of connection used to transfer the response
* Conekta-Media-Type -
|
+**422** | parameter validation error | - |
+**401** | authentication error | - |
+**404** | not found entity | - |
+**500** | internal server error | - |
+
+[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
+
+# **subscription_events**
+> SubscriptionEventsResponse subscription_events(customer_id, id, accept_language=accept_language, x_child_company_id=x_child_company_id, limit=limit, search=search, next=next, previous=previous)
+
+Get Subscription Events
+
+Get events for a specific subscription
+
+### Example
+
+* Bearer Authentication (bearerAuth):
+
+```python
+import conekta
+from conekta.models.subscription_events_response import SubscriptionEventsResponse
+from conekta.rest import ApiException
+from pprint import pprint
+
+# Defining the host is optional and defaults to https://api.conekta.io
+# See configuration.py for a list of all supported configuration parameters.
+configuration = conekta.Configuration(
+ host = "https://api.conekta.io"
+)
+
+# The client must configure the authentication and authorization parameters
+# in accordance with the API server security policy.
+# Examples for each auth method are provided below, use the example that
+# satisfies your auth use case.
+
+# Configure Bearer authorization: bearerAuth
+configuration = conekta.Configuration(
+ access_token = os.environ["BEARER_TOKEN"]
+)
+
+# Enter a context with an instance of the API client
+with conekta.ApiClient(configuration) as api_client:
+ # Create an instance of the API class
+ api_instance = conekta.SubscriptionsApi(api_client)
+ customer_id = 'cus_2tGzG1GxtDAZHEGPH' # str | Identifier of the customer resource
+ id = 'sub_2tGzG1GxtDAZHEGPH' # str | Identifier of the subscription resource
+ accept_language = es # str | Use for knowing which language to use (optional) (default to es)
+ x_child_company_id = '6441b6376b60c3a638da80af' # str | In the case of a holding company, the company id of the child company to which will process the request. (optional)
+ limit = 20 # int | The numbers of items to return, the maximum value is 250 (optional) (default to 20)
+ search = 'search_example' # str | General order search, e.g. by mail, reference etc. (optional)
+ next = 'next_example' # str | next page (optional)
+ previous = 'previous_example' # str | previous page (optional)
+
+ try:
+ # Get Subscription Events
+ api_response = api_instance.subscription_events(customer_id, id, accept_language=accept_language, x_child_company_id=x_child_company_id, limit=limit, search=search, next=next, previous=previous)
+ print("The response of SubscriptionsApi->subscription_events:\n")
+ pprint(api_response)
+ except Exception as e:
+ print("Exception when calling SubscriptionsApi->subscription_events: %s\n" % e)
+```
+
+
+
+### Parameters
+
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **customer_id** | **str**| Identifier of the customer resource |
+ **id** | **str**| Identifier of the subscription resource |
+ **accept_language** | **str**| Use for knowing which language to use | [optional] [default to es]
+ **x_child_company_id** | **str**| In the case of a holding company, the company id of the child company to which will process the request. | [optional]
+ **limit** | **int**| The numbers of items to return, the maximum value is 250 | [optional] [default to 20]
+ **search** | **str**| General order search, e.g. by mail, reference etc. | [optional]
+ **next** | **str**| next page | [optional]
+ **previous** | **str**| previous page | [optional]
+
+### Return type
+
+[**SubscriptionEventsResponse**](SubscriptionEventsResponse.md)
+
+### Authorization
+
+[bearerAuth](../README.md#bearerAuth)
+
+### HTTP request headers
+
+ - **Content-Type**: Not defined
+ - **Accept**: application/vnd.conekta-v2.2.0+json
+
+### HTTP response details
+
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+**200** | successful | * Date - The date and time that the response was sent
* Content-Type - The format of the response body
* Content-Length - The length of the response body in bytes
* Connection - The type of connection used to transfer the response
* Conekta-Media-Type -
|
+**401** | authentication error | - |
+**404** | not found entity | - |
+**500** | internal server error | - |
+
+[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
+
+# **subscription_list**
+> SubscriptionResponse subscription_list(customer_id, accept_language=accept_language, x_child_company_id=x_child_company_id, limit=limit, search=search, next=next, previous=previous)
+
+List Subscriptions
+
+Get a list of subscriptions for a customer
+
+### Example
+
+* Bearer Authentication (bearerAuth):
+
+```python
+import conekta
+from conekta.models.subscription_response import SubscriptionResponse
+from conekta.rest import ApiException
+from pprint import pprint
+
+# Defining the host is optional and defaults to https://api.conekta.io
+# See configuration.py for a list of all supported configuration parameters.
+configuration = conekta.Configuration(
+ host = "https://api.conekta.io"
+)
+
+# The client must configure the authentication and authorization parameters
+# in accordance with the API server security policy.
+# Examples for each auth method are provided below, use the example that
+# satisfies your auth use case.
+
+# Configure Bearer authorization: bearerAuth
+configuration = conekta.Configuration(
+ access_token = os.environ["BEARER_TOKEN"]
+)
+
+# Enter a context with an instance of the API client
+with conekta.ApiClient(configuration) as api_client:
+ # Create an instance of the API class
+ api_instance = conekta.SubscriptionsApi(api_client)
+ customer_id = 'cus_2tGzG1GxtDAZHEGPH' # str | Identifier of the customer resource
+ accept_language = es # str | Use for knowing which language to use (optional) (default to es)
+ x_child_company_id = '6441b6376b60c3a638da80af' # str | In the case of a holding company, the company id of the child company to which will process the request. (optional)
+ limit = 20 # int | The numbers of items to return, the maximum value is 250 (optional) (default to 20)
+ search = 'search_example' # str | General order search, e.g. by mail, reference etc. (optional)
+ next = 'next_example' # str | next page (optional)
+ previous = 'previous_example' # str | previous page (optional)
+
+ try:
+ # List Subscriptions
+ api_response = api_instance.subscription_list(customer_id, accept_language=accept_language, x_child_company_id=x_child_company_id, limit=limit, search=search, next=next, previous=previous)
+ print("The response of SubscriptionsApi->subscription_list:\n")
+ pprint(api_response)
+ except Exception as e:
+ print("Exception when calling SubscriptionsApi->subscription_list: %s\n" % e)
+```
+
+
+
+### Parameters
+
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **customer_id** | **str**| Identifier of the customer resource |
+ **accept_language** | **str**| Use for knowing which language to use | [optional] [default to es]
+ **x_child_company_id** | **str**| In the case of a holding company, the company id of the child company to which will process the request. | [optional]
+ **limit** | **int**| The numbers of items to return, the maximum value is 250 | [optional] [default to 20]
+ **search** | **str**| General order search, e.g. by mail, reference etc. | [optional]
+ **next** | **str**| next page | [optional]
+ **previous** | **str**| previous page | [optional]
+
+### Return type
+
+[**SubscriptionResponse**](SubscriptionResponse.md)
+
+### Authorization
+
+[bearerAuth](../README.md#bearerAuth)
+
+### HTTP request headers
+
+ - **Content-Type**: Not defined
+ - **Accept**: application/vnd.conekta-v2.2.0+json
+
+### HTTP response details
+
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+**200** | successful | * Date - The date and time that the response was sent
* Content-Type - The format of the response body
* Content-Length - The length of the response body in bytes
* Connection - The type of connection used to transfer the response
* Conekta-Media-Type -
|
+**401** | authentication error | - |
+**404** | not found entity | - |
+**500** | internal server error | - |
+
+[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
+
+# **subscription_pause**
+> SubscriptionResponse subscription_pause(customer_id, id, accept_language=accept_language, x_child_company_id=x_child_company_id)
+
+Pause Subscription
+
+Pause a specific subscription
+
+### Example
+
+* Bearer Authentication (bearerAuth):
+
+```python
+import conekta
+from conekta.models.subscription_response import SubscriptionResponse
+from conekta.rest import ApiException
+from pprint import pprint
+
+# Defining the host is optional and defaults to https://api.conekta.io
+# See configuration.py for a list of all supported configuration parameters.
+configuration = conekta.Configuration(
+ host = "https://api.conekta.io"
+)
+
+# The client must configure the authentication and authorization parameters
+# in accordance with the API server security policy.
+# Examples for each auth method are provided below, use the example that
+# satisfies your auth use case.
+
+# Configure Bearer authorization: bearerAuth
+configuration = conekta.Configuration(
+ access_token = os.environ["BEARER_TOKEN"]
+)
+
+# Enter a context with an instance of the API client
+with conekta.ApiClient(configuration) as api_client:
+ # Create an instance of the API class
+ api_instance = conekta.SubscriptionsApi(api_client)
+ customer_id = 'cus_2tGzG1GxtDAZHEGPH' # str | Identifier of the customer resource
+ id = 'sub_2tGzG1GxtDAZHEGPH' # str | Identifier of the subscription resource
+ accept_language = es # str | Use for knowing which language to use (optional) (default to es)
+ x_child_company_id = '6441b6376b60c3a638da80af' # str | In the case of a holding company, the company id of the child company to which will process the request. (optional)
+
+ try:
+ # Pause Subscription
+ api_response = api_instance.subscription_pause(customer_id, id, accept_language=accept_language, x_child_company_id=x_child_company_id)
+ print("The response of SubscriptionsApi->subscription_pause:\n")
+ pprint(api_response)
+ except Exception as e:
+ print("Exception when calling SubscriptionsApi->subscription_pause: %s\n" % e)
+```
+
+
+
+### Parameters
+
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **customer_id** | **str**| Identifier of the customer resource |
+ **id** | **str**| Identifier of the subscription resource |
+ **accept_language** | **str**| Use for knowing which language to use | [optional] [default to es]
+ **x_child_company_id** | **str**| In the case of a holding company, the company id of the child company to which will process the request. | [optional]
+
+### Return type
+
+[**SubscriptionResponse**](SubscriptionResponse.md)
+
+### Authorization
+
+[bearerAuth](../README.md#bearerAuth)
+
+### HTTP request headers
+
+ - **Content-Type**: Not defined
+ - **Accept**: application/vnd.conekta-v2.2.0+json
+
+### HTTP response details
+
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+**200** | successful | * Date - The date and time that the response was sent
* Content-Type - The format of the response body
* Content-Length - The length of the response body in bytes
* Connection - The type of connection used to transfer the response
* Conekta-Media-Type -
|
+**401** | authentication error | - |
+**404** | not found entity | - |
+**500** | internal server error | - |
+
+[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
+
+# **subscription_resume**
+> SubscriptionResponse subscription_resume(customer_id, id, accept_language=accept_language, x_child_company_id=x_child_company_id)
+
+Resume Subscription
+
+Resume a specific paused subscription
+
+### Example
+
+* Bearer Authentication (bearerAuth):
+
+```python
+import conekta
+from conekta.models.subscription_response import SubscriptionResponse
+from conekta.rest import ApiException
+from pprint import pprint
+
+# Defining the host is optional and defaults to https://api.conekta.io
+# See configuration.py for a list of all supported configuration parameters.
+configuration = conekta.Configuration(
+ host = "https://api.conekta.io"
+)
+
+# The client must configure the authentication and authorization parameters
+# in accordance with the API server security policy.
+# Examples for each auth method are provided below, use the example that
+# satisfies your auth use case.
+
+# Configure Bearer authorization: bearerAuth
+configuration = conekta.Configuration(
+ access_token = os.environ["BEARER_TOKEN"]
+)
+
+# Enter a context with an instance of the API client
+with conekta.ApiClient(configuration) as api_client:
+ # Create an instance of the API class
+ api_instance = conekta.SubscriptionsApi(api_client)
+ customer_id = 'cus_2tGzG1GxtDAZHEGPH' # str | Identifier of the customer resource
+ id = 'sub_2tGzG1GxtDAZHEGPH' # str | Identifier of the subscription resource
+ accept_language = es # str | Use for knowing which language to use (optional) (default to es)
+ x_child_company_id = '6441b6376b60c3a638da80af' # str | In the case of a holding company, the company id of the child company to which will process the request. (optional)
+
+ try:
+ # Resume Subscription
+ api_response = api_instance.subscription_resume(customer_id, id, accept_language=accept_language, x_child_company_id=x_child_company_id)
+ print("The response of SubscriptionsApi->subscription_resume:\n")
+ pprint(api_response)
+ except Exception as e:
+ print("Exception when calling SubscriptionsApi->subscription_resume: %s\n" % e)
+```
+
+
+
+### Parameters
+
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **customer_id** | **str**| Identifier of the customer resource |
+ **id** | **str**| Identifier of the subscription resource |
+ **accept_language** | **str**| Use for knowing which language to use | [optional] [default to es]
+ **x_child_company_id** | **str**| In the case of a holding company, the company id of the child company to which will process the request. | [optional]
+
+### Return type
+
+[**SubscriptionResponse**](SubscriptionResponse.md)
+
+### Authorization
+
+[bearerAuth](../README.md#bearerAuth)
+
+### HTTP request headers
+
+ - **Content-Type**: Not defined
+ - **Accept**: application/vnd.conekta-v2.2.0+json
+
+### HTTP response details
+
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+**200** | successful | * Date - The date and time that the response was sent
* Content-Type - The format of the response body
* Content-Length - The length of the response body in bytes
* Connection - The type of connection used to transfer the response
* Conekta-Media-Type -
|
+**401** | authentication error | - |
+**404** | not found entity | - |
+**500** | internal server error | - |
+
+[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
+
+# **subscription_update**
+> SubscriptionResponse subscription_update(customer_id, id, subscription_update_request, accept_language=accept_language, x_child_company_id=x_child_company_id)
+
+Update Subscription
+
+Update a specific subscription
+
+### Example
+
+* Bearer Authentication (bearerAuth):
+
+```python
+import conekta
+from conekta.models.subscription_response import SubscriptionResponse
+from conekta.models.subscription_update_request import SubscriptionUpdateRequest
+from conekta.rest import ApiException
+from pprint import pprint
+
+# Defining the host is optional and defaults to https://api.conekta.io
+# See configuration.py for a list of all supported configuration parameters.
+configuration = conekta.Configuration(
+ host = "https://api.conekta.io"
+)
+
+# The client must configure the authentication and authorization parameters
+# in accordance with the API server security policy.
+# Examples for each auth method are provided below, use the example that
+# satisfies your auth use case.
+
+# Configure Bearer authorization: bearerAuth
+configuration = conekta.Configuration(
+ access_token = os.environ["BEARER_TOKEN"]
+)
+
+# Enter a context with an instance of the API client
+with conekta.ApiClient(configuration) as api_client:
+ # Create an instance of the API class
+ api_instance = conekta.SubscriptionsApi(api_client)
+ customer_id = 'cus_2tGzG1GxtDAZHEGPH' # str | Identifier of the customer resource
+ id = 'sub_2tGzG1GxtDAZHEGPH' # str | Identifier of the subscription resource
+ subscription_update_request = conekta.SubscriptionUpdateRequest() # SubscriptionUpdateRequest | requested field for update a subscription
+ accept_language = es # str | Use for knowing which language to use (optional) (default to es)
+ x_child_company_id = '6441b6376b60c3a638da80af' # str | In the case of a holding company, the company id of the child company to which will process the request. (optional)
+
+ try:
+ # Update Subscription
+ api_response = api_instance.subscription_update(customer_id, id, subscription_update_request, accept_language=accept_language, x_child_company_id=x_child_company_id)
+ print("The response of SubscriptionsApi->subscription_update:\n")
+ pprint(api_response)
+ except Exception as e:
+ print("Exception when calling SubscriptionsApi->subscription_update: %s\n" % e)
+```
+
+
+
+### Parameters
+
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **customer_id** | **str**| Identifier of the customer resource |
+ **id** | **str**| Identifier of the subscription resource |
+ **subscription_update_request** | [**SubscriptionUpdateRequest**](SubscriptionUpdateRequest.md)| requested field for update a subscription |
+ **accept_language** | **str**| Use for knowing which language to use | [optional] [default to es]
+ **x_child_company_id** | **str**| In the case of a holding company, the company id of the child company to which will process the request. | [optional]
+
+### Return type
+
+[**SubscriptionResponse**](SubscriptionResponse.md)
+
+### Authorization
+
+[bearerAuth](../README.md#bearerAuth)
+
+### HTTP request headers
+
+ - **Content-Type**: application/json
+ - **Accept**: application/vnd.conekta-v2.2.0+json
+
+### HTTP response details
+
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+**200** | successful | * Date - The date and time that the response was sent
* Content-Type - The format of the response body
* Content-Length - The length of the response body in bytes
* Connection - The type of connection used to transfer the response
* Conekta-Media-Type -
|
+**422** | parameter validation error | - |
+**401** | authentication error | - |
+**404** | not found entity | - |
+**500** | internal server error | - |
+
+[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
+
+# **subscriptions_get**
+> SubscriptionResponse subscriptions_get(customer_id, id, accept_language=accept_language, x_child_company_id=x_child_company_id)
+
+Get Subscription
+
+Retrieve a specific subscription
+
+### Example
+
+* Bearer Authentication (bearerAuth):
+
+```python
+import conekta
+from conekta.models.subscription_response import SubscriptionResponse
+from conekta.rest import ApiException
+from pprint import pprint
+
+# Defining the host is optional and defaults to https://api.conekta.io
+# See configuration.py for a list of all supported configuration parameters.
+configuration = conekta.Configuration(
+ host = "https://api.conekta.io"
+)
+
+# The client must configure the authentication and authorization parameters
+# in accordance with the API server security policy.
+# Examples for each auth method are provided below, use the example that
+# satisfies your auth use case.
+
+# Configure Bearer authorization: bearerAuth
+configuration = conekta.Configuration(
+ access_token = os.environ["BEARER_TOKEN"]
+)
+
+# Enter a context with an instance of the API client
+with conekta.ApiClient(configuration) as api_client:
+ # Create an instance of the API class
+ api_instance = conekta.SubscriptionsApi(api_client)
+ customer_id = 'cus_2tGzG1GxtDAZHEGPH' # str | Identifier of the customer resource
+ id = 'sub_2tGzG1GxtDAZHEGPH' # str | Identifier of the subscription resource
+ accept_language = es # str | Use for knowing which language to use (optional) (default to es)
+ x_child_company_id = '6441b6376b60c3a638da80af' # str | In the case of a holding company, the company id of the child company to which will process the request. (optional)
+
+ try:
+ # Get Subscription
+ api_response = api_instance.subscriptions_get(customer_id, id, accept_language=accept_language, x_child_company_id=x_child_company_id)
+ print("The response of SubscriptionsApi->subscriptions_get:\n")
+ pprint(api_response)
+ except Exception as e:
+ print("Exception when calling SubscriptionsApi->subscriptions_get: %s\n" % e)
+```
+
+
+
+### Parameters
+
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **customer_id** | **str**| Identifier of the customer resource |
+ **id** | **str**| Identifier of the subscription resource |
+ **accept_language** | **str**| Use for knowing which language to use | [optional] [default to es]
+ **x_child_company_id** | **str**| In the case of a holding company, the company id of the child company to which will process the request. | [optional]
+
+### Return type
+
+[**SubscriptionResponse**](SubscriptionResponse.md)
+
+### Authorization
+
+[bearerAuth](../README.md#bearerAuth)
+
+### HTTP request headers
+
+ - **Content-Type**: Not defined
+ - **Accept**: application/vnd.conekta-v2.2.0+json
+
+### HTTP response details
+
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+**200** | successful | * Date - The date and time that the response was sent
* Content-Type - The format of the response body
* Content-Length - The length of the response body in bytes
* Connection - The type of connection used to transfer the response
* Conekta-Media-Type -
|
+**401** | authentication error | - |
+**404** | not found entity | - |
+**500** | internal server error | - |
+
+[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
+
+# **subscriptions_retry**
+> SubscriptionResponse subscriptions_retry(customer_id, id, accept_language=accept_language, x_child_company_id=x_child_company_id)
+
+Retry Failed Payment
+
+Retry a failed payment for a specific subscription
+
+### Example
+
+* Bearer Authentication (bearerAuth):
+
+```python
+import conekta
+from conekta.models.subscription_response import SubscriptionResponse
+from conekta.rest import ApiException
+from pprint import pprint
+
+# Defining the host is optional and defaults to https://api.conekta.io
+# See configuration.py for a list of all supported configuration parameters.
+configuration = conekta.Configuration(
+ host = "https://api.conekta.io"
+)
+
+# The client must configure the authentication and authorization parameters
+# in accordance with the API server security policy.
+# Examples for each auth method are provided below, use the example that
+# satisfies your auth use case.
+
+# Configure Bearer authorization: bearerAuth
+configuration = conekta.Configuration(
+ access_token = os.environ["BEARER_TOKEN"]
+)
+
+# Enter a context with an instance of the API client
+with conekta.ApiClient(configuration) as api_client:
+ # Create an instance of the API class
+ api_instance = conekta.SubscriptionsApi(api_client)
+ customer_id = 'cus_2tGzG1GxtDAZHEGPH' # str | Identifier of the customer resource
+ id = 'sub_2tGzG1GxtDAZHEGPH' # str | Identifier of the subscription resource
+ accept_language = es # str | Use for knowing which language to use (optional) (default to es)
+ x_child_company_id = '6441b6376b60c3a638da80af' # str | In the case of a holding company, the company id of the child company to which will process the request. (optional)
+
+ try:
+ # Retry Failed Payment
+ api_response = api_instance.subscriptions_retry(customer_id, id, accept_language=accept_language, x_child_company_id=x_child_company_id)
+ print("The response of SubscriptionsApi->subscriptions_retry:\n")
+ pprint(api_response)
+ except Exception as e:
+ print("Exception when calling SubscriptionsApi->subscriptions_retry: %s\n" % e)
+```
+
+
+
+### Parameters
+
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **customer_id** | **str**| Identifier of the customer resource |
+ **id** | **str**| Identifier of the subscription resource |
+ **accept_language** | **str**| Use for knowing which language to use | [optional] [default to es]
+ **x_child_company_id** | **str**| In the case of a holding company, the company id of the child company to which will process the request. | [optional]
+
+### Return type
+
+[**SubscriptionResponse**](SubscriptionResponse.md)
+
+### Authorization
+
+[bearerAuth](../README.md#bearerAuth)
+
+### HTTP request headers
+
+ - **Content-Type**: Not defined
+ - **Accept**: application/vnd.conekta-v2.2.0+json
+
+### HTTP response details
+
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+**200** | successful | * Date - The date and time that the response was sent
* Content-Type - The format of the response body
* Content-Length - The length of the response body in bytes
* Connection - The type of connection used to transfer the response
* Conekta-Media-Type -
|
+**401** | authentication error | - |
+**404** | not found entity | - |
+**422** | parameter validation error | - |
+**500** | internal server error | - |
+
+[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
+
+# **update_subscription**
+> SubscriptionResponse update_subscription(id, subscription_update_request, accept_language=accept_language, x_child_company_id=x_child_company_id)
+
+Update Subscription [Deprecated]
+
+DEPRECATED: This endpoint will be removed in version 2.3.0. You can modify the subscription to change the plans that your customers consume
+
+### Example
+
+* Bearer Authentication (bearerAuth):
+
+```python
+import conekta
+from conekta.models.subscription_response import SubscriptionResponse
+from conekta.models.subscription_update_request import SubscriptionUpdateRequest
+from conekta.rest import ApiException
+from pprint import pprint
+
+# Defining the host is optional and defaults to https://api.conekta.io
+# See configuration.py for a list of all supported configuration parameters.
+configuration = conekta.Configuration(
+ host = "https://api.conekta.io"
+)
+
+# The client must configure the authentication and authorization parameters
+# in accordance with the API server security policy.
+# Examples for each auth method are provided below, use the example that
+# satisfies your auth use case.
+
+# Configure Bearer authorization: bearerAuth
+configuration = conekta.Configuration(
+ access_token = os.environ["BEARER_TOKEN"]
+)
+
+# Enter a context with an instance of the API client
+with conekta.ApiClient(configuration) as api_client:
+ # Create an instance of the API class
+ api_instance = conekta.SubscriptionsApi(api_client)
+ id = '6307a60c41de27127515a575' # str | Identifier of the resource
+ subscription_update_request = conekta.SubscriptionUpdateRequest() # SubscriptionUpdateRequest | requested field for update a subscription
+ accept_language = es # str | Use for knowing which language to use (optional) (default to es)
+ x_child_company_id = '6441b6376b60c3a638da80af' # str | In the case of a holding company, the company id of the child company to which will process the request. (optional)
+
+ try:
+ # Update Subscription [Deprecated]
api_response = api_instance.update_subscription(id, subscription_update_request, accept_language=accept_language, x_child_company_id=x_child_company_id)
print("The response of SubscriptionsApi->update_subscription:\n")
pprint(api_response)
@@ -603,7 +1418,7 @@ Name | Type | Description | Notes
### HTTP request headers
- **Content-Type**: application/json
- - **Accept**: application/vnd.conekta-v2.1.0+json
+ - **Accept**: application/vnd.conekta-v2.2.0+json
### HTTP response details
diff --git a/docs/TaxesApi.md b/docs/TaxesApi.md
index b5fa070..0f802e5 100644
--- a/docs/TaxesApi.md
+++ b/docs/TaxesApi.md
@@ -84,7 +84,7 @@ Name | Type | Description | Notes
### HTTP request headers
- **Content-Type**: application/json
- - **Accept**: application/vnd.conekta-v2.1.0+json
+ - **Accept**: application/vnd.conekta-v2.2.0+json
### HTTP response details
@@ -171,7 +171,7 @@ Name | Type | Description | Notes
### HTTP request headers
- **Content-Type**: Not defined
- - **Accept**: application/vnd.conekta-v2.1.0+json
+ - **Accept**: application/vnd.conekta-v2.2.0+json
### HTTP response details
@@ -262,7 +262,7 @@ Name | Type | Description | Notes
### HTTP request headers
- **Content-Type**: application/json
- - **Accept**: application/vnd.conekta-v2.1.0+json
+ - **Accept**: application/vnd.conekta-v2.2.0+json
### HTTP response details
diff --git a/docs/TokensApi.md b/docs/TokensApi.md
index 1814131..53cece6 100644
--- a/docs/TokensApi.md
+++ b/docs/TokensApi.md
@@ -78,7 +78,7 @@ Name | Type | Description | Notes
### HTTP request headers
- **Content-Type**: application/json
- - **Accept**: application/vnd.conekta-v2.1.0+json
+ - **Accept**: application/vnd.conekta-v2.2.0+json
### HTTP response details
diff --git a/docs/TransactionsApi.md b/docs/TransactionsApi.md
index 348113d..7243f31 100644
--- a/docs/TransactionsApi.md
+++ b/docs/TransactionsApi.md
@@ -80,7 +80,7 @@ Name | Type | Description | Notes
### HTTP request headers
- **Content-Type**: Not defined
- - **Accept**: application/vnd.conekta-v2.1.0+json
+ - **Accept**: application/vnd.conekta-v2.2.0+json
### HTTP response details
@@ -177,7 +177,7 @@ Name | Type | Description | Notes
### HTTP request headers
- **Content-Type**: Not defined
- - **Accept**: application/vnd.conekta-v2.1.0+json
+ - **Accept**: application/vnd.conekta-v2.2.0+json
### HTTP response details
diff --git a/docs/TransfersApi.md b/docs/TransfersApi.md
index c13bc13..bf03354 100644
--- a/docs/TransfersApi.md
+++ b/docs/TransfersApi.md
@@ -80,7 +80,7 @@ Name | Type | Description | Notes
### HTTP request headers
- **Content-Type**: Not defined
- - **Accept**: application/vnd.conekta-v2.1.0+json
+ - **Accept**: application/vnd.conekta-v2.2.0+json
### HTTP response details
@@ -171,7 +171,7 @@ Name | Type | Description | Notes
### HTTP request headers
- **Content-Type**: Not defined
- - **Accept**: application/vnd.conekta-v2.1.0+json
+ - **Accept**: application/vnd.conekta-v2.2.0+json
### HTTP response details
diff --git a/docs/UpdateCustomerPaymentMethodsResponse.md b/docs/UpdateCustomerPaymentMethodsResponse.md
index d193263..ccfa142 100644
--- a/docs/UpdateCustomerPaymentMethodsResponse.md
+++ b/docs/UpdateCustomerPaymentMethodsResponse.md
@@ -10,9 +10,10 @@ Name | Type | Description | Notes
**object** | **str** | |
**created_at** | **int** | |
**parent_id** | **str** | | [optional]
+**agreements** | [**List[PaymentMethodCashResponseAllOfAgreements]**](PaymentMethodCashResponseAllOfAgreements.md) | | [optional]
**reference** | **str** | | [optional]
**barcode** | **str** | | [optional]
-**barcode_url** | **str** | | [optional]
+**barcode_url** | **str** | URL to the barcode image, reference is the same as barcode | [optional]
**expires_at** | **str** | | [optional]
**provider** | **str** | | [optional]
**last4** | **str** | | [optional]
diff --git a/docs/WebhookKeysApi.md b/docs/WebhookKeysApi.md
index 6cff868..635ddf6 100644
--- a/docs/WebhookKeysApi.md
+++ b/docs/WebhookKeysApi.md
@@ -82,7 +82,7 @@ Name | Type | Description | Notes
### HTTP request headers
- **Content-Type**: application/json
- - **Accept**: application/vnd.conekta-v2.1.0+json
+ - **Accept**: application/vnd.conekta-v2.2.0+json
### HTTP response details
@@ -162,7 +162,7 @@ Name | Type | Description | Notes
### HTTP request headers
- **Content-Type**: Not defined
- - **Accept**: application/vnd.conekta-v2.1.0+json
+ - **Accept**: application/vnd.conekta-v2.2.0+json
### HTTP response details
@@ -245,7 +245,7 @@ Name | Type | Description | Notes
### HTTP request headers
- **Content-Type**: Not defined
- - **Accept**: application/vnd.conekta-v2.1.0+json
+ - **Accept**: application/vnd.conekta-v2.2.0+json
### HTTP response details
@@ -336,7 +336,7 @@ Name | Type | Description | Notes
### HTTP request headers
- **Content-Type**: Not defined
- - **Accept**: application/vnd.conekta-v2.1.0+json
+ - **Accept**: application/vnd.conekta-v2.2.0+json
### HTTP response details
@@ -421,7 +421,7 @@ Name | Type | Description | Notes
### HTTP request headers
- **Content-Type**: application/json
- - **Accept**: application/vnd.conekta-v2.1.0+json
+ - **Accept**: application/vnd.conekta-v2.2.0+json
### HTTP response details
diff --git a/docs/WebhookRequest.md b/docs/WebhookRequest.md
index 609812f..e2d1d6e 100644
--- a/docs/WebhookRequest.md
+++ b/docs/WebhookRequest.md
@@ -7,7 +7,7 @@ a webhook
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**url** | **str** | Here you must place the URL of your Webhook remember that you must program what you will do with the events received. Also do not forget to handle the HTTPS protocol for greater security. |
-**synchronous** | **bool** | It is a value that allows to decide if the events will be synchronous or asynchronous. We recommend asynchronous = false | [default to False]
+**subscribed_events** | **List[str]** | events that will be sent to the webhook | [optional]
## Example
diff --git a/docs/WebhookResponse.md b/docs/WebhookResponse.md
index 7ada7dd..0e969f2 100644
--- a/docs/WebhookResponse.md
+++ b/docs/WebhookResponse.md
@@ -6,16 +6,14 @@ webhooks model
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
-**deleted** | **bool** | | [optional]
-**development_enabled** | **bool** | | [optional]
-**id** | **str** | | [optional]
-**livemode** | **bool** | | [optional]
-**object** | **str** | | [optional]
-**production_enabled** | **bool** | | [optional]
-**status** | **str** | | [optional]
-**subscribed_events** | **List[str]** | | [optional]
-**synchronous** | **bool** | | [optional]
-**url** | **str** | | [optional]
+**id** | **str** | id of the webhook | [optional]
+**description** | **str** | A name or brief explanation of what this webhook is used for | [optional]
+**livemode** | **bool** | Indicates if the webhook is in production | [optional]
+**active** | **bool** | Indicates if the webhook is actived or not | [optional]
+**object** | **str** | Object name, value is 'webhook' | [optional]
+**status** | **str** | Indicates if the webhook is ready to receive events or failing | [optional]
+**subscribed_events** | **List[str]** | lists the events that will be sent to the webhook | [optional]
+**url** | **str** | url or endpoint of the webhook | [optional]
## Example
diff --git a/docs/WebhookUpdateRequest.md b/docs/WebhookUpdateRequest.md
index e696ee0..c45541d 100644
--- a/docs/WebhookUpdateRequest.md
+++ b/docs/WebhookUpdateRequest.md
@@ -6,9 +6,9 @@ an updated webhook
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
-**url** | **str** | Here you must place the URL of your Webhook remember that you must program what you will do with the events received. Also do not forget to handle the HTTPS protocol for greater security. |
-**synchronous** | **bool** | It is a value that allows to decide if the events will be synchronous or asynchronous. We recommend asynchronous = false | [optional] [default to False]
-**events** | **List[str]** | | [optional]
+**url** | **str** | Here you must place the URL of your Webhook remember that you must program what you will do with the events received. Also do not forget to handle the HTTPS protocol for greater security. | [optional]
+**subscribed_events** | **List[str]** | events that will be sent to the webhook | [optional]
+**active** | **bool** | whether the webhook is active or not | [optional]
## Example
diff --git a/docs/WebhooksApi.md b/docs/WebhooksApi.md
index c3fcd61..0ec65c6 100644
--- a/docs/WebhooksApi.md
+++ b/docs/WebhooksApi.md
@@ -83,7 +83,7 @@ Name | Type | Description | Notes
### HTTP request headers
- **Content-Type**: application/json
- - **Accept**: application/vnd.conekta-v2.1.0+json
+ - **Accept**: application/vnd.conekta-v2.2.0+json
### HTTP response details
@@ -163,7 +163,7 @@ Name | Type | Description | Notes
### HTTP request headers
- **Content-Type**: Not defined
- - **Accept**: application/vnd.conekta-v2.1.0+json
+ - **Accept**: application/vnd.conekta-v2.2.0+json
### HTTP response details
@@ -246,7 +246,7 @@ Name | Type | Description | Notes
### HTTP request headers
- **Content-Type**: Not defined
- - **Accept**: application/vnd.conekta-v2.1.0+json
+ - **Accept**: application/vnd.conekta-v2.2.0+json
### HTTP response details
@@ -339,7 +339,7 @@ Name | Type | Description | Notes
### HTTP request headers
- **Content-Type**: Not defined
- - **Accept**: application/vnd.conekta-v2.1.0+json
+ - **Accept**: application/vnd.conekta-v2.2.0+json
### HTTP response details
@@ -421,7 +421,7 @@ Name | Type | Description | Notes
### HTTP request headers
- **Content-Type**: Not defined
- - **Accept**: application/vnd.conekta-v2.1.0+json
+ - **Accept**: application/vnd.conekta-v2.2.0+json
### HTTP response details
@@ -509,7 +509,7 @@ Name | Type | Description | Notes
### HTTP request headers
- **Content-Type**: application/json
- - **Accept**: application/vnd.conekta-v2.1.0+json
+ - **Accept**: application/vnd.conekta-v2.2.0+json
### HTTP response details
diff --git a/setup.py b/setup.py
index 14fc8e1..2122fc9 100644
--- a/setup.py
+++ b/setup.py
@@ -5,7 +5,7 @@
Conekta sdk
- The version of the OpenAPI document: 2.1.0
+ The version of the OpenAPI document: 2.2.0
Contact: engineering@conekta.com
Generated by OpenAPI Generator (https://openapi-generator.tech)
diff --git a/test/test_antifraud_api.py b/test/test_antifraud_api.py
index ba62b3c..e5dfa65 100644
--- a/test/test_antifraud_api.py
+++ b/test/test_antifraud_api.py
@@ -3,95 +3,71 @@
"""
Conekta API
- Conekta sdk # noqa: E501
+ Conekta sdk
- The version of the OpenAPI document: 2.1.0
+ The version of the OpenAPI document: 2.2.0
Contact: engineering@conekta.com
- Generated by: https://openapi-generator.tech
-"""
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+ Do not edit the class manually.
+""" # noqa: E501
-from __future__ import absolute_import
import unittest
-import conekta
-from conekta import ApiClient
-from conekta.api.antifraud_api import AntifraudApi # noqa: E501
-from conekta.rest import ApiException
-from test.test_utils import get_base_path
+from conekta.api.antifraud_api import AntifraudApi
class TestAntifraudApi(unittest.TestCase):
"""AntifraudApi unit test stubs"""
- def setUp(self):
- self.api = conekta.api.antifraud_api.AntifraudApi(ApiClient(
- configuration=conekta.Configuration(host=get_base_path())
- )) # noqa: E501
+ def setUp(self) -> None:
+ self.api = AntifraudApi()
- def tearDown(self):
+ def tearDown(self) -> None:
pass
- def test_create_rule_blacklist(self):
+ def test_create_rule_blacklist(self) -> None:
"""Test case for create_rule_blacklist
- Create blacklisted rule # noqa: E501
+ Create blacklisted rule
"""
- accept_language = 'es'
- create_risk_rules_data = conekta.CreateRiskRulesData(
- description='description',
- field='field',
- value='value'
- )
- response = self.api.create_rule_blacklist(create_risk_rules_data, accept_language)
- self.assertIsNotNone(response)
-
- def test_create_rule_whitelist(self):
+ pass
+
+ def test_create_rule_whitelist(self) -> None:
"""Test case for create_rule_whitelist
- Create whitelisted rule # noqa: E501
+ Create whitelisted rule
"""
- accept_language = 'es'
- create_risk_rules_data = conekta.CreateRiskRulesData(
- description='description',
- field='field',
- value='value'
- )
- response = self.api.create_rule_whitelist(accept_language, create_risk_rules_data)
- self.assertIsNotNone(response)
-
- def test_delete_rule_blacklist(self):
+ pass
+
+ def test_delete_rule_blacklist(self) -> None:
"""Test case for delete_rule_blacklist
- Delete blacklisted rule # noqa: E501
+ Delete blacklisted rule
"""
- response = self.api.delete_rule_blacklist('618c3f30db8b8da9be376b1e')
- self.assertIsNotNone(response)
+ pass
- def test_delete_rule_whitelist(self):
+ def test_delete_rule_whitelist(self) -> None:
"""Test case for delete_rule_whitelist
- Delete whitelisted rule # noqa: E501
+ Delete whitelisted rule
"""
- response = self.api.delete_rule_whitelist('618c3f30db8b8da9be376b1e')
- self.assertIsNotNone(response)
+ pass
- def test_get_rule_blacklist(self):
+ def test_get_rule_blacklist(self) -> None:
"""Test case for get_rule_blacklist
- Get list of blacklisted rules # noqa: E501
+ Get list of blacklisted rules
"""
- response = self.api.get_rule_blacklist('618c3f30db8b8da9be376b1e')
- self.assertIsNotNone(response)
+ pass
- def test_get_rule_whitelist(self):
+ def test_get_rule_whitelist(self) -> None:
"""Test case for get_rule_whitelist
- Get a list of whitelisted rules # noqa: E501
+ Get a list of whitelisted rules
"""
- response = self.api.get_rule_whitelist('618c3f30db8b8da9be376b1e')
- self.assertIsNotNone(response)
+ pass
if __name__ == '__main__':
diff --git a/test/test_api_keys_api.py b/test/test_api_keys_api.py
index 2ce929c..ed10387 100644
--- a/test/test_api_keys_api.py
+++ b/test/test_api_keys_api.py
@@ -3,98 +3,64 @@
"""
Conekta API
- Conekta sdk # noqa: E501
+ Conekta sdk
- The version of the OpenAPI document: 2.1.0
+ The version of the OpenAPI document: 2.2.0
Contact: engineering@conekta.com
- Generated by: https://openapi-generator.tech
-"""
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+ Do not edit the class manually.
+""" # noqa: E501
-from __future__ import absolute_import
import unittest
-import conekta
-from conekta import ApiClient
-from conekta.api.api_keys_api import ApiKeysApi
-from conekta.rest import ApiException
-from test.test_utils import get_base_path
-from conekta.models.get_api_keys_response import GetApiKeysResponse
-from conekta.models.api_key_response import ApiKeyResponse
+from conekta.api.api_keys_api import ApiKeysApi
+
class TestApiKeysApi(unittest.TestCase):
"""ApiKeysApi unit test stubs"""
- def setUp(self):
- self.api = ApiKeysApi(ApiClient(
- configuration=conekta.Configuration(host=get_base_path())
- ))
+ def setUp(self) -> None:
+ self.api = ApiKeysApi()
- def tearDown(self):
+ def tearDown(self) -> None:
pass
- def test_create_api_key(self):
+ def test_create_api_key(self) -> None:
"""Test case for create_api_key
- Create Api Key # noqa: E501
+ Create Api Key
"""
- accept_language = 'es'
- api_key_request = conekta.ApiKeyRequest(
- active=True,
- description='description',
- role='private'
- )
- response = self.api.create_api_key(api_key_request, accept_language)
- self.assertIsNotNone(response)
-
- def test_delete_api_key(self):
+ pass
+
+ def test_delete_api_key(self) -> None:
"""Test case for delete_api_key
- Delete Api Key # noqa: E501
+ Delete Api Key
"""
- accept_language = 'es'
- response = self.api.delete_api_key('64625cc9f3e02c00163f5e4d', accept_language)
- self.assertIsNotNone(response)
+ pass
- def test_get_api_key(self):
+ def test_get_api_key(self) -> None:
"""Test case for get_api_key
- Get Api Key # noqa: E501
+ Get Api Key
"""
- accept_language = 'es'
- response = self.api.get_api_key('64625cc9f3e02c00163f5e4d', accept_language)
- self.assertIsNotNone(response)
+ pass
- def test_get_api_keys(self):
+ def test_get_api_keys(self) -> None:
"""Test case for get_api_keys
- Get list of Api Keys # noqa: E501
+ Get list of Api Keys
"""
- accept_language = 'es'
- response = self.api.get_api_keys(accept_language, limit=20)
-
- self.assertIsNotNone(response)
- self.assertIsInstance(response, GetApiKeysResponse)
- self.assertIsInstance(response.data[0], ApiKeyResponse)
- self.assertIsNotNone(response.data)
- self.assertTrue(response.data[0].active)
- self.assertEqual(1, len(response.data))
- self.assertFalse(response.next_page_url)
- self.assertFalse(response.previous_page_url)
-
- def test_update_api_key(self):
+ pass
+
+ def test_update_api_key(self) -> None:
"""Test case for update_api_key
- Update Api Key # noqa: E501
+ Update Api Key
"""
- accept_language = 'es'
- api_key_update_request = conekta.ApiKeyUpdateRequest(
- active=False,
- description='description'
- )
- response = self.api.update_api_key('64625cc9f3e02c00163f5e4d', accept_language, api_key_update_request)
- self.assertIsNotNone(response)
+ pass
if __name__ == '__main__':
diff --git a/test/test_balances_api.py b/test/test_balances_api.py
index 2851bc7..61fd62d 100644
--- a/test/test_balances_api.py
+++ b/test/test_balances_api.py
@@ -3,36 +3,34 @@
"""
Conekta API
- Conekta sdk # noqa: E501
+ Conekta sdk
- The version of the OpenAPI document: 2.1.0
+ The version of the OpenAPI document: 2.2.0
Contact: engineering@conekta.com
Generated by OpenAPI Generator (https://openapi-generator.tech)
Do not edit the class manually.
-"""
+""" # noqa: E501
import unittest
-import conekta
-from conekta.api.balances_api import BalancesApi # noqa: E501
-from conekta.rest import ApiException
+from conekta.api.balances_api import BalancesApi
class TestBalancesApi(unittest.TestCase):
"""BalancesApi unit test stubs"""
- def setUp(self):
- self.api = conekta.api.balances_api.BalancesApi() # noqa: E501
+ def setUp(self) -> None:
+ self.api = BalancesApi()
- def tearDown(self):
+ def tearDown(self) -> None:
pass
- def test_get_balance(self):
+ def test_get_balance(self) -> None:
"""Test case for get_balance
- Get a company's balance # noqa: E501
+ Get a company's balance
"""
pass
diff --git a/test/test_charges_api.py b/test/test_charges_api.py
index c6dd620..21ff75a 100644
--- a/test/test_charges_api.py
+++ b/test/test_charges_api.py
@@ -3,64 +3,57 @@
"""
Conekta API
- Conekta sdk # noqa: E501
+ Conekta sdk
- The version of the OpenAPI document: 2.1.0
+ The version of the OpenAPI document: 2.2.0
Contact: engineering@conekta.com
- Generated by: https://openapi-generator.tech
-"""
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+ Do not edit the class manually.
+""" # noqa: E501
-from __future__ import absolute_import
import unittest
-import conekta
-from conekta import ApiClient
-from conekta.api.charges_api import ChargesApi # noqa: E501
-from conekta.rest import ApiException
-from test.test_utils import get_base_path
+from conekta.api.charges_api import ChargesApi
class TestChargesApi(unittest.TestCase):
"""ChargesApi unit test stubs"""
- def setUp(self):
- self.api = conekta.api.charges_api.ChargesApi(ApiClient(
- configuration=conekta.Configuration(host=get_base_path())
- )) # noqa: E501
+ def setUp(self) -> None:
+ self.api = ChargesApi()
- def tearDown(self):
+ def tearDown(self) -> None:
pass
- def test_get_charges(self):
+ def test_get_charges(self) -> None:
"""Test case for get_charges
- Get A List of Charges # noqa: E501
+ Get A List of Charges
"""
- accept_language = 'es'
- response = self.api.get_charges(accept_language, limit=20)
- self.assertIsNotNone(response)
- self.assertIsNotNone(response.data)
- self.assertIsNotNone(response.data[0].payment_method)
- self.assertIsInstance(response.data[0].payment_method.actual_instance, conekta.PaymentMethodCash)
- self.assertEqual('oxxo', response.data[0].payment_method.actual_instance.type)
-
- def test_orders_create_charge(self):
+ pass
+
+ def test_orders_create_charge(self) -> None:
"""Test case for orders_create_charge
- Create charge # noqa: E501
+ Create charge
+ """
+ pass
+
+ def test_orders_create_charges(self) -> None:
+ """Test case for orders_create_charges
+
+ Create charges
+ """
+ pass
+
+ def test_update_charge(self) -> None:
+ """Test case for update_charge
+
+ Update a charge
"""
- accept_language = 'es'
- charge_request = conekta.ChargeRequest(
- amount=1000,
- payment_method=conekta.ChargeRequestPaymentMethod(type='card')
- )
- response = self.api.orders_create_charge('ord_2tUigJ8DgBhbp6w5D', charge_request, accept_language)
- self.assertIsNotNone(response)
- self.assertIsNotNone(response.payment_method)
- self.assertIsInstance(response.payment_method.actual_instance, conekta.PaymentMethodCard)
- self.assertEqual('credit', response.payment_method.actual_instance.type)
+ pass
if __name__ == '__main__':
diff --git a/test/test_companies_api.py b/test/test_companies_api.py
index 7a2a43b..056d4e5 100644
--- a/test/test_companies_api.py
+++ b/test/test_companies_api.py
@@ -3,53 +3,43 @@
"""
Conekta API
- Conekta sdk # noqa: E501
+ Conekta sdk
- The version of the OpenAPI document: 2.1.0
+ The version of the OpenAPI document: 2.2.0
Contact: engineering@conekta.com
- Generated by: https://openapi-generator.tech
-"""
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+ Do not edit the class manually.
+""" # noqa: E501
-from __future__ import absolute_import
import unittest
-import conekta
-from conekta import ApiClient
-from conekta.api.companies_api import CompaniesApi # noqa: E501
-from conekta.rest import ApiException
-from test.test_utils import get_base_path
+from conekta.api.companies_api import CompaniesApi
class TestCompaniesApi(unittest.TestCase):
"""CompaniesApi unit test stubs"""
- def setUp(self):
- self.api = conekta.api.companies_api.CompaniesApi(ApiClient(
- configuration=conekta.Configuration(host=get_base_path())
- )) # noqa: E501
+ def setUp(self) -> None:
+ self.api = CompaniesApi()
- def tearDown(self):
+ def tearDown(self) -> None:
pass
- def test_get_companies(self):
+ def test_get_companies(self) -> None:
"""Test case for get_companies
- Get List of Companies # noqa: E501
+ Get List of Companies
"""
- accept_language = 'es'
- response = self.api.get_companies(accept_language, limit=20)
- self.assertIsNotNone(response)
+ pass
- def test_get_company(self):
+ def test_get_company(self) -> None:
"""Test case for get_company
- Get Company # noqa: E501
+ Get Company
"""
- accept_language = 'es'
- response = self.api.get_company('5c537c4d27839876e2f18139', accept_language)
- self.assertIsNotNone(response)
+ pass
if __name__ == '__main__':
diff --git a/test/test_customers_api.py b/test/test_customers_api.py
index de9724d..cd67811 100644
--- a/test/test_customers_api.py
+++ b/test/test_customers_api.py
@@ -3,129 +3,78 @@
"""
Conekta API
- Conekta sdk # noqa: E501
+ Conekta sdk
- The version of the OpenAPI document: 2.1.0
+ The version of the OpenAPI document: 2.2.0
Contact: engineering@conekta.com
- Generated by: https://openapi-generator.tech
-"""
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+ Do not edit the class manually.
+""" # noqa: E501
-from __future__ import absolute_import
import unittest
-import conekta
-from conekta import ApiClient
-from conekta.api.customers_api import CustomersApi # noqa: E501
-from conekta.rest import ApiException
-from test.test_utils import get_base_path
+from conekta.api.customers_api import CustomersApi
class TestCustomersApi(unittest.TestCase):
"""CustomersApi unit test stubs"""
- def setUp(self):
- self.api = conekta.api.customers_api.CustomersApi(ApiClient(
- configuration=conekta.Configuration(host=get_base_path())
- )) # noqa: E501
+ def setUp(self) -> None:
+ self.api = CustomersApi()
- def tearDown(self):
+ def tearDown(self) -> None:
pass
- def test_create_customer(self):
+ def test_create_customer(self) -> None:
"""Test case for create_customer
- Create customer # noqa: E501
+ Create customer
"""
- accept_language = 'es'
- customer = conekta.Customer(
- email='foo@foo.com',
- name='Foo Foo',
- phone='5534343434'
- )
- response = self.api.create_customer(customer, accept_language)
- self.assertIsNotNone(response)
-
- def test_create_customer_fiscal_entities(self):
+ pass
+
+ def test_create_customer_fiscal_entities(self) -> None:
"""Test case for create_customer_fiscal_entities
- Create Fiscal Entity # noqa: E501
+ Create Fiscal Entity
"""
- accept_language = 'es'
- customer = conekta.CustomerFiscalEntitiesRequest(
- email='foo@foo.com',
- company_name='Foo Foo',
- phone='5534343434',
- address=conekta.CustomerAddress(
- street1='street',
- postal_code='1444',
- city='CDMX'
- )
- )
- response = self.api.create_customer_fiscal_entities('cus_2tYENskzTjjgkGQLt', customer, accept_language)
- self.assertIsNotNone(response)
-
- def test_delete_customer_by_id(self):
+ pass
+
+ def test_delete_customer_by_id(self) -> None:
"""Test case for delete_customer_by_id
- Delete Customer # noqa: E501
+ Delete Customer
"""
- accept_language = 'es'
- response = self.api.delete_customer_by_id('cus_2tYENskzTjjgkGQLt', accept_language)
- self.assertIsNotNone(response)
+ pass
- def test_get_customer_by_id(self):
+ def test_get_customer_by_id(self) -> None:
"""Test case for get_customer_by_id
- Get Customer # noqa: E501
+ Get Customer
"""
- accept_language = 'es'
- response = self.api.get_customer_by_id('cus_2tYENskzTjjgkGQLt', accept_language)
- self.assertIsNotNone(response)
- self.assertIsNotNone(response.payment_sources)
- self.assertIsNotNone(response.payment_sources.data)
- self.assertIsInstance(response.payment_sources.data[0].actual_instance, conekta.PaymentMethodCardResponse)
- self.assertEqual('card', response.payment_sources.data[0].actual_instance.type)
-
- def test_get_customers(self):
+ pass
+
+ def test_get_customers(self) -> None:
"""Test case for get_customers
- Get a list of customers # noqa: E501
+ Get a list of customers
"""
- accept_language = 'es'
- response = self.api.get_customers(accept_language, limit=20)
- self.assertIsNotNone(response)
- self.assertIsNotNone(response.data)
- self.assertIsNotNone(response.data[0].payment_sources)
- self.assertIsNotNone(response.data[0].payment_sources.data)
- self.assertIsInstance(response.data[0].payment_sources.data[0].actual_instance,
- conekta.PaymentMethodSpeiRecurrent)
- self.assertEqual('spei_recurrent', response.data[0].payment_sources.data[0].actual_instance.type)
-
- def test_update_customer(self):
+ pass
+
+ def test_update_customer(self) -> None:
"""Test case for update_customer
- Update customer # noqa: E501
+ Update customer
"""
- accept_language = 'es'
- customer = conekta.UpdateCustomer(
- email='foo@foo.com'
- )
- response = self.api.update_customer('cus_2tYENskzTjjgkGQLt', customer, accept_language)
- self.assertIsNotNone(response)
-
- def test_update_customer_fiscal_entities(self):
+ pass
+
+ def test_update_customer_fiscal_entities(self) -> None:
"""Test case for update_customer_fiscal_entities
- Update Fiscal Entity # noqa: E501
+ Update Fiscal Entity
"""
- accept_language = 'es'
- customer = conekta.CustomerUpdateFiscalEntitiesRequest(
- company_name='Foo Foo'
- )
- response = self.api.update_customer_fiscal_entities('cus_2tYENskzTjjgkGQLt', 'fis_ent_2tYENskzTjjgkGQLr', customer, accept_language)
- self.assertIsNotNone(response)
+ pass
if __name__ == '__main__':
diff --git a/test/test_discounts_api.py b/test/test_discounts_api.py
index 618491c..92d6c55 100644
--- a/test/test_discounts_api.py
+++ b/test/test_discounts_api.py
@@ -3,70 +3,64 @@
"""
Conekta API
- Conekta sdk # noqa: E501
+ Conekta sdk
- The version of the OpenAPI document: 2.1.0
+ The version of the OpenAPI document: 2.2.0
Contact: engineering@conekta.com
- Generated by: https://openapi-generator.tech
-"""
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+ Do not edit the class manually.
+""" # noqa: E501
-from __future__ import absolute_import
import unittest
-import conekta
-from conekta import ApiClient
-from conekta.api.discounts_api import DiscountsApi # noqa: E501
-from conekta.rest import ApiException
-from test.test_utils import get_base_path
+from conekta.api.discounts_api import DiscountsApi
class TestDiscountsApi(unittest.TestCase):
"""DiscountsApi unit test stubs"""
- def setUp(self):
- self.api = conekta.api.discounts_api.DiscountsApi(ApiClient(
- configuration=conekta.Configuration(host=get_base_path())
- )) # noqa: E501
+ def setUp(self) -> None:
+ self.api = DiscountsApi()
- def tearDown(self):
+ def tearDown(self) -> None:
pass
- def test_orders_create_discount_line(self):
+ def test_orders_create_discount_line(self) -> None:
"""Test case for orders_create_discount_line
- Create Discount # noqa: E501
+ Create Discount
"""
- accept_language = 'es'
- rq = conekta.OrderDiscountLinesRequest(
- amount=2000,
- code='CD',
- type='type'
- )
- response = self.api.orders_create_discount_line('ord_2tUigJ8DgBhbp6w5D', rq, accept_language)
- self.assertIsNotNone(response)
-
- def test_orders_delete_discount_lines(self):
+ pass
+
+ def test_orders_delete_discount_lines(self) -> None:
"""Test case for orders_delete_discount_lines
- Delete Discount # noqa: E501
+ Delete Discount
"""
- accept_language = 'es'
- response = self.api.orders_delete_discount_lines('ord_2tUigJ8DgBhbp6w5D', 'dis_lin_2tQQ58HPgPw7StE8z', accept_language)
- self.assertIsNotNone(response)
+ pass
- def test_orders_update_discount_lines(self):
+ def test_orders_get_discount_line(self) -> None:
+ """Test case for orders_get_discount_line
+
+ Get Discount
+ """
+ pass
+
+ def test_orders_get_discount_lines(self) -> None:
+ """Test case for orders_get_discount_lines
+
+ Get a List of Discount
+ """
+ pass
+
+ def test_orders_update_discount_lines(self) -> None:
"""Test case for orders_update_discount_lines
- Update Discount # noqa: E501
+ Update Discount
"""
- accept_language = 'es'
- rq = conekta.UpdateOrderDiscountLinesRequest(
- amount=2000
- )
- response = self.api.orders_update_discount_lines('ord_2tUigJ8DgBhbp6w5D', 'dis_lin_2tQQ58HPgPw7StE8z', rq, accept_language)
- self.assertIsNotNone(response)
+ pass
if __name__ == '__main__':
diff --git a/test/test_events_api.py b/test/test_events_api.py
index c2efe26..327d933 100644
--- a/test/test_events_api.py
+++ b/test/test_events_api.py
@@ -3,62 +3,50 @@
"""
Conekta API
- Conekta sdk # noqa: E501
+ Conekta sdk
- The version of the OpenAPI document: 2.1.0
+ The version of the OpenAPI document: 2.2.0
Contact: engineering@conekta.com
- Generated by: https://openapi-generator.tech
-"""
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+ Do not edit the class manually.
+""" # noqa: E501
-from __future__ import absolute_import
import unittest
-import conekta
-from conekta import ApiClient
-from conekta.api.events_api import EventsApi # noqa: E501
-from conekta.rest import ApiException
-from test.test_utils import get_base_path
+from conekta.api.events_api import EventsApi
class TestEventsApi(unittest.TestCase):
"""EventsApi unit test stubs"""
- def setUp(self):
- self.api = conekta.api.events_api.EventsApi(ApiClient(
- configuration=conekta.Configuration(host=get_base_path())
- )) # noqa: E501
+ def setUp(self) -> None:
+ self.api = EventsApi()
- def tearDown(self):
+ def tearDown(self) -> None:
pass
- def test_get_event(self):
+ def test_get_event(self) -> None:
"""Test case for get_event
- Get Event # noqa: E501
+ Get Event
"""
- accept_language = 'es'
- response = self.api.get_event('63fe3d2ddf70970001cfb41a', accept_language)
- self.assertIsNotNone(response)
+ pass
- def test_get_events(self):
+ def test_get_events(self) -> None:
"""Test case for get_events
- Get list of Events # noqa: E501
+ Get list of Events
"""
- accept_language = 'es'
- response = self.api.get_events(accept_language, limit=20)
- self.assertIsNotNone(response)
+ pass
- def test_resend_event(self):
+ def test_resend_event(self) -> None:
"""Test case for resend_event
- Resend Event # noqa: E501
+ Resend Event
"""
- accept_language = 'es'
- response = self.api.resend_event('63fe3d2ddf70970001cfb41a', accept_language)
- self.assertIsNotNone(response)
+ pass
if __name__ == '__main__':
diff --git a/test/test_logs_api.py b/test/test_logs_api.py
index d1c7558..92d5a3f 100644
--- a/test/test_logs_api.py
+++ b/test/test_logs_api.py
@@ -3,53 +3,43 @@
"""
Conekta API
- Conekta sdk # noqa: E501
+ Conekta sdk
- The version of the OpenAPI document: 2.1.0
+ The version of the OpenAPI document: 2.2.0
Contact: engineering@conekta.com
- Generated by: https://openapi-generator.tech
-"""
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+ Do not edit the class manually.
+""" # noqa: E501
-from __future__ import absolute_import
import unittest
-import conekta
-from conekta import ApiClient
-from conekta.api.logs_api import LogsApi # noqa: E501
-from conekta.rest import ApiException
-from test.test_utils import get_base_path
+from conekta.api.logs_api import LogsApi
class TestLogsApi(unittest.TestCase):
"""LogsApi unit test stubs"""
- def setUp(self):
- self.api = conekta.api.logs_api.LogsApi(ApiClient(
- configuration=conekta.Configuration(host=get_base_path())
- )) # noqa: E501
+ def setUp(self) -> None:
+ self.api = LogsApi()
- def tearDown(self):
+ def tearDown(self) -> None:
pass
- def test_get_log_by_id(self):
+ def test_get_log_by_id(self) -> None:
"""Test case for get_log_by_id
- Get Log # noqa: E501
+ Get Log
"""
- accept_language = 'es'
- response = self.api.get_log_by_id('6419dd15b985080001fc280e', accept_language)
- self.assertIsNotNone(response)
+ pass
- def test_get_logs(self):
+ def test_get_logs(self) -> None:
"""Test case for get_logs
- Get List Of Logs # noqa: E501
+ Get List Of Logs
"""
- accept_language = 'es'
- response = self.api.get_logs(accept_language, limit=20)
- self.assertIsNotNone(response)
+ pass
if __name__ == '__main__':
diff --git a/test/test_orders_api.py b/test/test_orders_api.py
index 9e6f8f7..3a8b7d6 100644
--- a/test/test_orders_api.py
+++ b/test/test_orders_api.py
@@ -3,172 +3,85 @@
"""
Conekta API
- Conekta sdk # noqa: E501
+ Conekta sdk
- The version of the OpenAPI document: 2.1.0
+ The version of the OpenAPI document: 2.2.0
Contact: engineering@conekta.com
- Generated by: https://openapi-generator.tech
-"""
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
-from __future__ import absolute_import
import unittest
-import conekta
-from conekta import ApiClient
-from conekta.rest import ApiException
-from test.test_utils import get_base_path
-from conekta.models.order_response_charges import OrderResponseCharges
-from conekta.models.order_response import OrderResponse
from conekta.api.orders_api import OrdersApi
-from conekta.models.payment_method_cash import PaymentMethodCash
+
class TestOrdersApi(unittest.TestCase):
"""OrdersApi unit test stubs"""
- def setUp(self):
- self.api = OrdersApi(ApiClient(
- configuration=conekta.Configuration(host=get_base_path(),access_token='key_xxxx')
- )) # noqa: E501
+ def setUp(self) -> None:
+ self.api = OrdersApi()
- def tearDown(self):
+ def tearDown(self) -> None:
pass
- def test_cancel_order(self):
+ def test_cancel_order(self) -> None:
"""Test case for cancel_order
- Cancel Order # noqa: E501
+ Cancel Order
"""
- accept_language = 'es'
- response = self.api.cancel_order('ord_2tqaGQYZyvBsMKEgs', accept_language)
- self.assertIsNotNone(response)
+ pass
- def test_create_order(self):
+ def test_create_order(self) -> None:
"""Test case for create_order
- Create order # noqa: E501
+ Create order
"""
- accept_language = 'es'
- rq = conekta.OrderRequest(
- currency='MXN',
- customer_info=conekta.OrderRequestCustomerInfo(
- oneof_schema_2_validator=conekta.CustomerInfoJustCustomerId(
- customer_id='cus_2tYENskzTjjgkGQLt'
- )
- ),
- line_items=[conekta.Product(
- name='product',
- quantity=1,
- unit_price=1000
- )],
- shipping_contact=conekta.CustomerShippingContacts(
- address=conekta.CustomerShippingContactsAddress(
- street1='Calle 123, int 2',
- street2='Col. Condesa',
- city='Cuauhtémoc',
- state='Ciudad de México',
- country='MX',
- ),
- metadata={}
- ),
- fiscal_entity=conekta.OrderFiscalEntityRequest(
- address=conekta.FiscalEntityAddress(
- state='Ciudad de México',
- street1='Calle 123, int 2',
- street2='Col. Condesa',
- city='Cuauhtémoc',
- country='MX',
- postal_code='06100',
- external_number='123',
- ),
- metadata={},
- )
- )
- response = self.api.create_order(rq, accept_language)
-
- self.assertIsNotNone(response)
- self.assertIsNotNone(response.charges)
- self.assertIsInstance(response.charges, OrderResponseCharges)
- self.assertIsInstance(response, OrderResponse)
- self.assertEqual('list', response.charges.object)
- self.assertEqual(1, len(response.charges.data))
- self.assertIsInstance(response.charges.data[0].payment_method.actual_instance, PaymentMethodCash)
- self.assertEqual("oxxo", response.charges.data[0].payment_method.actual_instance.type)
-
- def test_get_order_by_id(self):
+ pass
+
+ def test_get_order_by_id(self) -> None:
"""Test case for get_order_by_id
- Get Order # noqa: E501
+ Get Order
"""
- accept_language = 'es'
- response = self.api.get_order_by_id('ord_2tUigJ8DgBhbp6w5D', accept_language)
- self.assertIsNotNone(response)
- self.assertIsNotNone(response.charges)
- self.assertIsNotNone(response.charges.data)
- charge = response.charges.data[0]
- self.assertIsNotNone(charge.payment_method)
- self.assertIsInstance(charge.payment_method.actual_instance, conekta.PaymentMethodBankTransfer)
- self.assertEqual('spei', charge.payment_method.actual_instance.type)
-
- def test_get_orders(self):
+ pass
+
+ def test_get_orders(self) -> None:
"""Test case for get_orders
- Get a list of Orders # noqa: E501
+ Get a list of Orders
"""
- accept_language = 'es'
- response = self.api.get_orders(accept_language, limit=20)
- self.assertIsNotNone(response)
- self.assertIsNotNone(response.data)
- self.assertIsNotNone(response.data)
- self.assertIsNotNone(response.data[0].charges)
- self.assertIsNotNone(response.data[0].charges.data)
- charge = response.data[0].charges.data[0]
- self.assertIsNotNone(charge.payment_method)
- self.assertIsInstance(charge.payment_method.actual_instance, conekta.PaymentMethodCard)
- self.assertEqual('credit', charge.payment_method.actual_instance.type)
-
- def test_order_cancel_refund(self):
+ pass
+
+ def test_order_cancel_refund(self) -> None:
"""Test case for order_cancel_refund
- Cancel Refund # noqa: E501
+ Cancel Refund
"""
- accept_language = 'es'
- response = self.api.order_cancel_refund('ord_2tV52JvSom2w3E8bX', '6407b5bee1329a000175ba11', accept_language)
- self.assertIsNotNone(response)
+ pass
- def test_order_refund(self):
+ def test_order_refund(self) -> None:
"""Test case for order_refund
- Refund Order # noqa: E501
+ Refund Order
"""
- accept_language = 'es'
- rq = conekta.OrderRefundRequest(
- amount=2000,
- reason='promo'
- )
- response = self.api.order_refund('ord_2tV52JvSom2w3E8bX', rq, accept_language)
- self.assertIsNotNone(response)
-
- def test_orders_create_capture(self):
+ pass
+
+ def test_orders_create_capture(self) -> None:
"""Test case for orders_create_capture
- Capture Order # noqa: E501
+ Capture Order
"""
- accept_language = 'es'
- response = self.api.orders_create_capture('ord_2tV52JvSom2w3E8bX', accept_language)
- self.assertIsNotNone(response)
+ pass
- def test_update_order(self):
+ def test_update_order(self) -> None:
"""Test case for update_order
- Update Order # noqa: E501
+ Update Order
"""
- accept_language = 'es'
- rq = conekta.OrderUpdateRequest(
- currency='MXN'
- )
- response = self.api.update_order('ord_2tV52JvSom2w3E8bX', rq, accept_language)
- self.assertIsNotNone(response)
+ pass
if __name__ == '__main__':
diff --git a/test/test_payment_link_api.py b/test/test_payment_link_api.py
index c51afe9..90dbb15 100644
--- a/test/test_payment_link_api.py
+++ b/test/test_payment_link_api.py
@@ -3,110 +3,71 @@
"""
Conekta API
- Conekta sdk # noqa: E501
+ Conekta sdk
- The version of the OpenAPI document: 2.1.0
+ The version of the OpenAPI document: 2.2.0
Contact: engineering@conekta.com
- Generated by: https://openapi-generator.tech
-"""
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+ Do not edit the class manually.
+""" # noqa: E501
-from __future__ import absolute_import
import unittest
-import conekta
-from conekta import ApiClient
-from conekta.api.payment_link_api import PaymentLinkApi # noqa: E501
-from conekta.rest import ApiException
-from test.test_utils import get_base_path
+from conekta.api.payment_link_api import PaymentLinkApi
class TestPaymentLinkApi(unittest.TestCase):
"""PaymentLinkApi unit test stubs"""
- def setUp(self):
- self.api = conekta.api.payment_link_api.PaymentLinkApi(ApiClient(
- configuration=conekta.Configuration(host=get_base_path())
- )) # noqa: E501
+ def setUp(self) -> None:
+ self.api = PaymentLinkApi()
- def tearDown(self):
+ def tearDown(self) -> None:
pass
- def test_cancel_checkout(self):
+ def test_cancel_checkout(self) -> None:
"""Test case for cancel_checkout
- Cancel Payment Link # noqa: E501
+ Cancel Payment Link
"""
- accept_language = 'es'
- response = self.api.cancel_checkout('ff6918c6-5043-43b9-a7ec-d40d407d62c1', accept_language)
- self.assertIsNotNone(response)
+ pass
- def test_create_checkout(self):
+ def test_create_checkout(self) -> None:
"""Test case for create_checkout
- Create Unique Payment Link # noqa: E501
+ Create Unique Payment Link
"""
- accept_language = 'es'
- rq = conekta.Checkout(
- allowed_payment_methods=['cash'],
- expires_at=1231223,
- name='test',
- recurrent=False,
- type='PaymentLink',
- order_template=conekta.CheckoutOrderTemplate(
- currency='MXN',
- line_items=[conekta.Product(
- name='Product',
- unit_price=10000,
- quantity=1
- )]
- )
- )
- response = self.api.create_checkout(rq, accept_language)
- self.assertIsNotNone(response)
-
- def test_email_checkout(self):
+ pass
+
+ def test_email_checkout(self) -> None:
"""Test case for email_checkout
- Send an email # noqa: E501
+ Send an email
"""
- accept_language = 'es'
- rq = conekta.EmailCheckoutRequest(
- email='foo@email.com'
- )
- response = self.api.email_checkout('ff6918c6-5043-43b9-a7ec-d40d407d62c1', rq, accept_language)
- self.assertIsNotNone(response)
-
- def test_get_checkout(self):
+ pass
+
+ def test_get_checkout(self) -> None:
"""Test case for get_checkout
- Get a payment link by ID # noqa: E501
+ Get a payment link by ID
"""
- accept_language = 'es'
- response = self.api.get_checkout('ff6918c6-5043-43b9-a7ec-d40d407d62c1', accept_language)
- self.assertIsNotNone(response)
+ pass
- def test_get_checkouts(self):
+ def test_get_checkouts(self) -> None:
"""Test case for get_checkouts
- Get a list of payment links # noqa: E501
+ Get a list of payment links
"""
- accept_language = 'es'
- response = self.api.get_checkouts(accept_language, limit=2)
- self.assertIsNotNone(response)
+ pass
- def test_sms_checkout(self):
+ def test_sms_checkout(self) -> None:
"""Test case for sms_checkout
- Send an sms # noqa: E501
+ Send an sms
"""
- accept_language = 'es'
- rq = conekta.SmsCheckoutRequest(
- phonenumber='5534234343'
- )
- response = self.api.sms_checkout('ff6918c6-5043-43b9-a7ec-d40d407d62c1', rq, accept_language)
- self.assertIsNotNone(response)
+ pass
if __name__ == '__main__':
diff --git a/test/test_payment_methods_api.py b/test/test_payment_methods_api.py
index bb66898..e98c529 100644
--- a/test/test_payment_methods_api.py
+++ b/test/test_payment_methods_api.py
@@ -3,87 +3,57 @@
"""
Conekta API
- Conekta sdk # noqa: E501
+ Conekta sdk
- The version of the OpenAPI document: 2.1.0
+ The version of the OpenAPI document: 2.2.0
Contact: engineering@conekta.com
- Generated by: https://openapi-generator.tech
-"""
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+ Do not edit the class manually.
+""" # noqa: E501
-from __future__ import absolute_import
import unittest
-import conekta
-from conekta import ApiClient
-from conekta.api.payment_methods_api import PaymentMethodsApi # noqa: E501
-from conekta.rest import ApiException
-from test.test_utils import get_base_path
+from conekta.api.payment_methods_api import PaymentMethodsApi
class TestPaymentMethodsApi(unittest.TestCase):
"""PaymentMethodsApi unit test stubs"""
- def setUp(self):
- self.api = conekta.api.payment_methods_api.PaymentMethodsApi(ApiClient(
- configuration=conekta.Configuration(host=get_base_path())
- )) # noqa: E501
+ def setUp(self) -> None:
+ self.api = PaymentMethodsApi()
- def tearDown(self):
+ def tearDown(self) -> None:
pass
- def test_create_customer_payment_methods(self):
+ def test_create_customer_payment_methods(self) -> None:
"""Test case for create_customer_payment_methods
- Create Payment Method # noqa: E501
+ Create Payment Method
"""
- accept_language = 'es'
- rq = conekta.CreateCustomerPaymentMethodsRequest(
- conekta.PaymentMethodCashRequest(
- type='oxxo_recurrent'
- )
- )
-
- response = self.api.create_customer_payment_methods('cus_2tXyF9BwPG14UMkkg', rq, accept_language)
- self.assertIsNotNone(response)
- self.assertIsInstance(response.actual_instance, conekta.PaymentMethodCashResponse)
- self.assertEqual('oxxo_recurrent', response.actual_instance.type)
-
- def test_delete_customer_payment_methods(self):
+ pass
+
+ def test_delete_customer_payment_methods(self) -> None:
"""Test case for delete_customer_payment_methods
- Delete Payment Method # noqa: E501
+ Delete Payment Method
"""
- accept_language = 'es'
- response = self.api.delete_customer_payment_methods('cus_2tYENskzTjjgkGQLt', 'src_2tbd5Bgy67RL9oycM',
- accept_language)
- self.assertIsNotNone(response)
+ pass
- def test_get_customer_payment_methods(self):
+ def test_get_customer_payment_methods(self) -> None:
"""Test case for get_customer_payment_methods
- Get Payment Methods # noqa: E501
+ Get Payment Methods
"""
- accept_language = 'es'
- response = self.api.get_customer_payment_methods('cus_2tYENskzTjjgkGQLt', accept_language)
- self.assertIsNotNone(response)
- self.assertIsNotNone(response.data)
- self.assertIsInstance(response.data[0].actual_instance, conekta.PaymentMethodCardResponse)
- self.assertEqual('card', response.data[0].actual_instance.type)
-
- def test_update_customer_payment_methods(self):
+ pass
+
+ def test_update_customer_payment_methods(self) -> None:
"""Test case for update_customer_payment_methods
- Update Payment Method # noqa: E501
+ Update Payment Method
"""
- accept_language = 'es'
- rq = conekta.UpdatePaymentMethods(
- name='test'
- )
- response = self.api.update_customer_payment_methods('cus_2tYENskzTjjgkGQLt', 'src_2tbd5Bgy67RL9oycM', rq,
- accept_language)
- self.assertIsNotNone(response)
+ pass
if __name__ == '__main__':
diff --git a/test/test_payout_orders_api.py b/test/test_payout_orders_api.py
index 784e62f..474be30 100644
--- a/test/test_payout_orders_api.py
+++ b/test/test_payout_orders_api.py
@@ -5,7 +5,7 @@
Conekta sdk
- The version of the OpenAPI document: 2.1.0
+ The version of the OpenAPI document: 2.2.0
Contact: engineering@conekta.com
Generated by OpenAPI Generator (https://openapi-generator.tech)
@@ -27,6 +27,13 @@ def setUp(self) -> None:
def tearDown(self) -> None:
pass
+ def test_cancel_payout_order_by_id(self) -> None:
+ """Test case for cancel_payout_order_by_id
+
+ Cancel Payout Order
+ """
+ pass
+
def test_create_payout_order(self) -> None:
"""Test case for create_payout_order
diff --git a/test/test_plans_api.py b/test/test_plans_api.py
index a814cf8..34254a2 100644
--- a/test/test_plans_api.py
+++ b/test/test_plans_api.py
@@ -3,90 +3,64 @@
"""
Conekta API
- Conekta sdk # noqa: E501
+ Conekta sdk
- The version of the OpenAPI document: 2.1.0
+ The version of the OpenAPI document: 2.2.0
Contact: engineering@conekta.com
- Generated by: https://openapi-generator.tech
-"""
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+ Do not edit the class manually.
+""" # noqa: E501
-from __future__ import absolute_import
import unittest
-import conekta
-from conekta import ApiClient
-from conekta.api.plans_api import PlansApi # noqa: E501
-from conekta.rest import ApiException
-from test.test_utils import get_base_path
+from conekta.api.plans_api import PlansApi
class TestPlansApi(unittest.TestCase):
"""PlansApi unit test stubs"""
- def setUp(self):
- self.api = conekta.api.plans_api.PlansApi(ApiClient(
- configuration=conekta.Configuration(host=get_base_path())
- )) # noqa: E501
+ def setUp(self) -> None:
+ self.api = PlansApi()
- def tearDown(self):
+ def tearDown(self) -> None:
pass
- def test_create_plan(self):
+ def test_create_plan(self) -> None:
"""Test case for create_plan
- Create Plan # noqa: E501
+ Create Plan
"""
- accept_language = 'es'
- rq = conekta.PlanRequest(
- amount=1000,
- currency='MXN',
- frequency=1,
- interval='week',
- name='plan test'
- )
- response = self.api.create_plan(rq, accept_language)
- self.assertIsNotNone(response)
-
- def test_delete_plan(self):
+ pass
+
+ def test_delete_plan(self) -> None:
"""Test case for delete_plan
- Delete Plan # noqa: E501
+ Delete Plan
"""
- accept_language = 'es'
- response = self.api.delete_plan('plan_2tZb5q8Z3PYpg6SJd', accept_language)
- self.assertIsNotNone(response)
+ pass
- def test_get_plan(self):
+ def test_get_plan(self) -> None:
"""Test case for get_plan
- Get Plan # noqa: E501
+ Get Plan
"""
- accept_language = 'es'
- response = self.api.get_plan('plan_2tZb5q8Z3PYpg6SJd', accept_language)
- self.assertIsNotNone(response)
+ pass
- def test_get_plans(self):
+ def test_get_plans(self) -> None:
"""Test case for get_plans
- Get A List of Plans # noqa: E501
+ Get A List of Plans
"""
- accept_language = 'es'
- response = self.api.get_plans(accept_language, limit=20)
- self.assertIsNotNone(response)
+ pass
- def test_update_plan(self):
+ def test_update_plan(self) -> None:
"""Test case for update_plan
- Update Plan # noqa: E501
+ Update Plan
"""
- accept_language = 'es'
- rq = conekta.PlanUpdateRequest(
- amount=1000
- )
- response = self.api.update_plan('plan_2tZb5q8Z3PYpg6SJd', rq, accept_language)
- self.assertIsNotNone(response)
+ pass
if __name__ == '__main__':
diff --git a/test/test_products_api.py b/test/test_products_api.py
index 7334776..3a1c5ac 100644
--- a/test/test_products_api.py
+++ b/test/test_products_api.py
@@ -3,74 +3,50 @@
"""
Conekta API
- Conekta sdk # noqa: E501
+ Conekta sdk
- The version of the OpenAPI document: 2.1.0
+ The version of the OpenAPI document: 2.2.0
Contact: engineering@conekta.com
- Generated by: https://openapi-generator.tech
-"""
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+ Do not edit the class manually.
+""" # noqa: E501
-from __future__ import absolute_import
import unittest
-import conekta
-from conekta import ApiClient
-from conekta.api.products_api import ProductsApi # noqa: E501
-from conekta.rest import ApiException
-from test.test_utils import get_base_path
+from conekta.api.products_api import ProductsApi
class TestProductsApi(unittest.TestCase):
"""ProductsApi unit test stubs"""
- def setUp(self):
- self.api = conekta.api.products_api.ProductsApi(ApiClient(
- configuration=conekta.Configuration(host=get_base_path())
- )) # noqa: E501
+ def setUp(self) -> None:
+ self.api = ProductsApi()
- def tearDown(self):
+ def tearDown(self) -> None:
pass
- def test_orders_create_product(self):
+ def test_orders_create_product(self) -> None:
"""Test case for orders_create_product
- Create Product # noqa: E501
+ Create Product
"""
- accept_language = 'es'
- rq = conekta.Product(
- name='plan test',
- quantity=1,
- unit_price=1000
- )
- response = self.api.orders_create_product('ord_2tUigJ8DgBhbp6w5D', rq, accept_language)
- self.assertIsNotNone(response)
-
- def test_orders_delete_product(self):
+ pass
+
+ def test_orders_delete_product(self) -> None:
"""Test case for orders_delete_product
- Delete Product # noqa: E501
+ Delete Product
"""
- accept_language = 'es'
- response = self.api.orders_delete_product('ord_2tUigJ8DgBhbp6w5D', 'line_item_2tVz8UkyWhSxLfUd7',
- accept_language)
- self.assertIsNotNone(response)
+ pass
- def test_orders_update_product(self):
+ def test_orders_update_product(self) -> None:
"""Test case for orders_update_product
- Update Product # noqa: E501
+ Update Product
"""
- accept_language = 'es'
- rq = conekta.UpdateProduct(
- name='plan test',
- quantity=1,
- unit_price=1000
- )
- response = self.api.orders_update_product('ord_2tUigJ8DgBhbp6w5D', 'line_item_2tVz8UkyWhSxLfUd7', rq,
- accept_language)
- self.assertIsNotNone(response)
+ pass
if __name__ == '__main__':
diff --git a/test/test_shipping_contacts_api.py b/test/test_shipping_contacts_api.py
index efda0d5..80dad73 100644
--- a/test/test_shipping_contacts_api.py
+++ b/test/test_shipping_contacts_api.py
@@ -3,74 +3,50 @@
"""
Conekta API
- Conekta sdk # noqa: E501
+ Conekta sdk
- The version of the OpenAPI document: 2.1.0
+ The version of the OpenAPI document: 2.2.0
Contact: engineering@conekta.com
- Generated by: https://openapi-generator.tech
-"""
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+ Do not edit the class manually.
+""" # noqa: E501
-from __future__ import absolute_import
import unittest
-import conekta
-from conekta import ApiClient
-from conekta.api.shipping_contacts_api import ShippingContactsApi # noqa: E501
-from conekta.rest import ApiException
-from test.test_utils import get_base_path
+from conekta.api.shipping_contacts_api import ShippingContactsApi
class TestShippingContactsApi(unittest.TestCase):
"""ShippingContactsApi unit test stubs"""
- def setUp(self):
- self.api = conekta.api.shipping_contacts_api.ShippingContactsApi(ApiClient(
- configuration=conekta.Configuration(host=get_base_path())
- )) # noqa: E501
+ def setUp(self) -> None:
+ self.api = ShippingContactsApi()
- def tearDown(self):
+ def tearDown(self) -> None:
pass
- def test_create_customer_shipping_contacts(self):
+ def test_create_customer_shipping_contacts(self) -> None:
"""Test case for create_customer_shipping_contacts
- Create a shipping contacts # noqa: E501
+ Create a shipping contacts
"""
- accept_language = 'es'
- rq = conekta.CustomerShippingContacts(
- address=conekta.CustomerShippingContactsAddress(
- street1='street'
- )
- )
- response = self.api.create_customer_shipping_contacts('cus_2tYENskzTjjgkGQLt', rq, accept_language)
- self.assertIsNotNone(response)
-
- def test_delete_customer_shipping_contacts(self):
+ pass
+
+ def test_delete_customer_shipping_contacts(self) -> None:
"""Test case for delete_customer_shipping_contacts
- Delete shipping contacts # noqa: E501
+ Delete shipping contacts
"""
- accept_language = 'es'
- response = self.api.delete_customer_shipping_contacts('cus_2tYENskzTjjgkGQLt', 'ship_cont_2tY2ncFSBLUaohto2',
- accept_language)
- self.assertIsNotNone(response)
+ pass
- def test_update_customer_shipping_contacts(self):
+ def test_update_customer_shipping_contacts(self) -> None:
"""Test case for update_customer_shipping_contacts
- Update shipping contacts # noqa: E501
+ Update shipping contacts
"""
- accept_language = 'es'
- rq = conekta.CustomerUpdateShippingContacts(
- address=conekta.CustomerShippingContactsAddress(
- street1='street'
- )
- )
- response = self.api.update_customer_shipping_contacts('cus_2tYENskzTjjgkGQLt', 'ship_cont_2tY2ncFSBLUaohto2',
- rq, accept_language)
- self.assertIsNotNone(response)
+ pass
if __name__ == '__main__':
diff --git a/test/test_shippings_api.py b/test/test_shippings_api.py
index 58b717b..3590a2e 100644
--- a/test/test_shippings_api.py
+++ b/test/test_shippings_api.py
@@ -3,70 +3,50 @@
"""
Conekta API
- Conekta sdk # noqa: E501
+ Conekta sdk
- The version of the OpenAPI document: 2.1.0
+ The version of the OpenAPI document: 2.2.0
Contact: engineering@conekta.com
- Generated by: https://openapi-generator.tech
-"""
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+ Do not edit the class manually.
+""" # noqa: E501
-from __future__ import absolute_import
import unittest
-import conekta
-from conekta import ApiClient
-from conekta.api.shippings_api import ShippingsApi # noqa: E501
-from conekta.rest import ApiException
-from test.test_utils import get_base_path
+from conekta.api.shippings_api import ShippingsApi
class TestShippingsApi(unittest.TestCase):
"""ShippingsApi unit test stubs"""
- def setUp(self):
- self.api = conekta.api.shippings_api.ShippingsApi(ApiClient(
- configuration=conekta.Configuration(host=get_base_path())
- )) # noqa: E501
+ def setUp(self) -> None:
+ self.api = ShippingsApi()
- def tearDown(self):
+ def tearDown(self) -> None:
pass
- def test_orders_create_shipping(self):
+ def test_orders_create_shipping(self) -> None:
"""Test case for orders_create_shipping
- Create Shipping # noqa: E501
+ Create Shipping
"""
- accept_language = 'es'
- rq = conekta.ShippingRequest(
- amount=100
- )
- response = self.api.orders_create_shipping('ord_2tUigJ8DgBhbp6w5D', rq, accept_language)
- self.assertIsNotNone(response)
-
- def test_orders_delete_shipping(self):
+ pass
+
+ def test_orders_delete_shipping(self) -> None:
"""Test case for orders_delete_shipping
- Delete Shipping # noqa: E501
+ Delete Shipping
"""
- accept_language = 'es'
- response = self.api.orders_delete_shipping('ord_2tUigJ8DgBhbp6w5D', 'ship_lin_2tVzNuDGSaDwreMg6',
- accept_language)
- self.assertIsNotNone(response)
+ pass
- def test_orders_update_shipping(self):
+ def test_orders_update_shipping(self) -> None:
"""Test case for orders_update_shipping
- Update Shipping # noqa: E501
+ Update Shipping
"""
- accept_language = 'es'
- rq = conekta.ShippingRequest(
- amount=100
- )
- response = self.api.orders_update_shipping('ord_2tUigJ8DgBhbp6w5D', 'ship_lin_2tVzNuDGSaDwreMg6', rq,
- accept_language)
- self.assertIsNotNone(response)
+ pass
if __name__ == '__main__':
diff --git a/test/test_subscriptions_api.py b/test/test_subscriptions_api.py
index 8f73e17..c810046 100644
--- a/test/test_subscriptions_api.py
+++ b/test/test_subscriptions_api.py
@@ -3,104 +3,141 @@
"""
Conekta API
- Conekta sdk # noqa: E501
+ Conekta sdk
- The version of the OpenAPI document: 2.1.0
+ The version of the OpenAPI document: 2.2.0
Contact: engineering@conekta.com
- Generated by: https://openapi-generator.tech
-"""
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+ Do not edit the class manually.
+""" # noqa: E501
-from __future__ import absolute_import
import unittest
-import conekta
-from conekta import ApiClient
-from conekta.api.subscriptions_api import SubscriptionsApi # noqa: E501
-from conekta.rest import ApiException
-from test.test_utils import get_base_path
+from conekta.api.subscriptions_api import SubscriptionsApi
class TestSubscriptionsApi(unittest.TestCase):
"""SubscriptionsApi unit test stubs"""
- def setUp(self):
- self.api = conekta.api.subscriptions_api.SubscriptionsApi(ApiClient(
- configuration=conekta.Configuration(host=get_base_path())
- )) # noqa: E501
+ def setUp(self) -> None:
+ self.api = SubscriptionsApi()
- def tearDown(self):
+ def tearDown(self) -> None:
pass
- def test_cancel_subscription(self):
+ def test_cancel_subscription(self) -> None:
"""Test case for cancel_subscription
- Cancel Subscription # noqa: E501
+ Cancel Subscription [Deprecated]
"""
- accept_language = 'es'
- response = self.api.cancel_subscription('cus_2tYENskzTjjgkGQLt', accept_language)
- self.assertIsNotNone(response)
+ pass
- def test_create_subscription(self):
+ def test_create_subscription(self) -> None:
"""Test case for create_subscription
- Create Subscription # noqa: E501
+ Create Subscription [Deprecated]
"""
- accept_language = 'es'
- rq = conekta.SubscriptionRequest(
- plan_id='plan_id'
- )
- response = self.api.create_subscription('cus_2tYENskzTjjgkGQLt', rq, accept_language)
- self.assertIsNotNone(response)
+ pass
- def test_get_all_events_from_subscription(self):
- """Test case for get_all_events_from_subscription
+ def test_get_subscription(self) -> None:
+ """Test case for get_subscription
- Get Events By Subscription # noqa: E501
+ Get Subscription [Deprecated]
"""
- accept_language = 'es'
- response = self.api.get_all_events_from_subscription('cus_2tYENskzTjjgkGQLt', accept_language)
- self.assertIsNotNone(response)
+ pass
- def test_get_subscription(self):
- """Test case for get_subscription
+ def test_get_subscription_events(self) -> None:
+ """Test case for get_subscription_events
- Get Subscription # noqa: E501
+ Get Subscription Events [Deprecated]
"""
- accept_language = 'es'
- response = self.api.get_subscription('cus_2tYENskzTjjgkGQLt', accept_language)
- self.assertIsNotNone(response)
+ pass
- def test_pause_subscription(self):
+ def test_pause_subscription(self) -> None:
"""Test case for pause_subscription
- Pause Subscription # noqa: E501
+ Pause Subscription [Deprecated]
"""
- accept_language = 'es'
- response = self.api.pause_subscription('cus_2tYENskzTjjgkGQLt', accept_language)
- self.assertIsNotNone(response)
+ pass
- def test_resume_subscription(self):
+ def test_resume_subscription(self) -> None:
"""Test case for resume_subscription
- Resume Subscription # noqa: E501
+ Resume Subscription [Deprecated]
+ """
+ pass
+
+ def test_subscription_cancel(self) -> None:
+ """Test case for subscription_cancel
+
+ Cancel Subscription
+ """
+ pass
+
+ def test_subscription_create(self) -> None:
+ """Test case for subscription_create
+
+ Create Subscription
+ """
+ pass
+
+ def test_subscription_events(self) -> None:
+ """Test case for subscription_events
+
+ Get Subscription Events
+ """
+ pass
+
+ def test_subscription_list(self) -> None:
+ """Test case for subscription_list
+
+ List Subscriptions
+ """
+ pass
+
+ def test_subscription_pause(self) -> None:
+ """Test case for subscription_pause
+
+ Pause Subscription
+ """
+ pass
+
+ def test_subscription_resume(self) -> None:
+ """Test case for subscription_resume
+
+ Resume Subscription
"""
- accept_language = 'es'
- response = self.api.resume_subscription('cus_2tYENskzTjjgkGQLt', accept_language)
- self.assertIsNotNone(response)
+ pass
+
+ def test_subscription_update(self) -> None:
+ """Test case for subscription_update
- def test_update_subscription(self):
+ Update Subscription
+ """
+ pass
+
+ def test_subscriptions_get(self) -> None:
+ """Test case for subscriptions_get
+
+ Get Subscription
+ """
+ pass
+
+ def test_subscriptions_retry(self) -> None:
+ """Test case for subscriptions_retry
+
+ Retry Failed Payment
+ """
+ pass
+
+ def test_update_subscription(self) -> None:
"""Test case for update_subscription
- Update Subscription # noqa: E501
+ Update Subscription [Deprecated]
"""
- accept_language = 'es'
- rq = conekta.SubscriptionUpdateRequest(
- plan_id='plan_id'
- )
- response = self.api.update_subscription('cus_2tYENskzTjjgkGQLt', rq, accept_language)
- self.assertIsNotNone(response)
+ pass
if __name__ == '__main__':
diff --git a/test/test_taxes_api.py b/test/test_taxes_api.py
index 30a59c5..622b51b 100644
--- a/test/test_taxes_api.py
+++ b/test/test_taxes_api.py
@@ -3,71 +3,50 @@
"""
Conekta API
- Conekta sdk # noqa: E501
+ Conekta sdk
- The version of the OpenAPI document: 2.1.0
+ The version of the OpenAPI document: 2.2.0
Contact: engineering@conekta.com
- Generated by: https://openapi-generator.tech
-"""
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+ Do not edit the class manually.
+""" # noqa: E501
-from __future__ import absolute_import
import unittest
-import conekta
-from conekta import ApiClient
-from conekta.api.taxes_api import TaxesApi # noqa: E501
-from conekta.rest import ApiException
-from test.test_utils import get_base_path
+from conekta.api.taxes_api import TaxesApi
class TestTaxesApi(unittest.TestCase):
"""TaxesApi unit test stubs"""
- def setUp(self):
- self.api = conekta.api.taxes_api.TaxesApi(ApiClient(
- configuration=conekta.Configuration(host=get_base_path())
- )) # noqa: E501
+ def setUp(self) -> None:
+ self.api = TaxesApi()
- def tearDown(self):
+ def tearDown(self) -> None:
pass
- def test_orders_create_taxes(self):
+ def test_orders_create_taxes(self) -> None:
"""Test case for orders_create_taxes
- Create Tax # noqa: E501
+ Create Tax
"""
- accept_language = 'es'
- rq = conekta.OrderTaxRequest(
- amount=100,
- description='desc'
- )
- response = self.api.orders_create_taxes('ord_2tUigJ8DgBhbp6w5D', rq, accept_language)
- self.assertIsNotNone(response)
-
- def test_orders_delete_taxes(self):
+ pass
+
+ def test_orders_delete_taxes(self) -> None:
"""Test case for orders_delete_taxes
- Delete Tax # noqa: E501
+ Delete Tax
"""
- accept_language = 'es'
- response = self.api.orders_delete_taxes('ord_2tUigJ8DgBhbp6w5D', 'tax_lin_2tVzVp6AAptCRHhgt', accept_language)
- self.assertIsNotNone(response)
+ pass
- def test_orders_update_taxes(self):
+ def test_orders_update_taxes(self) -> None:
"""Test case for orders_update_taxes
- Update Tax # noqa: E501
+ Update Tax
"""
- accept_language = 'es'
- rq = conekta.UpdateOrderTaxRequest(
- amount=100,
- description='desc'
- )
- response = self.api.orders_update_taxes('ord_2tUigJ8DgBhbp6w5D', 'tax_lin_2tVzVp6AAptCRHhgt', rq,
- accept_language)
- self.assertIsNotNone(response)
+ pass
if __name__ == '__main__':
diff --git a/test/test_tokens_api.py b/test/test_tokens_api.py
index bbccfe0..11e13f2 100644
--- a/test/test_tokens_api.py
+++ b/test/test_tokens_api.py
@@ -3,53 +3,36 @@
"""
Conekta API
- Conekta sdk # noqa: E501
+ Conekta sdk
- The version of the OpenAPI document: 2.1.0
+ The version of the OpenAPI document: 2.2.0
Contact: engineering@conekta.com
- Generated by: https://openapi-generator.tech
-"""
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+ Do not edit the class manually.
+""" # noqa: E501
-from __future__ import absolute_import
import unittest
-import conekta
-from conekta import ApiClient
-from conekta.api.tokens_api import TokensApi # noqa: E501
-from conekta.rest import ApiException
-from test.test_utils import get_base_path
+from conekta.api.tokens_api import TokensApi
class TestTokensApi(unittest.TestCase):
"""TokensApi unit test stubs"""
- def setUp(self):
- self.api = conekta.api.tokens_api.TokensApi(ApiClient(
- configuration=conekta.Configuration(host=get_base_path())
- )) # noqa: E501
+ def setUp(self) -> None:
+ self.api = TokensApi()
- def tearDown(self):
+ def tearDown(self) -> None:
pass
- def test_create_token(self):
+ def test_create_token(self) -> None:
"""Test case for create_token
- Create Token # noqa: E501
+ Create Token
"""
- accept_language = 'es'
- rq = conekta.Token(
- card=conekta.TokenCard(
- cvc='123',
- exp_month='07',
- exp_year='27',
- name='Foo Foo',
- number='5475040095304607'
- )
- )
- response = self.api.create_token(rq, accept_language)
- self.assertIsNotNone(response)
+ pass
if __name__ == '__main__':
diff --git a/test/test_transactions_api.py b/test/test_transactions_api.py
index 0b754d8..f555b26 100644
--- a/test/test_transactions_api.py
+++ b/test/test_transactions_api.py
@@ -3,53 +3,43 @@
"""
Conekta API
- Conekta sdk # noqa: E501
+ Conekta sdk
- The version of the OpenAPI document: 2.1.0
+ The version of the OpenAPI document: 2.2.0
Contact: engineering@conekta.com
- Generated by: https://openapi-generator.tech
-"""
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+ Do not edit the class manually.
+""" # noqa: E501
-from __future__ import absolute_import
import unittest
-import conekta
-from conekta import ApiClient
-from conekta.api.transactions_api import TransactionsApi # noqa: E501
-from conekta.rest import ApiException
-from test.test_utils import get_base_path
+from conekta.api.transactions_api import TransactionsApi
class TestTransactionsApi(unittest.TestCase):
"""TransactionsApi unit test stubs"""
- def setUp(self):
- self.api = conekta.api.transactions_api.TransactionsApi(ApiClient(
- configuration=conekta.Configuration(host=get_base_path())
- )) # noqa: E501
+ def setUp(self) -> None:
+ self.api = TransactionsApi()
- def tearDown(self):
+ def tearDown(self) -> None:
pass
- def test_get_transaction(self):
+ def test_get_transaction(self) -> None:
"""Test case for get_transaction
- Get transaction # noqa: E501
+ Get transaction
"""
- accept_language = 'es'
- response = self.api.get_transaction('6456b6dfac0fd40001a64eb8', accept_language)
- self.assertIsNotNone(response)
+ pass
- def test_get_transactions(self):
+ def test_get_transactions(self) -> None:
"""Test case for get_transactions
- Get List transactions # noqa: E501
+ Get List transactions
"""
- accept_language = 'es'
- response = self.api.get_transactions(accept_language, limit=2)
- self.assertIsNotNone(response)
+ pass
if __name__ == '__main__':
diff --git a/test/test_transfers_api.py b/test/test_transfers_api.py
index b90cb6a..e5334eb 100644
--- a/test/test_transfers_api.py
+++ b/test/test_transfers_api.py
@@ -3,53 +3,43 @@
"""
Conekta API
- Conekta sdk # noqa: E501
+ Conekta sdk
- The version of the OpenAPI document: 2.1.0
+ The version of the OpenAPI document: 2.2.0
Contact: engineering@conekta.com
- Generated by: https://openapi-generator.tech
-"""
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+ Do not edit the class manually.
+""" # noqa: E501
-from __future__ import absolute_import
import unittest
-import conekta
-from conekta import ApiClient
-from conekta.api.transfers_api import TransfersApi # noqa: E501
-from conekta.rest import ApiException
-from test.test_utils import get_base_path
+from conekta.api.transfers_api import TransfersApi
class TestTransfersApi(unittest.TestCase):
"""TransfersApi unit test stubs"""
- def setUp(self):
- self.api = conekta.api.transfers_api.TransfersApi(ApiClient(
- configuration=conekta.Configuration(host=get_base_path())
- )) # noqa: E501
+ def setUp(self) -> None:
+ self.api = TransfersApi()
- def tearDown(self):
+ def tearDown(self) -> None:
pass
- def test_get_transfer(self):
+ def test_get_transfer(self) -> None:
"""Test case for get_transfer
- Get Transfer # noqa: E501
+ Get Transfer
"""
- accept_language = 'es'
- response = self.api.get_transfer('64462930651b2600017b6d43', accept_language)
- self.assertIsNotNone(response)
+ pass
- def test_get_transfers(self):
+ def test_get_transfers(self) -> None:
"""Test case for get_transfers
- Get a list of transfers # noqa: E501
+ Get a list of transfers
"""
- accept_language = 'es'
- response = self.api.get_transfers(accept_language, limit=5)
- self.assertIsNotNone(response)
+ pass
if __name__ == '__main__':
diff --git a/test/test_utils.py b/test/test_utils.py
deleted file mode 100644
index fc9b6be..0000000
--- a/test/test_utils.py
+++ /dev/null
@@ -1,7 +0,0 @@
-# coding: utf-8
-
-import os
-
-
-def get_base_path():
- return os.environ.get('BASE_PATH', 'http://localhost:3000')
diff --git a/test/test_webhook_keys_api.py b/test/test_webhook_keys_api.py
index 2fa1d3d..d8d7ef2 100644
--- a/test/test_webhook_keys_api.py
+++ b/test/test_webhook_keys_api.py
@@ -3,85 +3,64 @@
"""
Conekta API
- Conekta sdk # noqa: E501
+ Conekta sdk
- The version of the OpenAPI document: 2.1.0
+ The version of the OpenAPI document: 2.2.0
Contact: engineering@conekta.com
- Generated by: https://openapi-generator.tech
-"""
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
-from __future__ import absolute_import
import unittest
-import conekta
-from conekta import ApiClient
-from conekta.api.webhook_keys_api import WebhookKeysApi # noqa: E501
-from conekta.rest import ApiException
-from test.test_utils import get_base_path
+from conekta.api.webhook_keys_api import WebhookKeysApi
class TestWebhookKeysApi(unittest.TestCase):
"""WebhookKeysApi unit test stubs"""
- def setUp(self):
- self.api = conekta.api.webhook_keys_api.WebhookKeysApi(ApiClient(
- configuration=conekta.Configuration(host=get_base_path(), access_token="key_xxx")
- )) # noqa: E501
+ def setUp(self) -> None:
+ self.api = WebhookKeysApi()
- def tearDown(self):
+ def tearDown(self) -> None:
pass
- def test_create_webhook_key(self):
+ def test_create_webhook_key(self) -> None:
"""Test case for create_webhook_key
- Create Webhook Key # noqa: E501
+ Create Webhook Key
"""
- accept_language = 'es'
- rq = conekta.WebhookKeyRequest(
- active=True
- )
- response = self.api.create_webhook_key(accept_language, rq)
- self.assertIsNotNone(response)
-
- def test_delete_webhook_key(self):
+ pass
+
+ def test_delete_webhook_key(self) -> None:
"""Test case for delete_webhook_key
- Delete Webhook key # noqa: E501
+ Delete Webhook key
"""
- accept_language = 'es'
- response = self.api.delete_webhook_key('645a59da22e7da0001cad283', accept_language)
- self.assertIsNotNone(response)
+ pass
- def test_get_webhook_key(self):
+ def test_get_webhook_key(self) -> None:
"""Test case for get_webhook_key
- Get Webhook Key # noqa: E501
+ Get Webhook Key
"""
- accept_language = 'es'
- response = self.api.get_webhook_key('645a5eb022e7da0001cad2a4', accept_language)
- self.assertIsNotNone(response)
+ pass
- def test_get_webhook_keys(self):
+ def test_get_webhook_keys(self) -> None:
"""Test case for get_webhook_keys
- Get List of Webhook Keys # noqa: E501
+ Get List of Webhook Keys
"""
- accept_language = 'es'
- response = self.api.get_webhook_keys(accept_language, limit=2)
- self.assertIsNotNone(response)
+ pass
- def test_update_webhook_key(self):
+ def test_update_webhook_key(self) -> None:
"""Test case for update_webhook_key
- Update Webhook Key # noqa: E501
+ Update Webhook Key
"""
- accept_language = 'es'
- rq = conekta.WebhookKeyUpdateRequest(
- active=False
- )
- response = self.api.update_webhook_key('645a613622e7da0001cad882', accept_language, rq)
- self.assertIsNotNone(response)
+ pass
if __name__ == '__main__':
diff --git a/test/test_webhooks_api.py b/test/test_webhooks_api.py
index 7782e43..9818e0d 100644
--- a/test/test_webhooks_api.py
+++ b/test/test_webhooks_api.py
@@ -3,97 +3,71 @@
"""
Conekta API
- Conekta sdk # noqa: E501
+ Conekta sdk
- The version of the OpenAPI document: 2.1.0
+ The version of the OpenAPI document: 2.2.0
Contact: engineering@conekta.com
- Generated by: https://openapi-generator.tech
-"""
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+ Do not edit the class manually.
+""" # noqa: E501
-from __future__ import absolute_import
import unittest
-import conekta
-from conekta import ApiClient
from conekta.api.webhooks_api import WebhooksApi
-from conekta.rest import ApiException
-from test.test_utils import get_base_path
class TestWebhooksApi(unittest.TestCase):
"""WebhooksApi unit test stubs"""
- def setUp(self):
- self.api = WebhooksApi(ApiClient(
- configuration=conekta.Configuration(host=get_base_path(), access_token='key_xxxx')
- )) # noqa: E501
+ def setUp(self) -> None:
+ self.api = WebhooksApi()
- def tearDown(self):
+ def tearDown(self) -> None:
pass
- def test_create_webhook(self):
+ def test_create_webhook(self) -> None:
"""Test case for create_webhook
- Create Webhook # noqa: E501
+ Create Webhook
"""
- accept_language = 'es'
- rq = conekta.WebhookRequest(
- url='http://api.test.com',
- synchronous=False
- )
- response = self.api.create_webhook(rq, accept_language)
- self.assertIsNotNone(response)
-
- def test_delete_webhook(self):
+ pass
+
+ def test_delete_webhook(self) -> None:
"""Test case for delete_webhook
- Delete Webhook # noqa: E501
+ Delete Webhook
"""
- accept_language = 'es'
- response = self.api.delete_webhook('641b1d5662d7e00001eaa46b', accept_language)
- self.assertIsNotNone(response)
+ pass
- def test_get_webhook(self):
+ def test_get_webhook(self) -> None:
"""Test case for get_webhook
- Get Webhook # noqa: E501
+ Get Webhook
"""
- accept_language = 'es'
- response = self.api.get_webhook('641b1d5662d7e00001eaa46b', accept_language)
- self.assertIsNotNone(response)
+ pass
- def test_get_webhooks(self):
+ def test_get_webhooks(self) -> None:
"""Test case for get_webhooks
- Get List of Webhooks # noqa: E501
+ Get List of Webhooks
"""
- accept_language = 'es'
- response = self.api.get_webhooks(accept_language, limit=20)
- self.assertIsNotNone(response)
+ pass
- def test_test_webhook(self):
+ def test_test_webhook(self) -> None:
"""Test case for test_webhook
- Test Webhook # noqa: E501
+ Test Webhook
"""
- accept_language = 'es'
- response = self.api.test_webhook('641b1d5662d7e00001eaa46b', accept_language)
- self.assertIsNotNone(response)
+ pass
- def test_update_webhook(self):
+ def test_update_webhook(self) -> None:
"""Test case for update_webhook
- Update Webhook # noqa: E501
+ Update Webhook
"""
- accept_language = 'es'
- rq = conekta.WebhookUpdateRequest(
- url='http://api.test.com',
- synchronous=False
- )
- response = self.api.update_webhook('641b1d5662d7e00001eaa46b', rq, accept_language)
- self.assertIsNotNone(response)
+ pass
if __name__ == '__main__':