conekta

Conekta - the Ruby gem for the Conekta API

Conekta sdk

This SDK is automatically generated by the OpenAPI Generator project:

  • API version: 2.1.0
  • Package version: 6.0.3
  • Build date: 2024-04-29T14:11:53.612104515Z[Etc/UTC]
  • Generator version: 7.5.0
  • Build package: org.openapitools.codegen.languages.RubyClientCodegen For more information, please visit https://github.com/conekta/openapi/issues

Installation

Build a gem

To build the Ruby code into a gem:

gem build conekta.gemspec

Then either install the gem locally:

gem install ./conekta-6.0.3.gem

(for development, run gem install --dev ./conekta-6.0.3.gem to install the development dependencies)

or publish the gem to a gem hosting service, e.g. RubyGems.

Finally add this to the Gemfile:

gem 'conekta', '~> 6.0.3'

Install from Git

If the Ruby gem is hosted at a git repository: https://github.com/conekta/conekta-ruby, then add the following in the Gemfile:

gem 'conekta', :git => 'https://github.com/conekta/conekta-ruby.git'

Include the Ruby code directly

Include the Ruby code directly using -I as follows:

ruby -Ilib script.rb

Getting Started

Please follow the installation procedure and then run the following code:

# Load the gem
require 'conekta'

# Setup authorization
Conekta.configure do |config|
  # Configure Bearer authorization: bearerAuth
  config.access_token = 'YOUR_BEARER_TOKEN'
  # Configure a proc to get access tokens in lieu of the static access_token configuration
  config.access_token_getter = -> { 'YOUR TOKEN GETTER PROC' } 
  # Configure faraday connection
  config.configure_faraday_connection { |connection| 'YOUR CONNECTION CONFIG PROC' }
end

api_instance = Conekta::AntifraudApi.new
create_risk_rules_data = Conekta::CreateRiskRulesData.new({description: 'this client email was verified at 20/09/22 by internal process', field: 'email | phone | card_token', value: '[email protected] | 818081808180 | src_2qUCNd5AyQqfPMBuV'}) # CreateRiskRulesData | requested field for blacklist rule
opts = {
  accept_language: 'es' # String | Use for knowing which language to use
}

begin
  #Create blacklisted rule
  result = api_instance.create_rule_blacklist(create_risk_rules_data, opts)
  p result
rescue Conekta::ApiError => e
  puts "Exception when calling AntifraudApi->create_rule_blacklist: #{e}"
end

Documentation for API Endpoints

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

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

Documentation for Models

Documentation for Authorization

Authentication schemes defined for the API:

bearerAuth

  • Type: Bearer authentication