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,13 +15,19 @@ require 'time'
|
|
|
15
15
|
|
|
16
16
|
module Conekta
|
|
17
17
|
# The charges associated with the order
|
|
18
|
-
class ChargesOrderResponse
|
|
18
|
+
class ChargesOrderResponse < ApiModelBase
|
|
19
19
|
# Indicates if there are more pages to be requested
|
|
20
20
|
attr_accessor :has_more
|
|
21
21
|
|
|
22
22
|
# Object type, in this case is list
|
|
23
23
|
attr_accessor :object
|
|
24
24
|
|
|
25
|
+
# URL of the next page.
|
|
26
|
+
attr_accessor :next_page_url
|
|
27
|
+
|
|
28
|
+
# Url of the previous page.
|
|
29
|
+
attr_accessor :previous_page_url
|
|
30
|
+
|
|
25
31
|
attr_accessor :data
|
|
26
32
|
|
|
27
33
|
# Attribute mapping from ruby-style variable name to JSON key.
|
|
@@ -29,13 +35,20 @@ module Conekta
|
|
|
29
35
|
{
|
|
30
36
|
:'has_more' => :'has_more',
|
|
31
37
|
:'object' => :'object',
|
|
38
|
+
:'next_page_url' => :'next_page_url',
|
|
39
|
+
:'previous_page_url' => :'previous_page_url',
|
|
32
40
|
:'data' => :'data'
|
|
33
41
|
}
|
|
34
42
|
end
|
|
35
43
|
|
|
44
|
+
# Returns attribute mapping this model knows about
|
|
45
|
+
def self.acceptable_attribute_map
|
|
46
|
+
attribute_map
|
|
47
|
+
end
|
|
48
|
+
|
|
36
49
|
# Returns all the JSON keys this model knows about
|
|
37
50
|
def self.acceptable_attributes
|
|
38
|
-
|
|
51
|
+
acceptable_attribute_map.values
|
|
39
52
|
end
|
|
40
53
|
|
|
41
54
|
# Attribute type mapping.
|
|
@@ -43,7 +56,9 @@ module Conekta
|
|
|
43
56
|
{
|
|
44
57
|
:'has_more' => :'Boolean',
|
|
45
58
|
:'object' => :'String',
|
|
46
|
-
:'
|
|
59
|
+
:'next_page_url' => :'String',
|
|
60
|
+
:'previous_page_url' => :'String',
|
|
61
|
+
:'data' => :'Array<ChargeResponse>'
|
|
47
62
|
}
|
|
48
63
|
end
|
|
49
64
|
|
|
@@ -53,13 +68,6 @@ module Conekta
|
|
|
53
68
|
])
|
|
54
69
|
end
|
|
55
70
|
|
|
56
|
-
# List of class defined in allOf (OpenAPI v3)
|
|
57
|
-
def self.openapi_all_of
|
|
58
|
-
[
|
|
59
|
-
:'Pagination'
|
|
60
|
-
]
|
|
61
|
-
end
|
|
62
|
-
|
|
63
71
|
# Initializes the object
|
|
64
72
|
# @param [Hash] attributes Model attributes in the form of hash
|
|
65
73
|
def initialize(attributes = {})
|
|
@@ -68,9 +76,10 @@ module Conekta
|
|
|
68
76
|
end
|
|
69
77
|
|
|
70
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
|
|
71
80
|
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
72
|
-
if (!
|
|
73
|
-
fail ArgumentError, "`#{k}` is not a valid attribute in `Conekta::ChargesOrderResponse`. 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::ChargesOrderResponse`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
74
83
|
end
|
|
75
84
|
h[k.to_sym] = v
|
|
76
85
|
}
|
|
@@ -87,6 +96,14 @@ module Conekta
|
|
|
87
96
|
self.object = nil
|
|
88
97
|
end
|
|
89
98
|
|
|
99
|
+
if attributes.key?(:'next_page_url')
|
|
100
|
+
self.next_page_url = attributes[:'next_page_url']
|
|
101
|
+
end
|
|
102
|
+
|
|
103
|
+
if attributes.key?(:'previous_page_url')
|
|
104
|
+
self.previous_page_url = attributes[:'previous_page_url']
|
|
105
|
+
end
|
|
106
|
+
|
|
90
107
|
if attributes.key?(:'data')
|
|
91
108
|
if (value = attributes[:'data']).is_a?(Array)
|
|
92
109
|
self.data = value
|
|
@@ -119,6 +136,26 @@ module Conekta
|
|
|
119
136
|
true
|
|
120
137
|
end
|
|
121
138
|
|
|
139
|
+
# Custom attribute writer method with validation
|
|
140
|
+
# @param [Object] has_more Value to be assigned
|
|
141
|
+
def has_more=(has_more)
|
|
142
|
+
if has_more.nil?
|
|
143
|
+
fail ArgumentError, 'has_more cannot be nil'
|
|
144
|
+
end
|
|
145
|
+
|
|
146
|
+
@has_more = has_more
|
|
147
|
+
end
|
|
148
|
+
|
|
149
|
+
# Custom attribute writer method with validation
|
|
150
|
+
# @param [Object] object Value to be assigned
|
|
151
|
+
def object=(object)
|
|
152
|
+
if object.nil?
|
|
153
|
+
fail ArgumentError, 'object cannot be nil'
|
|
154
|
+
end
|
|
155
|
+
|
|
156
|
+
@object = object
|
|
157
|
+
end
|
|
158
|
+
|
|
122
159
|
# Checks equality by comparing each attribute.
|
|
123
160
|
# @param [Object] Object to be compared
|
|
124
161
|
def ==(o)
|
|
@@ -126,6 +163,8 @@ module Conekta
|
|
|
126
163
|
self.class == o.class &&
|
|
127
164
|
has_more == o.has_more &&
|
|
128
165
|
object == o.object &&
|
|
166
|
+
next_page_url == o.next_page_url &&
|
|
167
|
+
previous_page_url == o.previous_page_url &&
|
|
129
168
|
data == o.data
|
|
130
169
|
end
|
|
131
170
|
|
|
@@ -138,7 +177,7 @@ module Conekta
|
|
|
138
177
|
# Calculates hash code according to all attributes.
|
|
139
178
|
# @return [Integer] Hash code
|
|
140
179
|
def hash
|
|
141
|
-
[has_more, object, data].hash
|
|
180
|
+
[has_more, object, next_page_url, previous_page_url, data].hash
|
|
142
181
|
end
|
|
143
182
|
|
|
144
183
|
# Builds the object from hash
|
|
@@ -164,61 +203,6 @@ module Conekta
|
|
|
164
203
|
new(transformed_hash)
|
|
165
204
|
end
|
|
166
205
|
|
|
167
|
-
# Deserializes the data based on type
|
|
168
|
-
# @param string type Data type
|
|
169
|
-
# @param string value Value to be deserialized
|
|
170
|
-
# @return [Object] Deserialized data
|
|
171
|
-
def self._deserialize(type, value)
|
|
172
|
-
case type.to_sym
|
|
173
|
-
when :Time
|
|
174
|
-
Time.parse(value)
|
|
175
|
-
when :Date
|
|
176
|
-
Date.parse(value)
|
|
177
|
-
when :String
|
|
178
|
-
value.to_s
|
|
179
|
-
when :Integer
|
|
180
|
-
value.to_i
|
|
181
|
-
when :Float
|
|
182
|
-
value.to_f
|
|
183
|
-
when :Boolean
|
|
184
|
-
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
|
185
|
-
true
|
|
186
|
-
else
|
|
187
|
-
false
|
|
188
|
-
end
|
|
189
|
-
when :Object
|
|
190
|
-
# generic object (usually a Hash), return directly
|
|
191
|
-
value
|
|
192
|
-
when /\AArray<(?<inner_type>.+)>\z/
|
|
193
|
-
inner_type = Regexp.last_match[:inner_type]
|
|
194
|
-
value.map { |v| _deserialize(inner_type, v) }
|
|
195
|
-
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
|
196
|
-
k_type = Regexp.last_match[:k_type]
|
|
197
|
-
v_type = Regexp.last_match[:v_type]
|
|
198
|
-
{}.tap do |hash|
|
|
199
|
-
value.each do |k, v|
|
|
200
|
-
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
|
201
|
-
end
|
|
202
|
-
end
|
|
203
|
-
else # model
|
|
204
|
-
# models (e.g. Pet) or oneOf
|
|
205
|
-
klass = Conekta.const_get(type)
|
|
206
|
-
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
|
207
|
-
end
|
|
208
|
-
end
|
|
209
|
-
|
|
210
|
-
# Returns the string representation of the object
|
|
211
|
-
# @return [String] String presentation of the object
|
|
212
|
-
def to_s
|
|
213
|
-
to_hash.to_s
|
|
214
|
-
end
|
|
215
|
-
|
|
216
|
-
# to_body is an alias to to_hash (backward compatibility)
|
|
217
|
-
# @return [Hash] Returns the object in the form of hash
|
|
218
|
-
def to_body
|
|
219
|
-
to_hash
|
|
220
|
-
end
|
|
221
|
-
|
|
222
206
|
# Returns the object in the form of hash
|
|
223
207
|
# @return [Hash] Returns the object in the form of hash
|
|
224
208
|
def to_hash
|
|
@@ -235,24 +219,6 @@ module Conekta
|
|
|
235
219
|
hash
|
|
236
220
|
end
|
|
237
221
|
|
|
238
|
-
# Outputs non-array value in the form of hash
|
|
239
|
-
# For object, use to_hash. Otherwise, just return the value
|
|
240
|
-
# @param [Object] value Any valid value
|
|
241
|
-
# @return [Hash] Returns the value in the form of hash
|
|
242
|
-
def _to_hash(value)
|
|
243
|
-
if value.is_a?(Array)
|
|
244
|
-
value.compact.map { |v| _to_hash(v) }
|
|
245
|
-
elsif value.is_a?(Hash)
|
|
246
|
-
{}.tap do |hash|
|
|
247
|
-
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
248
|
-
end
|
|
249
|
-
elsif value.respond_to? :to_hash
|
|
250
|
-
value.to_hash
|
|
251
|
-
else
|
|
252
|
-
value
|
|
253
|
-
end
|
|
254
|
-
end
|
|
255
|
-
|
|
256
222
|
end
|
|
257
223
|
|
|
258
224
|
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,11 +15,17 @@ require 'time'
|
|
|
15
15
|
|
|
16
16
|
module Conekta
|
|
17
17
|
# It is a sub-resource of the Order model that can be stipulated in order to configure its corresponding checkout
|
|
18
|
-
class Checkout
|
|
19
|
-
# Those are the payment methods that will be available for the link
|
|
18
|
+
class Checkout < ApiModelBase
|
|
19
|
+
# Those are the payment methods that will be available for the link. This field is mutually exclusive with excluded_payment_methods.
|
|
20
20
|
attr_accessor :allowed_payment_methods
|
|
21
21
|
|
|
22
|
-
#
|
|
22
|
+
# Payment methods to be excluded from the checkout. This field is mutually exclusive with allowed_payment_methods.
|
|
23
|
+
attr_accessor :excluded_payment_methods
|
|
24
|
+
|
|
25
|
+
# List of card networks to exclude from the checkout. This field is only applicable for card payments.
|
|
26
|
+
attr_accessor :exclude_card_networks
|
|
27
|
+
|
|
28
|
+
# It is the time when the link will expire. It is expressed in seconds since the Unix epoch. The valid range is from 5 minutes to 365 days from the creation date.
|
|
23
29
|
attr_accessor :expires_at
|
|
24
30
|
|
|
25
31
|
# This flag allows you to specify if months without interest will be active.
|
|
@@ -28,7 +34,7 @@ module Conekta
|
|
|
28
34
|
# This field allows you to specify the number of months without interest.
|
|
29
35
|
attr_accessor :monthly_installments_options
|
|
30
36
|
|
|
31
|
-
# Indicates the 3DS2 mode for the order, either smart or strict.
|
|
37
|
+
# Indicates the 3DS2 mode for the order, either smart or strict. This property is only applicable when 3DS is enabled. When 3DS is disabled, this field should be null.
|
|
32
38
|
attr_accessor :three_ds_mode
|
|
33
39
|
|
|
34
40
|
# Reason for charge
|
|
@@ -40,21 +46,51 @@ module Conekta
|
|
|
40
46
|
# This flag allows you to specify if the link will be on demand.
|
|
41
47
|
attr_accessor :on_demand_enabled
|
|
42
48
|
|
|
49
|
+
# It is a list of plan IDs that will be associated with the order.
|
|
50
|
+
attr_accessor :plan_ids
|
|
51
|
+
|
|
43
52
|
attr_accessor :order_template
|
|
44
53
|
|
|
45
54
|
# It is the number of payments that can be made through the link.
|
|
46
55
|
attr_accessor :payments_limit_count
|
|
47
56
|
|
|
57
|
+
# The URL to redirect to after a successful payment.
|
|
58
|
+
attr_accessor :success_url
|
|
59
|
+
|
|
48
60
|
# false: single use. true: multiple payments
|
|
49
61
|
attr_accessor :recurrent
|
|
50
62
|
|
|
51
63
|
# It is the type of link that will be created. It must be a valid type.
|
|
52
64
|
attr_accessor :type
|
|
53
65
|
|
|
66
|
+
class EnumAttributeValidator
|
|
67
|
+
attr_reader :datatype
|
|
68
|
+
attr_reader :allowable_values
|
|
69
|
+
|
|
70
|
+
def initialize(datatype, allowable_values)
|
|
71
|
+
@allowable_values = allowable_values.map do |value|
|
|
72
|
+
case datatype.to_s
|
|
73
|
+
when /Integer/i
|
|
74
|
+
value.to_i
|
|
75
|
+
when /Float/i
|
|
76
|
+
value.to_f
|
|
77
|
+
else
|
|
78
|
+
value
|
|
79
|
+
end
|
|
80
|
+
end
|
|
81
|
+
end
|
|
82
|
+
|
|
83
|
+
def valid?(value)
|
|
84
|
+
!value || allowable_values.include?(value)
|
|
85
|
+
end
|
|
86
|
+
end
|
|
87
|
+
|
|
54
88
|
# Attribute mapping from ruby-style variable name to JSON key.
|
|
55
89
|
def self.attribute_map
|
|
56
90
|
{
|
|
57
91
|
:'allowed_payment_methods' => :'allowed_payment_methods',
|
|
92
|
+
:'excluded_payment_methods' => :'excluded_payment_methods',
|
|
93
|
+
:'exclude_card_networks' => :'exclude_card_networks',
|
|
58
94
|
:'expires_at' => :'expires_at',
|
|
59
95
|
:'monthly_installments_enabled' => :'monthly_installments_enabled',
|
|
60
96
|
:'monthly_installments_options' => :'monthly_installments_options',
|
|
@@ -62,22 +98,31 @@ module Conekta
|
|
|
62
98
|
:'name' => :'name',
|
|
63
99
|
:'needs_shipping_contact' => :'needs_shipping_contact',
|
|
64
100
|
:'on_demand_enabled' => :'on_demand_enabled',
|
|
101
|
+
:'plan_ids' => :'plan_ids',
|
|
65
102
|
:'order_template' => :'order_template',
|
|
66
103
|
:'payments_limit_count' => :'payments_limit_count',
|
|
104
|
+
:'success_url' => :'success_url',
|
|
67
105
|
:'recurrent' => :'recurrent',
|
|
68
106
|
:'type' => :'type'
|
|
69
107
|
}
|
|
70
108
|
end
|
|
71
109
|
|
|
110
|
+
# Returns attribute mapping this model knows about
|
|
111
|
+
def self.acceptable_attribute_map
|
|
112
|
+
attribute_map
|
|
113
|
+
end
|
|
114
|
+
|
|
72
115
|
# Returns all the JSON keys this model knows about
|
|
73
116
|
def self.acceptable_attributes
|
|
74
|
-
|
|
117
|
+
acceptable_attribute_map.values
|
|
75
118
|
end
|
|
76
119
|
|
|
77
120
|
# Attribute type mapping.
|
|
78
121
|
def self.openapi_types
|
|
79
122
|
{
|
|
80
123
|
:'allowed_payment_methods' => :'Array<String>',
|
|
124
|
+
:'excluded_payment_methods' => :'Array<String>',
|
|
125
|
+
:'exclude_card_networks' => :'Array<String>',
|
|
81
126
|
:'expires_at' => :'Integer',
|
|
82
127
|
:'monthly_installments_enabled' => :'Boolean',
|
|
83
128
|
:'monthly_installments_options' => :'Array<Integer>',
|
|
@@ -85,8 +130,10 @@ module Conekta
|
|
|
85
130
|
:'name' => :'String',
|
|
86
131
|
:'needs_shipping_contact' => :'Boolean',
|
|
87
132
|
:'on_demand_enabled' => :'Boolean',
|
|
133
|
+
:'plan_ids' => :'Array<String>',
|
|
88
134
|
:'order_template' => :'CheckoutOrderTemplate',
|
|
89
135
|
:'payments_limit_count' => :'Integer',
|
|
136
|
+
:'success_url' => :'String',
|
|
90
137
|
:'recurrent' => :'Boolean',
|
|
91
138
|
:'type' => :'String'
|
|
92
139
|
}
|
|
@@ -95,7 +142,6 @@ module Conekta
|
|
|
95
142
|
# List of attributes with nullable: true
|
|
96
143
|
def self.openapi_nullable
|
|
97
144
|
Set.new([
|
|
98
|
-
:'on_demand_enabled',
|
|
99
145
|
])
|
|
100
146
|
end
|
|
101
147
|
|
|
@@ -107,9 +153,10 @@ module Conekta
|
|
|
107
153
|
end
|
|
108
154
|
|
|
109
155
|
# check to see if the attribute exists and convert string to symbol for hash key
|
|
156
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
110
157
|
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
111
|
-
if (!
|
|
112
|
-
fail ArgumentError, "`#{k}` is not a valid attribute in `Conekta::Checkout`. Please check the name to make sure it's valid. List of attributes: " +
|
|
158
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
159
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Conekta::Checkout`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
113
160
|
end
|
|
114
161
|
h[k.to_sym] = v
|
|
115
162
|
}
|
|
@@ -118,8 +165,18 @@ module Conekta
|
|
|
118
165
|
if (value = attributes[:'allowed_payment_methods']).is_a?(Array)
|
|
119
166
|
self.allowed_payment_methods = value
|
|
120
167
|
end
|
|
121
|
-
|
|
122
|
-
|
|
168
|
+
end
|
|
169
|
+
|
|
170
|
+
if attributes.key?(:'excluded_payment_methods')
|
|
171
|
+
if (value = attributes[:'excluded_payment_methods']).is_a?(Array)
|
|
172
|
+
self.excluded_payment_methods = value
|
|
173
|
+
end
|
|
174
|
+
end
|
|
175
|
+
|
|
176
|
+
if attributes.key?(:'exclude_card_networks')
|
|
177
|
+
if (value = attributes[:'exclude_card_networks']).is_a?(Array)
|
|
178
|
+
self.exclude_card_networks = value
|
|
179
|
+
end
|
|
123
180
|
end
|
|
124
181
|
|
|
125
182
|
if attributes.key?(:'expires_at')
|
|
@@ -156,6 +213,12 @@ module Conekta
|
|
|
156
213
|
self.on_demand_enabled = attributes[:'on_demand_enabled']
|
|
157
214
|
end
|
|
158
215
|
|
|
216
|
+
if attributes.key?(:'plan_ids')
|
|
217
|
+
if (value = attributes[:'plan_ids']).is_a?(Array)
|
|
218
|
+
self.plan_ids = value
|
|
219
|
+
end
|
|
220
|
+
end
|
|
221
|
+
|
|
159
222
|
if attributes.key?(:'order_template')
|
|
160
223
|
self.order_template = attributes[:'order_template']
|
|
161
224
|
else
|
|
@@ -166,6 +229,10 @@ module Conekta
|
|
|
166
229
|
self.payments_limit_count = attributes[:'payments_limit_count']
|
|
167
230
|
end
|
|
168
231
|
|
|
232
|
+
if attributes.key?(:'success_url')
|
|
233
|
+
self.success_url = attributes[:'success_url']
|
|
234
|
+
end
|
|
235
|
+
|
|
169
236
|
if attributes.key?(:'recurrent')
|
|
170
237
|
self.recurrent = attributes[:'recurrent']
|
|
171
238
|
else
|
|
@@ -184,14 +251,14 @@ module Conekta
|
|
|
184
251
|
def list_invalid_properties
|
|
185
252
|
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
186
253
|
invalid_properties = Array.new
|
|
187
|
-
if @allowed_payment_methods.nil?
|
|
188
|
-
invalid_properties.push('invalid value for "allowed_payment_methods", allowed_payment_methods cannot be nil.')
|
|
189
|
-
end
|
|
190
|
-
|
|
191
254
|
if @expires_at.nil?
|
|
192
255
|
invalid_properties.push('invalid value for "expires_at", expires_at cannot be nil.')
|
|
193
256
|
end
|
|
194
257
|
|
|
258
|
+
if @expires_at < 1
|
|
259
|
+
invalid_properties.push('invalid value for "expires_at", must be greater than or equal to 1.')
|
|
260
|
+
end
|
|
261
|
+
|
|
195
262
|
if @name.nil?
|
|
196
263
|
invalid_properties.push('invalid value for "name", name cannot be nil.')
|
|
197
264
|
end
|
|
@@ -200,6 +267,10 @@ module Conekta
|
|
|
200
267
|
invalid_properties.push('invalid value for "order_template", order_template cannot be nil.')
|
|
201
268
|
end
|
|
202
269
|
|
|
270
|
+
if !@payments_limit_count.nil? && @payments_limit_count < 1
|
|
271
|
+
invalid_properties.push('invalid value for "payments_limit_count", must be greater than or equal to 1.')
|
|
272
|
+
end
|
|
273
|
+
|
|
203
274
|
if @recurrent.nil?
|
|
204
275
|
invalid_properties.push('invalid value for "recurrent", recurrent cannot be nil.')
|
|
205
276
|
end
|
|
@@ -215,21 +286,92 @@ module Conekta
|
|
|
215
286
|
# @return true if the model is valid
|
|
216
287
|
def valid?
|
|
217
288
|
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
218
|
-
return false if @allowed_payment_methods.nil?
|
|
219
289
|
return false if @expires_at.nil?
|
|
290
|
+
return false if @expires_at < 1
|
|
220
291
|
return false if @name.nil?
|
|
221
292
|
return false if @order_template.nil?
|
|
293
|
+
return false if !@payments_limit_count.nil? && @payments_limit_count < 1
|
|
222
294
|
return false if @recurrent.nil?
|
|
223
295
|
return false if @type.nil?
|
|
224
296
|
true
|
|
225
297
|
end
|
|
226
298
|
|
|
299
|
+
# Custom attribute writer method with validation
|
|
300
|
+
# @param [Object] expires_at Value to be assigned
|
|
301
|
+
def expires_at=(expires_at)
|
|
302
|
+
if expires_at.nil?
|
|
303
|
+
fail ArgumentError, 'expires_at cannot be nil'
|
|
304
|
+
end
|
|
305
|
+
|
|
306
|
+
if expires_at < 1
|
|
307
|
+
fail ArgumentError, 'invalid value for "expires_at", must be greater than or equal to 1.'
|
|
308
|
+
end
|
|
309
|
+
|
|
310
|
+
@expires_at = expires_at
|
|
311
|
+
end
|
|
312
|
+
|
|
313
|
+
# Custom attribute writer method with validation
|
|
314
|
+
# @param [Object] name Value to be assigned
|
|
315
|
+
def name=(name)
|
|
316
|
+
if name.nil?
|
|
317
|
+
fail ArgumentError, 'name cannot be nil'
|
|
318
|
+
end
|
|
319
|
+
|
|
320
|
+
@name = name
|
|
321
|
+
end
|
|
322
|
+
|
|
323
|
+
# Custom attribute writer method with validation
|
|
324
|
+
# @param [Object] order_template Value to be assigned
|
|
325
|
+
def order_template=(order_template)
|
|
326
|
+
if order_template.nil?
|
|
327
|
+
fail ArgumentError, 'order_template cannot be nil'
|
|
328
|
+
end
|
|
329
|
+
|
|
330
|
+
@order_template = order_template
|
|
331
|
+
end
|
|
332
|
+
|
|
333
|
+
# Custom attribute writer method with validation
|
|
334
|
+
# @param [Object] payments_limit_count Value to be assigned
|
|
335
|
+
def payments_limit_count=(payments_limit_count)
|
|
336
|
+
if payments_limit_count.nil?
|
|
337
|
+
fail ArgumentError, 'payments_limit_count cannot be nil'
|
|
338
|
+
end
|
|
339
|
+
|
|
340
|
+
if payments_limit_count < 1
|
|
341
|
+
fail ArgumentError, 'invalid value for "payments_limit_count", must be greater than or equal to 1.'
|
|
342
|
+
end
|
|
343
|
+
|
|
344
|
+
@payments_limit_count = payments_limit_count
|
|
345
|
+
end
|
|
346
|
+
|
|
347
|
+
# Custom attribute writer method with validation
|
|
348
|
+
# @param [Object] recurrent Value to be assigned
|
|
349
|
+
def recurrent=(recurrent)
|
|
350
|
+
if recurrent.nil?
|
|
351
|
+
fail ArgumentError, 'recurrent cannot be nil'
|
|
352
|
+
end
|
|
353
|
+
|
|
354
|
+
@recurrent = recurrent
|
|
355
|
+
end
|
|
356
|
+
|
|
357
|
+
# Custom attribute writer method with validation
|
|
358
|
+
# @param [Object] type Value to be assigned
|
|
359
|
+
def type=(type)
|
|
360
|
+
if type.nil?
|
|
361
|
+
fail ArgumentError, 'type cannot be nil'
|
|
362
|
+
end
|
|
363
|
+
|
|
364
|
+
@type = type
|
|
365
|
+
end
|
|
366
|
+
|
|
227
367
|
# Checks equality by comparing each attribute.
|
|
228
368
|
# @param [Object] Object to be compared
|
|
229
369
|
def ==(o)
|
|
230
370
|
return true if self.equal?(o)
|
|
231
371
|
self.class == o.class &&
|
|
232
372
|
allowed_payment_methods == o.allowed_payment_methods &&
|
|
373
|
+
excluded_payment_methods == o.excluded_payment_methods &&
|
|
374
|
+
exclude_card_networks == o.exclude_card_networks &&
|
|
233
375
|
expires_at == o.expires_at &&
|
|
234
376
|
monthly_installments_enabled == o.monthly_installments_enabled &&
|
|
235
377
|
monthly_installments_options == o.monthly_installments_options &&
|
|
@@ -237,8 +379,10 @@ module Conekta
|
|
|
237
379
|
name == o.name &&
|
|
238
380
|
needs_shipping_contact == o.needs_shipping_contact &&
|
|
239
381
|
on_demand_enabled == o.on_demand_enabled &&
|
|
382
|
+
plan_ids == o.plan_ids &&
|
|
240
383
|
order_template == o.order_template &&
|
|
241
384
|
payments_limit_count == o.payments_limit_count &&
|
|
385
|
+
success_url == o.success_url &&
|
|
242
386
|
recurrent == o.recurrent &&
|
|
243
387
|
type == o.type
|
|
244
388
|
end
|
|
@@ -252,7 +396,7 @@ module Conekta
|
|
|
252
396
|
# Calculates hash code according to all attributes.
|
|
253
397
|
# @return [Integer] Hash code
|
|
254
398
|
def hash
|
|
255
|
-
[allowed_payment_methods, expires_at, monthly_installments_enabled, monthly_installments_options, three_ds_mode, name, needs_shipping_contact, on_demand_enabled, order_template, payments_limit_count, recurrent, type].hash
|
|
399
|
+
[allowed_payment_methods, excluded_payment_methods, exclude_card_networks, expires_at, monthly_installments_enabled, monthly_installments_options, three_ds_mode, name, needs_shipping_contact, on_demand_enabled, plan_ids, order_template, payments_limit_count, success_url, recurrent, type].hash
|
|
256
400
|
end
|
|
257
401
|
|
|
258
402
|
# Builds the object from hash
|
|
@@ -278,61 +422,6 @@ module Conekta
|
|
|
278
422
|
new(transformed_hash)
|
|
279
423
|
end
|
|
280
424
|
|
|
281
|
-
# Deserializes the data based on type
|
|
282
|
-
# @param string type Data type
|
|
283
|
-
# @param string value Value to be deserialized
|
|
284
|
-
# @return [Object] Deserialized data
|
|
285
|
-
def self._deserialize(type, value)
|
|
286
|
-
case type.to_sym
|
|
287
|
-
when :Time
|
|
288
|
-
Time.parse(value)
|
|
289
|
-
when :Date
|
|
290
|
-
Date.parse(value)
|
|
291
|
-
when :String
|
|
292
|
-
value.to_s
|
|
293
|
-
when :Integer
|
|
294
|
-
value.to_i
|
|
295
|
-
when :Float
|
|
296
|
-
value.to_f
|
|
297
|
-
when :Boolean
|
|
298
|
-
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
|
299
|
-
true
|
|
300
|
-
else
|
|
301
|
-
false
|
|
302
|
-
end
|
|
303
|
-
when :Object
|
|
304
|
-
# generic object (usually a Hash), return directly
|
|
305
|
-
value
|
|
306
|
-
when /\AArray<(?<inner_type>.+)>\z/
|
|
307
|
-
inner_type = Regexp.last_match[:inner_type]
|
|
308
|
-
value.map { |v| _deserialize(inner_type, v) }
|
|
309
|
-
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
|
310
|
-
k_type = Regexp.last_match[:k_type]
|
|
311
|
-
v_type = Regexp.last_match[:v_type]
|
|
312
|
-
{}.tap do |hash|
|
|
313
|
-
value.each do |k, v|
|
|
314
|
-
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
|
315
|
-
end
|
|
316
|
-
end
|
|
317
|
-
else # model
|
|
318
|
-
# models (e.g. Pet) or oneOf
|
|
319
|
-
klass = Conekta.const_get(type)
|
|
320
|
-
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
|
321
|
-
end
|
|
322
|
-
end
|
|
323
|
-
|
|
324
|
-
# Returns the string representation of the object
|
|
325
|
-
# @return [String] String presentation of the object
|
|
326
|
-
def to_s
|
|
327
|
-
to_hash.to_s
|
|
328
|
-
end
|
|
329
|
-
|
|
330
|
-
# to_body is an alias to to_hash (backward compatibility)
|
|
331
|
-
# @return [Hash] Returns the object in the form of hash
|
|
332
|
-
def to_body
|
|
333
|
-
to_hash
|
|
334
|
-
end
|
|
335
|
-
|
|
336
425
|
# Returns the object in the form of hash
|
|
337
426
|
# @return [Hash] Returns the object in the form of hash
|
|
338
427
|
def to_hash
|
|
@@ -349,24 +438,6 @@ module Conekta
|
|
|
349
438
|
hash
|
|
350
439
|
end
|
|
351
440
|
|
|
352
|
-
# Outputs non-array value in the form of hash
|
|
353
|
-
# For object, use to_hash. Otherwise, just return the value
|
|
354
|
-
# @param [Object] value Any valid value
|
|
355
|
-
# @return [Hash] Returns the value in the form of hash
|
|
356
|
-
def _to_hash(value)
|
|
357
|
-
if value.is_a?(Array)
|
|
358
|
-
value.compact.map { |v| _to_hash(v) }
|
|
359
|
-
elsif value.is_a?(Hash)
|
|
360
|
-
{}.tap do |hash|
|
|
361
|
-
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
362
|
-
end
|
|
363
|
-
elsif value.respond_to? :to_hash
|
|
364
|
-
value.to_hash
|
|
365
|
-
else
|
|
366
|
-
value
|
|
367
|
-
end
|
|
368
|
-
end
|
|
369
|
-
|
|
370
441
|
end
|
|
371
442
|
|
|
372
443
|
end
|