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.1.0
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
@@ -68,6 +68,7 @@ module Conekta
|
|
68
68
|
# Show invalid properties with the reasons. Usually used together with valid?
|
69
69
|
# @return Array for valid properties with the reasons
|
70
70
|
def list_invalid_properties
|
71
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
71
72
|
invalid_properties = Array.new
|
72
73
|
invalid_properties
|
73
74
|
end
|
@@ -75,6 +76,7 @@ module Conekta
|
|
75
76
|
# Check to see if the all the properties in the model are valid
|
76
77
|
# @return true if the model is valid
|
77
78
|
def valid?
|
79
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
78
80
|
true
|
79
81
|
end
|
80
82
|
|
@@ -102,37 +104,30 @@ module Conekta
|
|
102
104
|
# @param [Hash] attributes Model attributes in the form of hash
|
103
105
|
# @return [Object] Returns the model itself
|
104
106
|
def self.build_from_hash(attributes)
|
105
|
-
new.build_from_hash(attributes)
|
106
|
-
end
|
107
|
-
|
108
|
-
# Builds the object from hash
|
109
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
110
|
-
# @return [Object] Returns the model itself
|
111
|
-
def build_from_hash(attributes)
|
112
107
|
return nil unless attributes.is_a?(Hash)
|
113
108
|
attributes = attributes.transform_keys(&:to_sym)
|
114
|
-
|
115
|
-
|
116
|
-
|
109
|
+
transformed_hash = {}
|
110
|
+
openapi_types.each_pair do |key, type|
|
111
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
112
|
+
transformed_hash["#{key}"] = nil
|
117
113
|
elsif type =~ /\AArray<(.*)>/i
|
118
114
|
# check to ensure the input is an array given that the attribute
|
119
115
|
# is documented as an array but the input is not
|
120
|
-
if attributes[
|
121
|
-
|
116
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
117
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
122
118
|
end
|
123
|
-
elsif !attributes[
|
124
|
-
|
119
|
+
elsif !attributes[attribute_map[key]].nil?
|
120
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
125
121
|
end
|
126
122
|
end
|
127
|
-
|
128
|
-
self
|
123
|
+
new(transformed_hash)
|
129
124
|
end
|
130
125
|
|
131
126
|
# Deserializes the data based on type
|
132
127
|
# @param string type Data type
|
133
128
|
# @param string value Value to be deserialized
|
134
129
|
# @return [Object] Deserialized data
|
135
|
-
def _deserialize(type, value)
|
130
|
+
def self._deserialize(type, value)
|
136
131
|
case type.to_sym
|
137
132
|
when :Time
|
138
133
|
Time.parse(value)
|
@@ -167,7 +162,7 @@ module Conekta
|
|
167
162
|
else # model
|
168
163
|
# models (e.g. Pet) or oneOf
|
169
164
|
klass = Conekta.const_get(type)
|
170
|
-
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
165
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
171
166
|
end
|
172
167
|
end
|
173
168
|
|
@@ -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
|
|
@@ -85,6 +85,8 @@ module Conekta
|
|
85
85
|
|
86
86
|
if attributes.key?(:'amount')
|
87
87
|
self.amount = attributes[:'amount']
|
88
|
+
else
|
89
|
+
self.amount = nil
|
88
90
|
end
|
89
91
|
|
90
92
|
if attributes.key?(:'auth_code')
|
@@ -93,6 +95,8 @@ module Conekta
|
|
93
95
|
|
94
96
|
if attributes.key?(:'created_at')
|
95
97
|
self.created_at = attributes[:'created_at']
|
98
|
+
else
|
99
|
+
self.created_at = nil
|
96
100
|
end
|
97
101
|
|
98
102
|
if attributes.key?(:'expires_at')
|
@@ -101,10 +105,14 @@ module Conekta
|
|
101
105
|
|
102
106
|
if attributes.key?(:'id')
|
103
107
|
self.id = attributes[:'id']
|
108
|
+
else
|
109
|
+
self.id = nil
|
104
110
|
end
|
105
111
|
|
106
112
|
if attributes.key?(:'object')
|
107
113
|
self.object = attributes[:'object']
|
114
|
+
else
|
115
|
+
self.object = nil
|
108
116
|
end
|
109
117
|
|
110
118
|
if attributes.key?(:'status')
|
@@ -115,6 +123,7 @@ module Conekta
|
|
115
123
|
# Show invalid properties with the reasons. Usually used together with valid?
|
116
124
|
# @return Array for valid properties with the reasons
|
117
125
|
def list_invalid_properties
|
126
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
118
127
|
invalid_properties = Array.new
|
119
128
|
if @amount.nil?
|
120
129
|
invalid_properties.push('invalid value for "amount", amount cannot be nil.')
|
@@ -138,6 +147,7 @@ module Conekta
|
|
138
147
|
# Check to see if the all the properties in the model are valid
|
139
148
|
# @return true if the model is valid
|
140
149
|
def valid?
|
150
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
141
151
|
return false if @amount.nil?
|
142
152
|
return false if @created_at.nil?
|
143
153
|
return false if @id.nil?
|
@@ -175,37 +185,30 @@ module Conekta
|
|
175
185
|
# @param [Hash] attributes Model attributes in the form of hash
|
176
186
|
# @return [Object] Returns the model itself
|
177
187
|
def self.build_from_hash(attributes)
|
178
|
-
new.build_from_hash(attributes)
|
179
|
-
end
|
180
|
-
|
181
|
-
# Builds the object from hash
|
182
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
183
|
-
# @return [Object] Returns the model itself
|
184
|
-
def build_from_hash(attributes)
|
185
188
|
return nil unless attributes.is_a?(Hash)
|
186
189
|
attributes = attributes.transform_keys(&:to_sym)
|
187
|
-
|
188
|
-
|
189
|
-
|
190
|
+
transformed_hash = {}
|
191
|
+
openapi_types.each_pair do |key, type|
|
192
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
193
|
+
transformed_hash["#{key}"] = nil
|
190
194
|
elsif type =~ /\AArray<(.*)>/i
|
191
195
|
# check to ensure the input is an array given that the attribute
|
192
196
|
# is documented as an array but the input is not
|
193
|
-
if attributes[
|
194
|
-
|
197
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
198
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
195
199
|
end
|
196
|
-
elsif !attributes[
|
197
|
-
|
200
|
+
elsif !attributes[attribute_map[key]].nil?
|
201
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
198
202
|
end
|
199
203
|
end
|
200
|
-
|
201
|
-
self
|
204
|
+
new(transformed_hash)
|
202
205
|
end
|
203
206
|
|
204
207
|
# Deserializes the data based on type
|
205
208
|
# @param string type Data type
|
206
209
|
# @param string value Value to be deserialized
|
207
210
|
# @return [Object] Deserialized data
|
208
|
-
def _deserialize(type, value)
|
211
|
+
def self._deserialize(type, value)
|
209
212
|
case type.to_sym
|
210
213
|
when :Time
|
211
214
|
Time.parse(value)
|
@@ -240,7 +243,7 @@ module Conekta
|
|
240
243
|
else # model
|
241
244
|
# models (e.g. Pet) or oneOf
|
242
245
|
klass = Conekta.const_get(type)
|
243
|
-
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
246
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
244
247
|
end
|
245
248
|
end
|
246
249
|
|
@@ -0,0 +1,216 @@
|
|
1
|
+
=begin
|
2
|
+
#Conekta API
|
3
|
+
|
4
|
+
#Conekta sdk
|
5
|
+
|
6
|
+
The version of the OpenAPI document: 2.1.0
|
7
|
+
Contact: engineering@conekta.com
|
8
|
+
Generated by: https://openapi-generator.tech
|
9
|
+
OpenAPI Generator version: 7.2.0
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
require 'date'
|
14
|
+
require 'time'
|
15
|
+
|
16
|
+
module Conekta
|
17
|
+
# requested field for update a charge
|
18
|
+
class ChargeUpdateRequest
|
19
|
+
# custom reference id
|
20
|
+
attr_accessor :reference_id
|
21
|
+
|
22
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
23
|
+
def self.attribute_map
|
24
|
+
{
|
25
|
+
:'reference_id' => :'reference_id'
|
26
|
+
}
|
27
|
+
end
|
28
|
+
|
29
|
+
# Returns all the JSON keys this model knows about
|
30
|
+
def self.acceptable_attributes
|
31
|
+
attribute_map.values
|
32
|
+
end
|
33
|
+
|
34
|
+
# Attribute type mapping.
|
35
|
+
def self.openapi_types
|
36
|
+
{
|
37
|
+
:'reference_id' => :'String'
|
38
|
+
}
|
39
|
+
end
|
40
|
+
|
41
|
+
# List of attributes with nullable: true
|
42
|
+
def self.openapi_nullable
|
43
|
+
Set.new([
|
44
|
+
])
|
45
|
+
end
|
46
|
+
|
47
|
+
# Initializes the object
|
48
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
49
|
+
def initialize(attributes = {})
|
50
|
+
if (!attributes.is_a?(Hash))
|
51
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Conekta::ChargeUpdateRequest` initialize method"
|
52
|
+
end
|
53
|
+
|
54
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
55
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
56
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
57
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Conekta::ChargeUpdateRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
58
|
+
end
|
59
|
+
h[k.to_sym] = v
|
60
|
+
}
|
61
|
+
|
62
|
+
if attributes.key?(:'reference_id')
|
63
|
+
self.reference_id = attributes[:'reference_id']
|
64
|
+
end
|
65
|
+
end
|
66
|
+
|
67
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
68
|
+
# @return Array for valid properties with the reasons
|
69
|
+
def list_invalid_properties
|
70
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
71
|
+
invalid_properties = Array.new
|
72
|
+
invalid_properties
|
73
|
+
end
|
74
|
+
|
75
|
+
# Check to see if the all the properties in the model are valid
|
76
|
+
# @return true if the model is valid
|
77
|
+
def valid?
|
78
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
79
|
+
true
|
80
|
+
end
|
81
|
+
|
82
|
+
# Checks equality by comparing each attribute.
|
83
|
+
# @param [Object] Object to be compared
|
84
|
+
def ==(o)
|
85
|
+
return true if self.equal?(o)
|
86
|
+
self.class == o.class &&
|
87
|
+
reference_id == o.reference_id
|
88
|
+
end
|
89
|
+
|
90
|
+
# @see the `==` method
|
91
|
+
# @param [Object] Object to be compared
|
92
|
+
def eql?(o)
|
93
|
+
self == o
|
94
|
+
end
|
95
|
+
|
96
|
+
# Calculates hash code according to all attributes.
|
97
|
+
# @return [Integer] Hash code
|
98
|
+
def hash
|
99
|
+
[reference_id].hash
|
100
|
+
end
|
101
|
+
|
102
|
+
# Builds the object from hash
|
103
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
104
|
+
# @return [Object] Returns the model itself
|
105
|
+
def self.build_from_hash(attributes)
|
106
|
+
return nil unless attributes.is_a?(Hash)
|
107
|
+
attributes = attributes.transform_keys(&:to_sym)
|
108
|
+
transformed_hash = {}
|
109
|
+
openapi_types.each_pair do |key, type|
|
110
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
111
|
+
transformed_hash["#{key}"] = nil
|
112
|
+
elsif type =~ /\AArray<(.*)>/i
|
113
|
+
# check to ensure the input is an array given that the attribute
|
114
|
+
# is documented as an array but the input is not
|
115
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
116
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
117
|
+
end
|
118
|
+
elsif !attributes[attribute_map[key]].nil?
|
119
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
120
|
+
end
|
121
|
+
end
|
122
|
+
new(transformed_hash)
|
123
|
+
end
|
124
|
+
|
125
|
+
# Deserializes the data based on type
|
126
|
+
# @param string type Data type
|
127
|
+
# @param string value Value to be deserialized
|
128
|
+
# @return [Object] Deserialized data
|
129
|
+
def self._deserialize(type, value)
|
130
|
+
case type.to_sym
|
131
|
+
when :Time
|
132
|
+
Time.parse(value)
|
133
|
+
when :Date
|
134
|
+
Date.parse(value)
|
135
|
+
when :String
|
136
|
+
value.to_s
|
137
|
+
when :Integer
|
138
|
+
value.to_i
|
139
|
+
when :Float
|
140
|
+
value.to_f
|
141
|
+
when :Boolean
|
142
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
143
|
+
true
|
144
|
+
else
|
145
|
+
false
|
146
|
+
end
|
147
|
+
when :Object
|
148
|
+
# generic object (usually a Hash), return directly
|
149
|
+
value
|
150
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
151
|
+
inner_type = Regexp.last_match[:inner_type]
|
152
|
+
value.map { |v| _deserialize(inner_type, v) }
|
153
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
154
|
+
k_type = Regexp.last_match[:k_type]
|
155
|
+
v_type = Regexp.last_match[:v_type]
|
156
|
+
{}.tap do |hash|
|
157
|
+
value.each do |k, v|
|
158
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
159
|
+
end
|
160
|
+
end
|
161
|
+
else # model
|
162
|
+
# models (e.g. Pet) or oneOf
|
163
|
+
klass = Conekta.const_get(type)
|
164
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
165
|
+
end
|
166
|
+
end
|
167
|
+
|
168
|
+
# Returns the string representation of the object
|
169
|
+
# @return [String] String presentation of the object
|
170
|
+
def to_s
|
171
|
+
to_hash.to_s
|
172
|
+
end
|
173
|
+
|
174
|
+
# to_body is an alias to to_hash (backward compatibility)
|
175
|
+
# @return [Hash] Returns the object in the form of hash
|
176
|
+
def to_body
|
177
|
+
to_hash
|
178
|
+
end
|
179
|
+
|
180
|
+
# Returns the object in the form of hash
|
181
|
+
# @return [Hash] Returns the object in the form of hash
|
182
|
+
def to_hash
|
183
|
+
hash = {}
|
184
|
+
self.class.attribute_map.each_pair do |attr, param|
|
185
|
+
value = self.send(attr)
|
186
|
+
if value.nil?
|
187
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
188
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
189
|
+
end
|
190
|
+
|
191
|
+
hash[param] = _to_hash(value)
|
192
|
+
end
|
193
|
+
hash
|
194
|
+
end
|
195
|
+
|
196
|
+
# Outputs non-array value in the form of hash
|
197
|
+
# For object, use to_hash. Otherwise, just return the value
|
198
|
+
# @param [Object] value Any valid value
|
199
|
+
# @return [Hash] Returns the value in the form of hash
|
200
|
+
def _to_hash(value)
|
201
|
+
if value.is_a?(Array)
|
202
|
+
value.compact.map { |v| _to_hash(v) }
|
203
|
+
elsif value.is_a?(Hash)
|
204
|
+
{}.tap do |hash|
|
205
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
206
|
+
end
|
207
|
+
elsif value.respond_to? :to_hash
|
208
|
+
value.to_hash
|
209
|
+
else
|
210
|
+
value
|
211
|
+
end
|
212
|
+
end
|
213
|
+
|
214
|
+
end
|
215
|
+
|
216
|
+
end
|
@@ -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
|
|
@@ -33,8 +33,6 @@ module Conekta
|
|
33
33
|
|
34
34
|
attr_accessor :failure_message
|
35
35
|
|
36
|
-
attr_accessor :fee
|
37
|
-
|
38
36
|
attr_accessor :id
|
39
37
|
|
40
38
|
attr_accessor :livemode
|
@@ -66,7 +64,6 @@ module Conekta
|
|
66
64
|
:'device_fingerprint' => :'device_fingerprint',
|
67
65
|
:'failure_code' => :'failure_code',
|
68
66
|
:'failure_message' => :'failure_message',
|
69
|
-
:'fee' => :'fee',
|
70
67
|
:'id' => :'id',
|
71
68
|
:'livemode' => :'livemode',
|
72
69
|
:'object' => :'object',
|
@@ -96,7 +93,6 @@ module Conekta
|
|
96
93
|
:'device_fingerprint' => :'String',
|
97
94
|
:'failure_code' => :'String',
|
98
95
|
:'failure_message' => :'String',
|
99
|
-
:'fee' => :'Integer',
|
100
96
|
:'id' => :'String',
|
101
97
|
:'livemode' => :'Boolean',
|
102
98
|
:'object' => :'String',
|
@@ -176,10 +172,6 @@ module Conekta
|
|
176
172
|
self.failure_message = attributes[:'failure_message']
|
177
173
|
end
|
178
174
|
|
179
|
-
if attributes.key?(:'fee')
|
180
|
-
self.fee = attributes[:'fee']
|
181
|
-
end
|
182
|
-
|
183
175
|
if attributes.key?(:'id')
|
184
176
|
self.id = attributes[:'id']
|
185
177
|
end
|
@@ -220,6 +212,7 @@ module Conekta
|
|
220
212
|
# Show invalid properties with the reasons. Usually used together with valid?
|
221
213
|
# @return Array for valid properties with the reasons
|
222
214
|
def list_invalid_properties
|
215
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
223
216
|
invalid_properties = Array.new
|
224
217
|
invalid_properties
|
225
218
|
end
|
@@ -227,6 +220,7 @@ module Conekta
|
|
227
220
|
# Check to see if the all the properties in the model are valid
|
228
221
|
# @return true if the model is valid
|
229
222
|
def valid?
|
223
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
230
224
|
true
|
231
225
|
end
|
232
226
|
|
@@ -244,7 +238,6 @@ module Conekta
|
|
244
238
|
device_fingerprint == o.device_fingerprint &&
|
245
239
|
failure_code == o.failure_code &&
|
246
240
|
failure_message == o.failure_message &&
|
247
|
-
fee == o.fee &&
|
248
241
|
id == o.id &&
|
249
242
|
livemode == o.livemode &&
|
250
243
|
object == o.object &&
|
@@ -265,44 +258,37 @@ module Conekta
|
|
265
258
|
# Calculates hash code according to all attributes.
|
266
259
|
# @return [Integer] Hash code
|
267
260
|
def hash
|
268
|
-
[amount, channel, created_at, currency, customer_id, description, device_fingerprint, failure_code, failure_message,
|
261
|
+
[amount, channel, created_at, currency, customer_id, description, device_fingerprint, failure_code, failure_message, id, livemode, object, order_id, paid_at, payment_method, reference_id, refunds, status].hash
|
269
262
|
end
|
270
263
|
|
271
264
|
# Builds the object from hash
|
272
265
|
# @param [Hash] attributes Model attributes in the form of hash
|
273
266
|
# @return [Object] Returns the model itself
|
274
267
|
def self.build_from_hash(attributes)
|
275
|
-
new.build_from_hash(attributes)
|
276
|
-
end
|
277
|
-
|
278
|
-
# Builds the object from hash
|
279
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
280
|
-
# @return [Object] Returns the model itself
|
281
|
-
def build_from_hash(attributes)
|
282
268
|
return nil unless attributes.is_a?(Hash)
|
283
269
|
attributes = attributes.transform_keys(&:to_sym)
|
284
|
-
|
285
|
-
|
286
|
-
|
270
|
+
transformed_hash = {}
|
271
|
+
openapi_types.each_pair do |key, type|
|
272
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
273
|
+
transformed_hash["#{key}"] = nil
|
287
274
|
elsif type =~ /\AArray<(.*)>/i
|
288
275
|
# check to ensure the input is an array given that the attribute
|
289
276
|
# is documented as an array but the input is not
|
290
|
-
if attributes[
|
291
|
-
|
277
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
278
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
292
279
|
end
|
293
|
-
elsif !attributes[
|
294
|
-
|
280
|
+
elsif !attributes[attribute_map[key]].nil?
|
281
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
295
282
|
end
|
296
283
|
end
|
297
|
-
|
298
|
-
self
|
284
|
+
new(transformed_hash)
|
299
285
|
end
|
300
286
|
|
301
287
|
# Deserializes the data based on type
|
302
288
|
# @param string type Data type
|
303
289
|
# @param string value Value to be deserialized
|
304
290
|
# @return [Object] Deserialized data
|
305
|
-
def _deserialize(type, value)
|
291
|
+
def self._deserialize(type, value)
|
306
292
|
case type.to_sym
|
307
293
|
when :Time
|
308
294
|
Time.parse(value)
|
@@ -337,7 +323,7 @@ module Conekta
|
|
337
323
|
else # model
|
338
324
|
# models (e.g. Pet) or oneOf
|
339
325
|
klass = Conekta.const_get(type)
|
340
|
-
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
326
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
341
327
|
end
|
342
328
|
end
|
343
329
|
|
@@ -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
|
|
@@ -113,10 +113,14 @@ module Conekta
|
|
113
113
|
if (value = attributes[:'allowed_payment_methods']).is_a?(Array)
|
114
114
|
self.allowed_payment_methods = value
|
115
115
|
end
|
116
|
+
else
|
117
|
+
self.allowed_payment_methods = nil
|
116
118
|
end
|
117
119
|
|
118
120
|
if attributes.key?(:'expires_at')
|
119
121
|
self.expires_at = attributes[:'expires_at']
|
122
|
+
else
|
123
|
+
self.expires_at = nil
|
120
124
|
end
|
121
125
|
|
122
126
|
if attributes.key?(:'monthly_installments_enabled')
|
@@ -131,6 +135,8 @@ module Conekta
|
|
131
135
|
|
132
136
|
if attributes.key?(:'name')
|
133
137
|
self.name = attributes[:'name']
|
138
|
+
else
|
139
|
+
self.name = nil
|
134
140
|
end
|
135
141
|
|
136
142
|
if attributes.key?(:'needs_shipping_contact')
|
@@ -143,6 +149,8 @@ module Conekta
|
|
143
149
|
|
144
150
|
if attributes.key?(:'order_template')
|
145
151
|
self.order_template = attributes[:'order_template']
|
152
|
+
else
|
153
|
+
self.order_template = nil
|
146
154
|
end
|
147
155
|
|
148
156
|
if attributes.key?(:'payments_limit_count')
|
@@ -151,16 +159,21 @@ module Conekta
|
|
151
159
|
|
152
160
|
if attributes.key?(:'recurrent')
|
153
161
|
self.recurrent = attributes[:'recurrent']
|
162
|
+
else
|
163
|
+
self.recurrent = nil
|
154
164
|
end
|
155
165
|
|
156
166
|
if attributes.key?(:'type')
|
157
167
|
self.type = attributes[:'type']
|
168
|
+
else
|
169
|
+
self.type = nil
|
158
170
|
end
|
159
171
|
end
|
160
172
|
|
161
173
|
# Show invalid properties with the reasons. Usually used together with valid?
|
162
174
|
# @return Array for valid properties with the reasons
|
163
175
|
def list_invalid_properties
|
176
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
164
177
|
invalid_properties = Array.new
|
165
178
|
if @allowed_payment_methods.nil?
|
166
179
|
invalid_properties.push('invalid value for "allowed_payment_methods", allowed_payment_methods cannot be nil.')
|
@@ -192,6 +205,7 @@ module Conekta
|
|
192
205
|
# Check to see if the all the properties in the model are valid
|
193
206
|
# @return true if the model is valid
|
194
207
|
def valid?
|
208
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
195
209
|
return false if @allowed_payment_methods.nil?
|
196
210
|
return false if @expires_at.nil?
|
197
211
|
return false if @name.nil?
|
@@ -235,37 +249,30 @@ module Conekta
|
|
235
249
|
# @param [Hash] attributes Model attributes in the form of hash
|
236
250
|
# @return [Object] Returns the model itself
|
237
251
|
def self.build_from_hash(attributes)
|
238
|
-
new.build_from_hash(attributes)
|
239
|
-
end
|
240
|
-
|
241
|
-
# Builds the object from hash
|
242
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
243
|
-
# @return [Object] Returns the model itself
|
244
|
-
def build_from_hash(attributes)
|
245
252
|
return nil unless attributes.is_a?(Hash)
|
246
253
|
attributes = attributes.transform_keys(&:to_sym)
|
247
|
-
|
248
|
-
|
249
|
-
|
254
|
+
transformed_hash = {}
|
255
|
+
openapi_types.each_pair do |key, type|
|
256
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
257
|
+
transformed_hash["#{key}"] = nil
|
250
258
|
elsif type =~ /\AArray<(.*)>/i
|
251
259
|
# check to ensure the input is an array given that the attribute
|
252
260
|
# is documented as an array but the input is not
|
253
|
-
if attributes[
|
254
|
-
|
261
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
262
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
255
263
|
end
|
256
|
-
elsif !attributes[
|
257
|
-
|
264
|
+
elsif !attributes[attribute_map[key]].nil?
|
265
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
258
266
|
end
|
259
267
|
end
|
260
|
-
|
261
|
-
self
|
268
|
+
new(transformed_hash)
|
262
269
|
end
|
263
270
|
|
264
271
|
# Deserializes the data based on type
|
265
272
|
# @param string type Data type
|
266
273
|
# @param string value Value to be deserialized
|
267
274
|
# @return [Object] Deserialized data
|
268
|
-
def _deserialize(type, value)
|
275
|
+
def self._deserialize(type, value)
|
269
276
|
case type.to_sym
|
270
277
|
when :Time
|
271
278
|
Time.parse(value)
|
@@ -300,7 +307,7 @@ module Conekta
|
|
300
307
|
else # model
|
301
308
|
# models (e.g. Pet) or oneOf
|
302
309
|
klass = Conekta.const_get(type)
|
303
|
-
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
310
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
304
311
|
end
|
305
312
|
end
|
306
313
|
|