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.4
- Build date: 2024-10-11T14:29:25.812959596Z[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.4.gem
(for development, run gem install --dev ./conekta-6.0.4.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.4'
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
- Conekta::ApiKeyCreateResponse
- Conekta::ApiKeyRequest
- Conekta::ApiKeyResponse
- Conekta::ApiKeyResponseOnDelete
- Conekta::ApiKeyUpdateRequest
- Conekta::BalanceCommonField
- Conekta::BalanceResponse
- Conekta::BlacklistRuleResponse
- Conekta::ChargeOrderResponse
- Conekta::ChargeOrderResponsePaymentMethod
- Conekta::ChargeRequest
- Conekta::ChargeRequestPaymentMethod
- Conekta::ChargeResponse
- Conekta::ChargeResponseChannel
- Conekta::ChargeResponsePaymentMethod
- Conekta::ChargeResponseRefunds
- Conekta::ChargeResponseRefundsData
- Conekta::ChargeUpdateRequest
- Conekta::ChargesDataResponse
- Conekta::Checkout
- Conekta::CheckoutOrderTemplate
- Conekta::CheckoutOrderTemplateCustomerInfo
- Conekta::CheckoutRequest
- Conekta::CheckoutResponse
- Conekta::CheckoutsResponse
- Conekta::CompanyFiscalInfoAddressResponse
- Conekta::CompanyFiscalInfoResponse
- Conekta::CompanyPayoutDestinationResponse
- Conekta::CompanyResponse
- Conekta::CreateCustomerFiscalEntitiesResponse
- Conekta::CreateCustomerPaymentMethodsRequest
- Conekta::CreateCustomerPaymentMethodsResponse
- Conekta::CreateRiskRulesData
- Conekta::Customer
- Conekta::CustomerAddress
- Conekta::CustomerAntifraudInfo
- Conekta::CustomerAntifraudInfoResponse
- Conekta::CustomerFiscalEntitiesDataResponse
- Conekta::CustomerFiscalEntitiesRequest
- Conekta::CustomerFiscalEntitiesResponse
- Conekta::CustomerInfo
- Conekta::CustomerInfoJustCustomerId
- Conekta::CustomerInfoJustCustomerIdResponse
- Conekta::CustomerPaymentMethodRequest
- Conekta::CustomerPaymentMethodsData
- Conekta::CustomerPaymentMethodsRequest
- Conekta::CustomerPaymentMethodsResponse
- Conekta::CustomerResponse
- Conekta::CustomerResponseShippingContacts
- Conekta::CustomerShippingContacts
- Conekta::CustomerShippingContactsAddress
- Conekta::CustomerShippingContactsDataResponse
- Conekta::CustomerShippingContactsResponse
- Conekta::CustomerShippingContactsResponseAddress
- Conekta::CustomerUpdateFiscalEntitiesRequest
- Conekta::CustomerUpdateShippingContacts
- Conekta::CustomersResponse
- Conekta::DeleteApiKeysResponse
- Conekta::DeletedBlacklistRuleResponse
- Conekta::DeletedWhitelistRuleResponse
- Conekta::Details
- Conekta::DetailsError
- Conekta::DiscountLinesDataResponse
- Conekta::DiscountLinesResponse
- Conekta::EmailCheckoutRequest
- Conekta::Error
- Conekta::EventResponse
- Conekta::EventTypes
- Conekta::EventsResendResponse
- Conekta::FiscalEntityAddress
- Conekta::GetApiKeysResponse
- Conekta::GetChargesResponse
- Conekta::GetCompaniesResponse
- Conekta::GetCustomerPaymentMethodDataResponse
- Conekta::GetEventsResponse
- Conekta::GetOrderDiscountLinesResponse
- Conekta::GetOrdersResponse
- Conekta::GetPaymentMethodResponse
- Conekta::GetPlansResponse
- Conekta::GetTransactionsResponse
- Conekta::GetTransfersResponse
- Conekta::GetWebhookKeysResponse
- Conekta::GetWebhooksResponse
- Conekta::LogResponse
- Conekta::LogsResponse
- Conekta::LogsResponseData
- Conekta::OrderCaptureRequest
- Conekta::OrderCustomerInfoResponse
- Conekta::OrderDiscountLinesRequest
- Conekta::OrderFiscalEntityAddressResponse
- Conekta::OrderFiscalEntityRequest
- Conekta::OrderFiscalEntityResponse
- Conekta::OrderNextActionResponse
- Conekta::OrderNextActionResponseRedirectToUrl
- Conekta::OrderRefundRequest
- Conekta::OrderRequest
- Conekta::OrderRequestCustomerInfo
- Conekta::OrderResponse
- Conekta::OrderResponseCharges
- Conekta::OrderResponseCheckout
- Conekta::OrderResponseCustomerInfo
- Conekta::OrderResponseDiscountLines
- Conekta::OrderResponseProducts
- Conekta::OrderResponseShippingContact
- Conekta::OrderTaxRequest
- Conekta::OrderUpdateFiscalEntityRequest
- Conekta::OrderUpdateRequest
- Conekta::OrderUpdateRequestCustomerInfo
- Conekta::OrdersResponse
- Conekta::Page
- Conekta::Pagination
- Conekta::PaymentMethod
- Conekta::PaymentMethodBankTransfer
- Conekta::PaymentMethodCard
- Conekta::PaymentMethodCardRequest
- Conekta::PaymentMethodCardResponse
- Conekta::PaymentMethodCash
- Conekta::PaymentMethodCashRequest
- Conekta::PaymentMethodCashResponse
- Conekta::PaymentMethodGeneralRequest
- Conekta::PaymentMethodResponse
- Conekta::PaymentMethodSpeiRecurrent
- Conekta::PaymentMethodSpeiRequest
- Conekta::PaymentMethodTokenRequest
- Conekta::Payout
- Conekta::PayoutMethod
- Conekta::PayoutOrder
- Conekta::PayoutOrderPayoutsItem
- Conekta::PayoutOrderResponse
- Conekta::PayoutOrderResponseCustomerInfo
- Conekta::PayoutOrdersResponse
- Conekta::PlanRequest
- Conekta::PlanResponse
- Conekta::PlanUpdateRequest
- Conekta::Product
- Conekta::ProductDataResponse
- Conekta::ProductOrderResponse
- Conekta::RiskRulesData
- Conekta::RiskRulesList
- Conekta::ShippingOrderResponse
- Conekta::ShippingRequest
- Conekta::SmsCheckoutRequest
- Conekta::SubscriptionEventsResponse
- Conekta::SubscriptionRequest
- Conekta::SubscriptionResponse
- Conekta::SubscriptionUpdateRequest
- Conekta::Token
- Conekta::TokenCard
- Conekta::TokenCheckout
- Conekta::TokenResponse
- Conekta::TokenResponseCheckout
- Conekta::TransactionResponse
- Conekta::TransferDestinationResponse
- Conekta::TransferMethodResponse
- Conekta::TransferResponse
- Conekta::TransfersResponse
- Conekta::UpdateCustomer
- Conekta::UpdateCustomerAntifraudInfo
- Conekta::UpdateCustomerFiscalEntitiesResponse
- Conekta::UpdateCustomerPaymentMethodsResponse
- Conekta::UpdateOrderDiscountLinesRequest
- Conekta::UpdateOrderTaxRequest
- Conekta::UpdateOrderTaxResponse
- Conekta::UpdatePaymentMethods
- Conekta::UpdateProduct
- Conekta::WebhookKeyCreateResponse
- Conekta::WebhookKeyDeleteResponse
- Conekta::WebhookKeyRequest
- Conekta::WebhookKeyResponse
- Conekta::WebhookKeyUpdateRequest
- Conekta::WebhookLog
- Conekta::WebhookRequest
- Conekta::WebhookResponse
- Conekta::WebhookUpdateRequest
- Conekta::WhitelistlistRuleResponse
Documentation for Authorization
Authentication schemes defined for the API:
bearerAuth
- Type: Bearer authentication