Home

Awesome

conekta

Conekta - the Ruby gem for the Conekta API

Conekta sdk

This SDK is automatically generated by the OpenAPI Generator project:

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@example.com | 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

ClassMethodHTTP requestDescription
Conekta::AntifraudApicreate_rule_blacklistPOST /antifraud/blacklistsCreate blacklisted rule
Conekta::AntifraudApicreate_rule_whitelistPOST /antifraud/whitelistsCreate whitelisted rule
Conekta::AntifraudApidelete_rule_blacklistDELETE /antifraud/blacklists/{id}Delete blacklisted rule
Conekta::AntifraudApidelete_rule_whitelistDELETE /antifraud/whitelists/{id}Delete whitelisted rule
Conekta::AntifraudApiget_rule_blacklistGET /antifraud/blacklistsGet list of blacklisted rules
Conekta::AntifraudApiget_rule_whitelistGET /antifraud/whitelistsGet a list of whitelisted rules
Conekta::ApiKeysApicreate_api_keyPOST /api_keysCreate Api Key
Conekta::ApiKeysApidelete_api_keyDELETE /api_keys/{id}Delete Api Key
Conekta::ApiKeysApiget_api_keyGET /api_keys/{id}Get Api Key
Conekta::ApiKeysApiget_api_keysGET /api_keysGet list of Api Keys
Conekta::ApiKeysApiupdate_api_keyPUT /api_keys/{id}Update Api Key
Conekta::BalancesApiget_balanceGET /balanceGet a company's balance
Conekta::ChargesApiget_chargesGET /chargesGet A List of Charges
Conekta::ChargesApiorders_create_chargePOST /orders/{id}/chargesCreate charge
Conekta::ChargesApiupdate_chargePUT /charges/{id}Update a charge
Conekta::CompaniesApiget_companiesGET /companiesGet List of Companies
Conekta::CompaniesApiget_companyGET /companies/{id}Get Company
Conekta::CustomersApicreate_customerPOST /customersCreate customer
Conekta::CustomersApicreate_customer_fiscal_entitiesPOST /customers/{id}/fiscal_entitiesCreate Fiscal Entity
Conekta::CustomersApidelete_customer_by_idDELETE /customers/{id}Delete Customer
Conekta::CustomersApiget_customer_by_idGET /customers/{id}Get Customer
Conekta::CustomersApiget_customersGET /customersGet a list of customers
Conekta::CustomersApiupdate_customerPUT /customers/{id}Update customer
Conekta::CustomersApiupdate_customer_fiscal_entitiesPUT /customers/{id}/fiscal_entities/{fiscal_entities_id}Update Fiscal Entity
Conekta::DiscountsApiorders_create_discount_linePOST /orders/{id}/discount_linesCreate Discount
Conekta::DiscountsApiorders_delete_discount_linesDELETE /orders/{id}/discount_lines/{discount_lines_id}Delete Discount
Conekta::DiscountsApiorders_get_discount_lineGET /orders/{id}/discount_lines/{discount_lines_id}Get Discount
Conekta::DiscountsApiorders_get_discount_linesGET /orders/{id}/discount_linesGet a List of Discount
Conekta::DiscountsApiorders_update_discount_linesPUT /orders/{id}/discount_lines/{discount_lines_id}Update Discount
Conekta::EventsApiget_eventGET /events/{id}Get Event
Conekta::EventsApiget_eventsGET /eventsGet list of Events
Conekta::EventsApiresend_eventPOST /events/{event_id}/webhook_logs/{webhook_log_id}/resendResend Event
Conekta::LogsApiget_log_by_idGET /logs/{id}Get Log
Conekta::LogsApiget_logsGET /logsGet List Of Logs
Conekta::OrdersApicancel_orderPOST /orders/{id}/cancelCancel Order
Conekta::OrdersApicreate_orderPOST /ordersCreate order
Conekta::OrdersApiget_order_by_idGET /orders/{id}Get Order
Conekta::OrdersApiget_ordersGET /ordersGet a list of Orders
Conekta::OrdersApiorder_cancel_refundDELETE /orders/{id}/refunds/{refund_id}Cancel Refund
Conekta::OrdersApiorder_refundPOST /orders/{id}/refundsRefund Order
Conekta::OrdersApiorders_create_capturePOST /orders/{id}/captureCapture Order
Conekta::OrdersApiupdate_orderPUT /orders/{id}Update Order
Conekta::PaymentLinkApicancel_checkoutPUT /checkouts/{id}/cancelCancel Payment Link
Conekta::PaymentLinkApicreate_checkoutPOST /checkoutsCreate Unique Payment Link
Conekta::PaymentLinkApiemail_checkoutPOST /checkouts/{id}/emailSend an email
Conekta::PaymentLinkApiget_checkoutGET /checkouts/{id}Get a payment link by ID
Conekta::PaymentLinkApiget_checkoutsGET /checkoutsGet a list of payment links
Conekta::PaymentLinkApisms_checkoutPOST /checkouts/{id}/smsSend an sms
Conekta::PaymentMethodsApicreate_customer_payment_methodsPOST /customers/{id}/payment_sourcesCreate Payment Method
Conekta::PaymentMethodsApidelete_customer_payment_methodsDELETE /customers/{id}/payment_sources/{payment_method_id}Delete Payment Method
Conekta::PaymentMethodsApiget_customer_payment_methodsGET /customers/{id}/payment_sourcesGet Payment Methods
Conekta::PaymentMethodsApiupdate_customer_payment_methodsPUT /customers/{id}/payment_sources/{payment_method_id}Update Payment Method
Conekta::PayoutOrdersApicreate_payout_orderPOST /payout_ordersCreate payout order
Conekta::PayoutOrdersApiget_payout_order_by_idGET /payout_orders/{id}Get Payout Order
Conekta::PayoutOrdersApiget_payout_ordersGET /payout_ordersGet a list of Payout Orders
Conekta::PlansApicreate_planPOST /plansCreate Plan
Conekta::PlansApidelete_planDELETE /plans/{id}Delete Plan
Conekta::PlansApiget_planGET /plans/{id}Get Plan
Conekta::PlansApiget_plansGET /plansGet A List of Plans
Conekta::PlansApiupdate_planPUT /plans/{id}Update Plan
Conekta::ProductsApiorders_create_productPOST /orders/{id}/line_itemsCreate Product
Conekta::ProductsApiorders_delete_productDELETE /orders/{id}/line_items/{line_item_id}Delete Product
Conekta::ProductsApiorders_update_productPUT /orders/{id}/line_items/{line_item_id}Update Product
Conekta::ShippingContactsApicreate_customer_shipping_contactsPOST /customers/{id}/shipping_contactsCreate a shipping contacts
Conekta::ShippingContactsApidelete_customer_shipping_contactsDELETE /customers/{id}/shipping_contacts/{shipping_contacts_id}Delete shipping contacts
Conekta::ShippingContactsApiupdate_customer_shipping_contactsPUT /customers/{id}/shipping_contacts/{shipping_contacts_id}Update shipping contacts
Conekta::ShippingsApiorders_create_shippingPOST /orders/{id}/shipping_linesCreate Shipping
Conekta::ShippingsApiorders_delete_shippingDELETE /orders/{id}/shipping_lines/{shipping_id}Delete Shipping
Conekta::ShippingsApiorders_update_shippingPUT /orders/{id}/shipping_lines/{shipping_id}Update Shipping
Conekta::SubscriptionsApicancel_subscriptionPOST /customers/{id}/subscription/cancelCancel Subscription
Conekta::SubscriptionsApicreate_subscriptionPOST /customers/{id}/subscriptionCreate Subscription
Conekta::SubscriptionsApiget_all_events_from_subscriptionGET /customers/{id}/subscription/eventsGet Events By Subscription
Conekta::SubscriptionsApiget_subscriptionGET /customers/{id}/subscriptionGet Subscription
Conekta::SubscriptionsApipause_subscriptionPOST /customers/{id}/subscription/pausePause Subscription
Conekta::SubscriptionsApiresume_subscriptionPOST /customers/{id}/subscription/resumeResume Subscription
Conekta::SubscriptionsApiupdate_subscriptionPUT /customers/{id}/subscriptionUpdate Subscription
Conekta::TaxesApiorders_create_taxesPOST /orders/{id}/tax_linesCreate Tax
Conekta::TaxesApiorders_delete_taxesDELETE /orders/{id}/tax_lines/{tax_id}Delete Tax
Conekta::TaxesApiorders_update_taxesPUT /orders/{id}/tax_lines/{tax_id}Update Tax
Conekta::TokensApicreate_tokenPOST /tokensCreate Token
Conekta::TransactionsApiget_transactionGET /transactions/{id}Get transaction
Conekta::TransactionsApiget_transactionsGET /transactionsGet List transactions
Conekta::TransfersApiget_transferGET /transfers/{id}Get Transfer
Conekta::TransfersApiget_transfersGET /transfersGet a list of transfers
Conekta::WebhookKeysApicreate_webhook_keyPOST /webhook_keysCreate Webhook Key
Conekta::WebhookKeysApidelete_webhook_keyDELETE /webhook_keys/{id}Delete Webhook key
Conekta::WebhookKeysApiget_webhook_keyGET /webhook_keys/{id}Get Webhook Key
Conekta::WebhookKeysApiget_webhook_keysGET /webhook_keysGet List of Webhook Keys
Conekta::WebhookKeysApiupdate_webhook_keyPUT /webhook_keys/{id}Update Webhook Key
Conekta::WebhooksApicreate_webhookPOST /webhooksCreate Webhook
Conekta::WebhooksApidelete_webhookDELETE /webhooks/{id}Delete Webhook
Conekta::WebhooksApiget_webhookGET /webhooks/{id}Get Webhook
Conekta::WebhooksApiget_webhooksGET /webhooksGet List of Webhooks
Conekta::WebhooksApitest_webhookPOST /webhooks/{id}/testTest Webhook
Conekta::WebhooksApiupdate_webhookPUT /webhooks/{id}Update Webhook

Documentation for Models

Documentation for Authorization

Authentication schemes defined for the API:

bearerAuth