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