Skip to main content

This is a Python library that allows interaction with https://api.conekta.io API.

Project description

conekta

Conekta sdk

This Python package is automatically generated by the OpenAPI Generator project:

Requirements.

Python 3.7+

Installation & Usage

pip install

If the python package is hosted on a repository, you can install directly using:

pip install git+https://github.com/conekta/conekta-python.git

(you may need to run pip with root permission: sudo pip install git+https://github.com/conekta/conekta-python.git)

Then import the package:

import conekta

Setuptools

Install via Setuptools.

python setup.py install --user

(or sudo python setup.py install to install the package for all users)

Then import the package:

import conekta

Tests

Execute pytest to run the tests.

Getting Started

Please follow the installation procedure and then run the following:

import time
import conekta
from conekta.rest import ApiException
from pprint import pprint

# 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.CustomersApi(api_client)
    customer = conekta.Customer(
        email='customer@customer.com',
        name='Customer Name',
        phone='5534343434'
    ) # Customer | requested field for create Customer
    accept_language = 'es' # str | Use for knowing which language to use (optional) (default to 'es')

    try:
        # Create Customer
        api_response = api_instance.create_customer(customer, accept_language=accept_language)
        print("The response of CustomersApi->create_customer:\n")
        pprint(api_response)
    except ApiException as e:
        print("Exception when calling CustomersApi->create_customer: %s\n" % e)

Documentation for API Endpoints

All URIs are relative to https://api.conekta.io

Class Method HTTP request Description
AntifraudApi create_rule_blacklist POST /antifraud/blacklists Create blacklisted rule
AntifraudApi create_rule_whitelist POST /antifraud/whitelists Create whitelisted rule
AntifraudApi delete_rule_blacklist DELETE /antifraud/blacklists/{id} Delete blacklisted rule
AntifraudApi delete_rule_whitelist DELETE /antifraud/whitelists/{id} Delete whitelisted rule
AntifraudApi get_rule_blacklist GET /antifraud/blacklists Get list of blacklisted rules
AntifraudApi get_rule_whitelist GET /antifraud/whitelists Get a list of whitelisted rules
ApiKeysApi create_api_key POST /api_keys Create Api Key
ApiKeysApi delete_api_key DELETE /api_keys/{id} Delete Api Key
ApiKeysApi get_api_key GET /api_keys/{id} Get Api Key
ApiKeysApi get_api_keys GET /api_keys Get list of Api Keys
ApiKeysApi update_api_key PUT /api_keys/{id} Update Api Key
ChargesApi get_charges GET /charges Get A List of Charges
ChargesApi orders_create_charge POST /orders/{id}/charges Create charge
CompaniesApi get_companies GET /companies Get List of Companies
CompaniesApi get_company GET /companies/{id} Get Company
CustomersApi create_customer POST /customers Create customer
CustomersApi create_customer_fiscal_entities POST /customers/{id}/fiscal_entities Create Fiscal Entity
CustomersApi delete_customer_by_id DELETE /customers/{id} Delete Customer
CustomersApi get_customer_by_id GET /customers/{id} Get Customer
CustomersApi get_customers GET /customers Get a list of customers
CustomersApi update_customer PUT /customers/{id} Update customer
CustomersApi update_customer_fiscal_entities PUT /customers/{id}/fiscal_entities/{fiscal_entities_id} Update Fiscal Entity
DiscountsApi orders_create_discount_line POST /orders/{id}/discount_lines Create Discount
DiscountsApi orders_delete_discount_lines DELETE /orders/{id}/discount_lines/{discount_lines_id} Delete Discount
DiscountsApi orders_update_discount_lines PUT /orders/{id}/discount_lines/{discount_lines_id} Update Discount
EventsApi get_event GET /events/{id} Get Event
EventsApi get_events GET /events Get list of Events
EventsApi resend_event POST /events/{event_id}/webhook_logs/{webhook_log_id}/resend Resend Event
LogsApi get_log_by_id GET /logs/{id} Get Log
LogsApi get_logs GET /logs Get List Of Logs
OrdersApi cancel_order POST /orders/{id}/cancel Cancel Order
OrdersApi create_order POST /orders Create order
OrdersApi get_order_by_id GET /orders/{id} Get Order
OrdersApi get_orders GET /orders Get a list of Orders
OrdersApi order_cancel_refund DELETE /orders/{id}/refunds/{refund_id} Cancel Refund
OrdersApi order_refund POST /orders/{id}/refunds Refund Order
OrdersApi orders_create_capture POST /orders/{id}/capture Capture Order
OrdersApi update_order PUT /orders/{id} Update Order
PaymentLinkApi cancel_checkout PUT /checkouts/{id}/cancel Cancel Payment Link
PaymentLinkApi create_checkout POST /checkouts Create Unique Payment Link
PaymentLinkApi email_checkout POST /checkouts/{id}/email Send an email
PaymentLinkApi get_checkout GET /checkouts/{id} Get a payment link by ID
PaymentLinkApi get_checkouts GET /checkouts Get a list of payment links
PaymentLinkApi sms_checkout POST /checkouts/{id}/sms Send an sms
PaymentMethodsApi create_customer_payment_methods POST /customers/{id}/payment_sources Create Payment Method
PaymentMethodsApi delete_customer_payment_methods DELETE /customers/{id}/payment_sources/{payment_method_id} Delete Payment Method
PaymentMethodsApi get_customer_payment_methods GET /customers/{id}/payment_sources Get Payment Methods
PaymentMethodsApi update_customer_payment_methods PUT /customers/{id}/payment_sources/{payment_method_id} Update Payment Method
PlansApi create_plan POST /plans Create Plan
PlansApi delete_plan DELETE /plans/{id} Delete Plan
PlansApi get_plan GET /plans/{id} Get Plan
PlansApi get_plans GET /plans Get A List of Plans
PlansApi update_plan PUT /plans/{id} Update Plan
ProductsApi orders_create_product POST /orders/{id}/line_items Create Product
ProductsApi orders_delete_product DELETE /orders/{id}/line_items/{line_item_id} Delete Product
ProductsApi orders_update_product PUT /orders/{id}/line_items/{line_item_id} Update Product
ShippingContactsApi create_customer_shipping_contacts POST /customers/{id}/shipping_contacts Create a shipping contacts
ShippingContactsApi delete_customer_shipping_contacts DELETE /customers/{id}/shipping_contacts/{shipping_contacts_id} Delete shipping contacts
ShippingContactsApi update_customer_shipping_contacts PUT /customers/{id}/shipping_contacts/{shipping_contacts_id} Update shipping contacts
ShippingsApi orders_create_shipping POST /orders/{id}/shipping_lines Create Shipping
ShippingsApi orders_delete_shipping DELETE /orders/{id}/shipping_lines/{shipping_id} Delete Shipping
ShippingsApi orders_update_shipping PUT /orders/{id}/shipping_lines/{shipping_id} Update Shipping
SubscriptionsApi cancel_subscription POST /customers/{id}/subscription/cancel Cancel Subscription
SubscriptionsApi create_subscription POST /customers/{id}/subscription Create Subscription
SubscriptionsApi get_all_events_from_subscription GET /customers/{id}/subscription/events Get Events By Subscription
SubscriptionsApi get_subscription GET /customers/{id}/subscription Get Subscription
SubscriptionsApi pause_subscription POST /customers/{id}/subscription/pause Pause Subscription
SubscriptionsApi resume_subscription POST /customers/{id}/subscription/resume Resume Subscription
SubscriptionsApi update_subscription PUT /customers/{id}/subscription Update Subscription
TaxesApi orders_create_taxes POST /orders/{id}/tax_lines Create Tax
TaxesApi orders_delete_taxes DELETE /orders/{id}/tax_lines/{tax_id} Delete Tax
TaxesApi orders_update_taxes PUT /orders/{id}/tax_lines/{tax_id} Update Tax
TokensApi create_token POST /tokens Create Token
TransactionsApi get_transaction GET /transactions/{id} Get transaction
TransactionsApi get_transactions GET /transactions Get List transactions
TransfersApi get_transfer GET /transfers/{id} Get Transfer
TransfersApi get_transfers GET /transfers Get a list of transfers
WebhookKeysApi create_webhook_key POST /webhook_keys Create Webhook Key
WebhookKeysApi delete_webhook_key DELETE /webhook_keys/{id} Delete Webhook key
WebhookKeysApi get_webhook_key GET /webhook_keys/{id} Get Webhook Key
WebhookKeysApi get_webhook_keys GET /webhook_keys Get List of Webhook Keys
WebhookKeysApi update_webhook_key PUT /webhook_keys/{id} Update Webhook Key
WebhooksApi create_webhook POST /webhooks Create Webhook
WebhooksApi delete_webhook DELETE /webhooks/{id} Delete Webhook
WebhooksApi get_webhook GET /webhooks/{id} Get Webhook
WebhooksApi get_webhooks GET /webhooks Get List of Webhooks
WebhooksApi test_webhook POST /webhooks/{id}/test Test Webhook
WebhooksApi update_webhook PUT /webhooks/{id} Update Webhook

Documentation For Models

Documentation For Authorization

Authentication schemes defined for the API:

bearerAuth

  • Type: Bearer authentication

Author

engineering@conekta.com

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

conekta-6.0.0.tar.gz (118.7 kB view hashes)

Uploaded Source

Built Distribution

conekta-6.0.0-py3-none-any.whl (341.7 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page