conekta 6.0.0 → 6.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +6 -0
- data/Makefile +10 -1
- data/README.md +16 -52
- data/VERSION +1 -1
- data/conekta.gemspec +4 -3
- data/config-ruby.json +32 -0
- data/docs/ApiKeyCreateResponse.md +3 -3
- data/docs/BalancesApi.md +1 -1
- data/docs/ChargeOrderResponse.md +0 -2
- data/docs/ChargeRequest.md +0 -2
- data/docs/ChargeRequestPaymentMethod.md +2 -0
- data/docs/ChargeResponse.md +0 -2
- data/docs/ChargeUpdateRequest.md +18 -0
- data/docs/ChargesApi.md +76 -0
- data/docs/ChargesDataResponse.md +0 -2
- data/docs/Checkout.md +2 -2
- data/docs/CheckoutOrderTemplate.md +1 -1
- data/docs/CheckoutRequest.md +2 -2
- data/docs/CheckoutResponse.md +3 -3
- data/docs/CreateCustomerFiscalEntitiesResponse.md +1 -1
- data/docs/CustomerAddress.md +3 -3
- data/docs/CustomerFiscalEntitiesDataResponse.md +1 -1
- data/docs/CustomerFiscalEntitiesRequest.md +1 -1
- data/docs/CustomerResponse.md +10 -8
- data/docs/CustomerShippingContacts.md +3 -1
- data/docs/CustomerShippingContactsAddress.md +2 -2
- data/docs/CustomerShippingContactsDataResponse.md +2 -0
- data/docs/CustomerShippingContactsResponse.md +2 -0
- data/docs/CustomerShippingContactsResponseAddress.md +2 -2
- data/docs/CustomerUpdateFiscalEntitiesRequest.md +1 -1
- data/docs/CustomersApi.md +1 -1
- data/docs/CustomersResponse.md +3 -3
- data/docs/EventResponse.md +1 -1
- data/docs/FiscalEntityAddress.md +30 -0
- data/docs/LogResponse.md +5 -5
- data/docs/LogsResponseData.md +5 -5
- data/docs/{CustomerInfoResponse.md → OrderCustomerInfoResponse.md} +4 -2
- data/docs/OrderFiscalEntityAddressResponse.md +32 -0
- data/docs/OrderFiscalEntityRequest.md +28 -0
- data/docs/OrderFiscalEntityResponse.md +34 -0
- data/docs/OrderNextActionResponse.md +20 -0
- data/docs/OrderNextActionResponseRedirectToUrl.md +20 -0
- data/docs/OrderRequest.md +7 -1
- data/docs/OrderResponse.md +3 -1
- data/docs/OrderResponseCustomerInfo.md +4 -2
- data/docs/OrderResponseShippingContact.md +8 -6
- data/docs/OrderTaxRequest.md +1 -1
- data/docs/OrderUpdateFiscalEntityRequest.md +28 -0
- data/docs/OrderUpdateRequest.md +2 -0
- data/docs/PaymentLinkApi.md +1 -1
- data/docs/Product.md +3 -3
- data/docs/ShippingRequest.md +1 -1
- data/docs/TokenResponseCheckout.md +1 -1
- data/docs/TransactionsApi.md +9 -3
- data/docs/UpdateCustomerFiscalEntitiesResponse.md +1 -1
- data/docs/WebhookLog.md +1 -1
- data/docs/WebhookResponse.md +1 -1
- data/docs/WebhookUpdateRequest.md +2 -2
- data/lib/conekta/api/antifraud_api.rb +1 -1
- data/lib/conekta/api/api_keys_api.rb +1 -1
- data/lib/conekta/api/balances_api.rb +2 -2
- data/lib/conekta/api/charges_api.rb +83 -1
- data/lib/conekta/api/companies_api.rb +1 -1
- data/lib/conekta/api/customers_api.rb +1 -1
- data/lib/conekta/api/discounts_api.rb +1 -1
- data/lib/conekta/api/events_api.rb +1 -1
- data/lib/conekta/api/logs_api.rb +1 -1
- data/lib/conekta/api/orders_api.rb +1 -1
- data/lib/conekta/api/payment_link_api.rb +1 -1
- data/lib/conekta/api/payment_methods_api.rb +1 -1
- data/lib/conekta/api/plans_api.rb +1 -1
- data/lib/conekta/api/products_api.rb +1 -1
- data/lib/conekta/api/shipping_contacts_api.rb +1 -1
- data/lib/conekta/api/shippings_api.rb +1 -1
- data/lib/conekta/api/subscriptions_api.rb +1 -1
- data/lib/conekta/api/taxes_api.rb +1 -1
- data/lib/conekta/api/tokens_api.rb +1 -1
- data/lib/conekta/api/transactions_api.rb +13 -4
- data/lib/conekta/api/transfers_api.rb +1 -1
- data/lib/conekta/api/webhook_keys_api.rb +1 -1
- data/lib/conekta/api/webhooks_api.rb +1 -1
- data/lib/conekta/api_client.rb +40 -37
- data/lib/conekta/api_error.rb +1 -1
- data/lib/conekta/configuration.rb +13 -10
- data/lib/conekta/models/api_key_create_response.rb +28 -34
- data/lib/conekta/models/api_key_create_response_all_of.rb +14 -19
- data/lib/conekta/models/api_key_request.rb +16 -19
- data/lib/conekta/models/api_key_response.rb +14 -19
- data/lib/conekta/models/api_key_response_on_delete.rb +14 -19
- data/lib/conekta/models/api_key_update_request.rb +14 -19
- data/lib/conekta/models/balance_common_field.rb +14 -19
- data/lib/conekta/models/balance_response.rb +14 -19
- data/lib/conekta/models/blacklist_rule_response.rb +14 -19
- data/lib/conekta/models/charge_data_payment_method_bank_transfer_response.rb +14 -19
- data/lib/conekta/models/charge_data_payment_method_card_response.rb +14 -43
- data/lib/conekta/models/charge_data_payment_method_cash_response.rb +14 -19
- data/lib/conekta/models/charge_order_response.rb +15 -29
- data/lib/conekta/models/charge_order_response_payment_method.rb +1 -1
- data/lib/conekta/models/charge_request.rb +17 -30
- data/lib/conekta/models/charge_request_payment_method.rb +27 -44
- data/lib/conekta/models/charge_response.rb +15 -29
- data/lib/conekta/models/charge_response_channel.rb +14 -19
- data/lib/conekta/models/charge_response_payment_method.rb +1 -1
- data/lib/conekta/models/charge_response_refunds.rb +18 -20
- data/lib/conekta/models/charge_response_refunds_all_of.rb +14 -19
- data/lib/conekta/models/charge_response_refunds_data.rb +22 -19
- data/lib/conekta/models/charge_update_request.rb +216 -0
- data/lib/conekta/models/charges_data_response.rb +15 -29
- data/lib/conekta/models/checkout.rb +26 -19
- data/lib/conekta/models/checkout_order_template.rb +23 -20
- data/lib/conekta/models/checkout_order_template_customer_info.rb +2 -2
- data/lib/conekta/models/checkout_request.rb +16 -19
- data/lib/conekta/models/checkout_response.rb +22 -19
- data/lib/conekta/models/checkouts_response.rb +18 -20
- data/lib/conekta/models/checkouts_response_all_of.rb +14 -19
- data/lib/conekta/models/company_fiscal_info_address_response.rb +14 -19
- data/lib/conekta/models/company_fiscal_info_response.rb +14 -19
- data/lib/conekta/models/company_payout_destination_response.rb +14 -19
- data/lib/conekta/models/company_response.rb +14 -19
- data/lib/conekta/models/create_customer_fiscal_entities_response.rb +23 -21
- data/lib/conekta/models/create_customer_fiscal_entities_response_all_of.rb +20 -19
- data/lib/conekta/models/create_customer_payment_methods_request.rb +2 -2
- data/lib/conekta/models/create_customer_payment_methods_response.rb +1 -1
- data/lib/conekta/models/create_risk_rules_data.rb +20 -19
- data/lib/conekta/models/customer.rb +25 -20
- data/lib/conekta/models/customer_address.rb +22 -19
- data/lib/conekta/models/customer_antifraud_info.rb +14 -19
- data/lib/conekta/models/customer_antifraud_info_response.rb +14 -19
- data/lib/conekta/models/customer_fiscal_entities_data_response.rb +23 -21
- data/lib/conekta/models/customer_fiscal_entities_request.rb +17 -20
- data/lib/conekta/models/customer_fiscal_entities_request_address.rb +22 -19
- data/lib/conekta/models/customer_fiscal_entities_response.rb +18 -20
- data/lib/conekta/models/customer_fiscal_entities_response_all_of.rb +14 -19
- data/lib/conekta/models/customer_info.rb +20 -19
- data/lib/conekta/models/customer_info_just_customer_id.rb +16 -19
- data/lib/conekta/models/customer_info_just_customer_id_response.rb +14 -19
- data/lib/conekta/models/customer_payment_method_request.rb +16 -19
- data/lib/conekta/models/customer_payment_methods.rb +14 -19
- data/lib/conekta/models/customer_payment_methods_data.rb +1 -1
- data/lib/conekta/models/customer_payment_methods_request.rb +2 -2
- data/lib/conekta/models/customer_payment_methods_response.rb +18 -20
- data/lib/conekta/models/customer_response.rb +67 -20
- data/lib/conekta/models/customer_response_shipping_contacts.rb +18 -20
- data/lib/conekta/models/customer_response_shipping_contacts_all_of.rb +14 -19
- data/lib/conekta/models/customer_shipping_contacts.rb +52 -24
- data/lib/conekta/models/customer_shipping_contacts_address.rb +14 -19
- data/lib/conekta/models/customer_shipping_contacts_data_response.rb +55 -22
- data/lib/conekta/models/customer_shipping_contacts_data_response_all_of.rb +20 -19
- data/lib/conekta/models/customer_shipping_contacts_response.rb +46 -20
- data/lib/conekta/models/customer_shipping_contacts_response_address.rb +15 -19
- data/lib/conekta/models/customer_update_fiscal_entities_request.rb +15 -20
- data/lib/conekta/models/customer_update_shipping_contacts.rb +14 -19
- data/lib/conekta/models/customers_response.rb +34 -36
- data/lib/conekta/models/customers_response_all_of.rb +14 -19
- data/lib/conekta/models/delete_api_keys_response.rb +15 -21
- data/lib/conekta/models/delete_api_keys_response_all_of.rb +14 -19
- data/lib/conekta/models/deleted_blacklist_rule_response.rb +14 -19
- data/lib/conekta/models/deleted_whitelist_rule_response.rb +14 -19
- data/lib/conekta/models/details.rb +14 -19
- data/lib/conekta/models/details_error.rb +14 -19
- data/lib/conekta/models/discount_lines_data_response.rb +26 -19
- data/lib/conekta/models/discount_lines_response.rb +26 -20
- data/lib/conekta/models/discount_lines_response_all_of.rb +20 -19
- data/lib/conekta/models/email_checkout_request.rb +16 -19
- data/lib/conekta/models/error.rb +15 -21
- data/lib/conekta/models/error_all_of.rb +14 -19
- data/lib/conekta/models/event_response.rb +19 -20
- data/lib/conekta/models/events_resend_response.rb +19 -20
- data/lib/conekta/models/fiscal_entity_address.rb +312 -0
- data/lib/conekta/models/get_api_keys_response.rb +18 -20
- data/lib/conekta/models/get_api_keys_response_all_of.rb +14 -19
- data/lib/conekta/models/get_charges_response.rb +18 -20
- data/lib/conekta/models/get_charges_response_all_of.rb +14 -19
- data/lib/conekta/models/get_companies_response.rb +18 -20
- data/lib/conekta/models/get_companies_response_all_of.rb +14 -19
- data/lib/conekta/models/get_customer_payment_method_data_response.rb +1 -1
- data/lib/conekta/models/get_events_response.rb +18 -20
- data/lib/conekta/models/get_events_response_all_of.rb +14 -19
- data/lib/conekta/models/get_order_discount_lines_response.rb +18 -20
- data/lib/conekta/models/get_order_discount_lines_response_all_of.rb +14 -19
- data/lib/conekta/models/get_orders_response.rb +20 -19
- data/lib/conekta/models/get_payment_method_response.rb +18 -20
- data/lib/conekta/models/get_payment_method_response_all_of.rb +14 -19
- data/lib/conekta/models/get_plans_response.rb +18 -20
- data/lib/conekta/models/get_plans_response_all_of.rb +14 -19
- data/lib/conekta/models/get_transactions_response.rb +18 -20
- data/lib/conekta/models/get_transactions_response_all_of.rb +14 -19
- data/lib/conekta/models/get_transfers_response.rb +18 -20
- data/lib/conekta/models/get_transfers_response_all_of.rb +14 -19
- data/lib/conekta/models/get_webhook_keys_response.rb +18 -20
- data/lib/conekta/models/get_webhook_keys_response_all_of.rb +14 -19
- data/lib/conekta/models/get_webhooks_response.rb +18 -20
- data/lib/conekta/models/get_webhooks_response_all_of.rb +14 -19
- data/lib/conekta/models/log_response.rb +20 -19
- data/lib/conekta/models/logs_response.rb +14 -19
- data/lib/conekta/models/logs_response_data.rb +14 -19
- data/lib/conekta/models/order_capture_request.rb +16 -19
- data/lib/conekta/models/{customer_info_response.rb → order_customer_info_response.rb} +29 -23
- data/lib/conekta/models/order_discount_lines_request.rb +20 -19
- data/lib/conekta/models/{order_response_fiscal_entity_address.rb → order_fiscal_entity_address_response.rb} +47 -34
- data/lib/conekta/models/{order_response_fiscal_entity_address_all_of.rb → order_fiscal_entity_address_response_all_of.rb} +17 -22
- data/lib/conekta/models/order_fiscal_entity_request.rb +295 -0
- data/lib/conekta/models/order_fiscal_entity_response.rb +347 -0
- data/lib/conekta/models/{order_response_fiscal_entity.rb → order_next_action_response.rb} +32 -53
- data/lib/conekta/models/order_next_action_response_redirect_to_url.rb +226 -0
- data/lib/conekta/models/order_refund_request.rb +18 -19
- data/lib/conekta/models/order_request.rb +58 -24
- data/lib/conekta/models/order_request_customer_info.rb +2 -2
- data/lib/conekta/models/order_response.rb +31 -22
- data/lib/conekta/models/order_response_charges.rb +18 -20
- data/lib/conekta/models/order_response_charges_all_of.rb +14 -19
- data/lib/conekta/models/order_response_checkout.rb +19 -20
- data/lib/conekta/models/order_response_customer_info.rb +33 -28
- data/lib/conekta/models/order_response_customer_info_all_of.rb +14 -19
- data/lib/conekta/models/order_response_discount_lines.rb +18 -20
- data/lib/conekta/models/order_response_discount_lines_all_of.rb +14 -19
- data/lib/conekta/models/order_response_products.rb +18 -20
- data/lib/conekta/models/order_response_products_all_of.rb +14 -19
- data/lib/conekta/models/order_response_shipping_contact.rb +74 -49
- data/lib/conekta/models/order_response_shipping_contact_all_of.rb +14 -19
- data/lib/conekta/models/order_tax_request.rb +23 -20
- data/lib/conekta/models/order_update_fiscal_entity_request.rb +295 -0
- data/lib/conekta/models/order_update_request.rb +29 -21
- data/lib/conekta/models/order_update_request_customer_info.rb +2 -2
- data/lib/conekta/models/orders_response.rb +16 -19
- data/lib/conekta/models/page.rb +14 -19
- data/lib/conekta/models/pagination.rb +18 -19
- data/lib/conekta/models/payment_method.rb +16 -19
- data/lib/conekta/models/payment_method_bank_transfer.rb +16 -20
- data/lib/conekta/models/payment_method_card.rb +16 -44
- data/lib/conekta/models/payment_method_card_request.rb +19 -21
- data/lib/conekta/models/payment_method_card_request_all_of.rb +14 -19
- data/lib/conekta/models/payment_method_card_response.rb +22 -20
- data/lib/conekta/models/payment_method_card_response_all_of.rb +14 -19
- data/lib/conekta/models/payment_method_cash.rb +16 -20
- data/lib/conekta/models/payment_method_cash_request.rb +17 -21
- data/lib/conekta/models/payment_method_cash_request_all_of.rb +14 -19
- data/lib/conekta/models/payment_method_cash_response.rb +22 -20
- data/lib/conekta/models/payment_method_cash_response_all_of.rb +14 -19
- data/lib/conekta/models/payment_method_response.rb +22 -19
- data/lib/conekta/models/payment_method_spei_recurrent.rb +23 -21
- data/lib/conekta/models/payment_method_spei_recurrent_all_of.rb +14 -19
- data/lib/conekta/models/payment_method_spei_request.rb +17 -21
- data/lib/conekta/models/plan_request.rb +27 -20
- data/lib/conekta/models/plan_response.rb +19 -20
- data/lib/conekta/models/plan_update_request.rb +24 -21
- data/lib/conekta/models/product.rb +30 -21
- data/lib/conekta/models/product_data_response.rb +31 -23
- data/lib/conekta/models/product_data_response_all_of.rb +14 -19
- data/lib/conekta/models/product_order_response.rb +31 -23
- data/lib/conekta/models/product_order_response_all_of.rb +14 -19
- data/lib/conekta/models/risk_rules.rb +14 -19
- data/lib/conekta/models/risk_rules_data.rb +14 -19
- data/lib/conekta/models/risk_rules_list.rb +19 -21
- data/lib/conekta/models/shipping_order_response.rb +21 -21
- data/lib/conekta/models/shipping_request.rb +21 -20
- data/lib/conekta/models/sms_checkout_request.rb +16 -19
- data/lib/conekta/models/subscription_events_response.rb +18 -20
- data/lib/conekta/models/subscription_request.rb +16 -19
- data/lib/conekta/models/subscription_response.rb +14 -19
- data/lib/conekta/models/subscription_update_request.rb +14 -19
- data/lib/conekta/models/token.rb +14 -19
- data/lib/conekta/models/token_card.rb +24 -19
- data/lib/conekta/models/token_checkout.rb +14 -19
- data/lib/conekta/models/token_response.rb +22 -19
- data/lib/conekta/models/token_response_checkout.rb +14 -19
- data/lib/conekta/models/transaction_response.rb +36 -19
- data/lib/conekta/models/transfer_destination_response.rb +14 -19
- data/lib/conekta/models/transfer_method_response.rb +14 -19
- data/lib/conekta/models/transfer_response.rb +19 -20
- data/lib/conekta/models/transfers_response.rb +19 -20
- data/lib/conekta/models/update_customer.rb +19 -20
- data/lib/conekta/models/update_customer_antifraud_info.rb +14 -19
- data/lib/conekta/models/update_customer_fiscal_entities_response.rb +24 -22
- data/lib/conekta/models/update_customer_fiscal_entities_response_all_of.rb +20 -19
- data/lib/conekta/models/update_customer_payment_methods_response.rb +1 -1
- data/lib/conekta/models/update_order_discount_lines_request.rb +19 -20
- data/lib/conekta/models/update_order_tax_request.rb +29 -22
- data/lib/conekta/models/update_order_tax_response.rb +26 -22
- data/lib/conekta/models/update_order_tax_response_all_of.rb +14 -19
- data/lib/conekta/models/update_payment_methods.rb +14 -19
- data/lib/conekta/models/update_product.rb +29 -22
- data/lib/conekta/models/webhook_key_create_response.rb +14 -19
- data/lib/conekta/models/webhook_key_delete_response.rb +14 -19
- data/lib/conekta/models/webhook_key_request.rb +14 -19
- data/lib/conekta/models/webhook_key_response.rb +14 -19
- data/lib/conekta/models/webhook_key_update_request.rb +14 -19
- data/lib/conekta/models/webhook_log.rb +19 -20
- data/lib/conekta/models/webhook_request.rb +16 -19
- data/lib/conekta/models/webhook_response.rb +14 -19
- data/lib/conekta/models/webhook_update_request.rb +24 -27
- data/lib/conekta/models/whitelistlist_rule_response.rb +14 -19
- data/lib/conekta/version.rb +2 -2
- data/lib/conekta.rb +10 -47
- data/spec/api/customers_api_spec.rb +2 -2
- data/spec/api/orders_api_spec.rb +27 -1
- data/spec/api_client_spec.rb +1 -1
- data/spec/configuration_spec.rb +1 -1
- data/spec/spec_helper.rb +1 -8
- data/ssl_data/ca_bundle.crt +4039 -0
- data/templates/ruby/CUSTOM_VERSION.mustache +1 -0
- data/templates/ruby/api_client.mustache +256 -0
- data/templates/ruby/configuration.mustache +481 -0
- metadata +45 -71
- data/docs/ApiKeyCreateResponseAllOf.md +0 -18
- data/docs/ChargeDataPaymentMethodBankTransferResponse.md +0 -48
- data/docs/ChargeDataPaymentMethodCardResponse.md +0 -38
- data/docs/ChargeDataPaymentMethodCashResponse.md +0 -32
- data/docs/ChargeResponseRefundsAllOf.md +0 -18
- data/docs/CheckoutsResponseAllOf.md +0 -18
- data/docs/CreateCustomerFiscalEntitiesResponseAllOf.md +0 -26
- data/docs/CustomerFiscalEntitiesRequestAddress.md +0 -32
- data/docs/CustomerFiscalEntitiesResponseAllOf.md +0 -18
- data/docs/CustomerPaymentMethods.md +0 -18
- data/docs/CustomerResponseShippingContactsAllOf.md +0 -18
- data/docs/CustomerShippingContactsDataResponseAllOf.md +0 -22
- data/docs/CustomersResponseAllOf.md +0 -18
- data/docs/DeleteApiKeysResponseAllOf.md +0 -18
- data/docs/DiscountLinesResponseAllOf.md +0 -22
- data/docs/ErrorAllOf.md +0 -22
- data/docs/GetApiKeysResponseAllOf.md +0 -18
- data/docs/GetChargesResponseAllOf.md +0 -18
- data/docs/GetCompaniesResponseAllOf.md +0 -18
- data/docs/GetEventsResponseAllOf.md +0 -18
- data/docs/GetOrderDiscountLinesResponseAllOf.md +0 -18
- data/docs/GetPaymentMethodResponseAllOf.md +0 -18
- data/docs/GetPlansResponseAllOf.md +0 -18
- data/docs/GetTransactionsResponseAllOf.md +0 -18
- data/docs/GetTransfersResponseAllOf.md +0 -18
- data/docs/GetWebhookKeysResponseAllOf.md +0 -18
- data/docs/GetWebhooksResponseAllOf.md +0 -18
- data/docs/OrderResponseChargesAllOf.md +0 -18
- data/docs/OrderResponseCustomerInfoAllOf.md +0 -18
- data/docs/OrderResponseDiscountLinesAllOf.md +0 -18
- data/docs/OrderResponseFiscalEntity.md +0 -24
- data/docs/OrderResponseFiscalEntityAddress.md +0 -34
- data/docs/OrderResponseFiscalEntityAddressAllOf.md +0 -18
- data/docs/OrderResponseProductsAllOf.md +0 -18
- data/docs/OrderResponseShippingContactAllOf.md +0 -22
- data/docs/PaymentMethodCardRequestAllOf.md +0 -18
- data/docs/PaymentMethodCardResponseAllOf.md +0 -36
- data/docs/PaymentMethodCashRequestAllOf.md +0 -18
- data/docs/PaymentMethodCashResponseAllOf.md +0 -26
- data/docs/PaymentMethodSpeiRecurrentAllOf.md +0 -20
- data/docs/ProductDataResponseAllOf.md +0 -22
- data/docs/ProductOrderResponseAllOf.md +0 -22
- data/docs/RiskRules.md +0 -18
- data/docs/UpdateCustomerFiscalEntitiesResponseAllOf.md +0 -26
- data/docs/UpdateOrderTaxResponseAllOf.md +0 -22
@@ -6,7 +6,7 @@
|
|
6
6
|
The version of the OpenAPI document: 2.1.0
|
7
7
|
Contact: engineering@conekta.com
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
|
-
OpenAPI Generator version:
|
9
|
+
OpenAPI Generator version: 7.2.0
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
@@ -101,7 +101,6 @@ module Conekta
|
|
101
101
|
# List of class defined in allOf (OpenAPI v3)
|
102
102
|
def self.openapi_all_of
|
103
103
|
[
|
104
|
-
:'PaymentMethodCardResponseAllOf',
|
105
104
|
:'PaymentMethodResponse'
|
106
105
|
]
|
107
106
|
end
|
@@ -123,18 +122,26 @@ module Conekta
|
|
123
122
|
|
124
123
|
if attributes.key?(:'type')
|
125
124
|
self.type = attributes[:'type']
|
125
|
+
else
|
126
|
+
self.type = nil
|
126
127
|
end
|
127
128
|
|
128
129
|
if attributes.key?(:'id')
|
129
130
|
self.id = attributes[:'id']
|
131
|
+
else
|
132
|
+
self.id = nil
|
130
133
|
end
|
131
134
|
|
132
135
|
if attributes.key?(:'object')
|
133
136
|
self.object = attributes[:'object']
|
137
|
+
else
|
138
|
+
self.object = nil
|
134
139
|
end
|
135
140
|
|
136
141
|
if attributes.key?(:'created_at')
|
137
142
|
self.created_at = attributes[:'created_at']
|
143
|
+
else
|
144
|
+
self.created_at = nil
|
138
145
|
end
|
139
146
|
|
140
147
|
if attributes.key?(:'parent_id')
|
@@ -185,6 +192,7 @@ module Conekta
|
|
185
192
|
# Show invalid properties with the reasons. Usually used together with valid?
|
186
193
|
# @return Array for valid properties with the reasons
|
187
194
|
def list_invalid_properties
|
195
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
188
196
|
invalid_properties = Array.new
|
189
197
|
if @type.nil?
|
190
198
|
invalid_properties.push('invalid value for "type", type cannot be nil.')
|
@@ -208,6 +216,7 @@ module Conekta
|
|
208
216
|
# Check to see if the all the properties in the model are valid
|
209
217
|
# @return true if the model is valid
|
210
218
|
def valid?
|
219
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
211
220
|
return false if @type.nil?
|
212
221
|
return false if @id.nil?
|
213
222
|
return false if @object.nil?
|
@@ -253,37 +262,30 @@ module Conekta
|
|
253
262
|
# @param [Hash] attributes Model attributes in the form of hash
|
254
263
|
# @return [Object] Returns the model itself
|
255
264
|
def self.build_from_hash(attributes)
|
256
|
-
new.build_from_hash(attributes)
|
257
|
-
end
|
258
|
-
|
259
|
-
# Builds the object from hash
|
260
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
261
|
-
# @return [Object] Returns the model itself
|
262
|
-
def build_from_hash(attributes)
|
263
265
|
return nil unless attributes.is_a?(Hash)
|
264
266
|
attributes = attributes.transform_keys(&:to_sym)
|
265
|
-
|
266
|
-
|
267
|
-
|
267
|
+
transformed_hash = {}
|
268
|
+
openapi_types.each_pair do |key, type|
|
269
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
270
|
+
transformed_hash["#{key}"] = nil
|
268
271
|
elsif type =~ /\AArray<(.*)>/i
|
269
272
|
# check to ensure the input is an array given that the attribute
|
270
273
|
# is documented as an array but the input is not
|
271
|
-
if attributes[
|
272
|
-
|
274
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
275
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
273
276
|
end
|
274
|
-
elsif !attributes[
|
275
|
-
|
277
|
+
elsif !attributes[attribute_map[key]].nil?
|
278
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
276
279
|
end
|
277
280
|
end
|
278
|
-
|
279
|
-
self
|
281
|
+
new(transformed_hash)
|
280
282
|
end
|
281
283
|
|
282
284
|
# Deserializes the data based on type
|
283
285
|
# @param string type Data type
|
284
286
|
# @param string value Value to be deserialized
|
285
287
|
# @return [Object] Deserialized data
|
286
|
-
def _deserialize(type, value)
|
288
|
+
def self._deserialize(type, value)
|
287
289
|
case type.to_sym
|
288
290
|
when :Time
|
289
291
|
Time.parse(value)
|
@@ -318,7 +320,7 @@ module Conekta
|
|
318
320
|
else # model
|
319
321
|
# models (e.g. Pet) or oneOf
|
320
322
|
klass = Conekta.const_get(type)
|
321
|
-
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
323
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
322
324
|
end
|
323
325
|
end
|
324
326
|
|
@@ -6,7 +6,7 @@
|
|
6
6
|
The version of the OpenAPI document: 2.1.0
|
7
7
|
Contact: engineering@conekta.com
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
|
-
OpenAPI Generator version:
|
9
|
+
OpenAPI Generator version: 7.1.0
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
@@ -138,6 +138,7 @@ module Conekta
|
|
138
138
|
# Show invalid properties with the reasons. Usually used together with valid?
|
139
139
|
# @return Array for valid properties with the reasons
|
140
140
|
def list_invalid_properties
|
141
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
141
142
|
invalid_properties = Array.new
|
142
143
|
invalid_properties
|
143
144
|
end
|
@@ -145,6 +146,7 @@ module Conekta
|
|
145
146
|
# Check to see if the all the properties in the model are valid
|
146
147
|
# @return true if the model is valid
|
147
148
|
def valid?
|
149
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
148
150
|
true
|
149
151
|
end
|
150
152
|
|
@@ -181,37 +183,30 @@ module Conekta
|
|
181
183
|
# @param [Hash] attributes Model attributes in the form of hash
|
182
184
|
# @return [Object] Returns the model itself
|
183
185
|
def self.build_from_hash(attributes)
|
184
|
-
new.build_from_hash(attributes)
|
185
|
-
end
|
186
|
-
|
187
|
-
# Builds the object from hash
|
188
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
189
|
-
# @return [Object] Returns the model itself
|
190
|
-
def build_from_hash(attributes)
|
191
186
|
return nil unless attributes.is_a?(Hash)
|
192
187
|
attributes = attributes.transform_keys(&:to_sym)
|
193
|
-
|
194
|
-
|
195
|
-
|
188
|
+
transformed_hash = {}
|
189
|
+
openapi_types.each_pair do |key, type|
|
190
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
191
|
+
transformed_hash["#{key}"] = nil
|
196
192
|
elsif type =~ /\AArray<(.*)>/i
|
197
193
|
# check to ensure the input is an array given that the attribute
|
198
194
|
# is documented as an array but the input is not
|
199
|
-
if attributes[
|
200
|
-
|
195
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
196
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
201
197
|
end
|
202
|
-
elsif !attributes[
|
203
|
-
|
198
|
+
elsif !attributes[attribute_map[key]].nil?
|
199
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
204
200
|
end
|
205
201
|
end
|
206
|
-
|
207
|
-
self
|
202
|
+
new(transformed_hash)
|
208
203
|
end
|
209
204
|
|
210
205
|
# Deserializes the data based on type
|
211
206
|
# @param string type Data type
|
212
207
|
# @param string value Value to be deserialized
|
213
208
|
# @return [Object] Deserialized data
|
214
|
-
def _deserialize(type, value)
|
209
|
+
def self._deserialize(type, value)
|
215
210
|
case type.to_sym
|
216
211
|
when :Time
|
217
212
|
Time.parse(value)
|
@@ -246,7 +241,7 @@ module Conekta
|
|
246
241
|
else # model
|
247
242
|
# models (e.g. Pet) or oneOf
|
248
243
|
klass = Conekta.const_get(type)
|
249
|
-
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
244
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
250
245
|
end
|
251
246
|
end
|
252
247
|
|
@@ -6,7 +6,7 @@
|
|
6
6
|
The version of the OpenAPI document: 2.1.0
|
7
7
|
Contact: engineering@conekta.com
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
|
-
OpenAPI Generator version:
|
9
|
+
OpenAPI Generator version: 7.2.0
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
@@ -84,7 +84,6 @@ module Conekta
|
|
84
84
|
# List of class defined in allOf (OpenAPI v3)
|
85
85
|
def self.openapi_all_of
|
86
86
|
[
|
87
|
-
:'ChargeDataPaymentMethodCashResponse',
|
88
87
|
:'PaymentMethod'
|
89
88
|
]
|
90
89
|
end
|
@@ -110,6 +109,8 @@ module Conekta
|
|
110
109
|
|
111
110
|
if attributes.key?(:'object')
|
112
111
|
self.object = attributes[:'object']
|
112
|
+
else
|
113
|
+
self.object = nil
|
113
114
|
end
|
114
115
|
|
115
116
|
if attributes.key?(:'auth_code')
|
@@ -148,6 +149,7 @@ module Conekta
|
|
148
149
|
# Show invalid properties with the reasons. Usually used together with valid?
|
149
150
|
# @return Array for valid properties with the reasons
|
150
151
|
def list_invalid_properties
|
152
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
151
153
|
invalid_properties = Array.new
|
152
154
|
if @object.nil?
|
153
155
|
invalid_properties.push('invalid value for "object", object cannot be nil.')
|
@@ -159,6 +161,7 @@ module Conekta
|
|
159
161
|
# Check to see if the all the properties in the model are valid
|
160
162
|
# @return true if the model is valid
|
161
163
|
def valid?
|
164
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
162
165
|
return false if @object.nil?
|
163
166
|
true
|
164
167
|
end
|
@@ -196,37 +199,30 @@ module Conekta
|
|
196
199
|
# @param [Hash] attributes Model attributes in the form of hash
|
197
200
|
# @return [Object] Returns the model itself
|
198
201
|
def self.build_from_hash(attributes)
|
199
|
-
new.build_from_hash(attributes)
|
200
|
-
end
|
201
|
-
|
202
|
-
# Builds the object from hash
|
203
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
204
|
-
# @return [Object] Returns the model itself
|
205
|
-
def build_from_hash(attributes)
|
206
202
|
return nil unless attributes.is_a?(Hash)
|
207
203
|
attributes = attributes.transform_keys(&:to_sym)
|
208
|
-
|
209
|
-
|
210
|
-
|
204
|
+
transformed_hash = {}
|
205
|
+
openapi_types.each_pair do |key, type|
|
206
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
207
|
+
transformed_hash["#{key}"] = nil
|
211
208
|
elsif type =~ /\AArray<(.*)>/i
|
212
209
|
# check to ensure the input is an array given that the attribute
|
213
210
|
# is documented as an array but the input is not
|
214
|
-
if attributes[
|
215
|
-
|
211
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
212
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
216
213
|
end
|
217
|
-
elsif !attributes[
|
218
|
-
|
214
|
+
elsif !attributes[attribute_map[key]].nil?
|
215
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
219
216
|
end
|
220
217
|
end
|
221
|
-
|
222
|
-
self
|
218
|
+
new(transformed_hash)
|
223
219
|
end
|
224
220
|
|
225
221
|
# Deserializes the data based on type
|
226
222
|
# @param string type Data type
|
227
223
|
# @param string value Value to be deserialized
|
228
224
|
# @return [Object] Deserialized data
|
229
|
-
def _deserialize(type, value)
|
225
|
+
def self._deserialize(type, value)
|
230
226
|
case type.to_sym
|
231
227
|
when :Time
|
232
228
|
Time.parse(value)
|
@@ -261,7 +257,7 @@ module Conekta
|
|
261
257
|
else # model
|
262
258
|
# models (e.g. Pet) or oneOf
|
263
259
|
klass = Conekta.const_get(type)
|
264
|
-
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
260
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
265
261
|
end
|
266
262
|
end
|
267
263
|
|
@@ -6,7 +6,7 @@
|
|
6
6
|
The version of the OpenAPI document: 2.1.0
|
7
7
|
Contact: engineering@conekta.com
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
|
-
OpenAPI Generator version:
|
9
|
+
OpenAPI Generator version: 7.2.0
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
@@ -50,8 +50,7 @@ module Conekta
|
|
50
50
|
# List of class defined in allOf (OpenAPI v3)
|
51
51
|
def self.openapi_all_of
|
52
52
|
[
|
53
|
-
:'CustomerPaymentMethodRequest'
|
54
|
-
:'PaymentMethodCashRequestAllOf'
|
53
|
+
:'CustomerPaymentMethodRequest'
|
55
54
|
]
|
56
55
|
end
|
57
56
|
|
@@ -72,6 +71,8 @@ module Conekta
|
|
72
71
|
|
73
72
|
if attributes.key?(:'type')
|
74
73
|
self.type = attributes[:'type']
|
74
|
+
else
|
75
|
+
self.type = nil
|
75
76
|
end
|
76
77
|
|
77
78
|
if attributes.key?(:'expires_at')
|
@@ -82,6 +83,7 @@ module Conekta
|
|
82
83
|
# Show invalid properties with the reasons. Usually used together with valid?
|
83
84
|
# @return Array for valid properties with the reasons
|
84
85
|
def list_invalid_properties
|
86
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
85
87
|
invalid_properties = Array.new
|
86
88
|
if @type.nil?
|
87
89
|
invalid_properties.push('invalid value for "type", type cannot be nil.')
|
@@ -93,6 +95,7 @@ module Conekta
|
|
93
95
|
# Check to see if the all the properties in the model are valid
|
94
96
|
# @return true if the model is valid
|
95
97
|
def valid?
|
98
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
96
99
|
return false if @type.nil?
|
97
100
|
true
|
98
101
|
end
|
@@ -122,37 +125,30 @@ module Conekta
|
|
122
125
|
# @param [Hash] attributes Model attributes in the form of hash
|
123
126
|
# @return [Object] Returns the model itself
|
124
127
|
def self.build_from_hash(attributes)
|
125
|
-
new.build_from_hash(attributes)
|
126
|
-
end
|
127
|
-
|
128
|
-
# Builds the object from hash
|
129
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
130
|
-
# @return [Object] Returns the model itself
|
131
|
-
def build_from_hash(attributes)
|
132
128
|
return nil unless attributes.is_a?(Hash)
|
133
129
|
attributes = attributes.transform_keys(&:to_sym)
|
134
|
-
|
135
|
-
|
136
|
-
|
130
|
+
transformed_hash = {}
|
131
|
+
openapi_types.each_pair do |key, type|
|
132
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
133
|
+
transformed_hash["#{key}"] = nil
|
137
134
|
elsif type =~ /\AArray<(.*)>/i
|
138
135
|
# check to ensure the input is an array given that the attribute
|
139
136
|
# is documented as an array but the input is not
|
140
|
-
if attributes[
|
141
|
-
|
137
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
138
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
142
139
|
end
|
143
|
-
elsif !attributes[
|
144
|
-
|
140
|
+
elsif !attributes[attribute_map[key]].nil?
|
141
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
145
142
|
end
|
146
143
|
end
|
147
|
-
|
148
|
-
self
|
144
|
+
new(transformed_hash)
|
149
145
|
end
|
150
146
|
|
151
147
|
# Deserializes the data based on type
|
152
148
|
# @param string type Data type
|
153
149
|
# @param string value Value to be deserialized
|
154
150
|
# @return [Object] Deserialized data
|
155
|
-
def _deserialize(type, value)
|
151
|
+
def self._deserialize(type, value)
|
156
152
|
case type.to_sym
|
157
153
|
when :Time
|
158
154
|
Time.parse(value)
|
@@ -187,7 +183,7 @@ module Conekta
|
|
187
183
|
else # model
|
188
184
|
# models (e.g. Pet) or oneOf
|
189
185
|
klass = Conekta.const_get(type)
|
190
|
-
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
186
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
191
187
|
end
|
192
188
|
end
|
193
189
|
|
@@ -6,7 +6,7 @@
|
|
6
6
|
The version of the OpenAPI document: 2.1.0
|
7
7
|
Contact: engineering@conekta.com
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
|
-
OpenAPI Generator version:
|
9
|
+
OpenAPI Generator version: 7.1.0
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
@@ -65,6 +65,7 @@ module Conekta
|
|
65
65
|
# Show invalid properties with the reasons. Usually used together with valid?
|
66
66
|
# @return Array for valid properties with the reasons
|
67
67
|
def list_invalid_properties
|
68
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
68
69
|
invalid_properties = Array.new
|
69
70
|
invalid_properties
|
70
71
|
end
|
@@ -72,6 +73,7 @@ module Conekta
|
|
72
73
|
# Check to see if the all the properties in the model are valid
|
73
74
|
# @return true if the model is valid
|
74
75
|
def valid?
|
76
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
75
77
|
true
|
76
78
|
end
|
77
79
|
|
@@ -99,37 +101,30 @@ module Conekta
|
|
99
101
|
# @param [Hash] attributes Model attributes in the form of hash
|
100
102
|
# @return [Object] Returns the model itself
|
101
103
|
def self.build_from_hash(attributes)
|
102
|
-
new.build_from_hash(attributes)
|
103
|
-
end
|
104
|
-
|
105
|
-
# Builds the object from hash
|
106
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
107
|
-
# @return [Object] Returns the model itself
|
108
|
-
def build_from_hash(attributes)
|
109
104
|
return nil unless attributes.is_a?(Hash)
|
110
105
|
attributes = attributes.transform_keys(&:to_sym)
|
111
|
-
|
112
|
-
|
113
|
-
|
106
|
+
transformed_hash = {}
|
107
|
+
openapi_types.each_pair do |key, type|
|
108
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
109
|
+
transformed_hash["#{key}"] = nil
|
114
110
|
elsif type =~ /\AArray<(.*)>/i
|
115
111
|
# check to ensure the input is an array given that the attribute
|
116
112
|
# is documented as an array but the input is not
|
117
|
-
if attributes[
|
118
|
-
|
113
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
114
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
119
115
|
end
|
120
|
-
elsif !attributes[
|
121
|
-
|
116
|
+
elsif !attributes[attribute_map[key]].nil?
|
117
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
122
118
|
end
|
123
119
|
end
|
124
|
-
|
125
|
-
self
|
120
|
+
new(transformed_hash)
|
126
121
|
end
|
127
122
|
|
128
123
|
# Deserializes the data based on type
|
129
124
|
# @param string type Data type
|
130
125
|
# @param string value Value to be deserialized
|
131
126
|
# @return [Object] Deserialized data
|
132
|
-
def _deserialize(type, value)
|
127
|
+
def self._deserialize(type, value)
|
133
128
|
case type.to_sym
|
134
129
|
when :Time
|
135
130
|
Time.parse(value)
|
@@ -164,7 +159,7 @@ module Conekta
|
|
164
159
|
else # model
|
165
160
|
# models (e.g. Pet) or oneOf
|
166
161
|
klass = Conekta.const_get(type)
|
167
|
-
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
162
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
168
163
|
end
|
169
164
|
end
|
170
165
|
|
@@ -6,7 +6,7 @@
|
|
6
6
|
The version of the OpenAPI document: 2.1.0
|
7
7
|
Contact: engineering@conekta.com
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
|
-
OpenAPI Generator version:
|
9
|
+
OpenAPI Generator version: 7.2.0
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
@@ -81,7 +81,6 @@ module Conekta
|
|
81
81
|
# List of class defined in allOf (OpenAPI v3)
|
82
82
|
def self.openapi_all_of
|
83
83
|
[
|
84
|
-
:'PaymentMethodCashResponseAllOf',
|
85
84
|
:'PaymentMethodResponse'
|
86
85
|
]
|
87
86
|
end
|
@@ -103,18 +102,26 @@ module Conekta
|
|
103
102
|
|
104
103
|
if attributes.key?(:'type')
|
105
104
|
self.type = attributes[:'type']
|
105
|
+
else
|
106
|
+
self.type = nil
|
106
107
|
end
|
107
108
|
|
108
109
|
if attributes.key?(:'id')
|
109
110
|
self.id = attributes[:'id']
|
111
|
+
else
|
112
|
+
self.id = nil
|
110
113
|
end
|
111
114
|
|
112
115
|
if attributes.key?(:'object')
|
113
116
|
self.object = attributes[:'object']
|
117
|
+
else
|
118
|
+
self.object = nil
|
114
119
|
end
|
115
120
|
|
116
121
|
if attributes.key?(:'created_at')
|
117
122
|
self.created_at = attributes[:'created_at']
|
123
|
+
else
|
124
|
+
self.created_at = nil
|
118
125
|
end
|
119
126
|
|
120
127
|
if attributes.key?(:'parent_id')
|
@@ -145,6 +152,7 @@ module Conekta
|
|
145
152
|
# Show invalid properties with the reasons. Usually used together with valid?
|
146
153
|
# @return Array for valid properties with the reasons
|
147
154
|
def list_invalid_properties
|
155
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
148
156
|
invalid_properties = Array.new
|
149
157
|
if @type.nil?
|
150
158
|
invalid_properties.push('invalid value for "type", type cannot be nil.')
|
@@ -168,6 +176,7 @@ module Conekta
|
|
168
176
|
# Check to see if the all the properties in the model are valid
|
169
177
|
# @return true if the model is valid
|
170
178
|
def valid?
|
179
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
171
180
|
return false if @type.nil?
|
172
181
|
return false if @id.nil?
|
173
182
|
return false if @object.nil?
|
@@ -208,37 +217,30 @@ module Conekta
|
|
208
217
|
# @param [Hash] attributes Model attributes in the form of hash
|
209
218
|
# @return [Object] Returns the model itself
|
210
219
|
def self.build_from_hash(attributes)
|
211
|
-
new.build_from_hash(attributes)
|
212
|
-
end
|
213
|
-
|
214
|
-
# Builds the object from hash
|
215
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
216
|
-
# @return [Object] Returns the model itself
|
217
|
-
def build_from_hash(attributes)
|
218
220
|
return nil unless attributes.is_a?(Hash)
|
219
221
|
attributes = attributes.transform_keys(&:to_sym)
|
220
|
-
|
221
|
-
|
222
|
-
|
222
|
+
transformed_hash = {}
|
223
|
+
openapi_types.each_pair do |key, type|
|
224
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
225
|
+
transformed_hash["#{key}"] = nil
|
223
226
|
elsif type =~ /\AArray<(.*)>/i
|
224
227
|
# check to ensure the input is an array given that the attribute
|
225
228
|
# is documented as an array but the input is not
|
226
|
-
if attributes[
|
227
|
-
|
229
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
230
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
228
231
|
end
|
229
|
-
elsif !attributes[
|
230
|
-
|
232
|
+
elsif !attributes[attribute_map[key]].nil?
|
233
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
231
234
|
end
|
232
235
|
end
|
233
|
-
|
234
|
-
self
|
236
|
+
new(transformed_hash)
|
235
237
|
end
|
236
238
|
|
237
239
|
# Deserializes the data based on type
|
238
240
|
# @param string type Data type
|
239
241
|
# @param string value Value to be deserialized
|
240
242
|
# @return [Object] Deserialized data
|
241
|
-
def _deserialize(type, value)
|
243
|
+
def self._deserialize(type, value)
|
242
244
|
case type.to_sym
|
243
245
|
when :Time
|
244
246
|
Time.parse(value)
|
@@ -273,7 +275,7 @@ module Conekta
|
|
273
275
|
else # model
|
274
276
|
# models (e.g. Pet) or oneOf
|
275
277
|
klass = Conekta.const_get(type)
|
276
|
-
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
278
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
277
279
|
end
|
278
280
|
end
|
279
281
|
|
@@ -6,7 +6,7 @@
|
|
6
6
|
The version of the OpenAPI document: 2.1.0
|
7
7
|
Contact: engineering@conekta.com
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
|
-
OpenAPI Generator version:
|
9
|
+
OpenAPI Generator version: 7.1.0
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
@@ -98,6 +98,7 @@ module Conekta
|
|
98
98
|
# Show invalid properties with the reasons. Usually used together with valid?
|
99
99
|
# @return Array for valid properties with the reasons
|
100
100
|
def list_invalid_properties
|
101
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
101
102
|
invalid_properties = Array.new
|
102
103
|
invalid_properties
|
103
104
|
end
|
@@ -105,6 +106,7 @@ module Conekta
|
|
105
106
|
# Check to see if the all the properties in the model are valid
|
106
107
|
# @return true if the model is valid
|
107
108
|
def valid?
|
109
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
108
110
|
true
|
109
111
|
end
|
110
112
|
|
@@ -136,37 +138,30 @@ module Conekta
|
|
136
138
|
# @param [Hash] attributes Model attributes in the form of hash
|
137
139
|
# @return [Object] Returns the model itself
|
138
140
|
def self.build_from_hash(attributes)
|
139
|
-
new.build_from_hash(attributes)
|
140
|
-
end
|
141
|
-
|
142
|
-
# Builds the object from hash
|
143
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
144
|
-
# @return [Object] Returns the model itself
|
145
|
-
def build_from_hash(attributes)
|
146
141
|
return nil unless attributes.is_a?(Hash)
|
147
142
|
attributes = attributes.transform_keys(&:to_sym)
|
148
|
-
|
149
|
-
|
150
|
-
|
143
|
+
transformed_hash = {}
|
144
|
+
openapi_types.each_pair do |key, type|
|
145
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
146
|
+
transformed_hash["#{key}"] = nil
|
151
147
|
elsif type =~ /\AArray<(.*)>/i
|
152
148
|
# check to ensure the input is an array given that the attribute
|
153
149
|
# is documented as an array but the input is not
|
154
|
-
if attributes[
|
155
|
-
|
150
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
151
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
156
152
|
end
|
157
|
-
elsif !attributes[
|
158
|
-
|
153
|
+
elsif !attributes[attribute_map[key]].nil?
|
154
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
159
155
|
end
|
160
156
|
end
|
161
|
-
|
162
|
-
self
|
157
|
+
new(transformed_hash)
|
163
158
|
end
|
164
159
|
|
165
160
|
# Deserializes the data based on type
|
166
161
|
# @param string type Data type
|
167
162
|
# @param string value Value to be deserialized
|
168
163
|
# @return [Object] Deserialized data
|
169
|
-
def _deserialize(type, value)
|
164
|
+
def self._deserialize(type, value)
|
170
165
|
case type.to_sym
|
171
166
|
when :Time
|
172
167
|
Time.parse(value)
|
@@ -201,7 +196,7 @@ module Conekta
|
|
201
196
|
else # model
|
202
197
|
# models (e.g. Pet) or oneOf
|
203
198
|
klass = Conekta.const_get(type)
|
204
|
-
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
199
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
205
200
|
end
|
206
201
|
end
|
207
202
|
|