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
|
|
@@ -137,6 +137,8 @@ module Conekta
|
|
137
137
|
|
138
138
|
if attributes.key?(:'email')
|
139
139
|
self.email = attributes[:'email']
|
140
|
+
else
|
141
|
+
self.email = nil
|
140
142
|
end
|
141
143
|
|
142
144
|
if attributes.key?(:'default_payment_source_id')
|
@@ -161,6 +163,8 @@ module Conekta
|
|
161
163
|
|
162
164
|
if attributes.key?(:'name')
|
163
165
|
self.name = attributes[:'name']
|
166
|
+
else
|
167
|
+
self.name = nil
|
164
168
|
end
|
165
169
|
|
166
170
|
if attributes.key?(:'payment_sources')
|
@@ -171,6 +175,8 @@ module Conekta
|
|
171
175
|
|
172
176
|
if attributes.key?(:'phone')
|
173
177
|
self.phone = attributes[:'phone']
|
178
|
+
else
|
179
|
+
self.phone = nil
|
174
180
|
end
|
175
181
|
|
176
182
|
if attributes.key?(:'plan_id')
|
@@ -191,6 +197,7 @@ module Conekta
|
|
191
197
|
# Show invalid properties with the reasons. Usually used together with valid?
|
192
198
|
# @return Array for valid properties with the reasons
|
193
199
|
def list_invalid_properties
|
200
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
194
201
|
invalid_properties = Array.new
|
195
202
|
if @email.nil?
|
196
203
|
invalid_properties.push('invalid value for "email", email cannot be nil.')
|
@@ -214,6 +221,7 @@ module Conekta
|
|
214
221
|
# Check to see if the all the properties in the model are valid
|
215
222
|
# @return true if the model is valid
|
216
223
|
def valid?
|
224
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
217
225
|
return false if @email.nil?
|
218
226
|
return false if !@metadata.nil? && @metadata.length > 100
|
219
227
|
return false if @name.nil?
|
@@ -224,7 +232,11 @@ module Conekta
|
|
224
232
|
# Custom attribute writer method with validation
|
225
233
|
# @param [Object] metadata Value to be assigned
|
226
234
|
def metadata=(metadata)
|
227
|
-
if
|
235
|
+
if metadata.nil?
|
236
|
+
fail ArgumentError, 'metadata cannot be nil'
|
237
|
+
end
|
238
|
+
|
239
|
+
if metadata.length > 100
|
228
240
|
fail ArgumentError, 'invalid value for "metadata", number of items must be less than or equal to 100.'
|
229
241
|
end
|
230
242
|
|
@@ -268,37 +280,30 @@ module Conekta
|
|
268
280
|
# @param [Hash] attributes Model attributes in the form of hash
|
269
281
|
# @return [Object] Returns the model itself
|
270
282
|
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
283
|
return nil unless attributes.is_a?(Hash)
|
279
284
|
attributes = attributes.transform_keys(&:to_sym)
|
280
|
-
|
281
|
-
|
282
|
-
|
285
|
+
transformed_hash = {}
|
286
|
+
openapi_types.each_pair do |key, type|
|
287
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
288
|
+
transformed_hash["#{key}"] = nil
|
283
289
|
elsif type =~ /\AArray<(.*)>/i
|
284
290
|
# check to ensure the input is an array given that the attribute
|
285
291
|
# is documented as an array but the input is not
|
286
|
-
if attributes[
|
287
|
-
|
292
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
293
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
288
294
|
end
|
289
|
-
elsif !attributes[
|
290
|
-
|
295
|
+
elsif !attributes[attribute_map[key]].nil?
|
296
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
291
297
|
end
|
292
298
|
end
|
293
|
-
|
294
|
-
self
|
299
|
+
new(transformed_hash)
|
295
300
|
end
|
296
301
|
|
297
302
|
# Deserializes the data based on type
|
298
303
|
# @param string type Data type
|
299
304
|
# @param string value Value to be deserialized
|
300
305
|
# @return [Object] Deserialized data
|
301
|
-
def _deserialize(type, value)
|
306
|
+
def self._deserialize(type, value)
|
302
307
|
case type.to_sym
|
303
308
|
when :Time
|
304
309
|
Time.parse(value)
|
@@ -333,7 +338,7 @@ module Conekta
|
|
333
338
|
else # model
|
334
339
|
# models (e.g. Pet) or oneOf
|
335
340
|
klass = Conekta.const_get(type)
|
336
|
-
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
341
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
337
342
|
end
|
338
343
|
end
|
339
344
|
|
@@ -6,7 +6,7 @@
|
|
6
6
|
The version of the OpenAPI document: 2.1.0
|
7
7
|
Contact: engineering@conekta.com
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
|
-
OpenAPI Generator version:
|
9
|
+
OpenAPI Generator version: 7.2.0
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
@@ -88,6 +88,8 @@ module Conekta
|
|
88
88
|
|
89
89
|
if attributes.key?(:'street1')
|
90
90
|
self.street1 = attributes[:'street1']
|
91
|
+
else
|
92
|
+
self.street1 = nil
|
91
93
|
end
|
92
94
|
|
93
95
|
if attributes.key?(:'street2')
|
@@ -96,10 +98,14 @@ module Conekta
|
|
96
98
|
|
97
99
|
if attributes.key?(:'postal_code')
|
98
100
|
self.postal_code = attributes[:'postal_code']
|
101
|
+
else
|
102
|
+
self.postal_code = nil
|
99
103
|
end
|
100
104
|
|
101
105
|
if attributes.key?(:'city')
|
102
106
|
self.city = attributes[:'city']
|
107
|
+
else
|
108
|
+
self.city = nil
|
103
109
|
end
|
104
110
|
|
105
111
|
if attributes.key?(:'state')
|
@@ -112,6 +118,8 @@ module Conekta
|
|
112
118
|
|
113
119
|
if attributes.key?(:'residential')
|
114
120
|
self.residential = attributes[:'residential']
|
121
|
+
else
|
122
|
+
self.residential = false
|
115
123
|
end
|
116
124
|
|
117
125
|
if attributes.key?(:'external_number')
|
@@ -122,6 +130,7 @@ module Conekta
|
|
122
130
|
# Show invalid properties with the reasons. Usually used together with valid?
|
123
131
|
# @return Array for valid properties with the reasons
|
124
132
|
def list_invalid_properties
|
133
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
125
134
|
invalid_properties = Array.new
|
126
135
|
if @street1.nil?
|
127
136
|
invalid_properties.push('invalid value for "street1", street1 cannot be nil.')
|
@@ -141,6 +150,7 @@ module Conekta
|
|
141
150
|
# Check to see if the all the properties in the model are valid
|
142
151
|
# @return true if the model is valid
|
143
152
|
def valid?
|
153
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
144
154
|
return false if @street1.nil?
|
145
155
|
return false if @postal_code.nil?
|
146
156
|
return false if @city.nil?
|
@@ -178,37 +188,30 @@ module Conekta
|
|
178
188
|
# @param [Hash] attributes Model attributes in the form of hash
|
179
189
|
# @return [Object] Returns the model itself
|
180
190
|
def self.build_from_hash(attributes)
|
181
|
-
new.build_from_hash(attributes)
|
182
|
-
end
|
183
|
-
|
184
|
-
# Builds the object from hash
|
185
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
186
|
-
# @return [Object] Returns the model itself
|
187
|
-
def build_from_hash(attributes)
|
188
191
|
return nil unless attributes.is_a?(Hash)
|
189
192
|
attributes = attributes.transform_keys(&:to_sym)
|
190
|
-
|
191
|
-
|
192
|
-
|
193
|
+
transformed_hash = {}
|
194
|
+
openapi_types.each_pair do |key, type|
|
195
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
196
|
+
transformed_hash["#{key}"] = nil
|
193
197
|
elsif type =~ /\AArray<(.*)>/i
|
194
198
|
# check to ensure the input is an array given that the attribute
|
195
199
|
# is documented as an array but the input is not
|
196
|
-
if attributes[
|
197
|
-
|
200
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
201
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
198
202
|
end
|
199
|
-
elsif !attributes[
|
200
|
-
|
203
|
+
elsif !attributes[attribute_map[key]].nil?
|
204
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
201
205
|
end
|
202
206
|
end
|
203
|
-
|
204
|
-
self
|
207
|
+
new(transformed_hash)
|
205
208
|
end
|
206
209
|
|
207
210
|
# Deserializes the data based on type
|
208
211
|
# @param string type Data type
|
209
212
|
# @param string value Value to be deserialized
|
210
213
|
# @return [Object] Deserialized data
|
211
|
-
def _deserialize(type, value)
|
214
|
+
def self._deserialize(type, value)
|
212
215
|
case type.to_sym
|
213
216
|
when :Time
|
214
217
|
Time.parse(value)
|
@@ -243,7 +246,7 @@ module Conekta
|
|
243
246
|
else # model
|
244
247
|
# models (e.g. Pet) or oneOf
|
245
248
|
klass = Conekta.const_get(type)
|
246
|
-
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
249
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
247
250
|
end
|
248
251
|
end
|
249
252
|
|
@@ -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
|
|
@@ -73,6 +73,7 @@ module Conekta
|
|
73
73
|
# Show invalid properties with the reasons. Usually used together with valid?
|
74
74
|
# @return Array for valid properties with the reasons
|
75
75
|
def list_invalid_properties
|
76
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
76
77
|
invalid_properties = Array.new
|
77
78
|
invalid_properties
|
78
79
|
end
|
@@ -80,6 +81,7 @@ module Conekta
|
|
80
81
|
# Check to see if the all the properties in the model are valid
|
81
82
|
# @return true if the model is valid
|
82
83
|
def valid?
|
84
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
83
85
|
true
|
84
86
|
end
|
85
87
|
|
@@ -108,37 +110,30 @@ module Conekta
|
|
108
110
|
# @param [Hash] attributes Model attributes in the form of hash
|
109
111
|
# @return [Object] Returns the model itself
|
110
112
|
def self.build_from_hash(attributes)
|
111
|
-
new.build_from_hash(attributes)
|
112
|
-
end
|
113
|
-
|
114
|
-
# Builds the object from hash
|
115
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
116
|
-
# @return [Object] Returns the model itself
|
117
|
-
def build_from_hash(attributes)
|
118
113
|
return nil unless attributes.is_a?(Hash)
|
119
114
|
attributes = attributes.transform_keys(&:to_sym)
|
120
|
-
|
121
|
-
|
122
|
-
|
115
|
+
transformed_hash = {}
|
116
|
+
openapi_types.each_pair do |key, type|
|
117
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
118
|
+
transformed_hash["#{key}"] = nil
|
123
119
|
elsif type =~ /\AArray<(.*)>/i
|
124
120
|
# check to ensure the input is an array given that the attribute
|
125
121
|
# is documented as an array but the input is not
|
126
|
-
if attributes[
|
127
|
-
|
122
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
123
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
128
124
|
end
|
129
|
-
elsif !attributes[
|
130
|
-
|
125
|
+
elsif !attributes[attribute_map[key]].nil?
|
126
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
131
127
|
end
|
132
128
|
end
|
133
|
-
|
134
|
-
self
|
129
|
+
new(transformed_hash)
|
135
130
|
end
|
136
131
|
|
137
132
|
# Deserializes the data based on type
|
138
133
|
# @param string type Data type
|
139
134
|
# @param string value Value to be deserialized
|
140
135
|
# @return [Object] Deserialized data
|
141
|
-
def _deserialize(type, value)
|
136
|
+
def self._deserialize(type, value)
|
142
137
|
case type.to_sym
|
143
138
|
when :Time
|
144
139
|
Time.parse(value)
|
@@ -173,7 +168,7 @@ module Conekta
|
|
173
168
|
else # model
|
174
169
|
# models (e.g. Pet) or oneOf
|
175
170
|
klass = Conekta.const_get(type)
|
176
|
-
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
171
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
177
172
|
end
|
178
173
|
end
|
179
174
|
|
@@ -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
|
|
@@ -73,6 +73,7 @@ module Conekta
|
|
73
73
|
# Show invalid properties with the reasons. Usually used together with valid?
|
74
74
|
# @return Array for valid properties with the reasons
|
75
75
|
def list_invalid_properties
|
76
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
76
77
|
invalid_properties = Array.new
|
77
78
|
invalid_properties
|
78
79
|
end
|
@@ -80,6 +81,7 @@ module Conekta
|
|
80
81
|
# Check to see if the all the properties in the model are valid
|
81
82
|
# @return true if the model is valid
|
82
83
|
def valid?
|
84
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
83
85
|
true
|
84
86
|
end
|
85
87
|
|
@@ -108,37 +110,30 @@ module Conekta
|
|
108
110
|
# @param [Hash] attributes Model attributes in the form of hash
|
109
111
|
# @return [Object] Returns the model itself
|
110
112
|
def self.build_from_hash(attributes)
|
111
|
-
new.build_from_hash(attributes)
|
112
|
-
end
|
113
|
-
|
114
|
-
# Builds the object from hash
|
115
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
116
|
-
# @return [Object] Returns the model itself
|
117
|
-
def build_from_hash(attributes)
|
118
113
|
return nil unless attributes.is_a?(Hash)
|
119
114
|
attributes = attributes.transform_keys(&:to_sym)
|
120
|
-
|
121
|
-
|
122
|
-
|
115
|
+
transformed_hash = {}
|
116
|
+
openapi_types.each_pair do |key, type|
|
117
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
118
|
+
transformed_hash["#{key}"] = nil
|
123
119
|
elsif type =~ /\AArray<(.*)>/i
|
124
120
|
# check to ensure the input is an array given that the attribute
|
125
121
|
# is documented as an array but the input is not
|
126
|
-
if attributes[
|
127
|
-
|
122
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
123
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
128
124
|
end
|
129
|
-
elsif !attributes[
|
130
|
-
|
125
|
+
elsif !attributes[attribute_map[key]].nil?
|
126
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
131
127
|
end
|
132
128
|
end
|
133
|
-
|
134
|
-
self
|
129
|
+
new(transformed_hash)
|
135
130
|
end
|
136
131
|
|
137
132
|
# Deserializes the data based on type
|
138
133
|
# @param string type Data type
|
139
134
|
# @param string value Value to be deserialized
|
140
135
|
# @return [Object] Deserialized data
|
141
|
-
def _deserialize(type, value)
|
136
|
+
def self._deserialize(type, value)
|
142
137
|
case type.to_sym
|
143
138
|
when :Time
|
144
139
|
Time.parse(value)
|
@@ -173,7 +168,7 @@ module Conekta
|
|
173
168
|
else # model
|
174
169
|
# models (e.g. Pet) or oneOf
|
175
170
|
klass = Conekta.const_get(type)
|
176
|
-
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
171
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
177
172
|
end
|
178
173
|
end
|
179
174
|
|
@@ -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
|
|
@@ -62,7 +62,7 @@ module Conekta
|
|
62
62
|
# Attribute type mapping.
|
63
63
|
def self.openapi_types
|
64
64
|
{
|
65
|
-
:'address' => :'
|
65
|
+
:'address' => :'CustomerAddress',
|
66
66
|
:'tax_id' => :'String',
|
67
67
|
:'email' => :'String',
|
68
68
|
:'phone' => :'String',
|
@@ -85,7 +85,6 @@ module Conekta
|
|
85
85
|
# List of class defined in allOf (OpenAPI v3)
|
86
86
|
def self.openapi_all_of
|
87
87
|
[
|
88
|
-
:'CreateCustomerFiscalEntitiesResponseAllOf',
|
89
88
|
:'CustomerFiscalEntitiesRequest'
|
90
89
|
]
|
91
90
|
end
|
@@ -107,6 +106,8 @@ module Conekta
|
|
107
106
|
|
108
107
|
if attributes.key?(:'address')
|
109
108
|
self.address = attributes[:'address']
|
109
|
+
else
|
110
|
+
self.address = nil
|
110
111
|
end
|
111
112
|
|
112
113
|
if attributes.key?(:'tax_id')
|
@@ -133,14 +134,20 @@ module Conekta
|
|
133
134
|
|
134
135
|
if attributes.key?(:'id')
|
135
136
|
self.id = attributes[:'id']
|
137
|
+
else
|
138
|
+
self.id = nil
|
136
139
|
end
|
137
140
|
|
138
141
|
if attributes.key?(:'object')
|
139
142
|
self.object = attributes[:'object']
|
143
|
+
else
|
144
|
+
self.object = nil
|
140
145
|
end
|
141
146
|
|
142
147
|
if attributes.key?(:'created_at')
|
143
148
|
self.created_at = attributes[:'created_at']
|
149
|
+
else
|
150
|
+
self.created_at = nil
|
144
151
|
end
|
145
152
|
|
146
153
|
if attributes.key?(:'parent_id')
|
@@ -155,6 +162,7 @@ module Conekta
|
|
155
162
|
# Show invalid properties with the reasons. Usually used together with valid?
|
156
163
|
# @return Array for valid properties with the reasons
|
157
164
|
def list_invalid_properties
|
165
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
158
166
|
invalid_properties = Array.new
|
159
167
|
if @address.nil?
|
160
168
|
invalid_properties.push('invalid value for "address", address cannot be nil.')
|
@@ -178,6 +186,7 @@ module Conekta
|
|
178
186
|
# Check to see if the all the properties in the model are valid
|
179
187
|
# @return true if the model is valid
|
180
188
|
def valid?
|
189
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
181
190
|
return false if @address.nil?
|
182
191
|
return false if @id.nil?
|
183
192
|
return false if @object.nil?
|
@@ -219,37 +228,30 @@ module Conekta
|
|
219
228
|
# @param [Hash] attributes Model attributes in the form of hash
|
220
229
|
# @return [Object] Returns the model itself
|
221
230
|
def self.build_from_hash(attributes)
|
222
|
-
new.build_from_hash(attributes)
|
223
|
-
end
|
224
|
-
|
225
|
-
# Builds the object from hash
|
226
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
227
|
-
# @return [Object] Returns the model itself
|
228
|
-
def build_from_hash(attributes)
|
229
231
|
return nil unless attributes.is_a?(Hash)
|
230
232
|
attributes = attributes.transform_keys(&:to_sym)
|
231
|
-
|
232
|
-
|
233
|
-
|
233
|
+
transformed_hash = {}
|
234
|
+
openapi_types.each_pair do |key, type|
|
235
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
236
|
+
transformed_hash["#{key}"] = nil
|
234
237
|
elsif type =~ /\AArray<(.*)>/i
|
235
238
|
# check to ensure the input is an array given that the attribute
|
236
239
|
# is documented as an array but the input is not
|
237
|
-
if attributes[
|
238
|
-
|
240
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
241
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
239
242
|
end
|
240
|
-
elsif !attributes[
|
241
|
-
|
243
|
+
elsif !attributes[attribute_map[key]].nil?
|
244
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
242
245
|
end
|
243
246
|
end
|
244
|
-
|
245
|
-
self
|
247
|
+
new(transformed_hash)
|
246
248
|
end
|
247
249
|
|
248
250
|
# Deserializes the data based on type
|
249
251
|
# @param string type Data type
|
250
252
|
# @param string value Value to be deserialized
|
251
253
|
# @return [Object] Deserialized data
|
252
|
-
def _deserialize(type, value)
|
254
|
+
def self._deserialize(type, value)
|
253
255
|
case type.to_sym
|
254
256
|
when :Time
|
255
257
|
Time.parse(value)
|
@@ -284,7 +286,7 @@ module Conekta
|
|
284
286
|
else # model
|
285
287
|
# models (e.g. Pet) or oneOf
|
286
288
|
klass = Conekta.const_get(type)
|
287
|
-
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
289
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
288
290
|
end
|
289
291
|
end
|
290
292
|
|
@@ -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
|
|
@@ -47,7 +47,7 @@ module Conekta
|
|
47
47
|
# Attribute type mapping.
|
48
48
|
def self.openapi_types
|
49
49
|
{
|
50
|
-
:'address' => :'
|
50
|
+
:'address' => :'CustomerAddress',
|
51
51
|
:'tax_id' => :'String',
|
52
52
|
:'email' => :'String',
|
53
53
|
:'phone' => :'String',
|
@@ -79,6 +79,8 @@ module Conekta
|
|
79
79
|
|
80
80
|
if attributes.key?(:'address')
|
81
81
|
self.address = attributes[:'address']
|
82
|
+
else
|
83
|
+
self.address = nil
|
82
84
|
end
|
83
85
|
|
84
86
|
if attributes.key?(:'tax_id')
|
@@ -107,6 +109,7 @@ module Conekta
|
|
107
109
|
# Show invalid properties with the reasons. Usually used together with valid?
|
108
110
|
# @return Array for valid properties with the reasons
|
109
111
|
def list_invalid_properties
|
112
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
110
113
|
invalid_properties = Array.new
|
111
114
|
if @address.nil?
|
112
115
|
invalid_properties.push('invalid value for "address", address cannot be nil.')
|
@@ -118,6 +121,7 @@ module Conekta
|
|
118
121
|
# Check to see if the all the properties in the model are valid
|
119
122
|
# @return true if the model is valid
|
120
123
|
def valid?
|
124
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
121
125
|
return false if @address.nil?
|
122
126
|
true
|
123
127
|
end
|
@@ -151,37 +155,30 @@ module Conekta
|
|
151
155
|
# @param [Hash] attributes Model attributes in the form of hash
|
152
156
|
# @return [Object] Returns the model itself
|
153
157
|
def self.build_from_hash(attributes)
|
154
|
-
new.build_from_hash(attributes)
|
155
|
-
end
|
156
|
-
|
157
|
-
# Builds the object from hash
|
158
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
159
|
-
# @return [Object] Returns the model itself
|
160
|
-
def build_from_hash(attributes)
|
161
158
|
return nil unless attributes.is_a?(Hash)
|
162
159
|
attributes = attributes.transform_keys(&:to_sym)
|
163
|
-
|
164
|
-
|
165
|
-
|
160
|
+
transformed_hash = {}
|
161
|
+
openapi_types.each_pair do |key, type|
|
162
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
163
|
+
transformed_hash["#{key}"] = nil
|
166
164
|
elsif type =~ /\AArray<(.*)>/i
|
167
165
|
# check to ensure the input is an array given that the attribute
|
168
166
|
# is documented as an array but the input is not
|
169
|
-
if attributes[
|
170
|
-
|
167
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
168
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
171
169
|
end
|
172
|
-
elsif !attributes[
|
173
|
-
|
170
|
+
elsif !attributes[attribute_map[key]].nil?
|
171
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
174
172
|
end
|
175
173
|
end
|
176
|
-
|
177
|
-
self
|
174
|
+
new(transformed_hash)
|
178
175
|
end
|
179
176
|
|
180
177
|
# Deserializes the data based on type
|
181
178
|
# @param string type Data type
|
182
179
|
# @param string value Value to be deserialized
|
183
180
|
# @return [Object] Deserialized data
|
184
|
-
def _deserialize(type, value)
|
181
|
+
def self._deserialize(type, value)
|
185
182
|
case type.to_sym
|
186
183
|
when :Time
|
187
184
|
Time.parse(value)
|
@@ -216,7 +213,7 @@ module Conekta
|
|
216
213
|
else # model
|
217
214
|
# models (e.g. Pet) or oneOf
|
218
215
|
klass = Conekta.const_get(type)
|
219
|
-
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
216
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
220
217
|
end
|
221
218
|
end
|
222
219
|
|