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