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
|
|
@@ -139,10 +139,14 @@ module Conekta
|
|
139
139
|
|
140
140
|
if attributes.key?(:'created_at')
|
141
141
|
self.created_at = attributes[:'created_at']
|
142
|
+
else
|
143
|
+
self.created_at = nil
|
142
144
|
end
|
143
145
|
|
144
146
|
if attributes.key?(:'id')
|
145
147
|
self.id = attributes[:'id']
|
148
|
+
else
|
149
|
+
self.id = nil
|
146
150
|
end
|
147
151
|
|
148
152
|
if attributes.key?(:'ip_address')
|
@@ -151,6 +155,8 @@ module Conekta
|
|
151
155
|
|
152
156
|
if attributes.key?(:'livemode')
|
153
157
|
self.livemode = attributes[:'livemode']
|
158
|
+
else
|
159
|
+
self.livemode = nil
|
154
160
|
end
|
155
161
|
|
156
162
|
if attributes.key?(:'loggable_id')
|
@@ -229,6 +235,7 @@ module Conekta
|
|
229
235
|
# Show invalid properties with the reasons. Usually used together with valid?
|
230
236
|
# @return Array for valid properties with the reasons
|
231
237
|
def list_invalid_properties
|
238
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
232
239
|
invalid_properties = Array.new
|
233
240
|
if @created_at.nil?
|
234
241
|
invalid_properties.push('invalid value for "created_at", created_at cannot be nil.')
|
@@ -248,6 +255,7 @@ module Conekta
|
|
248
255
|
# Check to see if the all the properties in the model are valid
|
249
256
|
# @return true if the model is valid
|
250
257
|
def valid?
|
258
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
251
259
|
return false if @created_at.nil?
|
252
260
|
return false if @id.nil?
|
253
261
|
return false if @livemode.nil?
|
@@ -297,37 +305,30 @@ module Conekta
|
|
297
305
|
# @param [Hash] attributes Model attributes in the form of hash
|
298
306
|
# @return [Object] Returns the model itself
|
299
307
|
def self.build_from_hash(attributes)
|
300
|
-
new.build_from_hash(attributes)
|
301
|
-
end
|
302
|
-
|
303
|
-
# Builds the object from hash
|
304
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
305
|
-
# @return [Object] Returns the model itself
|
306
|
-
def build_from_hash(attributes)
|
307
308
|
return nil unless attributes.is_a?(Hash)
|
308
309
|
attributes = attributes.transform_keys(&:to_sym)
|
309
|
-
|
310
|
-
|
311
|
-
|
310
|
+
transformed_hash = {}
|
311
|
+
openapi_types.each_pair do |key, type|
|
312
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
313
|
+
transformed_hash["#{key}"] = nil
|
312
314
|
elsif type =~ /\AArray<(.*)>/i
|
313
315
|
# check to ensure the input is an array given that the attribute
|
314
316
|
# is documented as an array but the input is not
|
315
|
-
if attributes[
|
316
|
-
|
317
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
318
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
317
319
|
end
|
318
|
-
elsif !attributes[
|
319
|
-
|
320
|
+
elsif !attributes[attribute_map[key]].nil?
|
321
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
320
322
|
end
|
321
323
|
end
|
322
|
-
|
323
|
-
self
|
324
|
+
new(transformed_hash)
|
324
325
|
end
|
325
326
|
|
326
327
|
# Deserializes the data based on type
|
327
328
|
# @param string type Data type
|
328
329
|
# @param string value Value to be deserialized
|
329
330
|
# @return [Object] Deserialized data
|
330
|
-
def _deserialize(type, value)
|
331
|
+
def self._deserialize(type, value)
|
331
332
|
case type.to_sym
|
332
333
|
when :Time
|
333
334
|
Time.parse(value)
|
@@ -362,7 +363,7 @@ module Conekta
|
|
362
363
|
else # model
|
363
364
|
# models (e.g. Pet) or oneOf
|
364
365
|
klass = Conekta.const_get(type)
|
365
|
-
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
366
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
366
367
|
end
|
367
368
|
end
|
368
369
|
|
@@ -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
|
|
@@ -108,6 +108,7 @@ module Conekta
|
|
108
108
|
# Show invalid properties with the reasons. Usually used together with valid?
|
109
109
|
# @return Array for valid properties with the reasons
|
110
110
|
def list_invalid_properties
|
111
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
111
112
|
invalid_properties = Array.new
|
112
113
|
invalid_properties
|
113
114
|
end
|
@@ -115,6 +116,7 @@ module Conekta
|
|
115
116
|
# Check to see if the all the properties in the model are valid
|
116
117
|
# @return true if the model is valid
|
117
118
|
def valid?
|
119
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
118
120
|
true
|
119
121
|
end
|
120
122
|
|
@@ -146,37 +148,30 @@ module Conekta
|
|
146
148
|
# @param [Hash] attributes Model attributes in the form of hash
|
147
149
|
# @return [Object] Returns the model itself
|
148
150
|
def self.build_from_hash(attributes)
|
149
|
-
new.build_from_hash(attributes)
|
150
|
-
end
|
151
|
-
|
152
|
-
# Builds the object from hash
|
153
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
154
|
-
# @return [Object] Returns the model itself
|
155
|
-
def build_from_hash(attributes)
|
156
151
|
return nil unless attributes.is_a?(Hash)
|
157
152
|
attributes = attributes.transform_keys(&:to_sym)
|
158
|
-
|
159
|
-
|
160
|
-
|
153
|
+
transformed_hash = {}
|
154
|
+
openapi_types.each_pair do |key, type|
|
155
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
156
|
+
transformed_hash["#{key}"] = nil
|
161
157
|
elsif type =~ /\AArray<(.*)>/i
|
162
158
|
# check to ensure the input is an array given that the attribute
|
163
159
|
# is documented as an array but the input is not
|
164
|
-
if attributes[
|
165
|
-
|
160
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
161
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
166
162
|
end
|
167
|
-
elsif !attributes[
|
168
|
-
|
163
|
+
elsif !attributes[attribute_map[key]].nil?
|
164
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
169
165
|
end
|
170
166
|
end
|
171
|
-
|
172
|
-
self
|
167
|
+
new(transformed_hash)
|
173
168
|
end
|
174
169
|
|
175
170
|
# Deserializes the data based on type
|
176
171
|
# @param string type Data type
|
177
172
|
# @param string value Value to be deserialized
|
178
173
|
# @return [Object] Deserialized data
|
179
|
-
def _deserialize(type, value)
|
174
|
+
def self._deserialize(type, value)
|
180
175
|
case type.to_sym
|
181
176
|
when :Time
|
182
177
|
Time.parse(value)
|
@@ -211,7 +206,7 @@ module Conekta
|
|
211
206
|
else # model
|
212
207
|
# models (e.g. Pet) or oneOf
|
213
208
|
klass = Conekta.const_get(type)
|
214
|
-
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
209
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
215
210
|
end
|
216
211
|
end
|
217
212
|
|
@@ -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
|
|
@@ -228,6 +228,7 @@ module Conekta
|
|
228
228
|
# Show invalid properties with the reasons. Usually used together with valid?
|
229
229
|
# @return Array for valid properties with the reasons
|
230
230
|
def list_invalid_properties
|
231
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
231
232
|
invalid_properties = Array.new
|
232
233
|
invalid_properties
|
233
234
|
end
|
@@ -235,6 +236,7 @@ module Conekta
|
|
235
236
|
# Check to see if the all the properties in the model are valid
|
236
237
|
# @return true if the model is valid
|
237
238
|
def valid?
|
239
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
238
240
|
true
|
239
241
|
end
|
240
242
|
|
@@ -281,37 +283,30 @@ module Conekta
|
|
281
283
|
# @param [Hash] attributes Model attributes in the form of hash
|
282
284
|
# @return [Object] Returns the model itself
|
283
285
|
def self.build_from_hash(attributes)
|
284
|
-
new.build_from_hash(attributes)
|
285
|
-
end
|
286
|
-
|
287
|
-
# Builds the object from hash
|
288
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
289
|
-
# @return [Object] Returns the model itself
|
290
|
-
def build_from_hash(attributes)
|
291
286
|
return nil unless attributes.is_a?(Hash)
|
292
287
|
attributes = attributes.transform_keys(&:to_sym)
|
293
|
-
|
294
|
-
|
295
|
-
|
288
|
+
transformed_hash = {}
|
289
|
+
openapi_types.each_pair do |key, type|
|
290
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
291
|
+
transformed_hash["#{key}"] = nil
|
296
292
|
elsif type =~ /\AArray<(.*)>/i
|
297
293
|
# check to ensure the input is an array given that the attribute
|
298
294
|
# is documented as an array but the input is not
|
299
|
-
if attributes[
|
300
|
-
|
295
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
296
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
301
297
|
end
|
302
|
-
elsif !attributes[
|
303
|
-
|
298
|
+
elsif !attributes[attribute_map[key]].nil?
|
299
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
304
300
|
end
|
305
301
|
end
|
306
|
-
|
307
|
-
self
|
302
|
+
new(transformed_hash)
|
308
303
|
end
|
309
304
|
|
310
305
|
# Deserializes the data based on type
|
311
306
|
# @param string type Data type
|
312
307
|
# @param string value Value to be deserialized
|
313
308
|
# @return [Object] Deserialized data
|
314
|
-
def _deserialize(type, value)
|
309
|
+
def self._deserialize(type, value)
|
315
310
|
case type.to_sym
|
316
311
|
when :Time
|
317
312
|
Time.parse(value)
|
@@ -346,7 +341,7 @@ module Conekta
|
|
346
341
|
else # model
|
347
342
|
# models (e.g. Pet) or oneOf
|
348
343
|
klass = Conekta.const_get(type)
|
349
|
-
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
344
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
350
345
|
end
|
351
346
|
end
|
352
347
|
|
@@ -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
|
|
@@ -60,12 +60,15 @@ module Conekta
|
|
60
60
|
|
61
61
|
if attributes.key?(:'amount')
|
62
62
|
self.amount = attributes[:'amount']
|
63
|
+
else
|
64
|
+
self.amount = nil
|
63
65
|
end
|
64
66
|
end
|
65
67
|
|
66
68
|
# Show invalid properties with the reasons. Usually used together with valid?
|
67
69
|
# @return Array for valid properties with the reasons
|
68
70
|
def list_invalid_properties
|
71
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
69
72
|
invalid_properties = Array.new
|
70
73
|
if @amount.nil?
|
71
74
|
invalid_properties.push('invalid value for "amount", amount cannot be nil.')
|
@@ -81,6 +84,7 @@ module Conekta
|
|
81
84
|
# Check to see if the all the properties in the model are valid
|
82
85
|
# @return true if the model is valid
|
83
86
|
def valid?
|
87
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
84
88
|
return false if @amount.nil?
|
85
89
|
return false if @amount < 1
|
86
90
|
true
|
@@ -124,37 +128,30 @@ module Conekta
|
|
124
128
|
# @param [Hash] attributes Model attributes in the form of hash
|
125
129
|
# @return [Object] Returns the model itself
|
126
130
|
def self.build_from_hash(attributes)
|
127
|
-
new.build_from_hash(attributes)
|
128
|
-
end
|
129
|
-
|
130
|
-
# Builds the object from hash
|
131
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
132
|
-
# @return [Object] Returns the model itself
|
133
|
-
def build_from_hash(attributes)
|
134
131
|
return nil unless attributes.is_a?(Hash)
|
135
132
|
attributes = attributes.transform_keys(&:to_sym)
|
136
|
-
|
137
|
-
|
138
|
-
|
133
|
+
transformed_hash = {}
|
134
|
+
openapi_types.each_pair do |key, type|
|
135
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
136
|
+
transformed_hash["#{key}"] = nil
|
139
137
|
elsif type =~ /\AArray<(.*)>/i
|
140
138
|
# check to ensure the input is an array given that the attribute
|
141
139
|
# is documented as an array but the input is not
|
142
|
-
if attributes[
|
143
|
-
|
140
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
141
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
144
142
|
end
|
145
|
-
elsif !attributes[
|
146
|
-
|
143
|
+
elsif !attributes[attribute_map[key]].nil?
|
144
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
147
145
|
end
|
148
146
|
end
|
149
|
-
|
150
|
-
self
|
147
|
+
new(transformed_hash)
|
151
148
|
end
|
152
149
|
|
153
150
|
# Deserializes the data based on type
|
154
151
|
# @param string type Data type
|
155
152
|
# @param string value Value to be deserialized
|
156
153
|
# @return [Object] Deserialized data
|
157
|
-
def _deserialize(type, value)
|
154
|
+
def self._deserialize(type, value)
|
158
155
|
case type.to_sym
|
159
156
|
when :Time
|
160
157
|
Time.parse(value)
|
@@ -189,7 +186,7 @@ module Conekta
|
|
189
186
|
else # model
|
190
187
|
# models (e.g. Pet) or oneOf
|
191
188
|
klass = Conekta.const_get(type)
|
192
|
-
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
189
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
193
190
|
end
|
194
191
|
end
|
195
192
|
|
@@ -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
|
|
@@ -14,7 +14,10 @@ require 'date'
|
|
14
14
|
require 'time'
|
15
15
|
|
16
16
|
module Conekta
|
17
|
-
class
|
17
|
+
class OrderCustomerInfoResponse
|
18
|
+
# Custom reference
|
19
|
+
attr_accessor :customer_custom_reference
|
20
|
+
|
18
21
|
attr_accessor :name
|
19
22
|
|
20
23
|
attr_accessor :email
|
@@ -28,6 +31,7 @@ module Conekta
|
|
28
31
|
# Attribute mapping from ruby-style variable name to JSON key.
|
29
32
|
def self.attribute_map
|
30
33
|
{
|
34
|
+
:'customer_custom_reference' => :'customer_custom_reference',
|
31
35
|
:'name' => :'name',
|
32
36
|
:'email' => :'email',
|
33
37
|
:'phone' => :'phone',
|
@@ -44,6 +48,7 @@ module Conekta
|
|
44
48
|
# Attribute type mapping.
|
45
49
|
def self.openapi_types
|
46
50
|
{
|
51
|
+
:'customer_custom_reference' => :'String',
|
47
52
|
:'name' => :'String',
|
48
53
|
:'email' => :'String',
|
49
54
|
:'phone' => :'String',
|
@@ -55,6 +60,7 @@ module Conekta
|
|
55
60
|
# List of attributes with nullable: true
|
56
61
|
def self.openapi_nullable
|
57
62
|
Set.new([
|
63
|
+
:'customer_custom_reference',
|
58
64
|
])
|
59
65
|
end
|
60
66
|
|
@@ -62,17 +68,21 @@ module Conekta
|
|
62
68
|
# @param [Hash] attributes Model attributes in the form of hash
|
63
69
|
def initialize(attributes = {})
|
64
70
|
if (!attributes.is_a?(Hash))
|
65
|
-
fail ArgumentError, "The input argument (attributes) must be a hash in `Conekta::
|
71
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Conekta::OrderCustomerInfoResponse` initialize method"
|
66
72
|
end
|
67
73
|
|
68
74
|
# check to see if the attribute exists and convert string to symbol for hash key
|
69
75
|
attributes = attributes.each_with_object({}) { |(k, v), h|
|
70
76
|
if (!self.class.attribute_map.key?(k.to_sym))
|
71
|
-
fail ArgumentError, "`#{k}` is not a valid attribute in `Conekta::
|
77
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Conekta::OrderCustomerInfoResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
72
78
|
end
|
73
79
|
h[k.to_sym] = v
|
74
80
|
}
|
75
81
|
|
82
|
+
if attributes.key?(:'customer_custom_reference')
|
83
|
+
self.customer_custom_reference = attributes[:'customer_custom_reference']
|
84
|
+
end
|
85
|
+
|
76
86
|
if attributes.key?(:'name')
|
77
87
|
self.name = attributes[:'name']
|
78
88
|
end
|
@@ -99,6 +109,7 @@ module Conekta
|
|
99
109
|
# Show invalid properties with the reasons. Usually used together with valid?
|
100
110
|
# @return Array for valid properties with the reasons
|
101
111
|
def list_invalid_properties
|
112
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
102
113
|
invalid_properties = Array.new
|
103
114
|
invalid_properties
|
104
115
|
end
|
@@ -106,6 +117,7 @@ module Conekta
|
|
106
117
|
# Check to see if the all the properties in the model are valid
|
107
118
|
# @return true if the model is valid
|
108
119
|
def valid?
|
120
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
109
121
|
true
|
110
122
|
end
|
111
123
|
|
@@ -114,6 +126,7 @@ module Conekta
|
|
114
126
|
def ==(o)
|
115
127
|
return true if self.equal?(o)
|
116
128
|
self.class == o.class &&
|
129
|
+
customer_custom_reference == o.customer_custom_reference &&
|
117
130
|
name == o.name &&
|
118
131
|
email == o.email &&
|
119
132
|
phone == o.phone &&
|
@@ -130,44 +143,37 @@ module Conekta
|
|
130
143
|
# Calculates hash code according to all attributes.
|
131
144
|
# @return [Integer] Hash code
|
132
145
|
def hash
|
133
|
-
[name, email, phone, corporate, object].hash
|
146
|
+
[customer_custom_reference, name, email, phone, corporate, object].hash
|
134
147
|
end
|
135
148
|
|
136
149
|
# Builds the object from hash
|
137
150
|
# @param [Hash] attributes Model attributes in the form of hash
|
138
151
|
# @return [Object] Returns the model itself
|
139
152
|
def self.build_from_hash(attributes)
|
140
|
-
new.build_from_hash(attributes)
|
141
|
-
end
|
142
|
-
|
143
|
-
# Builds the object from hash
|
144
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
145
|
-
# @return [Object] Returns the model itself
|
146
|
-
def build_from_hash(attributes)
|
147
153
|
return nil unless attributes.is_a?(Hash)
|
148
154
|
attributes = attributes.transform_keys(&:to_sym)
|
149
|
-
|
150
|
-
|
151
|
-
|
155
|
+
transformed_hash = {}
|
156
|
+
openapi_types.each_pair do |key, type|
|
157
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
158
|
+
transformed_hash["#{key}"] = nil
|
152
159
|
elsif type =~ /\AArray<(.*)>/i
|
153
160
|
# check to ensure the input is an array given that the attribute
|
154
161
|
# is documented as an array but the input is not
|
155
|
-
if attributes[
|
156
|
-
|
162
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
163
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
157
164
|
end
|
158
|
-
elsif !attributes[
|
159
|
-
|
165
|
+
elsif !attributes[attribute_map[key]].nil?
|
166
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
160
167
|
end
|
161
168
|
end
|
162
|
-
|
163
|
-
self
|
169
|
+
new(transformed_hash)
|
164
170
|
end
|
165
171
|
|
166
172
|
# Deserializes the data based on type
|
167
173
|
# @param string type Data type
|
168
174
|
# @param string value Value to be deserialized
|
169
175
|
# @return [Object] Deserialized data
|
170
|
-
def _deserialize(type, value)
|
176
|
+
def self._deserialize(type, value)
|
171
177
|
case type.to_sym
|
172
178
|
when :Time
|
173
179
|
Time.parse(value)
|
@@ -202,7 +208,7 @@ module Conekta
|
|
202
208
|
else # model
|
203
209
|
# models (e.g. Pet) or oneOf
|
204
210
|
klass = Conekta.const_get(type)
|
205
|
-
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
211
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
206
212
|
end
|
207
213
|
end
|
208
214
|
|
@@ -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
|
|
@@ -71,20 +71,27 @@ module Conekta
|
|
71
71
|
|
72
72
|
if attributes.key?(:'amount')
|
73
73
|
self.amount = attributes[:'amount']
|
74
|
+
else
|
75
|
+
self.amount = nil
|
74
76
|
end
|
75
77
|
|
76
78
|
if attributes.key?(:'code')
|
77
79
|
self.code = attributes[:'code']
|
80
|
+
else
|
81
|
+
self.code = nil
|
78
82
|
end
|
79
83
|
|
80
84
|
if attributes.key?(:'type')
|
81
85
|
self.type = attributes[:'type']
|
86
|
+
else
|
87
|
+
self.type = nil
|
82
88
|
end
|
83
89
|
end
|
84
90
|
|
85
91
|
# Show invalid properties with the reasons. Usually used together with valid?
|
86
92
|
# @return Array for valid properties with the reasons
|
87
93
|
def list_invalid_properties
|
94
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
88
95
|
invalid_properties = Array.new
|
89
96
|
if @amount.nil?
|
90
97
|
invalid_properties.push('invalid value for "amount", amount cannot be nil.')
|
@@ -108,6 +115,7 @@ module Conekta
|
|
108
115
|
# Check to see if the all the properties in the model are valid
|
109
116
|
# @return true if the model is valid
|
110
117
|
def valid?
|
118
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
111
119
|
return false if @amount.nil?
|
112
120
|
return false if @amount < 0
|
113
121
|
return false if @code.nil?
|
@@ -155,37 +163,30 @@ module Conekta
|
|
155
163
|
# @param [Hash] attributes Model attributes in the form of hash
|
156
164
|
# @return [Object] Returns the model itself
|
157
165
|
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
166
|
return nil unless attributes.is_a?(Hash)
|
166
167
|
attributes = attributes.transform_keys(&:to_sym)
|
167
|
-
|
168
|
-
|
169
|
-
|
168
|
+
transformed_hash = {}
|
169
|
+
openapi_types.each_pair do |key, type|
|
170
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
171
|
+
transformed_hash["#{key}"] = nil
|
170
172
|
elsif type =~ /\AArray<(.*)>/i
|
171
173
|
# check to ensure the input is an array given that the attribute
|
172
174
|
# is documented as an array but the input is not
|
173
|
-
if attributes[
|
174
|
-
|
175
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
176
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
175
177
|
end
|
176
|
-
elsif !attributes[
|
177
|
-
|
178
|
+
elsif !attributes[attribute_map[key]].nil?
|
179
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
178
180
|
end
|
179
181
|
end
|
180
|
-
|
181
|
-
self
|
182
|
+
new(transformed_hash)
|
182
183
|
end
|
183
184
|
|
184
185
|
# Deserializes the data based on type
|
185
186
|
# @param string type Data type
|
186
187
|
# @param string value Value to be deserialized
|
187
188
|
# @return [Object] Deserialized data
|
188
|
-
def _deserialize(type, value)
|
189
|
+
def self._deserialize(type, value)
|
189
190
|
case type.to_sym
|
190
191
|
when :Time
|
191
192
|
Time.parse(value)
|
@@ -220,7 +221,7 @@ module Conekta
|
|
220
221
|
else # model
|
221
222
|
# models (e.g. Pet) or oneOf
|
222
223
|
klass = Conekta.const_get(type)
|
223
|
-
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
224
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
224
225
|
end
|
225
226
|
end
|
226
227
|
|