conekta 7.0.3 → 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 +52 -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 +1 -1
- data/docs/ChargeResponse.md +3 -1
- 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 +3 -3
- 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 +3 -3
- 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/{CustomerFiscalEntitiesRequest.md → FiscalEntityRequest.md} +3 -3
- data/docs/{CustomerAddress.md → FiscalEntityRequestAddress.md} +2 -2
- data/docs/GetCustomerPaymentMethodDataResponse.md +3 -3
- 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 +14 -10
- 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/PaymentMethodCardResponse.md +2 -0
- data/docs/PaymentMethodCashRecurrentResponse.md +1 -1
- data/docs/PaymentMethodCashResponse.md +1 -1
- data/docs/{PaymentMethodSpeiRecurrent.md → PaymentMethodSpeiRecurrentResponse.md} +2 -2
- data/docs/PaymentMethodTokenRequest.md +1 -1
- data/docs/PaymentMethodsApi.md +10 -10
- 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 +3 -3
- data/docs/{CustomerUpdateFiscalEntitiesRequest.md → UpdateFiscalEntityRequest.md} +3 -3
- data/docs/{UpdatePaymentMethods.md → UpdatePaymentMethodsCard.md} +2 -2
- 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 +1 -1
- data/docs/WebhookResponse.md +1 -1
- data/docs/WebhooksApi.md +12 -12
- data/examples/one_time_charge_pbb.rb +23 -6
- 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 +3 -3
- data/lib/conekta/models/charge_request.rb +22 -79
- data/lib/conekta/models/charge_request_payment_method.rb +4 -5
- 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 +2 -2
- 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/{risk_rules.rb → chargeback_file_response.rb} +48 -89
- 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 +4 -4
- 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 +4 -4
- 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 +4 -4
- 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_cash_recurrent_response.rb +53 -87
- 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 +67 -91
- data/lib/conekta/models/payment_method_pbb_request.rb +22 -86
- 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/{payment_method_response.rb → tax_lines_data_response.rb} +118 -112
- 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 +4 -4
- 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/{update_payment_methods.rb → update_payment_methods_card.rb} +13 -80
- 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 +44 -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 +104 -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/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_cash_request_all_of.rb +0 -214
- data/lib/conekta/models/payment_method_cash_response_all_of.rb +0 -251
- data/lib/conekta/models/payment_method_spei_recurrent_all_of.rb +0 -224
- 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
|
|
|
@@ -15,7 +15,7 @@ require 'time'
|
|
|
15
15
|
|
|
16
16
|
module Conekta
|
|
17
17
|
# order response
|
|
18
|
-
class OrderResponse
|
|
18
|
+
class OrderResponse < ApiModelBase
|
|
19
19
|
# The total amount to be collected in cents
|
|
20
20
|
attr_accessor :amount
|
|
21
21
|
|
|
@@ -38,6 +38,10 @@ module Conekta
|
|
|
38
38
|
|
|
39
39
|
attr_accessor :discount_lines
|
|
40
40
|
|
|
41
|
+
attr_accessor :tax_lines
|
|
42
|
+
|
|
43
|
+
attr_accessor :shipping_lines
|
|
44
|
+
|
|
41
45
|
attr_accessor :fiscal_entity
|
|
42
46
|
|
|
43
47
|
attr_accessor :id
|
|
@@ -80,6 +84,8 @@ module Conekta
|
|
|
80
84
|
:'currency' => :'currency',
|
|
81
85
|
:'customer_info' => :'customer_info',
|
|
82
86
|
:'discount_lines' => :'discount_lines',
|
|
87
|
+
:'tax_lines' => :'tax_lines',
|
|
88
|
+
:'shipping_lines' => :'shipping_lines',
|
|
83
89
|
:'fiscal_entity' => :'fiscal_entity',
|
|
84
90
|
:'id' => :'id',
|
|
85
91
|
:'is_refundable' => :'is_refundable',
|
|
@@ -95,9 +101,14 @@ module Conekta
|
|
|
95
101
|
}
|
|
96
102
|
end
|
|
97
103
|
|
|
104
|
+
# Returns attribute mapping this model knows about
|
|
105
|
+
def self.acceptable_attribute_map
|
|
106
|
+
attribute_map
|
|
107
|
+
end
|
|
108
|
+
|
|
98
109
|
# Returns all the JSON keys this model knows about
|
|
99
110
|
def self.acceptable_attributes
|
|
100
|
-
|
|
111
|
+
acceptable_attribute_map.values
|
|
101
112
|
end
|
|
102
113
|
|
|
103
114
|
# Attribute type mapping.
|
|
@@ -111,7 +122,9 @@ module Conekta
|
|
|
111
122
|
:'created_at' => :'Integer',
|
|
112
123
|
:'currency' => :'String',
|
|
113
124
|
:'customer_info' => :'OrderResponseCustomerInfo',
|
|
114
|
-
:'discount_lines' => :'
|
|
125
|
+
:'discount_lines' => :'OrderResponseDiscountLines',
|
|
126
|
+
:'tax_lines' => :'OrderResponseTaxLines',
|
|
127
|
+
:'shipping_lines' => :'OrderResponseShippingLines',
|
|
115
128
|
:'fiscal_entity' => :'OrderFiscalEntityResponse',
|
|
116
129
|
:'id' => :'String',
|
|
117
130
|
:'is_refundable' => :'Boolean',
|
|
@@ -130,7 +143,6 @@ module Conekta
|
|
|
130
143
|
# List of attributes with nullable: true
|
|
131
144
|
def self.openapi_nullable
|
|
132
145
|
Set.new([
|
|
133
|
-
:'fiscal_entity',
|
|
134
146
|
])
|
|
135
147
|
end
|
|
136
148
|
|
|
@@ -142,9 +154,10 @@ module Conekta
|
|
|
142
154
|
end
|
|
143
155
|
|
|
144
156
|
# check to see if the attribute exists and convert string to symbol for hash key
|
|
157
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
145
158
|
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
146
|
-
if (!
|
|
147
|
-
fail ArgumentError, "`#{k}` is not a valid attribute in `Conekta::OrderResponse`. Please check the name to make sure it's valid. List of attributes: " +
|
|
159
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
160
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Conekta::OrderResponse`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
148
161
|
end
|
|
149
162
|
h[k.to_sym] = v
|
|
150
163
|
}
|
|
@@ -185,6 +198,14 @@ module Conekta
|
|
|
185
198
|
self.discount_lines = attributes[:'discount_lines']
|
|
186
199
|
end
|
|
187
200
|
|
|
201
|
+
if attributes.key?(:'tax_lines')
|
|
202
|
+
self.tax_lines = attributes[:'tax_lines']
|
|
203
|
+
end
|
|
204
|
+
|
|
205
|
+
if attributes.key?(:'shipping_lines')
|
|
206
|
+
self.shipping_lines = attributes[:'shipping_lines']
|
|
207
|
+
end
|
|
208
|
+
|
|
188
209
|
if attributes.key?(:'fiscal_entity')
|
|
189
210
|
self.fiscal_entity = attributes[:'fiscal_entity']
|
|
190
211
|
end
|
|
@@ -284,6 +305,8 @@ module Conekta
|
|
|
284
305
|
currency == o.currency &&
|
|
285
306
|
customer_info == o.customer_info &&
|
|
286
307
|
discount_lines == o.discount_lines &&
|
|
308
|
+
tax_lines == o.tax_lines &&
|
|
309
|
+
shipping_lines == o.shipping_lines &&
|
|
287
310
|
fiscal_entity == o.fiscal_entity &&
|
|
288
311
|
id == o.id &&
|
|
289
312
|
is_refundable == o.is_refundable &&
|
|
@@ -307,7 +330,7 @@ module Conekta
|
|
|
307
330
|
# Calculates hash code according to all attributes.
|
|
308
331
|
# @return [Integer] Hash code
|
|
309
332
|
def hash
|
|
310
|
-
[amount, amount_refunded, channel, charges, checkout, created_at, currency, customer_info, discount_lines, fiscal_entity, id, is_refundable, line_items, livemode, metadata, next_action, object, payment_status, processing_mode, shipping_contact, updated_at].hash
|
|
333
|
+
[amount, amount_refunded, channel, charges, checkout, created_at, currency, customer_info, discount_lines, tax_lines, shipping_lines, fiscal_entity, id, is_refundable, line_items, livemode, metadata, next_action, object, payment_status, processing_mode, shipping_contact, updated_at].hash
|
|
311
334
|
end
|
|
312
335
|
|
|
313
336
|
# Builds the object from hash
|
|
@@ -333,61 +356,6 @@ module Conekta
|
|
|
333
356
|
new(transformed_hash)
|
|
334
357
|
end
|
|
335
358
|
|
|
336
|
-
# Deserializes the data based on type
|
|
337
|
-
# @param string type Data type
|
|
338
|
-
# @param string value Value to be deserialized
|
|
339
|
-
# @return [Object] Deserialized data
|
|
340
|
-
def self._deserialize(type, value)
|
|
341
|
-
case type.to_sym
|
|
342
|
-
when :Time
|
|
343
|
-
Time.parse(value)
|
|
344
|
-
when :Date
|
|
345
|
-
Date.parse(value)
|
|
346
|
-
when :String
|
|
347
|
-
value.to_s
|
|
348
|
-
when :Integer
|
|
349
|
-
value.to_i
|
|
350
|
-
when :Float
|
|
351
|
-
value.to_f
|
|
352
|
-
when :Boolean
|
|
353
|
-
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
|
354
|
-
true
|
|
355
|
-
else
|
|
356
|
-
false
|
|
357
|
-
end
|
|
358
|
-
when :Object
|
|
359
|
-
# generic object (usually a Hash), return directly
|
|
360
|
-
value
|
|
361
|
-
when /\AArray<(?<inner_type>.+)>\z/
|
|
362
|
-
inner_type = Regexp.last_match[:inner_type]
|
|
363
|
-
value.map { |v| _deserialize(inner_type, v) }
|
|
364
|
-
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
|
365
|
-
k_type = Regexp.last_match[:k_type]
|
|
366
|
-
v_type = Regexp.last_match[:v_type]
|
|
367
|
-
{}.tap do |hash|
|
|
368
|
-
value.each do |k, v|
|
|
369
|
-
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
|
370
|
-
end
|
|
371
|
-
end
|
|
372
|
-
else # model
|
|
373
|
-
# models (e.g. Pet) or oneOf
|
|
374
|
-
klass = Conekta.const_get(type)
|
|
375
|
-
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
|
376
|
-
end
|
|
377
|
-
end
|
|
378
|
-
|
|
379
|
-
# Returns the string representation of the object
|
|
380
|
-
# @return [String] String presentation of the object
|
|
381
|
-
def to_s
|
|
382
|
-
to_hash.to_s
|
|
383
|
-
end
|
|
384
|
-
|
|
385
|
-
# to_body is an alias to to_hash (backward compatibility)
|
|
386
|
-
# @return [Hash] Returns the object in the form of hash
|
|
387
|
-
def to_body
|
|
388
|
-
to_hash
|
|
389
|
-
end
|
|
390
|
-
|
|
391
359
|
# Returns the object in the form of hash
|
|
392
360
|
# @return [Hash] Returns the object in the form of hash
|
|
393
361
|
def to_hash
|
|
@@ -404,24 +372,6 @@ module Conekta
|
|
|
404
372
|
hash
|
|
405
373
|
end
|
|
406
374
|
|
|
407
|
-
# Outputs non-array value in the form of hash
|
|
408
|
-
# For object, use to_hash. Otherwise, just return the value
|
|
409
|
-
# @param [Object] value Any valid value
|
|
410
|
-
# @return [Hash] Returns the value in the form of hash
|
|
411
|
-
def _to_hash(value)
|
|
412
|
-
if value.is_a?(Array)
|
|
413
|
-
value.compact.map { |v| _to_hash(v) }
|
|
414
|
-
elsif value.is_a?(Hash)
|
|
415
|
-
{}.tap do |hash|
|
|
416
|
-
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
417
|
-
end
|
|
418
|
-
elsif value.respond_to? :to_hash
|
|
419
|
-
value.to_hash
|
|
420
|
-
else
|
|
421
|
-
value
|
|
422
|
-
end
|
|
423
|
-
end
|
|
424
|
-
|
|
425
375
|
end
|
|
426
376
|
|
|
427
377
|
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,10 +14,13 @@ require 'date'
|
|
|
14
14
|
require 'time'
|
|
15
15
|
|
|
16
16
|
module Conekta
|
|
17
|
-
class OrderResponseCheckout
|
|
17
|
+
class OrderResponseCheckout < ApiModelBase
|
|
18
18
|
# Are the payment methods available for this link
|
|
19
19
|
attr_accessor :allowed_payment_methods
|
|
20
20
|
|
|
21
|
+
# Payment methods excluded from the checkout. This field is only returned when excluded_payment_methods is provided in the request.
|
|
22
|
+
attr_accessor :excluded_payment_methods
|
|
23
|
+
|
|
21
24
|
attr_accessor :can_not_expire
|
|
22
25
|
|
|
23
26
|
attr_accessor :emails_sent
|
|
@@ -30,6 +33,9 @@ module Conekta
|
|
|
30
33
|
|
|
31
34
|
attr_accessor :force_3ds_flow
|
|
32
35
|
|
|
36
|
+
# Indicates whether the card used for the payment should be saved for future purchases. This field is only applicable for card payments.
|
|
37
|
+
attr_accessor :force_save_card
|
|
38
|
+
|
|
33
39
|
attr_accessor :id
|
|
34
40
|
|
|
35
41
|
attr_accessor :is_redirect_on_failure
|
|
@@ -64,26 +70,53 @@ module Conekta
|
|
|
64
70
|
|
|
65
71
|
attr_accessor :sms_sent
|
|
66
72
|
|
|
73
|
+
# Redirection url back to the site in case of successful payment, applies only to HostedPayment
|
|
67
74
|
attr_accessor :success_url
|
|
68
75
|
|
|
69
76
|
attr_accessor :starts_at
|
|
70
77
|
|
|
71
78
|
attr_accessor :status
|
|
72
79
|
|
|
80
|
+
# This field represents the type of checkout, which determines the user experience during the payment process. 'HostedPayment' will redirect the customer to a Conekta-hosted page to complete the payment, while 'Integration' allows the payment process to be handled entirely on your site using Conekta's APIs and SDKs.
|
|
73
81
|
attr_accessor :type
|
|
74
82
|
|
|
83
|
+
# Indicate the url of the Conekta component to complete the payment. For HostedPayment, this will be a Conekta-hosted page
|
|
75
84
|
attr_accessor :url
|
|
76
85
|
|
|
86
|
+
class EnumAttributeValidator
|
|
87
|
+
attr_reader :datatype
|
|
88
|
+
attr_reader :allowable_values
|
|
89
|
+
|
|
90
|
+
def initialize(datatype, allowable_values)
|
|
91
|
+
@allowable_values = allowable_values.map do |value|
|
|
92
|
+
case datatype.to_s
|
|
93
|
+
when /Integer/i
|
|
94
|
+
value.to_i
|
|
95
|
+
when /Float/i
|
|
96
|
+
value.to_f
|
|
97
|
+
else
|
|
98
|
+
value
|
|
99
|
+
end
|
|
100
|
+
end
|
|
101
|
+
end
|
|
102
|
+
|
|
103
|
+
def valid?(value)
|
|
104
|
+
!value || allowable_values.include?(value)
|
|
105
|
+
end
|
|
106
|
+
end
|
|
107
|
+
|
|
77
108
|
# Attribute mapping from ruby-style variable name to JSON key.
|
|
78
109
|
def self.attribute_map
|
|
79
110
|
{
|
|
80
111
|
:'allowed_payment_methods' => :'allowed_payment_methods',
|
|
112
|
+
:'excluded_payment_methods' => :'excluded_payment_methods',
|
|
81
113
|
:'can_not_expire' => :'can_not_expire',
|
|
82
114
|
:'emails_sent' => :'emails_sent',
|
|
83
115
|
:'exclude_card_networks' => :'exclude_card_networks',
|
|
84
116
|
:'expires_at' => :'expires_at',
|
|
85
117
|
:'failure_url' => :'failure_url',
|
|
86
118
|
:'force_3ds_flow' => :'force_3ds_flow',
|
|
119
|
+
:'force_save_card' => :'force_save_card',
|
|
87
120
|
:'id' => :'id',
|
|
88
121
|
:'is_redirect_on_failure' => :'is_redirect_on_failure',
|
|
89
122
|
:'livemode' => :'livemode',
|
|
@@ -108,21 +141,28 @@ module Conekta
|
|
|
108
141
|
}
|
|
109
142
|
end
|
|
110
143
|
|
|
144
|
+
# Returns attribute mapping this model knows about
|
|
145
|
+
def self.acceptable_attribute_map
|
|
146
|
+
attribute_map
|
|
147
|
+
end
|
|
148
|
+
|
|
111
149
|
# Returns all the JSON keys this model knows about
|
|
112
150
|
def self.acceptable_attributes
|
|
113
|
-
|
|
151
|
+
acceptable_attribute_map.values
|
|
114
152
|
end
|
|
115
153
|
|
|
116
154
|
# Attribute type mapping.
|
|
117
155
|
def self.openapi_types
|
|
118
156
|
{
|
|
119
157
|
:'allowed_payment_methods' => :'Array<String>',
|
|
158
|
+
:'excluded_payment_methods' => :'Array<String>',
|
|
120
159
|
:'can_not_expire' => :'Boolean',
|
|
121
160
|
:'emails_sent' => :'Integer',
|
|
122
|
-
:'exclude_card_networks' => :'Array<
|
|
161
|
+
:'exclude_card_networks' => :'Array<String>',
|
|
123
162
|
:'expires_at' => :'Integer',
|
|
124
163
|
:'failure_url' => :'String',
|
|
125
164
|
:'force_3ds_flow' => :'Boolean',
|
|
165
|
+
:'force_save_card' => :'Boolean',
|
|
126
166
|
:'id' => :'String',
|
|
127
167
|
:'is_redirect_on_failure' => :'Boolean',
|
|
128
168
|
:'livemode' => :'Boolean',
|
|
@@ -150,9 +190,6 @@ module Conekta
|
|
|
150
190
|
# List of attributes with nullable: true
|
|
151
191
|
def self.openapi_nullable
|
|
152
192
|
Set.new([
|
|
153
|
-
:'max_failed_retries',
|
|
154
|
-
:'on_demand_enabled',
|
|
155
|
-
:'redirection_time',
|
|
156
193
|
])
|
|
157
194
|
end
|
|
158
195
|
|
|
@@ -164,9 +201,10 @@ module Conekta
|
|
|
164
201
|
end
|
|
165
202
|
|
|
166
203
|
# check to see if the attribute exists and convert string to symbol for hash key
|
|
204
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
167
205
|
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
168
|
-
if (!
|
|
169
|
-
fail ArgumentError, "`#{k}` is not a valid attribute in `Conekta::OrderResponseCheckout`. Please check the name to make sure it's valid. List of attributes: " +
|
|
206
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
207
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Conekta::OrderResponseCheckout`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
170
208
|
end
|
|
171
209
|
h[k.to_sym] = v
|
|
172
210
|
}
|
|
@@ -177,6 +215,12 @@ module Conekta
|
|
|
177
215
|
end
|
|
178
216
|
end
|
|
179
217
|
|
|
218
|
+
if attributes.key?(:'excluded_payment_methods')
|
|
219
|
+
if (value = attributes[:'excluded_payment_methods']).is_a?(Array)
|
|
220
|
+
self.excluded_payment_methods = value
|
|
221
|
+
end
|
|
222
|
+
end
|
|
223
|
+
|
|
180
224
|
if attributes.key?(:'can_not_expire')
|
|
181
225
|
self.can_not_expire = attributes[:'can_not_expire']
|
|
182
226
|
end
|
|
@@ -203,8 +247,14 @@ module Conekta
|
|
|
203
247
|
self.force_3ds_flow = attributes[:'force_3ds_flow']
|
|
204
248
|
end
|
|
205
249
|
|
|
250
|
+
if attributes.key?(:'force_save_card')
|
|
251
|
+
self.force_save_card = attributes[:'force_save_card']
|
|
252
|
+
end
|
|
253
|
+
|
|
206
254
|
if attributes.key?(:'id')
|
|
207
255
|
self.id = attributes[:'id']
|
|
256
|
+
else
|
|
257
|
+
self.id = nil
|
|
208
258
|
end
|
|
209
259
|
|
|
210
260
|
if attributes.key?(:'is_redirect_on_failure')
|
|
@@ -213,6 +263,8 @@ module Conekta
|
|
|
213
263
|
|
|
214
264
|
if attributes.key?(:'livemode')
|
|
215
265
|
self.livemode = attributes[:'livemode']
|
|
266
|
+
else
|
|
267
|
+
self.livemode = nil
|
|
216
268
|
end
|
|
217
269
|
|
|
218
270
|
if attributes.key?(:'max_failed_retries')
|
|
@@ -237,6 +289,8 @@ module Conekta
|
|
|
237
289
|
|
|
238
290
|
if attributes.key?(:'name')
|
|
239
291
|
self.name = attributes[:'name']
|
|
292
|
+
else
|
|
293
|
+
self.name = nil
|
|
240
294
|
end
|
|
241
295
|
|
|
242
296
|
if attributes.key?(:'needs_shipping_contact')
|
|
@@ -245,6 +299,8 @@ module Conekta
|
|
|
245
299
|
|
|
246
300
|
if attributes.key?(:'object')
|
|
247
301
|
self.object = attributes[:'object']
|
|
302
|
+
else
|
|
303
|
+
self.object = nil
|
|
248
304
|
end
|
|
249
305
|
|
|
250
306
|
if attributes.key?(:'on_demand_enabled')
|
|
@@ -285,6 +341,8 @@ module Conekta
|
|
|
285
341
|
|
|
286
342
|
if attributes.key?(:'type')
|
|
287
343
|
self.type = attributes[:'type']
|
|
344
|
+
else
|
|
345
|
+
self.type = nil
|
|
288
346
|
end
|
|
289
347
|
|
|
290
348
|
if attributes.key?(:'url')
|
|
@@ -297,10 +355,30 @@ module Conekta
|
|
|
297
355
|
def list_invalid_properties
|
|
298
356
|
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
299
357
|
invalid_properties = Array.new
|
|
358
|
+
if @id.nil?
|
|
359
|
+
invalid_properties.push('invalid value for "id", id cannot be nil.')
|
|
360
|
+
end
|
|
361
|
+
|
|
362
|
+
if @livemode.nil?
|
|
363
|
+
invalid_properties.push('invalid value for "livemode", livemode cannot be nil.')
|
|
364
|
+
end
|
|
365
|
+
|
|
300
366
|
if !@metadata.nil? && @metadata.length > 100
|
|
301
367
|
invalid_properties.push('invalid value for "metadata", number of items must be less than or equal to 100.')
|
|
302
368
|
end
|
|
303
369
|
|
|
370
|
+
if @name.nil?
|
|
371
|
+
invalid_properties.push('invalid value for "name", name cannot be nil.')
|
|
372
|
+
end
|
|
373
|
+
|
|
374
|
+
if @object.nil?
|
|
375
|
+
invalid_properties.push('invalid value for "object", object cannot be nil.')
|
|
376
|
+
end
|
|
377
|
+
|
|
378
|
+
if @type.nil?
|
|
379
|
+
invalid_properties.push('invalid value for "type", type cannot be nil.')
|
|
380
|
+
end
|
|
381
|
+
|
|
304
382
|
invalid_properties
|
|
305
383
|
end
|
|
306
384
|
|
|
@@ -308,10 +386,35 @@ module Conekta
|
|
|
308
386
|
# @return true if the model is valid
|
|
309
387
|
def valid?
|
|
310
388
|
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
389
|
+
return false if @id.nil?
|
|
390
|
+
return false if @livemode.nil?
|
|
311
391
|
return false if !@metadata.nil? && @metadata.length > 100
|
|
392
|
+
return false if @name.nil?
|
|
393
|
+
return false if @object.nil?
|
|
394
|
+
return false if @type.nil?
|
|
312
395
|
true
|
|
313
396
|
end
|
|
314
397
|
|
|
398
|
+
# Custom attribute writer method with validation
|
|
399
|
+
# @param [Object] id Value to be assigned
|
|
400
|
+
def id=(id)
|
|
401
|
+
if id.nil?
|
|
402
|
+
fail ArgumentError, 'id cannot be nil'
|
|
403
|
+
end
|
|
404
|
+
|
|
405
|
+
@id = id
|
|
406
|
+
end
|
|
407
|
+
|
|
408
|
+
# Custom attribute writer method with validation
|
|
409
|
+
# @param [Object] livemode Value to be assigned
|
|
410
|
+
def livemode=(livemode)
|
|
411
|
+
if livemode.nil?
|
|
412
|
+
fail ArgumentError, 'livemode cannot be nil'
|
|
413
|
+
end
|
|
414
|
+
|
|
415
|
+
@livemode = livemode
|
|
416
|
+
end
|
|
417
|
+
|
|
315
418
|
# Custom attribute writer method with validation
|
|
316
419
|
# @param [Object] metadata Value to be assigned
|
|
317
420
|
def metadata=(metadata)
|
|
@@ -326,18 +429,50 @@ module Conekta
|
|
|
326
429
|
@metadata = metadata
|
|
327
430
|
end
|
|
328
431
|
|
|
432
|
+
# Custom attribute writer method with validation
|
|
433
|
+
# @param [Object] name Value to be assigned
|
|
434
|
+
def name=(name)
|
|
435
|
+
if name.nil?
|
|
436
|
+
fail ArgumentError, 'name cannot be nil'
|
|
437
|
+
end
|
|
438
|
+
|
|
439
|
+
@name = name
|
|
440
|
+
end
|
|
441
|
+
|
|
442
|
+
# Custom attribute writer method with validation
|
|
443
|
+
# @param [Object] object Value to be assigned
|
|
444
|
+
def object=(object)
|
|
445
|
+
if object.nil?
|
|
446
|
+
fail ArgumentError, 'object cannot be nil'
|
|
447
|
+
end
|
|
448
|
+
|
|
449
|
+
@object = object
|
|
450
|
+
end
|
|
451
|
+
|
|
452
|
+
# Custom attribute writer method with validation
|
|
453
|
+
# @param [Object] type Value to be assigned
|
|
454
|
+
def type=(type)
|
|
455
|
+
if type.nil?
|
|
456
|
+
fail ArgumentError, 'type cannot be nil'
|
|
457
|
+
end
|
|
458
|
+
|
|
459
|
+
@type = type
|
|
460
|
+
end
|
|
461
|
+
|
|
329
462
|
# Checks equality by comparing each attribute.
|
|
330
463
|
# @param [Object] Object to be compared
|
|
331
464
|
def ==(o)
|
|
332
465
|
return true if self.equal?(o)
|
|
333
466
|
self.class == o.class &&
|
|
334
467
|
allowed_payment_methods == o.allowed_payment_methods &&
|
|
468
|
+
excluded_payment_methods == o.excluded_payment_methods &&
|
|
335
469
|
can_not_expire == o.can_not_expire &&
|
|
336
470
|
emails_sent == o.emails_sent &&
|
|
337
471
|
exclude_card_networks == o.exclude_card_networks &&
|
|
338
472
|
expires_at == o.expires_at &&
|
|
339
473
|
failure_url == o.failure_url &&
|
|
340
474
|
force_3ds_flow == o.force_3ds_flow &&
|
|
475
|
+
force_save_card == o.force_save_card &&
|
|
341
476
|
id == o.id &&
|
|
342
477
|
is_redirect_on_failure == o.is_redirect_on_failure &&
|
|
343
478
|
livemode == o.livemode &&
|
|
@@ -370,7 +505,7 @@ module Conekta
|
|
|
370
505
|
# Calculates hash code according to all attributes.
|
|
371
506
|
# @return [Integer] Hash code
|
|
372
507
|
def hash
|
|
373
|
-
[allowed_payment_methods, can_not_expire, emails_sent, exclude_card_networks, expires_at, failure_url, force_3ds_flow, id, is_redirect_on_failure, livemode, max_failed_retries, metadata, monthly_installments_enabled, monthly_installments_options, name, needs_shipping_contact, object, on_demand_enabled, paid_payments_count, recurrent, redirection_time, slug, sms_sent, success_url, starts_at, status, type, url].hash
|
|
508
|
+
[allowed_payment_methods, excluded_payment_methods, can_not_expire, emails_sent, exclude_card_networks, expires_at, failure_url, force_3ds_flow, force_save_card, id, is_redirect_on_failure, livemode, max_failed_retries, metadata, monthly_installments_enabled, monthly_installments_options, name, needs_shipping_contact, object, on_demand_enabled, paid_payments_count, recurrent, redirection_time, slug, sms_sent, success_url, starts_at, status, type, url].hash
|
|
374
509
|
end
|
|
375
510
|
|
|
376
511
|
# Builds the object from hash
|
|
@@ -396,61 +531,6 @@ module Conekta
|
|
|
396
531
|
new(transformed_hash)
|
|
397
532
|
end
|
|
398
533
|
|
|
399
|
-
# Deserializes the data based on type
|
|
400
|
-
# @param string type Data type
|
|
401
|
-
# @param string value Value to be deserialized
|
|
402
|
-
# @return [Object] Deserialized data
|
|
403
|
-
def self._deserialize(type, value)
|
|
404
|
-
case type.to_sym
|
|
405
|
-
when :Time
|
|
406
|
-
Time.parse(value)
|
|
407
|
-
when :Date
|
|
408
|
-
Date.parse(value)
|
|
409
|
-
when :String
|
|
410
|
-
value.to_s
|
|
411
|
-
when :Integer
|
|
412
|
-
value.to_i
|
|
413
|
-
when :Float
|
|
414
|
-
value.to_f
|
|
415
|
-
when :Boolean
|
|
416
|
-
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
|
417
|
-
true
|
|
418
|
-
else
|
|
419
|
-
false
|
|
420
|
-
end
|
|
421
|
-
when :Object
|
|
422
|
-
# generic object (usually a Hash), return directly
|
|
423
|
-
value
|
|
424
|
-
when /\AArray<(?<inner_type>.+)>\z/
|
|
425
|
-
inner_type = Regexp.last_match[:inner_type]
|
|
426
|
-
value.map { |v| _deserialize(inner_type, v) }
|
|
427
|
-
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
|
428
|
-
k_type = Regexp.last_match[:k_type]
|
|
429
|
-
v_type = Regexp.last_match[:v_type]
|
|
430
|
-
{}.tap do |hash|
|
|
431
|
-
value.each do |k, v|
|
|
432
|
-
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
|
433
|
-
end
|
|
434
|
-
end
|
|
435
|
-
else # model
|
|
436
|
-
# models (e.g. Pet) or oneOf
|
|
437
|
-
klass = Conekta.const_get(type)
|
|
438
|
-
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
|
439
|
-
end
|
|
440
|
-
end
|
|
441
|
-
|
|
442
|
-
# Returns the string representation of the object
|
|
443
|
-
# @return [String] String presentation of the object
|
|
444
|
-
def to_s
|
|
445
|
-
to_hash.to_s
|
|
446
|
-
end
|
|
447
|
-
|
|
448
|
-
# to_body is an alias to to_hash (backward compatibility)
|
|
449
|
-
# @return [Hash] Returns the object in the form of hash
|
|
450
|
-
def to_body
|
|
451
|
-
to_hash
|
|
452
|
-
end
|
|
453
|
-
|
|
454
534
|
# Returns the object in the form of hash
|
|
455
535
|
# @return [Hash] Returns the object in the form of hash
|
|
456
536
|
def to_hash
|
|
@@ -467,24 +547,6 @@ module Conekta
|
|
|
467
547
|
hash
|
|
468
548
|
end
|
|
469
549
|
|
|
470
|
-
# Outputs non-array value in the form of hash
|
|
471
|
-
# For object, use to_hash. Otherwise, just return the value
|
|
472
|
-
# @param [Object] value Any valid value
|
|
473
|
-
# @return [Hash] Returns the value in the form of hash
|
|
474
|
-
def _to_hash(value)
|
|
475
|
-
if value.is_a?(Array)
|
|
476
|
-
value.compact.map { |v| _to_hash(v) }
|
|
477
|
-
elsif value.is_a?(Hash)
|
|
478
|
-
{}.tap do |hash|
|
|
479
|
-
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
480
|
-
end
|
|
481
|
-
elsif value.respond_to? :to_hash
|
|
482
|
-
value.to_hash
|
|
483
|
-
else
|
|
484
|
-
value
|
|
485
|
-
end
|
|
486
|
-
end
|
|
487
|
-
|
|
488
550
|
end
|
|
489
551
|
|
|
490
552
|
end
|