conekta 7.0.2 → 9.0.0
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/Makefile +3 -3
- data/README.md +55 -49
- data/VERSION +1 -1
- data/conekta.gemspec +2 -2
- data/config-ruby.json +4 -1
- data/docs/AntifraudApi.md +14 -14
- data/docs/ApiKeyCreateResponse.md +3 -3
- data/docs/ApiKeysApi.md +5 -5
- data/docs/{BalanceCommonField.md → BalanceCommonFielsResponse.md} +2 -2
- data/docs/BalanceResponse.md +9 -9
- data/docs/BalancesApi.md +1 -1
- data/docs/{PaymentMethodCashResponseAllOfAgreements.md → CashAgreementsResponse.md} +2 -2
- data/docs/ChargeOrderResponsePaymentMethod.md +5 -2
- data/docs/ChargeRequestPaymentMethod.md +3 -1
- data/docs/ChargeResponse.md +3 -1
- data/docs/ChargeResponsePaymentMethod.md +5 -2
- data/docs/ChargebackFileResponse.md +24 -0
- data/docs/ChargebackResponse.md +38 -0
- data/docs/ChargesApi.md +4 -4
- data/docs/ChargesDataResponse.md +3 -1
- data/docs/ChargesOrderResponse.md +5 -1
- data/docs/Checkout.md +13 -5
- data/docs/CheckoutOrderTemplate.md +5 -3
- data/docs/CheckoutOrderTemplateCustomerInfo.md +2 -2
- data/docs/CheckoutResponse.md +9 -7
- data/docs/CompaniesApi.md +80 -8
- data/docs/CompanyDocumentRequest.md +1 -1
- data/docs/CompanyResponse.md +6 -2
- data/docs/CreateCustomerFiscalEntitiesResponse.md +1 -1
- data/docs/CreateCustomerPaymentMethodsResponse.md +6 -5
- data/docs/{CreateRiskRulesData.md → CreateRuleWhitelistRequest.md} +2 -2
- data/docs/Customer.md +2 -2
- data/docs/CustomerDetails.md +24 -0
- data/docs/CustomerFiscalEntitiesDataResponse.md +1 -1
- data/docs/{CustomerInfoJustCustomerId.md → CustomerInfoCustomerId.md} +2 -2
- data/docs/CustomerPaymentMethodsData.md +6 -5
- data/docs/CustomerPortalResponse.md +40 -0
- data/docs/CustomerShippingContactsAddress.md +3 -1
- data/docs/CustomerShippingContactsDataResponse.md +1 -1
- data/docs/{CustomerShippingContacts.md → CustomerShippingContactsRequest.md} +3 -3
- data/docs/{CustomerShippingContactsResponseAddress.md → CustomerShippingContactsRequestAddress.md} +3 -5
- data/docs/CustomerShippingContactsResponse.md +1 -1
- data/docs/{CustomerUpdateShippingContacts.md → CustomerUpdateShippingContactsRequest.md} +3 -3
- data/docs/CustomersApi.md +19 -19
- data/docs/CustomersResponse.md +3 -3
- data/docs/DiscountsApi.md +5 -5
- data/docs/EventResponse.md +1 -1
- data/docs/EventsApi.md +9 -9
- data/docs/EventsResendResponse.md +1 -1
- data/docs/{CustomerFiscalEntitiesRequest.md → FiscalEntityRequest.md} +3 -3
- data/docs/{CustomerAddress.md → FiscalEntityRequestAddress.md} +2 -2
- data/docs/GetCustomerPaymentMethodDataResponse.md +6 -5
- data/docs/LogResponseForRequest.md +56 -0
- data/docs/LogsApi.md +10 -10
- data/docs/LogsResponseData.md +7 -7
- data/docs/{LogsResponse.md → LogsResponseForRequest.md} +2 -2
- data/docs/OrderChargesResponse.md +4 -0
- data/docs/OrderCheckoutRequest.md +46 -0
- data/docs/OrderRequest.md +9 -9
- data/docs/OrderRequestCustomerInfo.md +2 -2
- data/docs/OrderResponse.md +5 -1
- data/docs/OrderResponseCheckout.md +15 -11
- data/docs/OrderResponseCustomerInfo.md +2 -2
- data/docs/{OrderDiscountLinesResponse.md → OrderResponseDiscountLines.md} +6 -2
- data/docs/OrderResponseShippingContact.md +7 -7
- data/docs/OrderResponseShippingLines.md +26 -0
- data/docs/{Page.md → OrderResponseTaxLines.md} +9 -3
- data/docs/OrderTaxRequest.md +1 -1
- data/docs/{UpdateOrderTaxResponse.md → OrderTaxResponse.md} +2 -2
- data/docs/{OrderUpdateRequest.md → OrderUpdate.md} +9 -9
- data/docs/{OrderUpdateRequestCustomerInfo.md → OrderUpdateCustomerInfo.md} +6 -6
- data/docs/OrdersApi.md +17 -15
- data/docs/{UpdateOrderTaxRequest.md → OrdersUpdateTaxesRequest.md} +2 -2
- data/docs/PaymentLinkApi.md +7 -7
- data/docs/PaymentMethodBnplPayment.md +1 -1
- data/docs/PaymentMethodCardRequest.md +1 -1
- data/docs/PaymentMethodCardResponse.md +2 -0
- data/docs/PaymentMethodCashRecurrentResponse.md +38 -0
- data/docs/PaymentMethodCashRequest.md +1 -1
- data/docs/PaymentMethodCashResponse.md +1 -1
- data/docs/PaymentMethodPbbPayment.md +30 -0
- data/docs/PaymentMethodPbbRequest.md +22 -0
- data/docs/{PaymentMethodSpeiRecurrent.md → PaymentMethodSpeiRecurrentResponse.md} +2 -2
- data/docs/PaymentMethodSpeiRequest.md +1 -1
- data/docs/PaymentMethodTokenRequest.md +2 -2
- data/docs/PaymentMethodsApi.md +11 -11
- data/docs/{PayoutOrder.md → PayoutOrderRequest.md} +7 -5
- data/docs/{CustomerInfoJustCustomerIdResponse.md → PayoutOrderRequestCustomerInfo.md} +3 -3
- data/docs/PayoutOrderResponse.md +4 -4
- data/docs/PayoutOrderResponseCustomerInfo.md +3 -3
- data/docs/PayoutOrdersApi.md +10 -10
- data/docs/PayoutOrdersResponse.md +3 -3
- data/docs/PlansApi.md +16 -12
- data/docs/Product.md +3 -3
- data/docs/ProductsApi.md +3 -3
- data/docs/{ResendRequest.md → ResendEventRequest.md} +3 -3
- data/docs/RiskRulesData.md +1 -1
- data/docs/ShippingContactsApi.md +15 -15
- data/docs/ShippingLinesDataResponse.md +32 -0
- data/docs/ShippingRequest.md +1 -1
- data/docs/ShippingsApi.md +3 -3
- data/docs/SubscriptionDetails.md +36 -0
- data/docs/SubscriptionDetailsCard.md +40 -0
- data/docs/SubscriptionDetailsPlan.md +36 -0
- data/docs/SubscriptionsApi.md +28 -28
- data/docs/SubscriptionsCustomerPortalApi.md +159 -0
- data/docs/TaxLinesDataResponse.md +28 -0
- data/docs/TaxesApi.md +19 -19
- data/docs/TokenRequest.md +20 -0
- data/docs/{TokenCard.md → TokenRequestCard.md} +2 -2
- data/docs/{TokenCheckout.md → TokenRequestCheckout.md} +2 -2
- data/docs/TokenResponseCheckout.md +1 -1
- data/docs/TokensApi.md +8 -8
- data/docs/TransactionsApi.md +2 -2
- data/docs/TransfersApi.md +2 -2
- data/docs/UpdateCustomer.md +2 -2
- data/docs/UpdateCustomerFiscalEntitiesResponse.md +1 -1
- data/docs/UpdateCustomerPaymentMethodsResponse.md +6 -5
- data/docs/{CustomerUpdateFiscalEntitiesRequest.md → UpdateFiscalEntityRequest.md} +3 -3
- data/docs/UpdatePaymentMethodsCard.md +20 -0
- data/docs/{PlanUpdateRequest.md → UpdatePlan.md} +2 -2
- data/docs/{WebhookUpdateRequest.md → UpdateWebhook.md} +2 -2
- data/docs/{SubscriptionUpdateRequest.md → UpdatesASubscription.md} +2 -2
- data/docs/WebhookKeysApi.md +5 -5
- data/docs/WebhookLog.md +2 -2
- data/docs/WebhookResponse.md +2 -2
- data/docs/WebhooksApi.md +12 -12
- data/examples/one_time_charge_bnpl.rb +3 -0
- data/examples/one_time_charge_pbb.rb +64 -0
- data/lib/conekta/api/antifraud_api.rb +22 -22
- data/lib/conekta/api/api_keys_api.rb +10 -10
- data/lib/conekta/api/balances_api.rb +3 -3
- data/lib/conekta/api/charges_api.rb +9 -9
- data/lib/conekta/api/companies_api.rb +76 -12
- data/lib/conekta/api/customers_api.rb +32 -32
- data/lib/conekta/api/discounts_api.rb +12 -12
- data/lib/conekta/api/events_api.rb +16 -16
- data/lib/conekta/api/logs_api.rb +11 -11
- data/lib/conekta/api/orders_api.rb +28 -25
- data/lib/conekta/api/payment_link_api.rb +12 -12
- data/lib/conekta/api/payment_methods_api.rb +19 -19
- data/lib/conekta/api/payout_orders_api.rb +17 -17
- data/lib/conekta/api/plans_api.rb +25 -19
- data/lib/conekta/api/products_api.rb +8 -8
- data/lib/conekta/api/shipping_contacts_api.rb +26 -26
- data/lib/conekta/api/shippings_api.rb +8 -8
- data/lib/conekta/api/subscriptions_api.rb +52 -52
- data/lib/conekta/api/subscriptions_customer_portal_api.rb +168 -0
- data/lib/conekta/api/taxes_api.rb +26 -26
- data/lib/conekta/api/tokens_api.rb +14 -14
- data/lib/conekta/api/transactions_api.rb +5 -5
- data/lib/conekta/api/transfers_api.rb +5 -5
- data/lib/conekta/api/webhook_keys_api.rb +10 -10
- data/lib/conekta/api/webhooks_api.rb +21 -21
- data/lib/conekta/api_client.rb +31 -27
- data/lib/conekta/api_error.rb +2 -2
- data/lib/conekta/api_model_base.rb +88 -0
- data/lib/conekta/configuration.rb +2 -4
- data/lib/conekta/models/api_key_create_response.rb +26 -102
- data/lib/conekta/models/api_key_request.rb +22 -79
- data/lib/conekta/models/api_key_response.rb +12 -81
- data/lib/conekta/models/api_key_update_request.rb +12 -79
- data/lib/conekta/models/{balance_common_field.rb → balance_common_fiels_response.rb} +13 -80
- data/lib/conekta/models/balance_response.rb +21 -88
- data/lib/conekta/models/blacklist_rule_response.rb +12 -79
- data/lib/conekta/models/{payment_method_cash_response_all_of_agreements.rb → cash_agreements_response.rb} +13 -80
- data/lib/conekta/models/charge_order_response.rb +12 -83
- data/lib/conekta/models/charge_order_response_payment_method.rb +6 -4
- data/lib/conekta/models/charge_request.rb +22 -79
- data/lib/conekta/models/charge_request_payment_method.rb +6 -6
- data/lib/conekta/models/charge_response.rb +103 -84
- data/lib/conekta/models/charge_response_channel.rb +12 -79
- data/lib/conekta/models/charge_response_payment_method.rb +6 -4
- data/lib/conekta/models/charge_response_refunds.rb +32 -89
- data/lib/conekta/models/charge_response_refunds_data.rb +52 -79
- data/lib/conekta/models/charge_update_request.rb +12 -79
- data/lib/conekta/models/{update_payment_methods.rb → chargeback_file_response.rb} +48 -87
- data/lib/conekta/models/chargeback_response.rb +298 -0
- data/lib/conekta/models/charges_data_response.rb +103 -91
- data/lib/conekta/models/charges_order_response.rb +54 -88
- data/lib/conekta/models/checkout.rb +162 -91
- data/lib/conekta/models/checkout_order_template.rb +50 -95
- data/lib/conekta/models/checkout_order_template_customer_info.rb +5 -6
- data/lib/conekta/models/checkout_response.rb +89 -82
- data/lib/conekta/models/checkouts_response.rb +32 -89
- data/lib/conekta/models/company_document_request.rb +42 -79
- data/lib/conekta/models/company_document_response.rb +32 -79
- data/lib/conekta/models/company_response.rb +151 -85
- data/lib/conekta/models/create_company_request.rb +12 -79
- data/lib/conekta/models/create_company_request_bank_account_info.rb +12 -79
- data/lib/conekta/models/create_company_request_comercial_info.rb +12 -79
- data/lib/conekta/models/create_company_request_fiscal_info.rb +12 -79
- data/lib/conekta/models/create_customer_fiscal_entities_response.rb +54 -90
- data/lib/conekta/models/create_customer_payment_methods_request.rb +4 -5
- data/lib/conekta/models/create_customer_payment_methods_response.rb +6 -6
- data/lib/conekta/models/{create_risk_rules_data.rb → create_rule_whitelist_request.rb} +43 -80
- data/lib/conekta/models/customer.rb +44 -82
- data/lib/conekta/models/customer_antifraud_info.rb +12 -79
- data/lib/conekta/models/customer_antifraud_info_response.rb +12 -79
- data/lib/conekta/models/{product_order_response_all_of.rb → customer_details.rb} +30 -87
- data/lib/conekta/models/customer_fiscal_entities_data_response.rb +54 -90
- data/lib/conekta/models/customer_fiscal_entities_response.rb +32 -86
- data/lib/conekta/models/customer_info.rb +42 -79
- data/lib/conekta/models/{customer_info_just_customer_id.rb → customer_info_customer_id.rb} +23 -80
- data/lib/conekta/models/customer_payment_methods_data.rb +6 -6
- data/lib/conekta/models/customer_payment_methods_request.rb +4 -5
- data/lib/conekta/models/customer_payment_methods_response.rb +32 -89
- data/lib/conekta/models/{customer_shipping_contacts_data_response_all_of.rb → customer_portal_response.rb} +108 -105
- data/lib/conekta/models/customer_response.rb +62 -82
- data/lib/conekta/models/customer_response_shipping_contacts.rb +32 -86
- data/lib/conekta/models/customer_shipping_contacts_address.rb +22 -83
- data/lib/conekta/models/customer_shipping_contacts_data_response.rb +53 -89
- data/lib/conekta/models/{customer_shipping_contacts.rb → customer_shipping_contacts_request.rb} +25 -84
- data/lib/conekta/models/{customer_shipping_contacts_response_address.rb → customer_shipping_contacts_request_address.rb} +16 -91
- data/lib/conekta/models/customer_shipping_contacts_response.rb +13 -81
- data/lib/conekta/models/{customer_update_shipping_contacts.rb → customer_update_shipping_contacts_request.rb} +15 -84
- data/lib/conekta/models/customers_response.rb +47 -104
- data/lib/conekta/models/delete_api_keys_response.rb +12 -87
- data/lib/conekta/models/deleted_blacklist_rule_response.rb +12 -79
- data/lib/conekta/models/deleted_whitelist_rule_response.rb +12 -79
- data/lib/conekta/models/details_error.rb +12 -80
- data/lib/conekta/models/discount_lines_data_response.rb +62 -86
- data/lib/conekta/models/discount_lines_response.rb +62 -86
- data/lib/conekta/models/email_checkout_request.rb +22 -79
- data/lib/conekta/models/error.rb +12 -87
- data/lib/conekta/models/event_response.rb +12 -79
- data/lib/conekta/models/event_types.rb +2 -2
- data/lib/conekta/models/events_resend_response.rb +12 -79
- data/lib/conekta/models/fiscal_entity_address.rb +62 -80
- data/lib/conekta/models/{customer_fiscal_entities_request.rb → fiscal_entity_request.rb} +25 -84
- data/lib/conekta/models/{customer_address.rb → fiscal_entity_request_address.rb} +43 -80
- data/lib/conekta/models/get_api_keys_response.rb +32 -89
- data/lib/conekta/models/get_charges_response.rb +32 -89
- data/lib/conekta/models/get_companies_response.rb +32 -89
- data/lib/conekta/models/get_customer_payment_method_data_response.rb +6 -6
- data/lib/conekta/models/get_events_response.rb +32 -89
- data/lib/conekta/models/get_order_discount_lines_response.rb +32 -89
- data/lib/conekta/models/get_orders_response.rb +42 -90
- data/lib/conekta/models/get_payment_method_response.rb +32 -89
- data/lib/conekta/models/get_plans_response.rb +32 -89
- data/lib/conekta/models/get_transactions_response.rb +32 -89
- data/lib/conekta/models/get_transfers_response.rb +32 -89
- data/lib/conekta/models/get_webhook_keys_response.rb +32 -89
- data/lib/conekta/models/get_webhooks_response.rb +32 -89
- data/lib/conekta/models/{log_response.rb → log_response_for_request.rb} +45 -89
- data/lib/conekta/models/logs_response_data.rb +14 -88
- data/lib/conekta/models/{logs_response.rb → logs_response_for_request.rb} +13 -83
- data/lib/conekta/models/order_capture_request.rb +12 -79
- data/lib/conekta/models/order_channel_response.rb +12 -79
- data/lib/conekta/models/order_charges_response.rb +53 -87
- data/lib/conekta/models/{checkout_request.rb → order_checkout_request.rb} +81 -90
- data/lib/conekta/models/order_discount_lines_request.rb +32 -79
- data/lib/conekta/models/order_fiscal_entity_address_response.rb +62 -87
- data/lib/conekta/models/order_fiscal_entity_request.rb +22 -81
- data/lib/conekta/models/order_fiscal_entity_response.rb +52 -83
- data/lib/conekta/models/order_next_action_response.rb +12 -79
- data/lib/conekta/models/order_next_action_response_redirect_to_url.rb +12 -79
- data/lib/conekta/models/order_refund_request.rb +32 -79
- data/lib/conekta/models/order_request.rb +40 -89
- data/lib/conekta/models/order_request_customer_info.rb +5 -6
- data/lib/conekta/models/order_response.rb +32 -82
- data/lib/conekta/models/order_response_checkout.rb +146 -84
- data/lib/conekta/models/order_response_customer_info.rb +22 -98
- data/lib/conekta/models/order_response_discount_lines.rb +54 -87
- data/lib/conekta/models/order_response_products.rb +32 -89
- data/lib/conekta/models/order_response_shipping_contact.rb +41 -116
- data/lib/conekta/models/{order_discount_lines_response.rb → order_response_shipping_lines.rb} +56 -89
- data/lib/conekta/models/{order_response_charges.rb → order_response_tax_lines.rb} +56 -90
- data/lib/conekta/models/order_tax_request.rb +14 -81
- data/lib/conekta/models/{update_order_tax_response.rb → order_tax_response.rb} +25 -89
- data/lib/conekta/models/{order_update_request.rb → order_update.rb} +20 -91
- data/lib/conekta/models/{order_update_request_customer_info.rb → order_update_customer_info.rb} +6 -7
- data/lib/conekta/models/order_update_fiscal_entity_request.rb +22 -81
- data/lib/conekta/models/{update_order_tax_request.rb → orders_update_taxes_request.rb} +17 -90
- data/lib/conekta/models/payment_method_bank_transfer.rb +22 -96
- data/lib/conekta/models/payment_method_bnpl_payment.rb +66 -86
- data/lib/conekta/models/payment_method_bnpl_request.rb +64 -88
- data/lib/conekta/models/payment_method_card.rb +22 -86
- data/lib/conekta/models/payment_method_card_request.rb +48 -92
- data/lib/conekta/models/payment_method_card_response.rb +63 -87
- data/lib/conekta/models/payment_method_cash.rb +22 -89
- data/lib/conekta/models/{payment_method_response.rb → payment_method_cash_recurrent_response.rb} +115 -84
- data/lib/conekta/models/payment_method_cash_request.rb +22 -86
- data/lib/conekta/models/payment_method_cash_response.rb +53 -87
- data/lib/conekta/models/payment_method_general_request.rb +22 -79
- data/lib/conekta/models/payment_method_pbb_payment.rb +317 -0
- data/lib/conekta/models/{payment_method_cash_response_all_of.rb → payment_method_pbb_request.rb} +106 -112
- data/lib/conekta/models/{payment_method_spei_recurrent.rb → payment_method_spei_recurrent_response.rb} +53 -87
- data/lib/conekta/models/payment_method_spei_request.rb +22 -86
- data/lib/conekta/models/payment_method_token_request.rb +33 -87
- data/lib/conekta/models/payout.rb +22 -79
- data/lib/conekta/models/payout_method.rb +22 -79
- data/lib/conekta/models/payout_order_payouts_item.rb +62 -79
- data/lib/conekta/models/{payout_order.rb → payout_order_request.rb} +102 -82
- data/lib/conekta/models/{customer_info_just_customer_id_response.rb → payout_order_request_customer_info.rb} +31 -80
- data/lib/conekta/models/payout_order_response.rb +146 -79
- data/lib/conekta/models/payout_order_response_customer_info.rb +38 -103
- data/lib/conekta/models/payout_orders_response.rb +47 -104
- data/lib/conekta/models/plan_request.rb +22 -79
- data/lib/conekta/models/plan_response.rb +12 -81
- data/lib/conekta/models/product.rb +22 -79
- data/lib/conekta/models/product_data_response.rb +22 -86
- data/lib/conekta/models/product_order_response.rb +22 -86
- data/lib/conekta/models/{resend_request.rb → resend_event_request.rb} +23 -80
- data/lib/conekta/models/risk_rules_data.rb +12 -79
- data/lib/conekta/models/risk_rules_list.rb +32 -89
- data/lib/conekta/models/{discount_lines_response_all_of.rb → shipping_lines_data_response.rb} +105 -99
- data/lib/conekta/models/shipping_order_response.rb +12 -86
- data/lib/conekta/models/shipping_request.rb +12 -79
- data/lib/conekta/models/sms_checkout_request.rb +22 -79
- data/lib/conekta/models/{order_response_shipping_contact_all_of.rb → subscription_details.rb} +87 -90
- data/lib/conekta/models/{payment_method_card_response_all_of.rb → subscription_details_card.rb} +68 -118
- data/lib/conekta/models/{product_data_response_all_of.rb → subscription_details_plan.rb} +83 -87
- data/lib/conekta/models/subscription_events_response.rb +32 -89
- data/lib/conekta/models/subscription_request.rb +22 -79
- data/lib/conekta/models/subscription_response.rb +12 -86
- data/lib/conekta/models/tax_lines_data_response.rb +284 -0
- data/lib/conekta/models/{token.rb → token_request.rb} +15 -84
- data/lib/conekta/models/{token_card.rb → token_request_card.rb} +33 -80
- data/lib/conekta/models/{token_checkout.rb → token_request_checkout.rb} +13 -80
- data/lib/conekta/models/token_response.rb +52 -80
- data/lib/conekta/models/token_response_checkout.rb +12 -79
- data/lib/conekta/models/transaction_response.rb +112 -79
- data/lib/conekta/models/transfer_destination_response.rb +12 -79
- data/lib/conekta/models/transfer_method_response.rb +12 -79
- data/lib/conekta/models/transfer_response.rb +12 -79
- data/lib/conekta/models/transfers_response.rb +12 -79
- data/lib/conekta/models/update_customer.rb +14 -82
- data/lib/conekta/models/update_customer_antifraud_info.rb +12 -79
- data/lib/conekta/models/update_customer_fiscal_entities_response.rb +54 -90
- data/lib/conekta/models/update_customer_payment_methods_response.rb +6 -6
- data/lib/conekta/models/{customer_update_fiscal_entities_request.rb → update_fiscal_entity_request.rb} +15 -84
- data/lib/conekta/models/update_order_discount_lines_request.rb +12 -79
- data/lib/conekta/models/{payment_method_cash_request_all_of.rb → update_payment_methods_card.rb} +44 -81
- data/lib/conekta/models/{plan_update_request.rb → update_plan.rb} +13 -80
- data/lib/conekta/models/update_product.rb +14 -85
- data/lib/conekta/models/{webhook_update_request.rb → update_webhook.rb} +13 -80
- data/lib/conekta/models/{subscription_update_request.rb → updates_a_subscription.rb} +13 -80
- data/lib/conekta/models/webhook_key_create_response.rb +12 -79
- data/lib/conekta/models/webhook_key_delete_response.rb +12 -79
- data/lib/conekta/models/webhook_key_request.rb +12 -79
- data/lib/conekta/models/webhook_key_response.rb +12 -80
- data/lib/conekta/models/webhook_key_update_request.rb +12 -79
- data/lib/conekta/models/webhook_log.rb +12 -79
- data/lib/conekta/models/webhook_request.rb +12 -79
- data/lib/conekta/models/webhook_response.rb +12 -79
- data/lib/conekta/models/whitelistlist_rule_response.rb +12 -79
- data/lib/conekta/version.rb +3 -3
- data/lib/conekta.rb +47 -42
- data/spec/api/antifraud_api_spec.rb +4 -4
- data/spec/api/api_keys_api_spec.rb +2 -2
- data/spec/api/balances_api_spec.rb +2 -2
- data/spec/api/charges_api_spec.rb +2 -2
- data/spec/api/companies_api_spec.rb +14 -2
- data/spec/api/customers_api_spec.rb +4 -4
- data/spec/api/discounts_api_spec.rb +2 -2
- data/spec/api/events_api_spec.rb +3 -3
- data/spec/api/logs_api_spec.rb +4 -4
- data/spec/api/orders_api_spec.rb +4 -3
- data/spec/api/payment_link_api_spec.rb +2 -2
- data/spec/api/payment_methods_api_spec.rb +3 -3
- data/spec/api/payout_orders_api_spec.rb +3 -3
- data/spec/api/plans_api_spec.rb +5 -3
- data/spec/api/products_api_spec.rb +2 -2
- data/spec/api/shipping_contacts_api_spec.rb +4 -4
- data/spec/api/shippings_api_spec.rb +2 -2
- data/spec/api/subscriptions_api_spec.rb +4 -4
- data/spec/api/subscriptions_customer_portal_api_spec.rb +63 -0
- data/spec/api/taxes_api_spec.rb +6 -6
- data/spec/api/tokens_api_spec.rb +4 -4
- data/spec/api/transactions_api_spec.rb +2 -2
- data/spec/api/transfers_api_spec.rb +2 -2
- data/spec/api/webhook_keys_api_spec.rb +2 -2
- data/spec/api/webhooks_api_spec.rb +3 -3
- data/spec/spec_helper.rb +2 -2
- metadata +111 -147
- data/docs/ApiKeyResponseOnDelete.md +0 -34
- data/docs/ChargesOrderResponseAllOfData.md +0 -52
- data/docs/CheckoutRequest.md +0 -40
- data/docs/CompanyResponseDocumentsInner.md +0 -22
- data/docs/CustomerPaymentMethodRequest.md +0 -18
- data/docs/Details.md +0 -18
- data/docs/LogResponse.md +0 -56
- data/docs/OrderCustomerInfoResponse.md +0 -28
- data/docs/OrdersResponse.md +0 -18
- data/docs/Pagination.md +0 -20
- data/docs/PaymentMethod.md +0 -20
- data/docs/PaymentMethodResponse.md +0 -26
- data/docs/Token.md +0 -20
- data/docs/UpdatePaymentMethods.md +0 -18
- data/lib/conekta/models/api_key_create_response_all_of.rb +0 -215
- data/lib/conekta/models/api_key_response_on_delete.rb +0 -297
- data/lib/conekta/models/charge_data_payment_method_bank_transfer_response.rb +0 -362
- data/lib/conekta/models/charge_data_payment_method_card_response.rb +0 -308
- data/lib/conekta/models/charge_data_payment_method_cash_response.rb +0 -281
- data/lib/conekta/models/charge_response_refunds_all_of.rb +0 -217
- data/lib/conekta/models/charges_order_response_all_of_data.rb +0 -439
- data/lib/conekta/models/checkouts_response_all_of.rb +0 -216
- data/lib/conekta/models/company_fiscal_info_address_response.rb +0 -330
- data/lib/conekta/models/company_fiscal_info_response.rb +0 -309
- data/lib/conekta/models/company_payout_destination_response.rb +0 -312
- data/lib/conekta/models/company_response_documents_inner.rb +0 -270
- data/lib/conekta/models/create_customer_fiscal_entities_response_all_of.rb +0 -271
- data/lib/conekta/models/customer_fiscal_entities_request_address.rb +0 -308
- data/lib/conekta/models/customer_fiscal_entities_response_all_of.rb +0 -216
- data/lib/conekta/models/customer_payment_method_request.rb +0 -223
- data/lib/conekta/models/customer_payment_methods.rb +0 -216
- data/lib/conekta/models/customer_response_shipping_contacts_all_of.rb +0 -216
- data/lib/conekta/models/customers_response_all_of.rb +0 -216
- data/lib/conekta/models/delete_api_keys_response_all_of.rb +0 -214
- data/lib/conekta/models/details.rb +0 -216
- data/lib/conekta/models/error_all_of.rb +0 -234
- data/lib/conekta/models/get_api_keys_response_all_of.rb +0 -216
- data/lib/conekta/models/get_charges_response_all_of.rb +0 -216
- data/lib/conekta/models/get_companies_response_all_of.rb +0 -216
- data/lib/conekta/models/get_events_response_all_of.rb +0 -216
- data/lib/conekta/models/get_order_discount_lines_response_all_of.rb +0 -216
- data/lib/conekta/models/get_payment_method_response_all_of.rb +0 -216
- data/lib/conekta/models/get_plans_response_all_of.rb +0 -216
- data/lib/conekta/models/get_transactions_response_all_of.rb +0 -217
- data/lib/conekta/models/get_transfers_response_all_of.rb +0 -217
- data/lib/conekta/models/get_webhook_keys_response_all_of.rb +0 -216
- data/lib/conekta/models/get_webhooks_response_all_of.rb +0 -216
- data/lib/conekta/models/order_customer_info_response.rb +0 -263
- data/lib/conekta/models/order_fiscal_entity_address_response_all_of.rb +0 -214
- data/lib/conekta/models/order_response_charges_all_of.rb +0 -216
- data/lib/conekta/models/order_response_customer_info_all_of.rb +0 -214
- data/lib/conekta/models/order_response_discount_lines_all_of.rb +0 -216
- data/lib/conekta/models/order_response_products_all_of.rb +0 -216
- data/lib/conekta/models/orders_response.rb +0 -223
- data/lib/conekta/models/page.rb +0 -228
- data/lib/conekta/models/pagination.rb +0 -240
- data/lib/conekta/models/payment_method.rb +0 -230
- data/lib/conekta/models/payment_method_card_request_all_of.rb +0 -215
- data/lib/conekta/models/payment_method_spei_recurrent_all_of.rb +0 -224
- data/lib/conekta/models/risk_rules.rb +0 -216
- data/lib/conekta/models/update_customer_fiscal_entities_response_all_of.rb +0 -271
- data/lib/conekta/models/update_order_tax_response_all_of.rb +0 -232
|
@@ -3,10 +3,10 @@
|
|
|
3
3
|
|
|
4
4
|
#Conekta sdk
|
|
5
5
|
|
|
6
|
-
The version of the OpenAPI document: 2.
|
|
6
|
+
The version of the OpenAPI document: 2.3.0
|
|
7
7
|
Contact: engineering@conekta.com
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
|
9
|
-
Generator version: 7.
|
|
9
|
+
Generator version: 7.24.0
|
|
10
10
|
|
|
11
11
|
=end
|
|
12
12
|
|
|
@@ -14,7 +14,7 @@ require 'date'
|
|
|
14
14
|
require 'time'
|
|
15
15
|
|
|
16
16
|
module Conekta
|
|
17
|
-
class
|
|
17
|
+
class TokenRequestCheckout < ApiModelBase
|
|
18
18
|
# It is a value that allows identifying the returns control on.
|
|
19
19
|
attr_accessor :returns_control_on
|
|
20
20
|
|
|
@@ -25,9 +25,14 @@ module Conekta
|
|
|
25
25
|
}
|
|
26
26
|
end
|
|
27
27
|
|
|
28
|
+
# Returns attribute mapping this model knows about
|
|
29
|
+
def self.acceptable_attribute_map
|
|
30
|
+
attribute_map
|
|
31
|
+
end
|
|
32
|
+
|
|
28
33
|
# Returns all the JSON keys this model knows about
|
|
29
34
|
def self.acceptable_attributes
|
|
30
|
-
|
|
35
|
+
acceptable_attribute_map.values
|
|
31
36
|
end
|
|
32
37
|
|
|
33
38
|
# Attribute type mapping.
|
|
@@ -47,13 +52,14 @@ module Conekta
|
|
|
47
52
|
# @param [Hash] attributes Model attributes in the form of hash
|
|
48
53
|
def initialize(attributes = {})
|
|
49
54
|
if (!attributes.is_a?(Hash))
|
|
50
|
-
fail ArgumentError, "The input argument (attributes) must be a hash in `Conekta::
|
|
55
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Conekta::TokenRequestCheckout` initialize method"
|
|
51
56
|
end
|
|
52
57
|
|
|
53
58
|
# check to see if the attribute exists and convert string to symbol for hash key
|
|
59
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
54
60
|
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
55
|
-
if (!
|
|
56
|
-
fail ArgumentError, "`#{k}` is not a valid attribute in `Conekta::
|
|
61
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
62
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Conekta::TokenRequestCheckout`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
57
63
|
end
|
|
58
64
|
h[k.to_sym] = v
|
|
59
65
|
}
|
|
@@ -121,61 +127,6 @@ module Conekta
|
|
|
121
127
|
new(transformed_hash)
|
|
122
128
|
end
|
|
123
129
|
|
|
124
|
-
# Deserializes the data based on type
|
|
125
|
-
# @param string type Data type
|
|
126
|
-
# @param string value Value to be deserialized
|
|
127
|
-
# @return [Object] Deserialized data
|
|
128
|
-
def self._deserialize(type, value)
|
|
129
|
-
case type.to_sym
|
|
130
|
-
when :Time
|
|
131
|
-
Time.parse(value)
|
|
132
|
-
when :Date
|
|
133
|
-
Date.parse(value)
|
|
134
|
-
when :String
|
|
135
|
-
value.to_s
|
|
136
|
-
when :Integer
|
|
137
|
-
value.to_i
|
|
138
|
-
when :Float
|
|
139
|
-
value.to_f
|
|
140
|
-
when :Boolean
|
|
141
|
-
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
|
142
|
-
true
|
|
143
|
-
else
|
|
144
|
-
false
|
|
145
|
-
end
|
|
146
|
-
when :Object
|
|
147
|
-
# generic object (usually a Hash), return directly
|
|
148
|
-
value
|
|
149
|
-
when /\AArray<(?<inner_type>.+)>\z/
|
|
150
|
-
inner_type = Regexp.last_match[:inner_type]
|
|
151
|
-
value.map { |v| _deserialize(inner_type, v) }
|
|
152
|
-
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
|
153
|
-
k_type = Regexp.last_match[:k_type]
|
|
154
|
-
v_type = Regexp.last_match[:v_type]
|
|
155
|
-
{}.tap do |hash|
|
|
156
|
-
value.each do |k, v|
|
|
157
|
-
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
|
158
|
-
end
|
|
159
|
-
end
|
|
160
|
-
else # model
|
|
161
|
-
# models (e.g. Pet) or oneOf
|
|
162
|
-
klass = Conekta.const_get(type)
|
|
163
|
-
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
|
164
|
-
end
|
|
165
|
-
end
|
|
166
|
-
|
|
167
|
-
# Returns the string representation of the object
|
|
168
|
-
# @return [String] String presentation of the object
|
|
169
|
-
def to_s
|
|
170
|
-
to_hash.to_s
|
|
171
|
-
end
|
|
172
|
-
|
|
173
|
-
# to_body is an alias to to_hash (backward compatibility)
|
|
174
|
-
# @return [Hash] Returns the object in the form of hash
|
|
175
|
-
def to_body
|
|
176
|
-
to_hash
|
|
177
|
-
end
|
|
178
|
-
|
|
179
130
|
# Returns the object in the form of hash
|
|
180
131
|
# @return [Hash] Returns the object in the form of hash
|
|
181
132
|
def to_hash
|
|
@@ -192,24 +143,6 @@ module Conekta
|
|
|
192
143
|
hash
|
|
193
144
|
end
|
|
194
145
|
|
|
195
|
-
# Outputs non-array value in the form of hash
|
|
196
|
-
# For object, use to_hash. Otherwise, just return the value
|
|
197
|
-
# @param [Object] value Any valid value
|
|
198
|
-
# @return [Hash] Returns the value in the form of hash
|
|
199
|
-
def _to_hash(value)
|
|
200
|
-
if value.is_a?(Array)
|
|
201
|
-
value.compact.map { |v| _to_hash(v) }
|
|
202
|
-
elsif value.is_a?(Hash)
|
|
203
|
-
{}.tap do |hash|
|
|
204
|
-
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
205
|
-
end
|
|
206
|
-
elsif value.respond_to? :to_hash
|
|
207
|
-
value.to_hash
|
|
208
|
-
else
|
|
209
|
-
value
|
|
210
|
-
end
|
|
211
|
-
end
|
|
212
|
-
|
|
213
146
|
end
|
|
214
147
|
|
|
215
148
|
end
|
|
@@ -3,10 +3,10 @@
|
|
|
3
3
|
|
|
4
4
|
#Conekta sdk
|
|
5
5
|
|
|
6
|
-
The version of the OpenAPI document: 2.
|
|
6
|
+
The version of the OpenAPI document: 2.3.0
|
|
7
7
|
Contact: engineering@conekta.com
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
|
9
|
-
Generator version: 7.
|
|
9
|
+
Generator version: 7.24.0
|
|
10
10
|
|
|
11
11
|
=end
|
|
12
12
|
|
|
@@ -15,7 +15,7 @@ require 'time'
|
|
|
15
15
|
|
|
16
16
|
module Conekta
|
|
17
17
|
# token response
|
|
18
|
-
class TokenResponse
|
|
18
|
+
class TokenResponse < ApiModelBase
|
|
19
19
|
attr_accessor :checkout
|
|
20
20
|
|
|
21
21
|
# Unique identifier for the token generated by Conekta.
|
|
@@ -41,9 +41,14 @@ module Conekta
|
|
|
41
41
|
}
|
|
42
42
|
end
|
|
43
43
|
|
|
44
|
+
# Returns attribute mapping this model knows about
|
|
45
|
+
def self.acceptable_attribute_map
|
|
46
|
+
attribute_map
|
|
47
|
+
end
|
|
48
|
+
|
|
44
49
|
# Returns all the JSON keys this model knows about
|
|
45
50
|
def self.acceptable_attributes
|
|
46
|
-
|
|
51
|
+
acceptable_attribute_map.values
|
|
47
52
|
end
|
|
48
53
|
|
|
49
54
|
# Attribute type mapping.
|
|
@@ -60,7 +65,6 @@ module Conekta
|
|
|
60
65
|
# List of attributes with nullable: true
|
|
61
66
|
def self.openapi_nullable
|
|
62
67
|
Set.new([
|
|
63
|
-
:'checkout',
|
|
64
68
|
])
|
|
65
69
|
end
|
|
66
70
|
|
|
@@ -72,9 +76,10 @@ module Conekta
|
|
|
72
76
|
end
|
|
73
77
|
|
|
74
78
|
# check to see if the attribute exists and convert string to symbol for hash key
|
|
79
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
75
80
|
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
76
|
-
if (!
|
|
77
|
-
fail ArgumentError, "`#{k}` is not a valid attribute in `Conekta::TokenResponse`. Please check the name to make sure it's valid. List of attributes: " +
|
|
81
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
82
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Conekta::TokenResponse`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
78
83
|
end
|
|
79
84
|
h[k.to_sym] = v
|
|
80
85
|
}
|
|
@@ -143,6 +148,46 @@ module Conekta
|
|
|
143
148
|
true
|
|
144
149
|
end
|
|
145
150
|
|
|
151
|
+
# Custom attribute writer method with validation
|
|
152
|
+
# @param [Object] id Value to be assigned
|
|
153
|
+
def id=(id)
|
|
154
|
+
if id.nil?
|
|
155
|
+
fail ArgumentError, 'id cannot be nil'
|
|
156
|
+
end
|
|
157
|
+
|
|
158
|
+
@id = id
|
|
159
|
+
end
|
|
160
|
+
|
|
161
|
+
# Custom attribute writer method with validation
|
|
162
|
+
# @param [Object] livemode Value to be assigned
|
|
163
|
+
def livemode=(livemode)
|
|
164
|
+
if livemode.nil?
|
|
165
|
+
fail ArgumentError, 'livemode cannot be nil'
|
|
166
|
+
end
|
|
167
|
+
|
|
168
|
+
@livemode = livemode
|
|
169
|
+
end
|
|
170
|
+
|
|
171
|
+
# Custom attribute writer method with validation
|
|
172
|
+
# @param [Object] object Value to be assigned
|
|
173
|
+
def object=(object)
|
|
174
|
+
if object.nil?
|
|
175
|
+
fail ArgumentError, 'object cannot be nil'
|
|
176
|
+
end
|
|
177
|
+
|
|
178
|
+
@object = object
|
|
179
|
+
end
|
|
180
|
+
|
|
181
|
+
# Custom attribute writer method with validation
|
|
182
|
+
# @param [Object] used Value to be assigned
|
|
183
|
+
def used=(used)
|
|
184
|
+
if used.nil?
|
|
185
|
+
fail ArgumentError, 'used cannot be nil'
|
|
186
|
+
end
|
|
187
|
+
|
|
188
|
+
@used = used
|
|
189
|
+
end
|
|
190
|
+
|
|
146
191
|
# Checks equality by comparing each attribute.
|
|
147
192
|
# @param [Object] Object to be compared
|
|
148
193
|
def ==(o)
|
|
@@ -190,61 +235,6 @@ module Conekta
|
|
|
190
235
|
new(transformed_hash)
|
|
191
236
|
end
|
|
192
237
|
|
|
193
|
-
# Deserializes the data based on type
|
|
194
|
-
# @param string type Data type
|
|
195
|
-
# @param string value Value to be deserialized
|
|
196
|
-
# @return [Object] Deserialized data
|
|
197
|
-
def self._deserialize(type, value)
|
|
198
|
-
case type.to_sym
|
|
199
|
-
when :Time
|
|
200
|
-
Time.parse(value)
|
|
201
|
-
when :Date
|
|
202
|
-
Date.parse(value)
|
|
203
|
-
when :String
|
|
204
|
-
value.to_s
|
|
205
|
-
when :Integer
|
|
206
|
-
value.to_i
|
|
207
|
-
when :Float
|
|
208
|
-
value.to_f
|
|
209
|
-
when :Boolean
|
|
210
|
-
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
|
211
|
-
true
|
|
212
|
-
else
|
|
213
|
-
false
|
|
214
|
-
end
|
|
215
|
-
when :Object
|
|
216
|
-
# generic object (usually a Hash), return directly
|
|
217
|
-
value
|
|
218
|
-
when /\AArray<(?<inner_type>.+)>\z/
|
|
219
|
-
inner_type = Regexp.last_match[:inner_type]
|
|
220
|
-
value.map { |v| _deserialize(inner_type, v) }
|
|
221
|
-
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
|
222
|
-
k_type = Regexp.last_match[:k_type]
|
|
223
|
-
v_type = Regexp.last_match[:v_type]
|
|
224
|
-
{}.tap do |hash|
|
|
225
|
-
value.each do |k, v|
|
|
226
|
-
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
|
227
|
-
end
|
|
228
|
-
end
|
|
229
|
-
else # model
|
|
230
|
-
# models (e.g. Pet) or oneOf
|
|
231
|
-
klass = Conekta.const_get(type)
|
|
232
|
-
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
|
233
|
-
end
|
|
234
|
-
end
|
|
235
|
-
|
|
236
|
-
# Returns the string representation of the object
|
|
237
|
-
# @return [String] String presentation of the object
|
|
238
|
-
def to_s
|
|
239
|
-
to_hash.to_s
|
|
240
|
-
end
|
|
241
|
-
|
|
242
|
-
# to_body is an alias to to_hash (backward compatibility)
|
|
243
|
-
# @return [Hash] Returns the object in the form of hash
|
|
244
|
-
def to_body
|
|
245
|
-
to_hash
|
|
246
|
-
end
|
|
247
|
-
|
|
248
238
|
# Returns the object in the form of hash
|
|
249
239
|
# @return [Hash] Returns the object in the form of hash
|
|
250
240
|
def to_hash
|
|
@@ -261,24 +251,6 @@ module Conekta
|
|
|
261
251
|
hash
|
|
262
252
|
end
|
|
263
253
|
|
|
264
|
-
# Outputs non-array value in the form of hash
|
|
265
|
-
# For object, use to_hash. Otherwise, just return the value
|
|
266
|
-
# @param [Object] value Any valid value
|
|
267
|
-
# @return [Hash] Returns the value in the form of hash
|
|
268
|
-
def _to_hash(value)
|
|
269
|
-
if value.is_a?(Array)
|
|
270
|
-
value.compact.map { |v| _to_hash(v) }
|
|
271
|
-
elsif value.is_a?(Hash)
|
|
272
|
-
{}.tap do |hash|
|
|
273
|
-
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
274
|
-
end
|
|
275
|
-
elsif value.respond_to? :to_hash
|
|
276
|
-
value.to_hash
|
|
277
|
-
else
|
|
278
|
-
value
|
|
279
|
-
end
|
|
280
|
-
end
|
|
281
|
-
|
|
282
254
|
end
|
|
283
255
|
|
|
284
256
|
end
|
|
@@ -3,10 +3,10 @@
|
|
|
3
3
|
|
|
4
4
|
#Conekta sdk
|
|
5
5
|
|
|
6
|
-
The version of the OpenAPI document: 2.
|
|
6
|
+
The version of the OpenAPI document: 2.3.0
|
|
7
7
|
Contact: engineering@conekta.com
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
|
9
|
-
Generator version: 7.
|
|
9
|
+
Generator version: 7.24.0
|
|
10
10
|
|
|
11
11
|
=end
|
|
12
12
|
|
|
@@ -14,7 +14,7 @@ require 'date'
|
|
|
14
14
|
require 'time'
|
|
15
15
|
|
|
16
16
|
module Conekta
|
|
17
|
-
class TokenResponseCheckout
|
|
17
|
+
class TokenResponseCheckout < ApiModelBase
|
|
18
18
|
attr_accessor :allowed_payment_methods
|
|
19
19
|
|
|
20
20
|
# Indicates if the checkout can not expire.
|
|
@@ -104,9 +104,14 @@ module Conekta
|
|
|
104
104
|
}
|
|
105
105
|
end
|
|
106
106
|
|
|
107
|
+
# Returns attribute mapping this model knows about
|
|
108
|
+
def self.acceptable_attribute_map
|
|
109
|
+
attribute_map
|
|
110
|
+
end
|
|
111
|
+
|
|
107
112
|
# Returns all the JSON keys this model knows about
|
|
108
113
|
def self.acceptable_attributes
|
|
109
|
-
|
|
114
|
+
acceptable_attribute_map.values
|
|
110
115
|
end
|
|
111
116
|
|
|
112
117
|
# Attribute type mapping.
|
|
@@ -152,9 +157,10 @@ module Conekta
|
|
|
152
157
|
end
|
|
153
158
|
|
|
154
159
|
# check to see if the attribute exists and convert string to symbol for hash key
|
|
160
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
155
161
|
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
156
|
-
if (!
|
|
157
|
-
fail ArgumentError, "`#{k}` is not a valid attribute in `Conekta::TokenResponseCheckout`. Please check the name to make sure it's valid. List of attributes: " +
|
|
162
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
163
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Conekta::TokenResponseCheckout`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
158
164
|
end
|
|
159
165
|
h[k.to_sym] = v
|
|
160
166
|
}
|
|
@@ -340,61 +346,6 @@ module Conekta
|
|
|
340
346
|
new(transformed_hash)
|
|
341
347
|
end
|
|
342
348
|
|
|
343
|
-
# Deserializes the data based on type
|
|
344
|
-
# @param string type Data type
|
|
345
|
-
# @param string value Value to be deserialized
|
|
346
|
-
# @return [Object] Deserialized data
|
|
347
|
-
def self._deserialize(type, value)
|
|
348
|
-
case type.to_sym
|
|
349
|
-
when :Time
|
|
350
|
-
Time.parse(value)
|
|
351
|
-
when :Date
|
|
352
|
-
Date.parse(value)
|
|
353
|
-
when :String
|
|
354
|
-
value.to_s
|
|
355
|
-
when :Integer
|
|
356
|
-
value.to_i
|
|
357
|
-
when :Float
|
|
358
|
-
value.to_f
|
|
359
|
-
when :Boolean
|
|
360
|
-
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
|
361
|
-
true
|
|
362
|
-
else
|
|
363
|
-
false
|
|
364
|
-
end
|
|
365
|
-
when :Object
|
|
366
|
-
# generic object (usually a Hash), return directly
|
|
367
|
-
value
|
|
368
|
-
when /\AArray<(?<inner_type>.+)>\z/
|
|
369
|
-
inner_type = Regexp.last_match[:inner_type]
|
|
370
|
-
value.map { |v| _deserialize(inner_type, v) }
|
|
371
|
-
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
|
372
|
-
k_type = Regexp.last_match[:k_type]
|
|
373
|
-
v_type = Regexp.last_match[:v_type]
|
|
374
|
-
{}.tap do |hash|
|
|
375
|
-
value.each do |k, v|
|
|
376
|
-
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
|
377
|
-
end
|
|
378
|
-
end
|
|
379
|
-
else # model
|
|
380
|
-
# models (e.g. Pet) or oneOf
|
|
381
|
-
klass = Conekta.const_get(type)
|
|
382
|
-
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
|
383
|
-
end
|
|
384
|
-
end
|
|
385
|
-
|
|
386
|
-
# Returns the string representation of the object
|
|
387
|
-
# @return [String] String presentation of the object
|
|
388
|
-
def to_s
|
|
389
|
-
to_hash.to_s
|
|
390
|
-
end
|
|
391
|
-
|
|
392
|
-
# to_body is an alias to to_hash (backward compatibility)
|
|
393
|
-
# @return [Hash] Returns the object in the form of hash
|
|
394
|
-
def to_body
|
|
395
|
-
to_hash
|
|
396
|
-
end
|
|
397
|
-
|
|
398
349
|
# Returns the object in the form of hash
|
|
399
350
|
# @return [Hash] Returns the object in the form of hash
|
|
400
351
|
def to_hash
|
|
@@ -411,24 +362,6 @@ module Conekta
|
|
|
411
362
|
hash
|
|
412
363
|
end
|
|
413
364
|
|
|
414
|
-
# Outputs non-array value in the form of hash
|
|
415
|
-
# For object, use to_hash. Otherwise, just return the value
|
|
416
|
-
# @param [Object] value Any valid value
|
|
417
|
-
# @return [Hash] Returns the value in the form of hash
|
|
418
|
-
def _to_hash(value)
|
|
419
|
-
if value.is_a?(Array)
|
|
420
|
-
value.compact.map { |v| _to_hash(v) }
|
|
421
|
-
elsif value.is_a?(Hash)
|
|
422
|
-
{}.tap do |hash|
|
|
423
|
-
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
424
|
-
end
|
|
425
|
-
elsif value.respond_to? :to_hash
|
|
426
|
-
value.to_hash
|
|
427
|
-
else
|
|
428
|
-
value
|
|
429
|
-
end
|
|
430
|
-
end
|
|
431
|
-
|
|
432
365
|
end
|
|
433
366
|
|
|
434
367
|
end
|
|
@@ -3,10 +3,10 @@
|
|
|
3
3
|
|
|
4
4
|
#Conekta sdk
|
|
5
5
|
|
|
6
|
-
The version of the OpenAPI document: 2.
|
|
6
|
+
The version of the OpenAPI document: 2.3.0
|
|
7
7
|
Contact: engineering@conekta.com
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
|
9
|
-
Generator version: 7.
|
|
9
|
+
Generator version: 7.24.0
|
|
10
10
|
|
|
11
11
|
=end
|
|
12
12
|
|
|
@@ -15,7 +15,7 @@ require 'time'
|
|
|
15
15
|
|
|
16
16
|
module Conekta
|
|
17
17
|
# The Transaction object represents the actions or steps of an order. Statuses can be: unprocessed, pending, available, owen, paid_out, voided, capture, capture_reversal, liquidation, liquidation_reversal, payout, payout_reversal, refund, refund_reversal, chargeback, chargeback_reversal, rounding_adjustment, won_chargeback, transferred, and transferred.
|
|
18
|
-
class TransactionResponse
|
|
18
|
+
class TransactionResponse < ApiModelBase
|
|
19
19
|
# The amount of the transaction.
|
|
20
20
|
attr_accessor :amount
|
|
21
21
|
|
|
@@ -66,9 +66,14 @@ module Conekta
|
|
|
66
66
|
}
|
|
67
67
|
end
|
|
68
68
|
|
|
69
|
+
# Returns attribute mapping this model knows about
|
|
70
|
+
def self.acceptable_attribute_map
|
|
71
|
+
attribute_map
|
|
72
|
+
end
|
|
73
|
+
|
|
69
74
|
# Returns all the JSON keys this model knows about
|
|
70
75
|
def self.acceptable_attributes
|
|
71
|
-
|
|
76
|
+
acceptable_attribute_map.values
|
|
72
77
|
end
|
|
73
78
|
|
|
74
79
|
# Attribute type mapping.
|
|
@@ -102,9 +107,10 @@ module Conekta
|
|
|
102
107
|
end
|
|
103
108
|
|
|
104
109
|
# check to see if the attribute exists and convert string to symbol for hash key
|
|
110
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
105
111
|
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
106
|
-
if (!
|
|
107
|
-
fail ArgumentError, "`#{k}` is not a valid attribute in `Conekta::TransactionResponse`. Please check the name to make sure it's valid. List of attributes: " +
|
|
112
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
113
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Conekta::TransactionResponse`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
108
114
|
end
|
|
109
115
|
h[k.to_sym] = v
|
|
110
116
|
}
|
|
@@ -251,6 +257,36 @@ module Conekta
|
|
|
251
257
|
true
|
|
252
258
|
end
|
|
253
259
|
|
|
260
|
+
# Custom attribute writer method with validation
|
|
261
|
+
# @param [Object] amount Value to be assigned
|
|
262
|
+
def amount=(amount)
|
|
263
|
+
if amount.nil?
|
|
264
|
+
fail ArgumentError, 'amount cannot be nil'
|
|
265
|
+
end
|
|
266
|
+
|
|
267
|
+
@amount = amount
|
|
268
|
+
end
|
|
269
|
+
|
|
270
|
+
# Custom attribute writer method with validation
|
|
271
|
+
# @param [Object] charge Value to be assigned
|
|
272
|
+
def charge=(charge)
|
|
273
|
+
if charge.nil?
|
|
274
|
+
fail ArgumentError, 'charge cannot be nil'
|
|
275
|
+
end
|
|
276
|
+
|
|
277
|
+
@charge = charge
|
|
278
|
+
end
|
|
279
|
+
|
|
280
|
+
# Custom attribute writer method with validation
|
|
281
|
+
# @param [Object] created_at Value to be assigned
|
|
282
|
+
def created_at=(created_at)
|
|
283
|
+
if created_at.nil?
|
|
284
|
+
fail ArgumentError, 'created_at cannot be nil'
|
|
285
|
+
end
|
|
286
|
+
|
|
287
|
+
@created_at = created_at
|
|
288
|
+
end
|
|
289
|
+
|
|
254
290
|
# Custom attribute writer method with validation
|
|
255
291
|
# @param [Object] currency Value to be assigned
|
|
256
292
|
def currency=(currency)
|
|
@@ -265,6 +301,76 @@ module Conekta
|
|
|
265
301
|
@currency = currency
|
|
266
302
|
end
|
|
267
303
|
|
|
304
|
+
# Custom attribute writer method with validation
|
|
305
|
+
# @param [Object] fee Value to be assigned
|
|
306
|
+
def fee=(fee)
|
|
307
|
+
if fee.nil?
|
|
308
|
+
fail ArgumentError, 'fee cannot be nil'
|
|
309
|
+
end
|
|
310
|
+
|
|
311
|
+
@fee = fee
|
|
312
|
+
end
|
|
313
|
+
|
|
314
|
+
# Custom attribute writer method with validation
|
|
315
|
+
# @param [Object] id Value to be assigned
|
|
316
|
+
def id=(id)
|
|
317
|
+
if id.nil?
|
|
318
|
+
fail ArgumentError, 'id cannot be nil'
|
|
319
|
+
end
|
|
320
|
+
|
|
321
|
+
@id = id
|
|
322
|
+
end
|
|
323
|
+
|
|
324
|
+
# Custom attribute writer method with validation
|
|
325
|
+
# @param [Object] livemode Value to be assigned
|
|
326
|
+
def livemode=(livemode)
|
|
327
|
+
if livemode.nil?
|
|
328
|
+
fail ArgumentError, 'livemode cannot be nil'
|
|
329
|
+
end
|
|
330
|
+
|
|
331
|
+
@livemode = livemode
|
|
332
|
+
end
|
|
333
|
+
|
|
334
|
+
# Custom attribute writer method with validation
|
|
335
|
+
# @param [Object] net Value to be assigned
|
|
336
|
+
def net=(net)
|
|
337
|
+
if net.nil?
|
|
338
|
+
fail ArgumentError, 'net cannot be nil'
|
|
339
|
+
end
|
|
340
|
+
|
|
341
|
+
@net = net
|
|
342
|
+
end
|
|
343
|
+
|
|
344
|
+
# Custom attribute writer method with validation
|
|
345
|
+
# @param [Object] object Value to be assigned
|
|
346
|
+
def object=(object)
|
|
347
|
+
if object.nil?
|
|
348
|
+
fail ArgumentError, 'object cannot be nil'
|
|
349
|
+
end
|
|
350
|
+
|
|
351
|
+
@object = object
|
|
352
|
+
end
|
|
353
|
+
|
|
354
|
+
# Custom attribute writer method with validation
|
|
355
|
+
# @param [Object] status Value to be assigned
|
|
356
|
+
def status=(status)
|
|
357
|
+
if status.nil?
|
|
358
|
+
fail ArgumentError, 'status cannot be nil'
|
|
359
|
+
end
|
|
360
|
+
|
|
361
|
+
@status = status
|
|
362
|
+
end
|
|
363
|
+
|
|
364
|
+
# Custom attribute writer method with validation
|
|
365
|
+
# @param [Object] type Value to be assigned
|
|
366
|
+
def type=(type)
|
|
367
|
+
if type.nil?
|
|
368
|
+
fail ArgumentError, 'type cannot be nil'
|
|
369
|
+
end
|
|
370
|
+
|
|
371
|
+
@type = type
|
|
372
|
+
end
|
|
373
|
+
|
|
268
374
|
# Checks equality by comparing each attribute.
|
|
269
375
|
# @param [Object] Object to be compared
|
|
270
376
|
def ==(o)
|
|
@@ -318,61 +424,6 @@ module Conekta
|
|
|
318
424
|
new(transformed_hash)
|
|
319
425
|
end
|
|
320
426
|
|
|
321
|
-
# Deserializes the data based on type
|
|
322
|
-
# @param string type Data type
|
|
323
|
-
# @param string value Value to be deserialized
|
|
324
|
-
# @return [Object] Deserialized data
|
|
325
|
-
def self._deserialize(type, value)
|
|
326
|
-
case type.to_sym
|
|
327
|
-
when :Time
|
|
328
|
-
Time.parse(value)
|
|
329
|
-
when :Date
|
|
330
|
-
Date.parse(value)
|
|
331
|
-
when :String
|
|
332
|
-
value.to_s
|
|
333
|
-
when :Integer
|
|
334
|
-
value.to_i
|
|
335
|
-
when :Float
|
|
336
|
-
value.to_f
|
|
337
|
-
when :Boolean
|
|
338
|
-
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
|
339
|
-
true
|
|
340
|
-
else
|
|
341
|
-
false
|
|
342
|
-
end
|
|
343
|
-
when :Object
|
|
344
|
-
# generic object (usually a Hash), return directly
|
|
345
|
-
value
|
|
346
|
-
when /\AArray<(?<inner_type>.+)>\z/
|
|
347
|
-
inner_type = Regexp.last_match[:inner_type]
|
|
348
|
-
value.map { |v| _deserialize(inner_type, v) }
|
|
349
|
-
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
|
350
|
-
k_type = Regexp.last_match[:k_type]
|
|
351
|
-
v_type = Regexp.last_match[:v_type]
|
|
352
|
-
{}.tap do |hash|
|
|
353
|
-
value.each do |k, v|
|
|
354
|
-
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
|
355
|
-
end
|
|
356
|
-
end
|
|
357
|
-
else # model
|
|
358
|
-
# models (e.g. Pet) or oneOf
|
|
359
|
-
klass = Conekta.const_get(type)
|
|
360
|
-
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
|
361
|
-
end
|
|
362
|
-
end
|
|
363
|
-
|
|
364
|
-
# Returns the string representation of the object
|
|
365
|
-
# @return [String] String presentation of the object
|
|
366
|
-
def to_s
|
|
367
|
-
to_hash.to_s
|
|
368
|
-
end
|
|
369
|
-
|
|
370
|
-
# to_body is an alias to to_hash (backward compatibility)
|
|
371
|
-
# @return [Hash] Returns the object in the form of hash
|
|
372
|
-
def to_body
|
|
373
|
-
to_hash
|
|
374
|
-
end
|
|
375
|
-
|
|
376
427
|
# Returns the object in the form of hash
|
|
377
428
|
# @return [Hash] Returns the object in the form of hash
|
|
378
429
|
def to_hash
|
|
@@ -389,24 +440,6 @@ module Conekta
|
|
|
389
440
|
hash
|
|
390
441
|
end
|
|
391
442
|
|
|
392
|
-
# Outputs non-array value in the form of hash
|
|
393
|
-
# For object, use to_hash. Otherwise, just return the value
|
|
394
|
-
# @param [Object] value Any valid value
|
|
395
|
-
# @return [Hash] Returns the value in the form of hash
|
|
396
|
-
def _to_hash(value)
|
|
397
|
-
if value.is_a?(Array)
|
|
398
|
-
value.compact.map { |v| _to_hash(v) }
|
|
399
|
-
elsif value.is_a?(Hash)
|
|
400
|
-
{}.tap do |hash|
|
|
401
|
-
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
402
|
-
end
|
|
403
|
-
elsif value.respond_to? :to_hash
|
|
404
|
-
value.to_hash
|
|
405
|
-
else
|
|
406
|
-
value
|
|
407
|
-
end
|
|
408
|
-
end
|
|
409
|
-
|
|
410
443
|
end
|
|
411
444
|
|
|
412
445
|
end
|