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
|
|
@@ -66,16 +66,21 @@ module Conekta
|
|
66
66
|
|
67
67
|
if attributes.key?(:'has_more')
|
68
68
|
self.has_more = attributes[:'has_more']
|
69
|
+
else
|
70
|
+
self.has_more = nil
|
69
71
|
end
|
70
72
|
|
71
73
|
if attributes.key?(:'object')
|
72
74
|
self.object = attributes[:'object']
|
75
|
+
else
|
76
|
+
self.object = nil
|
73
77
|
end
|
74
78
|
end
|
75
79
|
|
76
80
|
# Show invalid properties with the reasons. Usually used together with valid?
|
77
81
|
# @return Array for valid properties with the reasons
|
78
82
|
def list_invalid_properties
|
83
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
79
84
|
invalid_properties = Array.new
|
80
85
|
if @has_more.nil?
|
81
86
|
invalid_properties.push('invalid value for "has_more", has_more cannot be nil.')
|
@@ -91,6 +96,7 @@ module Conekta
|
|
91
96
|
# Check to see if the all the properties in the model are valid
|
92
97
|
# @return true if the model is valid
|
93
98
|
def valid?
|
99
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
94
100
|
return false if @has_more.nil?
|
95
101
|
return false if @object.nil?
|
96
102
|
true
|
@@ -121,37 +127,30 @@ module Conekta
|
|
121
127
|
# @param [Hash] attributes Model attributes in the form of hash
|
122
128
|
# @return [Object] Returns the model itself
|
123
129
|
def self.build_from_hash(attributes)
|
124
|
-
new.build_from_hash(attributes)
|
125
|
-
end
|
126
|
-
|
127
|
-
# Builds the object from hash
|
128
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
129
|
-
# @return [Object] Returns the model itself
|
130
|
-
def build_from_hash(attributes)
|
131
130
|
return nil unless attributes.is_a?(Hash)
|
132
131
|
attributes = attributes.transform_keys(&:to_sym)
|
133
|
-
|
134
|
-
|
135
|
-
|
132
|
+
transformed_hash = {}
|
133
|
+
openapi_types.each_pair do |key, type|
|
134
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
135
|
+
transformed_hash["#{key}"] = nil
|
136
136
|
elsif type =~ /\AArray<(.*)>/i
|
137
137
|
# check to ensure the input is an array given that the attribute
|
138
138
|
# is documented as an array but the input is not
|
139
|
-
if attributes[
|
140
|
-
|
139
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
140
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
141
141
|
end
|
142
|
-
elsif !attributes[
|
143
|
-
|
142
|
+
elsif !attributes[attribute_map[key]].nil?
|
143
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
144
144
|
end
|
145
145
|
end
|
146
|
-
|
147
|
-
self
|
146
|
+
new(transformed_hash)
|
148
147
|
end
|
149
148
|
|
150
149
|
# Deserializes the data based on type
|
151
150
|
# @param string type Data type
|
152
151
|
# @param string value Value to be deserialized
|
153
152
|
# @return [Object] Deserialized data
|
154
|
-
def _deserialize(type, value)
|
153
|
+
def self._deserialize(type, value)
|
155
154
|
case type.to_sym
|
156
155
|
when :Time
|
157
156
|
Time.parse(value)
|
@@ -186,7 +185,7 @@ module Conekta
|
|
186
185
|
else # model
|
187
186
|
# models (e.g. Pet) or oneOf
|
188
187
|
klass = Conekta.const_get(type)
|
189
|
-
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
188
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
190
189
|
end
|
191
190
|
end
|
192
191
|
|
@@ -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
|
|
@@ -67,12 +67,15 @@ module Conekta
|
|
67
67
|
|
68
68
|
if attributes.key?(:'object')
|
69
69
|
self.object = attributes[:'object']
|
70
|
+
else
|
71
|
+
self.object = nil
|
70
72
|
end
|
71
73
|
end
|
72
74
|
|
73
75
|
# Show invalid properties with the reasons. Usually used together with valid?
|
74
76
|
# @return Array for valid properties with the reasons
|
75
77
|
def list_invalid_properties
|
78
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
76
79
|
invalid_properties = Array.new
|
77
80
|
if @object.nil?
|
78
81
|
invalid_properties.push('invalid value for "object", object cannot be nil.')
|
@@ -84,6 +87,7 @@ module Conekta
|
|
84
87
|
# Check to see if the all the properties in the model are valid
|
85
88
|
# @return true if the model is valid
|
86
89
|
def valid?
|
90
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
87
91
|
return false if @object.nil?
|
88
92
|
true
|
89
93
|
end
|
@@ -113,37 +117,30 @@ module Conekta
|
|
113
117
|
# @param [Hash] attributes Model attributes in the form of hash
|
114
118
|
# @return [Object] Returns the model itself
|
115
119
|
def self.build_from_hash(attributes)
|
116
|
-
new.build_from_hash(attributes)
|
117
|
-
end
|
118
|
-
|
119
|
-
# Builds the object from hash
|
120
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
121
|
-
# @return [Object] Returns the model itself
|
122
|
-
def build_from_hash(attributes)
|
123
120
|
return nil unless attributes.is_a?(Hash)
|
124
121
|
attributes = attributes.transform_keys(&:to_sym)
|
125
|
-
|
126
|
-
|
127
|
-
|
122
|
+
transformed_hash = {}
|
123
|
+
openapi_types.each_pair do |key, type|
|
124
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
125
|
+
transformed_hash["#{key}"] = nil
|
128
126
|
elsif type =~ /\AArray<(.*)>/i
|
129
127
|
# check to ensure the input is an array given that the attribute
|
130
128
|
# is documented as an array but the input is not
|
131
|
-
if attributes[
|
132
|
-
|
129
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
130
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
133
131
|
end
|
134
|
-
elsif !attributes[
|
135
|
-
|
132
|
+
elsif !attributes[attribute_map[key]].nil?
|
133
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
136
134
|
end
|
137
135
|
end
|
138
|
-
|
139
|
-
self
|
136
|
+
new(transformed_hash)
|
140
137
|
end
|
141
138
|
|
142
139
|
# Deserializes the data based on type
|
143
140
|
# @param string type Data type
|
144
141
|
# @param string value Value to be deserialized
|
145
142
|
# @return [Object] Deserialized data
|
146
|
-
def _deserialize(type, value)
|
143
|
+
def self._deserialize(type, value)
|
147
144
|
case type.to_sym
|
148
145
|
when :Time
|
149
146
|
Time.parse(value)
|
@@ -178,7 +175,7 @@ module Conekta
|
|
178
175
|
else # model
|
179
176
|
# models (e.g. Pet) or oneOf
|
180
177
|
klass = Conekta.const_get(type)
|
181
|
-
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
178
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
182
179
|
end
|
183
180
|
end
|
184
181
|
|
@@ -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
|
|
@@ -123,7 +123,6 @@ module Conekta
|
|
123
123
|
# List of class defined in allOf (OpenAPI v3)
|
124
124
|
def self.openapi_all_of
|
125
125
|
[
|
126
|
-
:'ChargeDataPaymentMethodBankTransferResponse',
|
127
126
|
:'PaymentMethod'
|
128
127
|
]
|
129
128
|
end
|
@@ -149,6 +148,8 @@ module Conekta
|
|
149
148
|
|
150
149
|
if attributes.key?(:'object')
|
151
150
|
self.object = attributes[:'object']
|
151
|
+
else
|
152
|
+
self.object = nil
|
152
153
|
end
|
153
154
|
|
154
155
|
if attributes.key?(:'bank')
|
@@ -221,6 +222,7 @@ module Conekta
|
|
221
222
|
# Show invalid properties with the reasons. Usually used together with valid?
|
222
223
|
# @return Array for valid properties with the reasons
|
223
224
|
def list_invalid_properties
|
225
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
224
226
|
invalid_properties = Array.new
|
225
227
|
if @object.nil?
|
226
228
|
invalid_properties.push('invalid value for "object", object cannot be nil.')
|
@@ -232,6 +234,7 @@ module Conekta
|
|
232
234
|
# Check to see if the all the properties in the model are valid
|
233
235
|
# @return true if the model is valid
|
234
236
|
def valid?
|
237
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
235
238
|
return false if @object.nil?
|
236
239
|
true
|
237
240
|
end
|
@@ -277,37 +280,30 @@ module Conekta
|
|
277
280
|
# @param [Hash] attributes Model attributes in the form of hash
|
278
281
|
# @return [Object] Returns the model itself
|
279
282
|
def self.build_from_hash(attributes)
|
280
|
-
new.build_from_hash(attributes)
|
281
|
-
end
|
282
|
-
|
283
|
-
# Builds the object from hash
|
284
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
285
|
-
# @return [Object] Returns the model itself
|
286
|
-
def build_from_hash(attributes)
|
287
283
|
return nil unless attributes.is_a?(Hash)
|
288
284
|
attributes = attributes.transform_keys(&:to_sym)
|
289
|
-
|
290
|
-
|
291
|
-
|
285
|
+
transformed_hash = {}
|
286
|
+
openapi_types.each_pair do |key, type|
|
287
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
288
|
+
transformed_hash["#{key}"] = nil
|
292
289
|
elsif type =~ /\AArray<(.*)>/i
|
293
290
|
# check to ensure the input is an array given that the attribute
|
294
291
|
# is documented as an array but the input is not
|
295
|
-
if attributes[
|
296
|
-
|
292
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
293
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
297
294
|
end
|
298
|
-
elsif !attributes[
|
299
|
-
|
295
|
+
elsif !attributes[attribute_map[key]].nil?
|
296
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
300
297
|
end
|
301
298
|
end
|
302
|
-
|
303
|
-
self
|
299
|
+
new(transformed_hash)
|
304
300
|
end
|
305
301
|
|
306
302
|
# Deserializes the data based on type
|
307
303
|
# @param string type Data type
|
308
304
|
# @param string value Value to be deserialized
|
309
305
|
# @return [Object] Deserialized data
|
310
|
-
def _deserialize(type, value)
|
306
|
+
def self._deserialize(type, value)
|
311
307
|
case type.to_sym
|
312
308
|
when :Time
|
313
309
|
Time.parse(value)
|
@@ -342,7 +338,7 @@ module Conekta
|
|
342
338
|
else # model
|
343
339
|
# models (e.g. Pet) or oneOf
|
344
340
|
klass = Conekta.const_get(type)
|
345
|
-
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
341
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
346
342
|
end
|
347
343
|
end
|
348
344
|
|
@@ -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
|
|
@@ -94,7 +94,6 @@ module Conekta
|
|
94
94
|
# List of class defined in allOf (OpenAPI v3)
|
95
95
|
def self.openapi_all_of
|
96
96
|
[
|
97
|
-
:'ChargeDataPaymentMethodCardResponse',
|
98
97
|
:'PaymentMethod'
|
99
98
|
]
|
100
99
|
end
|
@@ -120,6 +119,8 @@ module Conekta
|
|
120
119
|
|
121
120
|
if attributes.key?(:'object')
|
122
121
|
self.object = attributes[:'object']
|
122
|
+
else
|
123
|
+
self.object = nil
|
123
124
|
end
|
124
125
|
|
125
126
|
if attributes.key?(:'account_type')
|
@@ -172,45 +173,23 @@ module Conekta
|
|
172
173
|
# Show invalid properties with the reasons. Usually used together with valid?
|
173
174
|
# @return Array for valid properties with the reasons
|
174
175
|
def list_invalid_properties
|
176
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
175
177
|
invalid_properties = Array.new
|
176
178
|
if @object.nil?
|
177
179
|
invalid_properties.push('invalid value for "object", object cannot be nil.')
|
178
180
|
end
|
179
181
|
|
180
|
-
if !@contract_id.nil? && @contract_id.to_s.length > 10
|
181
|
-
invalid_properties.push('invalid value for "contract_id", the character length must be smaller than or equal to 10.')
|
182
|
-
end
|
183
|
-
|
184
|
-
if !@contract_id.nil? && @contract_id.to_s.length < 10
|
185
|
-
invalid_properties.push('invalid value for "contract_id", the character length must be great than or equal to 10.')
|
186
|
-
end
|
187
|
-
|
188
182
|
invalid_properties
|
189
183
|
end
|
190
184
|
|
191
185
|
# Check to see if the all the properties in the model are valid
|
192
186
|
# @return true if the model is valid
|
193
187
|
def valid?
|
188
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
194
189
|
return false if @object.nil?
|
195
|
-
return false if !@contract_id.nil? && @contract_id.to_s.length > 10
|
196
|
-
return false if !@contract_id.nil? && @contract_id.to_s.length < 10
|
197
190
|
true
|
198
191
|
end
|
199
192
|
|
200
|
-
# Custom attribute writer method with validation
|
201
|
-
# @param [Object] contract_id Value to be assigned
|
202
|
-
def contract_id=(contract_id)
|
203
|
-
if !contract_id.nil? && contract_id.to_s.length > 10
|
204
|
-
fail ArgumentError, 'invalid value for "contract_id", the character length must be smaller than or equal to 10.'
|
205
|
-
end
|
206
|
-
|
207
|
-
if !contract_id.nil? && contract_id.to_s.length < 10
|
208
|
-
fail ArgumentError, 'invalid value for "contract_id", the character length must be great than or equal to 10.'
|
209
|
-
end
|
210
|
-
|
211
|
-
@contract_id = contract_id
|
212
|
-
end
|
213
|
-
|
214
193
|
# Checks equality by comparing each attribute.
|
215
194
|
# @param [Object] Object to be compared
|
216
195
|
def ==(o)
|
@@ -247,37 +226,30 @@ module Conekta
|
|
247
226
|
# @param [Hash] attributes Model attributes in the form of hash
|
248
227
|
# @return [Object] Returns the model itself
|
249
228
|
def self.build_from_hash(attributes)
|
250
|
-
new.build_from_hash(attributes)
|
251
|
-
end
|
252
|
-
|
253
|
-
# Builds the object from hash
|
254
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
255
|
-
# @return [Object] Returns the model itself
|
256
|
-
def build_from_hash(attributes)
|
257
229
|
return nil unless attributes.is_a?(Hash)
|
258
230
|
attributes = attributes.transform_keys(&:to_sym)
|
259
|
-
|
260
|
-
|
261
|
-
|
231
|
+
transformed_hash = {}
|
232
|
+
openapi_types.each_pair do |key, type|
|
233
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
234
|
+
transformed_hash["#{key}"] = nil
|
262
235
|
elsif type =~ /\AArray<(.*)>/i
|
263
236
|
# check to ensure the input is an array given that the attribute
|
264
237
|
# is documented as an array but the input is not
|
265
|
-
if attributes[
|
266
|
-
|
238
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
239
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
267
240
|
end
|
268
|
-
elsif !attributes[
|
269
|
-
|
241
|
+
elsif !attributes[attribute_map[key]].nil?
|
242
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
270
243
|
end
|
271
244
|
end
|
272
|
-
|
273
|
-
self
|
245
|
+
new(transformed_hash)
|
274
246
|
end
|
275
247
|
|
276
248
|
# Deserializes the data based on type
|
277
249
|
# @param string type Data type
|
278
250
|
# @param string value Value to be deserialized
|
279
251
|
# @return [Object] Deserialized data
|
280
|
-
def _deserialize(type, value)
|
252
|
+
def self._deserialize(type, value)
|
281
253
|
case type.to_sym
|
282
254
|
when :Time
|
283
255
|
Time.parse(value)
|
@@ -312,7 +284,7 @@ module Conekta
|
|
312
284
|
else # model
|
313
285
|
# models (e.g. Pet) or oneOf
|
314
286
|
klass = Conekta.const_get(type)
|
315
|
-
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
287
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
316
288
|
end
|
317
289
|
end
|
318
290
|
|
@@ -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
|
|
@@ -51,8 +51,7 @@ module Conekta
|
|
51
51
|
# List of class defined in allOf (OpenAPI v3)
|
52
52
|
def self.openapi_all_of
|
53
53
|
[
|
54
|
-
:'CustomerPaymentMethodRequest'
|
55
|
-
:'PaymentMethodCardRequestAllOf'
|
54
|
+
:'CustomerPaymentMethodRequest'
|
56
55
|
]
|
57
56
|
end
|
58
57
|
|
@@ -73,16 +72,21 @@ module Conekta
|
|
73
72
|
|
74
73
|
if attributes.key?(:'type')
|
75
74
|
self.type = attributes[:'type']
|
75
|
+
else
|
76
|
+
self.type = nil
|
76
77
|
end
|
77
78
|
|
78
79
|
if attributes.key?(:'token_id')
|
79
80
|
self.token_id = attributes[:'token_id']
|
81
|
+
else
|
82
|
+
self.token_id = nil
|
80
83
|
end
|
81
84
|
end
|
82
85
|
|
83
86
|
# Show invalid properties with the reasons. Usually used together with valid?
|
84
87
|
# @return Array for valid properties with the reasons
|
85
88
|
def list_invalid_properties
|
89
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
86
90
|
invalid_properties = Array.new
|
87
91
|
if @type.nil?
|
88
92
|
invalid_properties.push('invalid value for "type", type cannot be nil.')
|
@@ -98,6 +102,7 @@ module Conekta
|
|
98
102
|
# Check to see if the all the properties in the model are valid
|
99
103
|
# @return true if the model is valid
|
100
104
|
def valid?
|
105
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
101
106
|
return false if @type.nil?
|
102
107
|
return false if @token_id.nil?
|
103
108
|
true
|
@@ -128,37 +133,30 @@ module Conekta
|
|
128
133
|
# @param [Hash] attributes Model attributes in the form of hash
|
129
134
|
# @return [Object] Returns the model itself
|
130
135
|
def self.build_from_hash(attributes)
|
131
|
-
new.build_from_hash(attributes)
|
132
|
-
end
|
133
|
-
|
134
|
-
# Builds the object from hash
|
135
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
136
|
-
# @return [Object] Returns the model itself
|
137
|
-
def build_from_hash(attributes)
|
138
136
|
return nil unless attributes.is_a?(Hash)
|
139
137
|
attributes = attributes.transform_keys(&:to_sym)
|
140
|
-
|
141
|
-
|
142
|
-
|
138
|
+
transformed_hash = {}
|
139
|
+
openapi_types.each_pair do |key, type|
|
140
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
141
|
+
transformed_hash["#{key}"] = nil
|
143
142
|
elsif type =~ /\AArray<(.*)>/i
|
144
143
|
# check to ensure the input is an array given that the attribute
|
145
144
|
# is documented as an array but the input is not
|
146
|
-
if attributes[
|
147
|
-
|
145
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
146
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
148
147
|
end
|
149
|
-
elsif !attributes[
|
150
|
-
|
148
|
+
elsif !attributes[attribute_map[key]].nil?
|
149
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
151
150
|
end
|
152
151
|
end
|
153
|
-
|
154
|
-
self
|
152
|
+
new(transformed_hash)
|
155
153
|
end
|
156
154
|
|
157
155
|
# Deserializes the data based on type
|
158
156
|
# @param string type Data type
|
159
157
|
# @param string value Value to be deserialized
|
160
158
|
# @return [Object] Deserialized data
|
161
|
-
def _deserialize(type, value)
|
159
|
+
def self._deserialize(type, value)
|
162
160
|
case type.to_sym
|
163
161
|
when :Time
|
164
162
|
Time.parse(value)
|
@@ -193,7 +191,7 @@ module Conekta
|
|
193
191
|
else # model
|
194
192
|
# models (e.g. Pet) or oneOf
|
195
193
|
klass = Conekta.const_get(type)
|
196
|
-
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
194
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
197
195
|
end
|
198
196
|
end
|
199
197
|
|
@@ -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
|
|
@@ -66,6 +66,7 @@ module Conekta
|
|
66
66
|
# Show invalid properties with the reasons. Usually used together with valid?
|
67
67
|
# @return Array for valid properties with the reasons
|
68
68
|
def list_invalid_properties
|
69
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
69
70
|
invalid_properties = Array.new
|
70
71
|
invalid_properties
|
71
72
|
end
|
@@ -73,6 +74,7 @@ module Conekta
|
|
73
74
|
# Check to see if the all the properties in the model are valid
|
74
75
|
# @return true if the model is valid
|
75
76
|
def valid?
|
77
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
76
78
|
true
|
77
79
|
end
|
78
80
|
|
@@ -100,37 +102,30 @@ module Conekta
|
|
100
102
|
# @param [Hash] attributes Model attributes in the form of hash
|
101
103
|
# @return [Object] Returns the model itself
|
102
104
|
def self.build_from_hash(attributes)
|
103
|
-
new.build_from_hash(attributes)
|
104
|
-
end
|
105
|
-
|
106
|
-
# Builds the object from hash
|
107
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
108
|
-
# @return [Object] Returns the model itself
|
109
|
-
def build_from_hash(attributes)
|
110
105
|
return nil unless attributes.is_a?(Hash)
|
111
106
|
attributes = attributes.transform_keys(&:to_sym)
|
112
|
-
|
113
|
-
|
114
|
-
|
107
|
+
transformed_hash = {}
|
108
|
+
openapi_types.each_pair do |key, type|
|
109
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
110
|
+
transformed_hash["#{key}"] = nil
|
115
111
|
elsif type =~ /\AArray<(.*)>/i
|
116
112
|
# check to ensure the input is an array given that the attribute
|
117
113
|
# is documented as an array but the input is not
|
118
|
-
if attributes[
|
119
|
-
|
114
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
115
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
120
116
|
end
|
121
|
-
elsif !attributes[
|
122
|
-
|
117
|
+
elsif !attributes[attribute_map[key]].nil?
|
118
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
123
119
|
end
|
124
120
|
end
|
125
|
-
|
126
|
-
self
|
121
|
+
new(transformed_hash)
|
127
122
|
end
|
128
123
|
|
129
124
|
# Deserializes the data based on type
|
130
125
|
# @param string type Data type
|
131
126
|
# @param string value Value to be deserialized
|
132
127
|
# @return [Object] Deserialized data
|
133
|
-
def _deserialize(type, value)
|
128
|
+
def self._deserialize(type, value)
|
134
129
|
case type.to_sym
|
135
130
|
when :Time
|
136
131
|
Time.parse(value)
|
@@ -165,7 +160,7 @@ module Conekta
|
|
165
160
|
else # model
|
166
161
|
# models (e.g. Pet) or oneOf
|
167
162
|
klass = Conekta.const_get(type)
|
168
|
-
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
163
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
169
164
|
end
|
170
165
|
end
|
171
166
|
|