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