conekta 6.0.0 → 6.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +6 -0
- data/Makefile +10 -1
- data/README.md +16 -52
- data/VERSION +1 -1
- data/conekta.gemspec +4 -3
- data/config-ruby.json +32 -0
- data/docs/ApiKeyCreateResponse.md +3 -3
- data/docs/BalancesApi.md +1 -1
- data/docs/ChargeOrderResponse.md +0 -2
- data/docs/ChargeRequest.md +0 -2
- data/docs/ChargeRequestPaymentMethod.md +2 -0
- data/docs/ChargeResponse.md +0 -2
- data/docs/ChargeUpdateRequest.md +18 -0
- data/docs/ChargesApi.md +76 -0
- data/docs/ChargesDataResponse.md +0 -2
- data/docs/Checkout.md +2 -2
- data/docs/CheckoutOrderTemplate.md +1 -1
- data/docs/CheckoutRequest.md +2 -2
- data/docs/CheckoutResponse.md +3 -3
- data/docs/CreateCustomerFiscalEntitiesResponse.md +1 -1
- data/docs/CustomerAddress.md +3 -3
- data/docs/CustomerFiscalEntitiesDataResponse.md +1 -1
- data/docs/CustomerFiscalEntitiesRequest.md +1 -1
- data/docs/CustomerResponse.md +10 -8
- data/docs/CustomerShippingContacts.md +3 -1
- data/docs/CustomerShippingContactsAddress.md +2 -2
- data/docs/CustomerShippingContactsDataResponse.md +2 -0
- data/docs/CustomerShippingContactsResponse.md +2 -0
- data/docs/CustomerShippingContactsResponseAddress.md +2 -2
- data/docs/CustomerUpdateFiscalEntitiesRequest.md +1 -1
- data/docs/CustomersApi.md +1 -1
- data/docs/CustomersResponse.md +3 -3
- data/docs/EventResponse.md +1 -1
- data/docs/FiscalEntityAddress.md +30 -0
- data/docs/LogResponse.md +5 -5
- data/docs/LogsResponseData.md +5 -5
- data/docs/{CustomerInfoResponse.md → OrderCustomerInfoResponse.md} +4 -2
- data/docs/OrderFiscalEntityAddressResponse.md +32 -0
- data/docs/OrderFiscalEntityRequest.md +28 -0
- data/docs/OrderFiscalEntityResponse.md +34 -0
- data/docs/OrderNextActionResponse.md +20 -0
- data/docs/OrderNextActionResponseRedirectToUrl.md +20 -0
- data/docs/OrderRequest.md +7 -1
- data/docs/OrderResponse.md +3 -1
- data/docs/OrderResponseCustomerInfo.md +4 -2
- data/docs/OrderResponseShippingContact.md +8 -6
- data/docs/OrderTaxRequest.md +1 -1
- data/docs/OrderUpdateFiscalEntityRequest.md +28 -0
- data/docs/OrderUpdateRequest.md +2 -0
- data/docs/PaymentLinkApi.md +1 -1
- data/docs/Product.md +3 -3
- data/docs/ShippingRequest.md +1 -1
- data/docs/TokenResponseCheckout.md +1 -1
- data/docs/TransactionsApi.md +9 -3
- data/docs/UpdateCustomerFiscalEntitiesResponse.md +1 -1
- data/docs/WebhookLog.md +1 -1
- data/docs/WebhookResponse.md +1 -1
- data/docs/WebhookUpdateRequest.md +2 -2
- data/lib/conekta/api/antifraud_api.rb +1 -1
- data/lib/conekta/api/api_keys_api.rb +1 -1
- data/lib/conekta/api/balances_api.rb +2 -2
- data/lib/conekta/api/charges_api.rb +83 -1
- data/lib/conekta/api/companies_api.rb +1 -1
- data/lib/conekta/api/customers_api.rb +1 -1
- data/lib/conekta/api/discounts_api.rb +1 -1
- data/lib/conekta/api/events_api.rb +1 -1
- data/lib/conekta/api/logs_api.rb +1 -1
- data/lib/conekta/api/orders_api.rb +1 -1
- data/lib/conekta/api/payment_link_api.rb +1 -1
- data/lib/conekta/api/payment_methods_api.rb +1 -1
- data/lib/conekta/api/plans_api.rb +1 -1
- data/lib/conekta/api/products_api.rb +1 -1
- data/lib/conekta/api/shipping_contacts_api.rb +1 -1
- data/lib/conekta/api/shippings_api.rb +1 -1
- data/lib/conekta/api/subscriptions_api.rb +1 -1
- data/lib/conekta/api/taxes_api.rb +1 -1
- data/lib/conekta/api/tokens_api.rb +1 -1
- data/lib/conekta/api/transactions_api.rb +13 -4
- data/lib/conekta/api/transfers_api.rb +1 -1
- data/lib/conekta/api/webhook_keys_api.rb +1 -1
- data/lib/conekta/api/webhooks_api.rb +1 -1
- data/lib/conekta/api_client.rb +40 -37
- data/lib/conekta/api_error.rb +1 -1
- data/lib/conekta/configuration.rb +13 -10
- data/lib/conekta/models/api_key_create_response.rb +28 -34
- data/lib/conekta/models/api_key_create_response_all_of.rb +14 -19
- data/lib/conekta/models/api_key_request.rb +16 -19
- data/lib/conekta/models/api_key_response.rb +14 -19
- data/lib/conekta/models/api_key_response_on_delete.rb +14 -19
- data/lib/conekta/models/api_key_update_request.rb +14 -19
- data/lib/conekta/models/balance_common_field.rb +14 -19
- data/lib/conekta/models/balance_response.rb +14 -19
- data/lib/conekta/models/blacklist_rule_response.rb +14 -19
- data/lib/conekta/models/charge_data_payment_method_bank_transfer_response.rb +14 -19
- data/lib/conekta/models/charge_data_payment_method_card_response.rb +14 -43
- data/lib/conekta/models/charge_data_payment_method_cash_response.rb +14 -19
- data/lib/conekta/models/charge_order_response.rb +15 -29
- data/lib/conekta/models/charge_order_response_payment_method.rb +1 -1
- data/lib/conekta/models/charge_request.rb +17 -30
- data/lib/conekta/models/charge_request_payment_method.rb +27 -44
- data/lib/conekta/models/charge_response.rb +15 -29
- data/lib/conekta/models/charge_response_channel.rb +14 -19
- data/lib/conekta/models/charge_response_payment_method.rb +1 -1
- data/lib/conekta/models/charge_response_refunds.rb +18 -20
- data/lib/conekta/models/charge_response_refunds_all_of.rb +14 -19
- data/lib/conekta/models/charge_response_refunds_data.rb +22 -19
- data/lib/conekta/models/charge_update_request.rb +216 -0
- data/lib/conekta/models/charges_data_response.rb +15 -29
- data/lib/conekta/models/checkout.rb +26 -19
- data/lib/conekta/models/checkout_order_template.rb +23 -20
- data/lib/conekta/models/checkout_order_template_customer_info.rb +2 -2
- data/lib/conekta/models/checkout_request.rb +16 -19
- data/lib/conekta/models/checkout_response.rb +22 -19
- data/lib/conekta/models/checkouts_response.rb +18 -20
- data/lib/conekta/models/checkouts_response_all_of.rb +14 -19
- data/lib/conekta/models/company_fiscal_info_address_response.rb +14 -19
- data/lib/conekta/models/company_fiscal_info_response.rb +14 -19
- data/lib/conekta/models/company_payout_destination_response.rb +14 -19
- data/lib/conekta/models/company_response.rb +14 -19
- data/lib/conekta/models/create_customer_fiscal_entities_response.rb +23 -21
- data/lib/conekta/models/create_customer_fiscal_entities_response_all_of.rb +20 -19
- data/lib/conekta/models/create_customer_payment_methods_request.rb +2 -2
- data/lib/conekta/models/create_customer_payment_methods_response.rb +1 -1
- data/lib/conekta/models/create_risk_rules_data.rb +20 -19
- data/lib/conekta/models/customer.rb +25 -20
- data/lib/conekta/models/customer_address.rb +22 -19
- data/lib/conekta/models/customer_antifraud_info.rb +14 -19
- data/lib/conekta/models/customer_antifraud_info_response.rb +14 -19
- data/lib/conekta/models/customer_fiscal_entities_data_response.rb +23 -21
- data/lib/conekta/models/customer_fiscal_entities_request.rb +17 -20
- data/lib/conekta/models/customer_fiscal_entities_request_address.rb +22 -19
- data/lib/conekta/models/customer_fiscal_entities_response.rb +18 -20
- data/lib/conekta/models/customer_fiscal_entities_response_all_of.rb +14 -19
- data/lib/conekta/models/customer_info.rb +20 -19
- data/lib/conekta/models/customer_info_just_customer_id.rb +16 -19
- data/lib/conekta/models/customer_info_just_customer_id_response.rb +14 -19
- data/lib/conekta/models/customer_payment_method_request.rb +16 -19
- data/lib/conekta/models/customer_payment_methods.rb +14 -19
- data/lib/conekta/models/customer_payment_methods_data.rb +1 -1
- data/lib/conekta/models/customer_payment_methods_request.rb +2 -2
- data/lib/conekta/models/customer_payment_methods_response.rb +18 -20
- data/lib/conekta/models/customer_response.rb +67 -20
- data/lib/conekta/models/customer_response_shipping_contacts.rb +18 -20
- data/lib/conekta/models/customer_response_shipping_contacts_all_of.rb +14 -19
- data/lib/conekta/models/customer_shipping_contacts.rb +52 -24
- data/lib/conekta/models/customer_shipping_contacts_address.rb +14 -19
- data/lib/conekta/models/customer_shipping_contacts_data_response.rb +55 -22
- data/lib/conekta/models/customer_shipping_contacts_data_response_all_of.rb +20 -19
- data/lib/conekta/models/customer_shipping_contacts_response.rb +46 -20
- data/lib/conekta/models/customer_shipping_contacts_response_address.rb +15 -19
- data/lib/conekta/models/customer_update_fiscal_entities_request.rb +15 -20
- data/lib/conekta/models/customer_update_shipping_contacts.rb +14 -19
- data/lib/conekta/models/customers_response.rb +34 -36
- data/lib/conekta/models/customers_response_all_of.rb +14 -19
- data/lib/conekta/models/delete_api_keys_response.rb +15 -21
- data/lib/conekta/models/delete_api_keys_response_all_of.rb +14 -19
- data/lib/conekta/models/deleted_blacklist_rule_response.rb +14 -19
- data/lib/conekta/models/deleted_whitelist_rule_response.rb +14 -19
- data/lib/conekta/models/details.rb +14 -19
- data/lib/conekta/models/details_error.rb +14 -19
- data/lib/conekta/models/discount_lines_data_response.rb +26 -19
- data/lib/conekta/models/discount_lines_response.rb +26 -20
- data/lib/conekta/models/discount_lines_response_all_of.rb +20 -19
- data/lib/conekta/models/email_checkout_request.rb +16 -19
- data/lib/conekta/models/error.rb +15 -21
- data/lib/conekta/models/error_all_of.rb +14 -19
- data/lib/conekta/models/event_response.rb +19 -20
- data/lib/conekta/models/events_resend_response.rb +19 -20
- data/lib/conekta/models/fiscal_entity_address.rb +312 -0
- data/lib/conekta/models/get_api_keys_response.rb +18 -20
- data/lib/conekta/models/get_api_keys_response_all_of.rb +14 -19
- data/lib/conekta/models/get_charges_response.rb +18 -20
- data/lib/conekta/models/get_charges_response_all_of.rb +14 -19
- data/lib/conekta/models/get_companies_response.rb +18 -20
- data/lib/conekta/models/get_companies_response_all_of.rb +14 -19
- data/lib/conekta/models/get_customer_payment_method_data_response.rb +1 -1
- data/lib/conekta/models/get_events_response.rb +18 -20
- data/lib/conekta/models/get_events_response_all_of.rb +14 -19
- data/lib/conekta/models/get_order_discount_lines_response.rb +18 -20
- data/lib/conekta/models/get_order_discount_lines_response_all_of.rb +14 -19
- data/lib/conekta/models/get_orders_response.rb +20 -19
- data/lib/conekta/models/get_payment_method_response.rb +18 -20
- data/lib/conekta/models/get_payment_method_response_all_of.rb +14 -19
- data/lib/conekta/models/get_plans_response.rb +18 -20
- data/lib/conekta/models/get_plans_response_all_of.rb +14 -19
- data/lib/conekta/models/get_transactions_response.rb +18 -20
- data/lib/conekta/models/get_transactions_response_all_of.rb +14 -19
- data/lib/conekta/models/get_transfers_response.rb +18 -20
- data/lib/conekta/models/get_transfers_response_all_of.rb +14 -19
- data/lib/conekta/models/get_webhook_keys_response.rb +18 -20
- data/lib/conekta/models/get_webhook_keys_response_all_of.rb +14 -19
- data/lib/conekta/models/get_webhooks_response.rb +18 -20
- data/lib/conekta/models/get_webhooks_response_all_of.rb +14 -19
- data/lib/conekta/models/log_response.rb +20 -19
- data/lib/conekta/models/logs_response.rb +14 -19
- data/lib/conekta/models/logs_response_data.rb +14 -19
- data/lib/conekta/models/order_capture_request.rb +16 -19
- data/lib/conekta/models/{customer_info_response.rb → order_customer_info_response.rb} +29 -23
- data/lib/conekta/models/order_discount_lines_request.rb +20 -19
- data/lib/conekta/models/{order_response_fiscal_entity_address.rb → order_fiscal_entity_address_response.rb} +47 -34
- data/lib/conekta/models/{order_response_fiscal_entity_address_all_of.rb → order_fiscal_entity_address_response_all_of.rb} +17 -22
- data/lib/conekta/models/order_fiscal_entity_request.rb +295 -0
- data/lib/conekta/models/order_fiscal_entity_response.rb +347 -0
- data/lib/conekta/models/{order_response_fiscal_entity.rb → order_next_action_response.rb} +32 -53
- data/lib/conekta/models/order_next_action_response_redirect_to_url.rb +226 -0
- data/lib/conekta/models/order_refund_request.rb +18 -19
- data/lib/conekta/models/order_request.rb +58 -24
- data/lib/conekta/models/order_request_customer_info.rb +2 -2
- data/lib/conekta/models/order_response.rb +31 -22
- data/lib/conekta/models/order_response_charges.rb +18 -20
- data/lib/conekta/models/order_response_charges_all_of.rb +14 -19
- data/lib/conekta/models/order_response_checkout.rb +19 -20
- data/lib/conekta/models/order_response_customer_info.rb +33 -28
- data/lib/conekta/models/order_response_customer_info_all_of.rb +14 -19
- data/lib/conekta/models/order_response_discount_lines.rb +18 -20
- data/lib/conekta/models/order_response_discount_lines_all_of.rb +14 -19
- data/lib/conekta/models/order_response_products.rb +18 -20
- data/lib/conekta/models/order_response_products_all_of.rb +14 -19
- data/lib/conekta/models/order_response_shipping_contact.rb +74 -49
- data/lib/conekta/models/order_response_shipping_contact_all_of.rb +14 -19
- data/lib/conekta/models/order_tax_request.rb +23 -20
- data/lib/conekta/models/order_update_fiscal_entity_request.rb +295 -0
- data/lib/conekta/models/order_update_request.rb +29 -21
- data/lib/conekta/models/order_update_request_customer_info.rb +2 -2
- data/lib/conekta/models/orders_response.rb +16 -19
- data/lib/conekta/models/page.rb +14 -19
- data/lib/conekta/models/pagination.rb +18 -19
- data/lib/conekta/models/payment_method.rb +16 -19
- data/lib/conekta/models/payment_method_bank_transfer.rb +16 -20
- data/lib/conekta/models/payment_method_card.rb +16 -44
- data/lib/conekta/models/payment_method_card_request.rb +19 -21
- data/lib/conekta/models/payment_method_card_request_all_of.rb +14 -19
- data/lib/conekta/models/payment_method_card_response.rb +22 -20
- data/lib/conekta/models/payment_method_card_response_all_of.rb +14 -19
- data/lib/conekta/models/payment_method_cash.rb +16 -20
- data/lib/conekta/models/payment_method_cash_request.rb +17 -21
- data/lib/conekta/models/payment_method_cash_request_all_of.rb +14 -19
- data/lib/conekta/models/payment_method_cash_response.rb +22 -20
- data/lib/conekta/models/payment_method_cash_response_all_of.rb +14 -19
- data/lib/conekta/models/payment_method_response.rb +22 -19
- data/lib/conekta/models/payment_method_spei_recurrent.rb +23 -21
- data/lib/conekta/models/payment_method_spei_recurrent_all_of.rb +14 -19
- data/lib/conekta/models/payment_method_spei_request.rb +17 -21
- data/lib/conekta/models/plan_request.rb +27 -20
- data/lib/conekta/models/plan_response.rb +19 -20
- data/lib/conekta/models/plan_update_request.rb +24 -21
- data/lib/conekta/models/product.rb +30 -21
- data/lib/conekta/models/product_data_response.rb +31 -23
- data/lib/conekta/models/product_data_response_all_of.rb +14 -19
- data/lib/conekta/models/product_order_response.rb +31 -23
- data/lib/conekta/models/product_order_response_all_of.rb +14 -19
- data/lib/conekta/models/risk_rules.rb +14 -19
- data/lib/conekta/models/risk_rules_data.rb +14 -19
- data/lib/conekta/models/risk_rules_list.rb +19 -21
- data/lib/conekta/models/shipping_order_response.rb +21 -21
- data/lib/conekta/models/shipping_request.rb +21 -20
- data/lib/conekta/models/sms_checkout_request.rb +16 -19
- data/lib/conekta/models/subscription_events_response.rb +18 -20
- data/lib/conekta/models/subscription_request.rb +16 -19
- data/lib/conekta/models/subscription_response.rb +14 -19
- data/lib/conekta/models/subscription_update_request.rb +14 -19
- data/lib/conekta/models/token.rb +14 -19
- data/lib/conekta/models/token_card.rb +24 -19
- data/lib/conekta/models/token_checkout.rb +14 -19
- data/lib/conekta/models/token_response.rb +22 -19
- data/lib/conekta/models/token_response_checkout.rb +14 -19
- data/lib/conekta/models/transaction_response.rb +36 -19
- data/lib/conekta/models/transfer_destination_response.rb +14 -19
- data/lib/conekta/models/transfer_method_response.rb +14 -19
- data/lib/conekta/models/transfer_response.rb +19 -20
- data/lib/conekta/models/transfers_response.rb +19 -20
- data/lib/conekta/models/update_customer.rb +19 -20
- data/lib/conekta/models/update_customer_antifraud_info.rb +14 -19
- data/lib/conekta/models/update_customer_fiscal_entities_response.rb +24 -22
- data/lib/conekta/models/update_customer_fiscal_entities_response_all_of.rb +20 -19
- data/lib/conekta/models/update_customer_payment_methods_response.rb +1 -1
- data/lib/conekta/models/update_order_discount_lines_request.rb +19 -20
- data/lib/conekta/models/update_order_tax_request.rb +29 -22
- data/lib/conekta/models/update_order_tax_response.rb +26 -22
- data/lib/conekta/models/update_order_tax_response_all_of.rb +14 -19
- data/lib/conekta/models/update_payment_methods.rb +14 -19
- data/lib/conekta/models/update_product.rb +29 -22
- data/lib/conekta/models/webhook_key_create_response.rb +14 -19
- data/lib/conekta/models/webhook_key_delete_response.rb +14 -19
- data/lib/conekta/models/webhook_key_request.rb +14 -19
- data/lib/conekta/models/webhook_key_response.rb +14 -19
- data/lib/conekta/models/webhook_key_update_request.rb +14 -19
- data/lib/conekta/models/webhook_log.rb +19 -20
- data/lib/conekta/models/webhook_request.rb +16 -19
- data/lib/conekta/models/webhook_response.rb +14 -19
- data/lib/conekta/models/webhook_update_request.rb +24 -27
- data/lib/conekta/models/whitelistlist_rule_response.rb +14 -19
- data/lib/conekta/version.rb +2 -2
- data/lib/conekta.rb +10 -47
- data/spec/api/customers_api_spec.rb +2 -2
- data/spec/api/orders_api_spec.rb +27 -1
- data/spec/api_client_spec.rb +1 -1
- data/spec/configuration_spec.rb +1 -1
- data/spec/spec_helper.rb +1 -8
- data/ssl_data/ca_bundle.crt +4039 -0
- data/templates/ruby/CUSTOM_VERSION.mustache +1 -0
- data/templates/ruby/api_client.mustache +256 -0
- data/templates/ruby/configuration.mustache +481 -0
- metadata +45 -71
- data/docs/ApiKeyCreateResponseAllOf.md +0 -18
- data/docs/ChargeDataPaymentMethodBankTransferResponse.md +0 -48
- data/docs/ChargeDataPaymentMethodCardResponse.md +0 -38
- data/docs/ChargeDataPaymentMethodCashResponse.md +0 -32
- data/docs/ChargeResponseRefundsAllOf.md +0 -18
- data/docs/CheckoutsResponseAllOf.md +0 -18
- data/docs/CreateCustomerFiscalEntitiesResponseAllOf.md +0 -26
- data/docs/CustomerFiscalEntitiesRequestAddress.md +0 -32
- data/docs/CustomerFiscalEntitiesResponseAllOf.md +0 -18
- data/docs/CustomerPaymentMethods.md +0 -18
- data/docs/CustomerResponseShippingContactsAllOf.md +0 -18
- data/docs/CustomerShippingContactsDataResponseAllOf.md +0 -22
- data/docs/CustomersResponseAllOf.md +0 -18
- data/docs/DeleteApiKeysResponseAllOf.md +0 -18
- data/docs/DiscountLinesResponseAllOf.md +0 -22
- data/docs/ErrorAllOf.md +0 -22
- data/docs/GetApiKeysResponseAllOf.md +0 -18
- data/docs/GetChargesResponseAllOf.md +0 -18
- data/docs/GetCompaniesResponseAllOf.md +0 -18
- data/docs/GetEventsResponseAllOf.md +0 -18
- data/docs/GetOrderDiscountLinesResponseAllOf.md +0 -18
- data/docs/GetPaymentMethodResponseAllOf.md +0 -18
- data/docs/GetPlansResponseAllOf.md +0 -18
- data/docs/GetTransactionsResponseAllOf.md +0 -18
- data/docs/GetTransfersResponseAllOf.md +0 -18
- data/docs/GetWebhookKeysResponseAllOf.md +0 -18
- data/docs/GetWebhooksResponseAllOf.md +0 -18
- data/docs/OrderResponseChargesAllOf.md +0 -18
- data/docs/OrderResponseCustomerInfoAllOf.md +0 -18
- data/docs/OrderResponseDiscountLinesAllOf.md +0 -18
- data/docs/OrderResponseFiscalEntity.md +0 -24
- data/docs/OrderResponseFiscalEntityAddress.md +0 -34
- data/docs/OrderResponseFiscalEntityAddressAllOf.md +0 -18
- data/docs/OrderResponseProductsAllOf.md +0 -18
- data/docs/OrderResponseShippingContactAllOf.md +0 -22
- data/docs/PaymentMethodCardRequestAllOf.md +0 -18
- data/docs/PaymentMethodCardResponseAllOf.md +0 -36
- data/docs/PaymentMethodCashRequestAllOf.md +0 -18
- data/docs/PaymentMethodCashResponseAllOf.md +0 -26
- data/docs/PaymentMethodSpeiRecurrentAllOf.md +0 -20
- data/docs/ProductDataResponseAllOf.md +0 -22
- data/docs/ProductOrderResponseAllOf.md +0 -22
- data/docs/RiskRules.md +0 -18
- data/docs/UpdateCustomerFiscalEntitiesResponseAllOf.md +0 -26
- data/docs/UpdateOrderTaxResponseAllOf.md +0 -22
data/docs/PaymentLinkApi.md
CHANGED
@@ -103,7 +103,7 @@ Conekta.configure do |config|
|
|
103
103
|
end
|
104
104
|
|
105
105
|
api_instance = Conekta::PaymentLinkApi.new
|
106
|
-
checkout = Conekta::Checkout.new({allowed_payment_methods: [cash,
|
106
|
+
checkout = Conekta::Checkout.new({allowed_payment_methods: ["cash", "card", "bank_transfer"], expires_at: 1680397724, name: 'Payment Link Name 1594138857', order_template: Conekta::CheckoutOrderTemplate.new({currency: 'MXN', line_items: [Conekta::Product.new({name: 'Box of Cohiba S1s', quantity: 1, unit_price: 20000})]}), recurrent: false, type: 'PaymentLink'}) # Checkout | requested field for checkout
|
107
107
|
opts = {
|
108
108
|
accept_language: 'es', # String | Use for knowing which language to use
|
109
109
|
x_child_company_id: '6441b6376b60c3a638da80af' # String | In the case of a holding company, the company id of the child company to which will process the request.
|
data/docs/Product.md
CHANGED
@@ -20,14 +20,14 @@
|
|
20
20
|
require 'conekta'
|
21
21
|
|
22
22
|
instance = Conekta::Product.new(
|
23
|
-
antifraud_info: {key
|
23
|
+
antifraud_info: {"key":"value"},
|
24
24
|
brand: Cohiba,
|
25
25
|
description: Imported From Mex.,
|
26
|
-
metadata: {key
|
26
|
+
metadata: {"key":"value"},
|
27
27
|
name: Box of Cohiba S1s,
|
28
28
|
quantity: 1,
|
29
29
|
sku: XYZ12345,
|
30
|
-
tags: [food
|
30
|
+
tags: ["food","mexican food"],
|
31
31
|
unit_price: 20000
|
32
32
|
)
|
33
33
|
```
|
data/docs/ShippingRequest.md
CHANGED
@@ -43,7 +43,7 @@ instance = Conekta::TokenResponseCheckout.new(
|
|
43
43
|
force_3ds_flow: false,
|
44
44
|
id: 524f9d2f-8c2e-4e64-a33d-6006711a91bd,
|
45
45
|
livemode: true,
|
46
|
-
metadata: {key
|
46
|
+
metadata: {"key":"value"},
|
47
47
|
monthly_installments_enabled: false,
|
48
48
|
monthly_installments_options: null,
|
49
49
|
name: tok-2toNoPZpJgRU4PvgZ,
|
data/docs/TransactionsApi.md
CHANGED
@@ -107,9 +107,12 @@ opts = {
|
|
107
107
|
accept_language: 'es', # String | Use for knowing which language to use
|
108
108
|
x_child_company_id: '6441b6376b60c3a638da80af', # String | In the case of a holding company, the company id of the child company to which will process the request.
|
109
109
|
limit: 56, # Integer | The numbers of items to return, the maximum value is 250
|
110
|
-
search: 'search_example', # String | General order search, e.g. by mail, reference etc.
|
111
110
|
_next: '_next_example', # String | next page
|
112
|
-
previous: 'previous_example' # String | previous page
|
111
|
+
previous: 'previous_example', # String | previous page
|
112
|
+
id: '65412a893cd69a0001c25892', # String | id of the object to be retrieved
|
113
|
+
charge_id: '65412a893cd69a0001c25892', # String | id of the charge used for filtering
|
114
|
+
type: 'capture', # String | type of the object to be retrieved
|
115
|
+
currency: 'MXN' # String | currency of the object to be retrieved
|
113
116
|
}
|
114
117
|
|
115
118
|
begin
|
@@ -146,9 +149,12 @@ end
|
|
146
149
|
| **accept_language** | **String** | Use for knowing which language to use | [optional][default to 'es'] |
|
147
150
|
| **x_child_company_id** | **String** | In the case of a holding company, the company id of the child company to which will process the request. | [optional] |
|
148
151
|
| **limit** | **Integer** | The numbers of items to return, the maximum value is 250 | [optional][default to 20] |
|
149
|
-
| **search** | **String** | General order search, e.g. by mail, reference etc. | [optional] |
|
150
152
|
| **_next** | **String** | next page | [optional] |
|
151
153
|
| **previous** | **String** | previous page | [optional] |
|
154
|
+
| **id** | **String** | id of the object to be retrieved | [optional] |
|
155
|
+
| **charge_id** | **String** | id of the charge used for filtering | [optional] |
|
156
|
+
| **type** | **String** | type of the object to be retrieved | [optional] |
|
157
|
+
| **currency** | **String** | currency of the object to be retrieved | [optional] |
|
152
158
|
|
153
159
|
### Return type
|
154
160
|
|
@@ -4,7 +4,7 @@
|
|
4
4
|
|
5
5
|
| Name | Type | Description | Notes |
|
6
6
|
| ---- | ---- | ----------- | ----- |
|
7
|
-
| **address** | [**
|
7
|
+
| **address** | [**CustomerAddress**](CustomerAddress.md) | | |
|
8
8
|
| **tax_id** | **String** | | [optional] |
|
9
9
|
| **email** | **String** | | [optional] |
|
10
10
|
| **phone** | **String** | | [optional] |
|
data/docs/WebhookLog.md
CHANGED
@@ -23,7 +23,7 @@ instance = Conekta::WebhookLog.new(
|
|
23
23
|
last_attempted_at: 1669651274,
|
24
24
|
last_http_response_status: 200,
|
25
25
|
object: webhook_log,
|
26
|
-
response_data: {amount
|
26
|
+
response_data: {"amount":3000,"payable":true},
|
27
27
|
url: https://username:password@mockoon.stg.conekta.io/payments-api/cash/merchant_approval
|
28
28
|
)
|
29
29
|
```
|
data/docs/WebhookResponse.md
CHANGED
@@ -28,7 +28,7 @@ instance = Conekta::WebhookResponse.new(
|
|
28
28
|
object: event,
|
29
29
|
production_enabled: true,
|
30
30
|
status: listening,
|
31
|
-
subscribed_events: [charge.created
|
31
|
+
subscribed_events: ["charge.created","charge.paid","charge.under_fraud_review","charge.fraudulent","charge.refunded","charge.preauthorized","charge.declined","charge.canceled","charge.reversed","charge.pending_confirmation"],
|
32
32
|
synchronous: false,
|
33
33
|
url: https://username:password@mockoon.stg.conekta.io/payments-api/cash/merchant_approval
|
34
34
|
)
|
@@ -6,7 +6,7 @@
|
|
6
6
|
| ---- | ---- | ----------- | ----- |
|
7
7
|
| **url** | **String** | 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. | |
|
8
8
|
| **synchronous** | **Boolean** | It is a value that allows to decide if the events will be synchronous or asynchronous. We recommend asynchronous = false | [optional][default to false] |
|
9
|
-
| **
|
9
|
+
| **events** | **Array<String>** | | [optional] |
|
10
10
|
|
11
11
|
## Example
|
12
12
|
|
@@ -16,7 +16,7 @@ require 'conekta'
|
|
16
16
|
instance = Conekta::WebhookUpdateRequest.new(
|
17
17
|
url: https://webhook.site/89277eaa-a8e4-4306-8dc5-f55c80703dc8,
|
18
18
|
synchronous: false,
|
19
|
-
|
19
|
+
events: customer.created
|
20
20
|
)
|
21
21
|
```
|
22
22
|
|
@@ -6,7 +6,7 @@
|
|
6
6
|
The version of the OpenAPI document: 2.1.0
|
7
7
|
Contact: engineering@conekta.com
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
|
-
OpenAPI Generator version:
|
9
|
+
OpenAPI Generator version: 7.2.0
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
@@ -43,7 +43,7 @@ module Conekta
|
|
43
43
|
fail ArgumentError, "invalid value for \"accept_language\", must be one of #{allowable_values}"
|
44
44
|
end
|
45
45
|
# resource path
|
46
|
-
local_var_path = '/
|
46
|
+
local_var_path = '/balance'
|
47
47
|
|
48
48
|
# query parameters
|
49
49
|
query_params = opts[:query_params] || {}
|
@@ -6,7 +6,7 @@
|
|
6
6
|
The version of the OpenAPI document: 2.1.0
|
7
7
|
Contact: engineering@conekta.com
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
|
-
OpenAPI Generator version:
|
9
|
+
OpenAPI Generator version: 7.2.0
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
@@ -187,5 +187,87 @@ module Conekta
|
|
187
187
|
end
|
188
188
|
return data, status_code, headers
|
189
189
|
end
|
190
|
+
|
191
|
+
# Update a charge
|
192
|
+
# @param id [String] Identifier of the resource
|
193
|
+
# @param charge_update_request [ChargeUpdateRequest] requested field for update a charge
|
194
|
+
# @param [Hash] opts the optional parameters
|
195
|
+
# @option opts [String] :accept_language Use for knowing which language to use (default to 'es')
|
196
|
+
# @option opts [String] :x_child_company_id In the case of a holding company, the company id of the child company to which will process the request.
|
197
|
+
# @return [ChargeResponse]
|
198
|
+
def update_charge(id, charge_update_request, opts = {})
|
199
|
+
data, _status_code, _headers = update_charge_with_http_info(id, charge_update_request, opts)
|
200
|
+
data
|
201
|
+
end
|
202
|
+
|
203
|
+
# Update a charge
|
204
|
+
# @param id [String] Identifier of the resource
|
205
|
+
# @param charge_update_request [ChargeUpdateRequest] requested field for update a charge
|
206
|
+
# @param [Hash] opts the optional parameters
|
207
|
+
# @option opts [String] :accept_language Use for knowing which language to use (default to 'es')
|
208
|
+
# @option opts [String] :x_child_company_id In the case of a holding company, the company id of the child company to which will process the request.
|
209
|
+
# @return [Array<(ChargeResponse, Integer, Hash)>] ChargeResponse data, response status code and response headers
|
210
|
+
def update_charge_with_http_info(id, charge_update_request, opts = {})
|
211
|
+
if @api_client.config.debugging
|
212
|
+
@api_client.config.logger.debug 'Calling API: ChargesApi.update_charge ...'
|
213
|
+
end
|
214
|
+
# verify the required parameter 'id' is set
|
215
|
+
if @api_client.config.client_side_validation && id.nil?
|
216
|
+
fail ArgumentError, "Missing the required parameter 'id' when calling ChargesApi.update_charge"
|
217
|
+
end
|
218
|
+
# verify the required parameter 'charge_update_request' is set
|
219
|
+
if @api_client.config.client_side_validation && charge_update_request.nil?
|
220
|
+
fail ArgumentError, "Missing the required parameter 'charge_update_request' when calling ChargesApi.update_charge"
|
221
|
+
end
|
222
|
+
allowable_values = ["es", "en"]
|
223
|
+
if @api_client.config.client_side_validation && opts[:'accept_language'] && !allowable_values.include?(opts[:'accept_language'])
|
224
|
+
fail ArgumentError, "invalid value for \"accept_language\", must be one of #{allowable_values}"
|
225
|
+
end
|
226
|
+
# resource path
|
227
|
+
local_var_path = '/charges/{id}'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
|
228
|
+
|
229
|
+
# query parameters
|
230
|
+
query_params = opts[:query_params] || {}
|
231
|
+
|
232
|
+
# header parameters
|
233
|
+
header_params = opts[:header_params] || {}
|
234
|
+
# HTTP header 'Accept' (if needed)
|
235
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/vnd.conekta-v2.1.0+json'])
|
236
|
+
# HTTP header 'Content-Type'
|
237
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
238
|
+
if !content_type.nil?
|
239
|
+
header_params['Content-Type'] = content_type
|
240
|
+
end
|
241
|
+
header_params[:'Accept-Language'] = opts[:'accept_language'] if !opts[:'accept_language'].nil?
|
242
|
+
header_params[:'X-Child-Company-Id'] = opts[:'x_child_company_id'] if !opts[:'x_child_company_id'].nil?
|
243
|
+
|
244
|
+
# form parameters
|
245
|
+
form_params = opts[:form_params] || {}
|
246
|
+
|
247
|
+
# http body (model)
|
248
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(charge_update_request)
|
249
|
+
|
250
|
+
# return_type
|
251
|
+
return_type = opts[:debug_return_type] || 'ChargeResponse'
|
252
|
+
|
253
|
+
# auth_names
|
254
|
+
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
255
|
+
|
256
|
+
new_options = opts.merge(
|
257
|
+
:operation => :"ChargesApi.update_charge",
|
258
|
+
:header_params => header_params,
|
259
|
+
:query_params => query_params,
|
260
|
+
:form_params => form_params,
|
261
|
+
:body => post_body,
|
262
|
+
:auth_names => auth_names,
|
263
|
+
:return_type => return_type
|
264
|
+
)
|
265
|
+
|
266
|
+
data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
|
267
|
+
if @api_client.config.debugging
|
268
|
+
@api_client.config.logger.debug "API called: ChargesApi#update_charge\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
269
|
+
end
|
270
|
+
return data, status_code, headers
|
271
|
+
end
|
190
272
|
end
|
191
273
|
end
|
data/lib/conekta/api/logs_api.rb
CHANGED
@@ -6,7 +6,7 @@
|
|
6
6
|
The version of the OpenAPI document: 2.1.0
|
7
7
|
Contact: engineering@conekta.com
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
|
-
OpenAPI Generator version:
|
9
|
+
OpenAPI Generator version: 7.2.0
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
@@ -98,9 +98,12 @@ module Conekta
|
|
98
98
|
# @option opts [String] :accept_language Use for knowing which language to use (default to 'es')
|
99
99
|
# @option opts [String] :x_child_company_id In the case of a holding company, the company id of the child company to which will process the request.
|
100
100
|
# @option opts [Integer] :limit The numbers of items to return, the maximum value is 250 (default to 20)
|
101
|
-
# @option opts [String] :search General order search, e.g. by mail, reference etc.
|
102
101
|
# @option opts [String] :_next next page
|
103
102
|
# @option opts [String] :previous previous page
|
103
|
+
# @option opts [String] :id id of the object to be retrieved
|
104
|
+
# @option opts [String] :charge_id id of the charge used for filtering
|
105
|
+
# @option opts [String] :type type of the object to be retrieved
|
106
|
+
# @option opts [String] :currency currency of the object to be retrieved
|
104
107
|
# @return [GetTransactionsResponse]
|
105
108
|
def get_transactions(opts = {})
|
106
109
|
data, _status_code, _headers = get_transactions_with_http_info(opts)
|
@@ -113,9 +116,12 @@ module Conekta
|
|
113
116
|
# @option opts [String] :accept_language Use for knowing which language to use (default to 'es')
|
114
117
|
# @option opts [String] :x_child_company_id In the case of a holding company, the company id of the child company to which will process the request.
|
115
118
|
# @option opts [Integer] :limit The numbers of items to return, the maximum value is 250 (default to 20)
|
116
|
-
# @option opts [String] :search General order search, e.g. by mail, reference etc.
|
117
119
|
# @option opts [String] :_next next page
|
118
120
|
# @option opts [String] :previous previous page
|
121
|
+
# @option opts [String] :id id of the object to be retrieved
|
122
|
+
# @option opts [String] :charge_id id of the charge used for filtering
|
123
|
+
# @option opts [String] :type type of the object to be retrieved
|
124
|
+
# @option opts [String] :currency currency of the object to be retrieved
|
119
125
|
# @return [Array<(GetTransactionsResponse, Integer, Hash)>] GetTransactionsResponse data, response status code and response headers
|
120
126
|
def get_transactions_with_http_info(opts = {})
|
121
127
|
if @api_client.config.debugging
|
@@ -139,9 +145,12 @@ module Conekta
|
|
139
145
|
# query parameters
|
140
146
|
query_params = opts[:query_params] || {}
|
141
147
|
query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
|
142
|
-
query_params[:'search'] = opts[:'search'] if !opts[:'search'].nil?
|
143
148
|
query_params[:'next'] = opts[:'_next'] if !opts[:'_next'].nil?
|
144
149
|
query_params[:'previous'] = opts[:'previous'] if !opts[:'previous'].nil?
|
150
|
+
query_params[:'id'] = opts[:'id'] if !opts[:'id'].nil?
|
151
|
+
query_params[:'charge_id'] = opts[:'charge_id'] if !opts[:'charge_id'].nil?
|
152
|
+
query_params[:'type'] = opts[:'type'] if !opts[:'type'].nil?
|
153
|
+
query_params[:'currency'] = opts[:'currency'] if !opts[:'currency'].nil?
|
145
154
|
|
146
155
|
# header parameters
|
147
156
|
header_params = opts[:header_params] || {}
|
data/lib/conekta/api_client.rb
CHANGED
@@ -6,7 +6,7 @@
|
|
6
6
|
The version of the OpenAPI document: 2.1.0
|
7
7
|
Contact: engineering@conekta.com
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
|
-
OpenAPI Generator version:
|
9
|
+
OpenAPI Generator version: 7.2.0
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
@@ -18,6 +18,7 @@ require 'time'
|
|
18
18
|
require 'faraday'
|
19
19
|
require 'faraday/multipart' if Gem::Version.new(Faraday::VERSION) >= Gem::Version.new('2.0')
|
20
20
|
|
21
|
+
|
21
22
|
module Conekta
|
22
23
|
class ApiClient
|
23
24
|
# The Configuration object holding settings to be used in the API client.
|
@@ -49,9 +50,11 @@ module Conekta
|
|
49
50
|
# @return [Array<(Object, Integer, Hash)>] an array of 3 elements:
|
50
51
|
# the data deserialized from response body (could be nil), response status code and response headers.
|
51
52
|
def call_api(http_method, path, opts = {})
|
53
|
+
stream = nil
|
52
54
|
begin
|
53
55
|
response = connection(opts).public_send(http_method.to_sym.downcase) do |req|
|
54
|
-
build_request(http_method, path, req, opts)
|
56
|
+
request = build_request(http_method, path, req, opts)
|
57
|
+
stream = download_file(request) if opts[:return_type] == 'File' || opts[:return_type] == 'Binary'
|
55
58
|
end
|
56
59
|
|
57
60
|
if config.debugging
|
@@ -76,7 +79,9 @@ module Conekta
|
|
76
79
|
fail ApiError.new('Connection failed')
|
77
80
|
end
|
78
81
|
|
79
|
-
if opts[:return_type]
|
82
|
+
if opts[:return_type] == 'File' || opts[:return_type] == 'Binary'
|
83
|
+
data = deserialize_file(response, stream)
|
84
|
+
elsif opts[:return_type]
|
80
85
|
data = deserialize(response, opts[:return_type])
|
81
86
|
else
|
82
87
|
data = nil
|
@@ -118,7 +123,6 @@ module Conekta
|
|
118
123
|
|
119
124
|
request.url url
|
120
125
|
request.params = query_params
|
121
|
-
download_file(request) if opts[:return_type] == 'File' || opts[:return_type] == 'Binary'
|
122
126
|
request
|
123
127
|
end
|
124
128
|
|
@@ -155,11 +159,40 @@ module Conekta
|
|
155
159
|
end
|
156
160
|
|
157
161
|
def download_file(request)
|
158
|
-
|
162
|
+
stream = []
|
159
163
|
|
160
164
|
# handle streaming Responses
|
161
165
|
request.options.on_data = Proc.new do |chunk, overall_received_bytes|
|
162
|
-
|
166
|
+
stream << chunk
|
167
|
+
end
|
168
|
+
stream
|
169
|
+
end
|
170
|
+
|
171
|
+
def deserialize_file(response, stream)
|
172
|
+
body = response.body
|
173
|
+
if @config.return_binary_data == true
|
174
|
+
# return byte stream
|
175
|
+
encoding = body.encoding
|
176
|
+
stream.join.force_encoding(encoding)
|
177
|
+
else
|
178
|
+
# return file instead of binary data
|
179
|
+
content_disposition = response.headers['Content-Disposition']
|
180
|
+
if content_disposition && content_disposition =~ /filename=/i
|
181
|
+
filename = content_disposition[/filename=['"]?([^'"\s]+)['"]?/, 1]
|
182
|
+
prefix = sanitize_filename(filename)
|
183
|
+
else
|
184
|
+
prefix = 'download-'
|
185
|
+
end
|
186
|
+
prefix = prefix + '-' unless prefix.end_with?('-')
|
187
|
+
encoding = body.encoding
|
188
|
+
tempfile = Tempfile.open(prefix, @config.temp_folder_path, encoding: encoding)
|
189
|
+
tempfile.write(stream.join.force_encoding(encoding))
|
190
|
+
tempfile.close
|
191
|
+
config.logger.info "Temp file written to #{tempfile.path}, please copy the file to a proper folder "\
|
192
|
+
"with e.g. `FileUtils.cp(tempfile.path, '/new/file/path')` otherwise the temp file "\
|
193
|
+
"will be deleted automatically with GC. It's also recommended to delete the temp file "\
|
194
|
+
"explicitly with `tempfile.delete`"
|
195
|
+
tempfile
|
163
196
|
end
|
164
197
|
end
|
165
198
|
|
@@ -226,40 +259,10 @@ module Conekta
|
|
226
259
|
# @param [String] return_type some examples: "User", "Array<User>", "Hash<String, Integer>"
|
227
260
|
def deserialize(response, return_type)
|
228
261
|
body = response.body
|
229
|
-
|
230
|
-
# handle file downloading - return the File instance processed in request callbacks
|
231
|
-
# note that response body is empty when the file is written in chunks in request on_body callback
|
232
|
-
if return_type == 'File'
|
233
|
-
if @config.return_binary_data == true
|
234
|
-
# return byte stream
|
235
|
-
encoding = body.encoding
|
236
|
-
return @stream.join.force_encoding(encoding)
|
237
|
-
else
|
238
|
-
# return file instead of binary data
|
239
|
-
content_disposition = response.headers['Content-Disposition']
|
240
|
-
if content_disposition && content_disposition =~ /filename=/i
|
241
|
-
filename = content_disposition[/filename=['"]?([^'"\s]+)['"]?/, 1]
|
242
|
-
prefix = sanitize_filename(filename)
|
243
|
-
else
|
244
|
-
prefix = 'download-'
|
245
|
-
end
|
246
|
-
prefix = prefix + '-' unless prefix.end_with?('-')
|
247
|
-
encoding = body.encoding
|
248
|
-
@tempfile = Tempfile.open(prefix, @config.temp_folder_path, encoding: encoding)
|
249
|
-
@tempfile.write(@stream.join.force_encoding(encoding))
|
250
|
-
@tempfile.close
|
251
|
-
@config.logger.info "Temp file written to #{@tempfile.path}, please copy the file to a proper folder "\
|
252
|
-
"with e.g. `FileUtils.cp(tempfile.path, '/new/file/path')` otherwise the temp file "\
|
253
|
-
"will be deleted automatically with GC. It's also recommended to delete the temp file "\
|
254
|
-
"explicitly with `tempfile.delete`"
|
255
|
-
return @tempfile
|
256
|
-
end
|
257
|
-
end
|
258
|
-
|
259
262
|
return nil if body.nil? || body.empty?
|
260
263
|
|
261
264
|
# return response body directly for String return type
|
262
|
-
return body if return_type == 'String'
|
265
|
+
return body.to_s if return_type == 'String'
|
263
266
|
|
264
267
|
# ensuring a default content type
|
265
268
|
content_type = response.headers['Content-Type'] || 'application/json'
|