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
|
|
@@ -32,6 +32,9 @@ module Conekta
|
|
32
32
|
|
33
33
|
attr_accessor :created_at
|
34
34
|
|
35
|
+
# Metadata associated with the shipping contact
|
36
|
+
attr_accessor :metadata
|
37
|
+
|
35
38
|
attr_accessor :object
|
36
39
|
|
37
40
|
attr_accessor :deleted
|
@@ -47,6 +50,7 @@ module Conekta
|
|
47
50
|
:'default' => :'default',
|
48
51
|
:'id' => :'id',
|
49
52
|
:'created_at' => :'created_at',
|
53
|
+
:'metadata' => :'metadata',
|
50
54
|
:'object' => :'object',
|
51
55
|
:'deleted' => :'deleted'
|
52
56
|
}
|
@@ -68,6 +72,7 @@ module Conekta
|
|
68
72
|
:'default' => :'Boolean',
|
69
73
|
:'id' => :'String',
|
70
74
|
:'created_at' => :'Integer',
|
75
|
+
:'metadata' => :'Hash<String, Object>',
|
71
76
|
:'object' => :'String',
|
72
77
|
:'deleted' => :'Boolean'
|
73
78
|
}
|
@@ -127,6 +132,12 @@ module Conekta
|
|
127
132
|
self.created_at = attributes[:'created_at']
|
128
133
|
end
|
129
134
|
|
135
|
+
if attributes.key?(:'metadata')
|
136
|
+
if (value = attributes[:'metadata']).is_a?(Hash)
|
137
|
+
self.metadata = value
|
138
|
+
end
|
139
|
+
end
|
140
|
+
|
130
141
|
if attributes.key?(:'object')
|
131
142
|
self.object = attributes[:'object']
|
132
143
|
end
|
@@ -139,16 +150,37 @@ module Conekta
|
|
139
150
|
# Show invalid properties with the reasons. Usually used together with valid?
|
140
151
|
# @return Array for valid properties with the reasons
|
141
152
|
def list_invalid_properties
|
153
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
142
154
|
invalid_properties = Array.new
|
155
|
+
if !@metadata.nil? && @metadata.length > 100
|
156
|
+
invalid_properties.push('invalid value for "metadata", number of items must be less than or equal to 100.')
|
157
|
+
end
|
158
|
+
|
143
159
|
invalid_properties
|
144
160
|
end
|
145
161
|
|
146
162
|
# Check to see if the all the properties in the model are valid
|
147
163
|
# @return true if the model is valid
|
148
164
|
def valid?
|
165
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
166
|
+
return false if !@metadata.nil? && @metadata.length > 100
|
149
167
|
true
|
150
168
|
end
|
151
169
|
|
170
|
+
# Custom attribute writer method with validation
|
171
|
+
# @param [Object] metadata Value to be assigned
|
172
|
+
def metadata=(metadata)
|
173
|
+
if metadata.nil?
|
174
|
+
fail ArgumentError, 'metadata cannot be nil'
|
175
|
+
end
|
176
|
+
|
177
|
+
if metadata.length > 100
|
178
|
+
fail ArgumentError, 'invalid value for "metadata", number of items must be less than or equal to 100.'
|
179
|
+
end
|
180
|
+
|
181
|
+
@metadata = metadata
|
182
|
+
end
|
183
|
+
|
152
184
|
# Checks equality by comparing each attribute.
|
153
185
|
# @param [Object] Object to be compared
|
154
186
|
def ==(o)
|
@@ -162,6 +194,7 @@ module Conekta
|
|
162
194
|
default == o.default &&
|
163
195
|
id == o.id &&
|
164
196
|
created_at == o.created_at &&
|
197
|
+
metadata == o.metadata &&
|
165
198
|
object == o.object &&
|
166
199
|
deleted == o.deleted
|
167
200
|
end
|
@@ -175,44 +208,37 @@ module Conekta
|
|
175
208
|
# Calculates hash code according to all attributes.
|
176
209
|
# @return [Integer] Hash code
|
177
210
|
def hash
|
178
|
-
[phone, receiver, between_streets, address, parent_id, default, id, created_at, object, deleted].hash
|
211
|
+
[phone, receiver, between_streets, address, parent_id, default, id, created_at, metadata, object, deleted].hash
|
179
212
|
end
|
180
213
|
|
181
214
|
# Builds the object from hash
|
182
215
|
# @param [Hash] attributes Model attributes in the form of hash
|
183
216
|
# @return [Object] Returns the model itself
|
184
217
|
def self.build_from_hash(attributes)
|
185
|
-
new.build_from_hash(attributes)
|
186
|
-
end
|
187
|
-
|
188
|
-
# Builds the object from hash
|
189
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
190
|
-
# @return [Object] Returns the model itself
|
191
|
-
def build_from_hash(attributes)
|
192
218
|
return nil unless attributes.is_a?(Hash)
|
193
219
|
attributes = attributes.transform_keys(&:to_sym)
|
194
|
-
|
195
|
-
|
196
|
-
|
220
|
+
transformed_hash = {}
|
221
|
+
openapi_types.each_pair do |key, type|
|
222
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
223
|
+
transformed_hash["#{key}"] = nil
|
197
224
|
elsif type =~ /\AArray<(.*)>/i
|
198
225
|
# check to ensure the input is an array given that the attribute
|
199
226
|
# is documented as an array but the input is not
|
200
|
-
if attributes[
|
201
|
-
|
227
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
228
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
202
229
|
end
|
203
|
-
elsif !attributes[
|
204
|
-
|
230
|
+
elsif !attributes[attribute_map[key]].nil?
|
231
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
205
232
|
end
|
206
233
|
end
|
207
|
-
|
208
|
-
self
|
234
|
+
new(transformed_hash)
|
209
235
|
end
|
210
236
|
|
211
237
|
# Deserializes the data based on type
|
212
238
|
# @param string type Data type
|
213
239
|
# @param string value Value to be deserialized
|
214
240
|
# @return [Object] Deserialized data
|
215
|
-
def _deserialize(type, value)
|
241
|
+
def self._deserialize(type, value)
|
216
242
|
case type.to_sym
|
217
243
|
when :Time
|
218
244
|
Time.parse(value)
|
@@ -247,7 +273,7 @@ module Conekta
|
|
247
273
|
else # model
|
248
274
|
# models (e.g. Pet) or oneOf
|
249
275
|
klass = Conekta.const_get(type)
|
250
|
-
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
276
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
251
277
|
end
|
252
278
|
end
|
253
279
|
|
@@ -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
|
|
@@ -67,6 +67,7 @@ module Conekta
|
|
67
67
|
# List of attributes with nullable: true
|
68
68
|
def self.openapi_nullable
|
69
69
|
Set.new([
|
70
|
+
:'residential'
|
70
71
|
])
|
71
72
|
end
|
72
73
|
|
@@ -121,6 +122,7 @@ module Conekta
|
|
121
122
|
# Show invalid properties with the reasons. Usually used together with valid?
|
122
123
|
# @return Array for valid properties with the reasons
|
123
124
|
def list_invalid_properties
|
125
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
124
126
|
invalid_properties = Array.new
|
125
127
|
invalid_properties
|
126
128
|
end
|
@@ -128,6 +130,7 @@ module Conekta
|
|
128
130
|
# Check to see if the all the properties in the model are valid
|
129
131
|
# @return true if the model is valid
|
130
132
|
def valid?
|
133
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
131
134
|
true
|
132
135
|
end
|
133
136
|
|
@@ -162,37 +165,30 @@ module Conekta
|
|
162
165
|
# @param [Hash] attributes Model attributes in the form of hash
|
163
166
|
# @return [Object] Returns the model itself
|
164
167
|
def self.build_from_hash(attributes)
|
165
|
-
new.build_from_hash(attributes)
|
166
|
-
end
|
167
|
-
|
168
|
-
# Builds the object from hash
|
169
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
170
|
-
# @return [Object] Returns the model itself
|
171
|
-
def build_from_hash(attributes)
|
172
168
|
return nil unless attributes.is_a?(Hash)
|
173
169
|
attributes = attributes.transform_keys(&:to_sym)
|
174
|
-
|
175
|
-
|
176
|
-
|
170
|
+
transformed_hash = {}
|
171
|
+
openapi_types.each_pair do |key, type|
|
172
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
173
|
+
transformed_hash["#{key}"] = nil
|
177
174
|
elsif type =~ /\AArray<(.*)>/i
|
178
175
|
# check to ensure the input is an array given that the attribute
|
179
176
|
# is documented as an array but the input is not
|
180
|
-
if attributes[
|
181
|
-
|
177
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
178
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
182
179
|
end
|
183
|
-
elsif !attributes[
|
184
|
-
|
180
|
+
elsif !attributes[attribute_map[key]].nil?
|
181
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
185
182
|
end
|
186
183
|
end
|
187
|
-
|
188
|
-
self
|
184
|
+
new(transformed_hash)
|
189
185
|
end
|
190
186
|
|
191
187
|
# Deserializes the data based on type
|
192
188
|
# @param string type Data type
|
193
189
|
# @param string value Value to be deserialized
|
194
190
|
# @return [Object] Deserialized data
|
195
|
-
def _deserialize(type, value)
|
191
|
+
def self._deserialize(type, value)
|
196
192
|
case type.to_sym
|
197
193
|
when :Time
|
198
194
|
Time.parse(value)
|
@@ -227,7 +223,7 @@ module Conekta
|
|
227
223
|
else # model
|
228
224
|
# models (e.g. Pet) or oneOf
|
229
225
|
klass = Conekta.const_get(type)
|
230
|
-
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
226
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
231
227
|
end
|
232
228
|
end
|
233
229
|
|
@@ -6,7 +6,7 @@
|
|
6
6
|
The version of the OpenAPI document: 2.1.0
|
7
7
|
Contact: engineering@conekta.com
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
|
-
OpenAPI Generator version:
|
9
|
+
OpenAPI Generator version: 7.2.0
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
@@ -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',
|
@@ -107,6 +107,7 @@ module Conekta
|
|
107
107
|
# Show invalid properties with the reasons. Usually used together with valid?
|
108
108
|
# @return Array for valid properties with the reasons
|
109
109
|
def list_invalid_properties
|
110
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
110
111
|
invalid_properties = Array.new
|
111
112
|
invalid_properties
|
112
113
|
end
|
@@ -114,6 +115,7 @@ module Conekta
|
|
114
115
|
# Check to see if the all the properties in the model are valid
|
115
116
|
# @return true if the model is valid
|
116
117
|
def valid?
|
118
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
117
119
|
true
|
118
120
|
end
|
119
121
|
|
@@ -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
|
|
@@ -119,6 +119,7 @@ module Conekta
|
|
119
119
|
# Show invalid properties with the reasons. Usually used together with valid?
|
120
120
|
# @return Array for valid properties with the reasons
|
121
121
|
def list_invalid_properties
|
122
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
122
123
|
invalid_properties = Array.new
|
123
124
|
invalid_properties
|
124
125
|
end
|
@@ -126,6 +127,7 @@ module Conekta
|
|
126
127
|
# Check to see if the all the properties in the model are valid
|
127
128
|
# @return true if the model is valid
|
128
129
|
def valid?
|
130
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
129
131
|
true
|
130
132
|
end
|
131
133
|
|
@@ -159,37 +161,30 @@ module Conekta
|
|
159
161
|
# @param [Hash] attributes Model attributes in the form of hash
|
160
162
|
# @return [Object] Returns the model itself
|
161
163
|
def self.build_from_hash(attributes)
|
162
|
-
new.build_from_hash(attributes)
|
163
|
-
end
|
164
|
-
|
165
|
-
# Builds the object from hash
|
166
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
167
|
-
# @return [Object] Returns the model itself
|
168
|
-
def build_from_hash(attributes)
|
169
164
|
return nil unless attributes.is_a?(Hash)
|
170
165
|
attributes = attributes.transform_keys(&:to_sym)
|
171
|
-
|
172
|
-
|
173
|
-
|
166
|
+
transformed_hash = {}
|
167
|
+
openapi_types.each_pair do |key, type|
|
168
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
169
|
+
transformed_hash["#{key}"] = nil
|
174
170
|
elsif type =~ /\AArray<(.*)>/i
|
175
171
|
# check to ensure the input is an array given that the attribute
|
176
172
|
# is documented as an array but the input is not
|
177
|
-
if attributes[
|
178
|
-
|
173
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
174
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
179
175
|
end
|
180
|
-
elsif !attributes[
|
181
|
-
|
176
|
+
elsif !attributes[attribute_map[key]].nil?
|
177
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
182
178
|
end
|
183
179
|
end
|
184
|
-
|
185
|
-
self
|
180
|
+
new(transformed_hash)
|
186
181
|
end
|
187
182
|
|
188
183
|
# Deserializes the data based on type
|
189
184
|
# @param string type Data type
|
190
185
|
# @param string value Value to be deserialized
|
191
186
|
# @return [Object] Deserialized data
|
192
|
-
def _deserialize(type, value)
|
187
|
+
def self._deserialize(type, value)
|
193
188
|
case type.to_sym
|
194
189
|
when :Time
|
195
190
|
Time.parse(value)
|
@@ -224,7 +219,7 @@ module Conekta
|
|
224
219
|
else # model
|
225
220
|
# models (e.g. Pet) or oneOf
|
226
221
|
klass = Conekta.const_get(type)
|
227
|
-
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
222
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
228
223
|
end
|
229
224
|
end
|
230
225
|
|
@@ -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
|
|
@@ -15,8 +15,6 @@ require 'time'
|
|
15
15
|
|
16
16
|
module Conekta
|
17
17
|
class CustomersResponse
|
18
|
-
attr_accessor :data
|
19
|
-
|
20
18
|
# Indicates if there are more pages to be requested
|
21
19
|
attr_accessor :has_more
|
22
20
|
|
@@ -29,14 +27,16 @@ module Conekta
|
|
29
27
|
# Url of the previous page.
|
30
28
|
attr_accessor :previous_page_url
|
31
29
|
|
30
|
+
attr_accessor :data
|
31
|
+
|
32
32
|
# Attribute mapping from ruby-style variable name to JSON key.
|
33
33
|
def self.attribute_map
|
34
34
|
{
|
35
|
-
:'data' => :'data',
|
36
35
|
:'has_more' => :'has_more',
|
37
36
|
:'object' => :'object',
|
38
37
|
:'next_page_url' => :'next_page_url',
|
39
|
-
:'previous_page_url' => :'previous_page_url'
|
38
|
+
:'previous_page_url' => :'previous_page_url',
|
39
|
+
:'data' => :'data'
|
40
40
|
}
|
41
41
|
end
|
42
42
|
|
@@ -48,11 +48,11 @@ module Conekta
|
|
48
48
|
# Attribute type mapping.
|
49
49
|
def self.openapi_types
|
50
50
|
{
|
51
|
-
:'data' => :'Array<CustomerResponse>',
|
52
51
|
:'has_more' => :'Boolean',
|
53
52
|
:'object' => :'String',
|
54
53
|
:'next_page_url' => :'String',
|
55
|
-
:'previous_page_url' => :'String'
|
54
|
+
:'previous_page_url' => :'String',
|
55
|
+
:'data' => :'Array<CustomerResponse>'
|
56
56
|
}
|
57
57
|
end
|
58
58
|
|
@@ -60,14 +60,13 @@ module Conekta
|
|
60
60
|
def self.openapi_nullable
|
61
61
|
Set.new([
|
62
62
|
:'next_page_url',
|
63
|
-
:'previous_page_url'
|
63
|
+
:'previous_page_url',
|
64
64
|
])
|
65
65
|
end
|
66
66
|
|
67
67
|
# List of class defined in allOf (OpenAPI v3)
|
68
68
|
def self.openapi_all_of
|
69
69
|
[
|
70
|
-
:'CustomersResponseAllOf',
|
71
70
|
:'Page',
|
72
71
|
:'Pagination'
|
73
72
|
]
|
@@ -88,18 +87,16 @@ module Conekta
|
|
88
87
|
h[k.to_sym] = v
|
89
88
|
}
|
90
89
|
|
91
|
-
if attributes.key?(:'data')
|
92
|
-
if (value = attributes[:'data']).is_a?(Array)
|
93
|
-
self.data = value
|
94
|
-
end
|
95
|
-
end
|
96
|
-
|
97
90
|
if attributes.key?(:'has_more')
|
98
91
|
self.has_more = attributes[:'has_more']
|
92
|
+
else
|
93
|
+
self.has_more = nil
|
99
94
|
end
|
100
95
|
|
101
96
|
if attributes.key?(:'object')
|
102
97
|
self.object = attributes[:'object']
|
98
|
+
else
|
99
|
+
self.object = nil
|
103
100
|
end
|
104
101
|
|
105
102
|
if attributes.key?(:'next_page_url')
|
@@ -109,11 +106,18 @@ module Conekta
|
|
109
106
|
if attributes.key?(:'previous_page_url')
|
110
107
|
self.previous_page_url = attributes[:'previous_page_url']
|
111
108
|
end
|
109
|
+
|
110
|
+
if attributes.key?(:'data')
|
111
|
+
if (value = attributes[:'data']).is_a?(Array)
|
112
|
+
self.data = value
|
113
|
+
end
|
114
|
+
end
|
112
115
|
end
|
113
116
|
|
114
117
|
# Show invalid properties with the reasons. Usually used together with valid?
|
115
118
|
# @return Array for valid properties with the reasons
|
116
119
|
def list_invalid_properties
|
120
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
117
121
|
invalid_properties = Array.new
|
118
122
|
if @has_more.nil?
|
119
123
|
invalid_properties.push('invalid value for "has_more", has_more cannot be nil.')
|
@@ -129,6 +133,7 @@ module Conekta
|
|
129
133
|
# Check to see if the all the properties in the model are valid
|
130
134
|
# @return true if the model is valid
|
131
135
|
def valid?
|
136
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
132
137
|
return false if @has_more.nil?
|
133
138
|
return false if @object.nil?
|
134
139
|
true
|
@@ -139,11 +144,11 @@ module Conekta
|
|
139
144
|
def ==(o)
|
140
145
|
return true if self.equal?(o)
|
141
146
|
self.class == o.class &&
|
142
|
-
data == o.data &&
|
143
147
|
has_more == o.has_more &&
|
144
148
|
object == o.object &&
|
145
149
|
next_page_url == o.next_page_url &&
|
146
|
-
previous_page_url == o.previous_page_url
|
150
|
+
previous_page_url == o.previous_page_url &&
|
151
|
+
data == o.data
|
147
152
|
end
|
148
153
|
|
149
154
|
# @see the `==` method
|
@@ -155,44 +160,37 @@ module Conekta
|
|
155
160
|
# Calculates hash code according to all attributes.
|
156
161
|
# @return [Integer] Hash code
|
157
162
|
def hash
|
158
|
-
[
|
163
|
+
[has_more, object, next_page_url, previous_page_url, data].hash
|
159
164
|
end
|
160
165
|
|
161
166
|
# Builds the object from hash
|
162
167
|
# @param [Hash] attributes Model attributes in the form of hash
|
163
168
|
# @return [Object] Returns the model itself
|
164
169
|
def self.build_from_hash(attributes)
|
165
|
-
new.build_from_hash(attributes)
|
166
|
-
end
|
167
|
-
|
168
|
-
# Builds the object from hash
|
169
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
170
|
-
# @return [Object] Returns the model itself
|
171
|
-
def build_from_hash(attributes)
|
172
170
|
return nil unless attributes.is_a?(Hash)
|
173
171
|
attributes = attributes.transform_keys(&:to_sym)
|
174
|
-
|
175
|
-
|
176
|
-
|
172
|
+
transformed_hash = {}
|
173
|
+
openapi_types.each_pair do |key, type|
|
174
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
175
|
+
transformed_hash["#{key}"] = nil
|
177
176
|
elsif type =~ /\AArray<(.*)>/i
|
178
177
|
# check to ensure the input is an array given that the attribute
|
179
178
|
# is documented as an array but the input is not
|
180
|
-
if attributes[
|
181
|
-
|
179
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
180
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
182
181
|
end
|
183
|
-
elsif !attributes[
|
184
|
-
|
182
|
+
elsif !attributes[attribute_map[key]].nil?
|
183
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
185
184
|
end
|
186
185
|
end
|
187
|
-
|
188
|
-
self
|
186
|
+
new(transformed_hash)
|
189
187
|
end
|
190
188
|
|
191
189
|
# Deserializes the data based on type
|
192
190
|
# @param string type Data type
|
193
191
|
# @param string value Value to be deserialized
|
194
192
|
# @return [Object] Deserialized data
|
195
|
-
def _deserialize(type, value)
|
193
|
+
def self._deserialize(type, value)
|
196
194
|
case type.to_sym
|
197
195
|
when :Time
|
198
196
|
Time.parse(value)
|
@@ -227,7 +225,7 @@ module Conekta
|
|
227
225
|
else # model
|
228
226
|
# models (e.g. Pet) or oneOf
|
229
227
|
klass = Conekta.const_get(type)
|
230
|
-
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
228
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
231
229
|
end
|
232
230
|
end
|
233
231
|
|