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
|
|
@@ -52,6 +52,8 @@ module Conekta
|
|
52
52
|
# Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
|
53
53
|
attr_accessor :metadata
|
54
54
|
|
55
|
+
attr_accessor :next_action
|
56
|
+
|
55
57
|
# String representing the object’s type. Objects of the same type share the same value.
|
56
58
|
attr_accessor :object
|
57
59
|
|
@@ -84,6 +86,7 @@ module Conekta
|
|
84
86
|
:'line_items' => :'line_items',
|
85
87
|
:'livemode' => :'livemode',
|
86
88
|
:'metadata' => :'metadata',
|
89
|
+
:'next_action' => :'next_action',
|
87
90
|
:'object' => :'object',
|
88
91
|
:'payment_status' => :'payment_status',
|
89
92
|
:'processing_mode' => :'processing_mode',
|
@@ -109,12 +112,13 @@ module Conekta
|
|
109
112
|
:'currency' => :'String',
|
110
113
|
:'customer_info' => :'OrderResponseCustomerInfo',
|
111
114
|
:'discount_lines' => :'OrderResponseDiscountLines',
|
112
|
-
:'fiscal_entity' => :'
|
115
|
+
:'fiscal_entity' => :'OrderFiscalEntityResponse',
|
113
116
|
:'id' => :'String',
|
114
117
|
:'is_refundable' => :'Boolean',
|
115
118
|
:'line_items' => :'OrderResponseProducts',
|
116
119
|
:'livemode' => :'Boolean',
|
117
120
|
:'metadata' => :'Hash<String, Object>',
|
121
|
+
:'next_action' => :'OrderNextActionResponse',
|
118
122
|
:'object' => :'String',
|
119
123
|
:'payment_status' => :'String',
|
120
124
|
:'processing_mode' => :'String',
|
@@ -126,6 +130,7 @@ module Conekta
|
|
126
130
|
# List of attributes with nullable: true
|
127
131
|
def self.openapi_nullable
|
128
132
|
Set.new([
|
133
|
+
:'fiscal_entity',
|
129
134
|
])
|
130
135
|
end
|
131
136
|
|
@@ -206,6 +211,10 @@ module Conekta
|
|
206
211
|
end
|
207
212
|
end
|
208
213
|
|
214
|
+
if attributes.key?(:'next_action')
|
215
|
+
self.next_action = attributes[:'next_action']
|
216
|
+
end
|
217
|
+
|
209
218
|
if attributes.key?(:'object')
|
210
219
|
self.object = attributes[:'object']
|
211
220
|
end
|
@@ -230,6 +239,7 @@ module Conekta
|
|
230
239
|
# Show invalid properties with the reasons. Usually used together with valid?
|
231
240
|
# @return Array for valid properties with the reasons
|
232
241
|
def list_invalid_properties
|
242
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
233
243
|
invalid_properties = Array.new
|
234
244
|
if !@metadata.nil? && @metadata.length > 100
|
235
245
|
invalid_properties.push('invalid value for "metadata", number of items must be less than or equal to 100.')
|
@@ -241,6 +251,7 @@ module Conekta
|
|
241
251
|
# Check to see if the all the properties in the model are valid
|
242
252
|
# @return true if the model is valid
|
243
253
|
def valid?
|
254
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
244
255
|
return false if !@metadata.nil? && @metadata.length > 100
|
245
256
|
true
|
246
257
|
end
|
@@ -248,7 +259,11 @@ module Conekta
|
|
248
259
|
# Custom attribute writer method with validation
|
249
260
|
# @param [Object] metadata Value to be assigned
|
250
261
|
def metadata=(metadata)
|
251
|
-
if
|
262
|
+
if metadata.nil?
|
263
|
+
fail ArgumentError, 'metadata cannot be nil'
|
264
|
+
end
|
265
|
+
|
266
|
+
if metadata.length > 100
|
252
267
|
fail ArgumentError, 'invalid value for "metadata", number of items must be less than or equal to 100.'
|
253
268
|
end
|
254
269
|
|
@@ -275,6 +290,7 @@ module Conekta
|
|
275
290
|
line_items == o.line_items &&
|
276
291
|
livemode == o.livemode &&
|
277
292
|
metadata == o.metadata &&
|
293
|
+
next_action == o.next_action &&
|
278
294
|
object == o.object &&
|
279
295
|
payment_status == o.payment_status &&
|
280
296
|
processing_mode == o.processing_mode &&
|
@@ -291,44 +307,37 @@ module Conekta
|
|
291
307
|
# Calculates hash code according to all attributes.
|
292
308
|
# @return [Integer] Hash code
|
293
309
|
def hash
|
294
|
-
[amount, amount_refunded, channel, charges, checkout, created_at, currency, customer_info, discount_lines, fiscal_entity, id, is_refundable, line_items, livemode, metadata, object, payment_status, processing_mode, shipping_contact, updated_at].hash
|
310
|
+
[amount, amount_refunded, channel, charges, checkout, created_at, currency, customer_info, discount_lines, fiscal_entity, id, is_refundable, line_items, livemode, metadata, next_action, object, payment_status, processing_mode, shipping_contact, updated_at].hash
|
295
311
|
end
|
296
312
|
|
297
313
|
# Builds the object from hash
|
298
314
|
# @param [Hash] attributes Model attributes in the form of hash
|
299
315
|
# @return [Object] Returns the model itself
|
300
316
|
def self.build_from_hash(attributes)
|
301
|
-
new.build_from_hash(attributes)
|
302
|
-
end
|
303
|
-
|
304
|
-
# Builds the object from hash
|
305
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
306
|
-
# @return [Object] Returns the model itself
|
307
|
-
def build_from_hash(attributes)
|
308
317
|
return nil unless attributes.is_a?(Hash)
|
309
318
|
attributes = attributes.transform_keys(&:to_sym)
|
310
|
-
|
311
|
-
|
312
|
-
|
319
|
+
transformed_hash = {}
|
320
|
+
openapi_types.each_pair do |key, type|
|
321
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
322
|
+
transformed_hash["#{key}"] = nil
|
313
323
|
elsif type =~ /\AArray<(.*)>/i
|
314
324
|
# check to ensure the input is an array given that the attribute
|
315
325
|
# is documented as an array but the input is not
|
316
|
-
if attributes[
|
317
|
-
|
326
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
327
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
318
328
|
end
|
319
|
-
elsif !attributes[
|
320
|
-
|
329
|
+
elsif !attributes[attribute_map[key]].nil?
|
330
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
321
331
|
end
|
322
332
|
end
|
323
|
-
|
324
|
-
self
|
333
|
+
new(transformed_hash)
|
325
334
|
end
|
326
335
|
|
327
336
|
# Deserializes the data based on type
|
328
337
|
# @param string type Data type
|
329
338
|
# @param string value Value to be deserialized
|
330
339
|
# @return [Object] Deserialized data
|
331
|
-
def _deserialize(type, value)
|
340
|
+
def self._deserialize(type, value)
|
332
341
|
case type.to_sym
|
333
342
|
when :Time
|
334
343
|
Time.parse(value)
|
@@ -363,7 +372,7 @@ module Conekta
|
|
363
372
|
else # model
|
364
373
|
# models (e.g. Pet) or oneOf
|
365
374
|
klass = Conekta.const_get(type)
|
366
|
-
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
375
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
367
376
|
end
|
368
377
|
end
|
369
378
|
|
@@ -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
|
|
@@ -56,7 +56,6 @@ module Conekta
|
|
56
56
|
# List of class defined in allOf (OpenAPI v3)
|
57
57
|
def self.openapi_all_of
|
58
58
|
[
|
59
|
-
:'OrderResponseChargesAllOf',
|
60
59
|
:'Pagination'
|
61
60
|
]
|
62
61
|
end
|
@@ -78,10 +77,14 @@ module Conekta
|
|
78
77
|
|
79
78
|
if attributes.key?(:'has_more')
|
80
79
|
self.has_more = attributes[:'has_more']
|
80
|
+
else
|
81
|
+
self.has_more = nil
|
81
82
|
end
|
82
83
|
|
83
84
|
if attributes.key?(:'object')
|
84
85
|
self.object = attributes[:'object']
|
86
|
+
else
|
87
|
+
self.object = nil
|
85
88
|
end
|
86
89
|
|
87
90
|
if attributes.key?(:'data')
|
@@ -94,6 +97,7 @@ module Conekta
|
|
94
97
|
# Show invalid properties with the reasons. Usually used together with valid?
|
95
98
|
# @return Array for valid properties with the reasons
|
96
99
|
def list_invalid_properties
|
100
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
97
101
|
invalid_properties = Array.new
|
98
102
|
if @has_more.nil?
|
99
103
|
invalid_properties.push('invalid value for "has_more", has_more cannot be nil.')
|
@@ -109,6 +113,7 @@ module Conekta
|
|
109
113
|
# Check to see if the all the properties in the model are valid
|
110
114
|
# @return true if the model is valid
|
111
115
|
def valid?
|
116
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
112
117
|
return false if @has_more.nil?
|
113
118
|
return false if @object.nil?
|
114
119
|
true
|
@@ -140,37 +145,30 @@ module Conekta
|
|
140
145
|
# @param [Hash] attributes Model attributes in the form of hash
|
141
146
|
# @return [Object] Returns the model itself
|
142
147
|
def self.build_from_hash(attributes)
|
143
|
-
new.build_from_hash(attributes)
|
144
|
-
end
|
145
|
-
|
146
|
-
# Builds the object from hash
|
147
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
148
|
-
# @return [Object] Returns the model itself
|
149
|
-
def build_from_hash(attributes)
|
150
148
|
return nil unless attributes.is_a?(Hash)
|
151
149
|
attributes = attributes.transform_keys(&:to_sym)
|
152
|
-
|
153
|
-
|
154
|
-
|
150
|
+
transformed_hash = {}
|
151
|
+
openapi_types.each_pair do |key, type|
|
152
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
153
|
+
transformed_hash["#{key}"] = nil
|
155
154
|
elsif type =~ /\AArray<(.*)>/i
|
156
155
|
# check to ensure the input is an array given that the attribute
|
157
156
|
# is documented as an array but the input is not
|
158
|
-
if attributes[
|
159
|
-
|
157
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
158
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
160
159
|
end
|
161
|
-
elsif !attributes[
|
162
|
-
|
160
|
+
elsif !attributes[attribute_map[key]].nil?
|
161
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
163
162
|
end
|
164
163
|
end
|
165
|
-
|
166
|
-
self
|
164
|
+
new(transformed_hash)
|
167
165
|
end
|
168
166
|
|
169
167
|
# Deserializes the data based on type
|
170
168
|
# @param string type Data type
|
171
169
|
# @param string value Value to be deserialized
|
172
170
|
# @return [Object] Deserialized data
|
173
|
-
def _deserialize(type, value)
|
171
|
+
def self._deserialize(type, value)
|
174
172
|
case type.to_sym
|
175
173
|
when :Time
|
176
174
|
Time.parse(value)
|
@@ -205,7 +203,7 @@ module Conekta
|
|
205
203
|
else # model
|
206
204
|
# models (e.g. Pet) or oneOf
|
207
205
|
klass = Conekta.const_get(type)
|
208
|
-
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
206
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
209
207
|
end
|
210
208
|
end
|
211
209
|
|
@@ -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
|
|
@@ -67,6 +67,7 @@ module Conekta
|
|
67
67
|
# Show invalid properties with the reasons. Usually used together with valid?
|
68
68
|
# @return Array for valid properties with the reasons
|
69
69
|
def list_invalid_properties
|
70
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
70
71
|
invalid_properties = Array.new
|
71
72
|
invalid_properties
|
72
73
|
end
|
@@ -74,6 +75,7 @@ module Conekta
|
|
74
75
|
# Check to see if the all the properties in the model are valid
|
75
76
|
# @return true if the model is valid
|
76
77
|
def valid?
|
78
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
77
79
|
true
|
78
80
|
end
|
79
81
|
|
@@ -101,37 +103,30 @@ module Conekta
|
|
101
103
|
# @param [Hash] attributes Model attributes in the form of hash
|
102
104
|
# @return [Object] Returns the model itself
|
103
105
|
def self.build_from_hash(attributes)
|
104
|
-
new.build_from_hash(attributes)
|
105
|
-
end
|
106
|
-
|
107
|
-
# Builds the object from hash
|
108
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
109
|
-
# @return [Object] Returns the model itself
|
110
|
-
def build_from_hash(attributes)
|
111
106
|
return nil unless attributes.is_a?(Hash)
|
112
107
|
attributes = attributes.transform_keys(&:to_sym)
|
113
|
-
|
114
|
-
|
115
|
-
|
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
|
116
112
|
elsif type =~ /\AArray<(.*)>/i
|
117
113
|
# check to ensure the input is an array given that the attribute
|
118
114
|
# is documented as an array but the input is not
|
119
|
-
if attributes[
|
120
|
-
|
115
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
116
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
121
117
|
end
|
122
|
-
elsif !attributes[
|
123
|
-
|
118
|
+
elsif !attributes[attribute_map[key]].nil?
|
119
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
124
120
|
end
|
125
121
|
end
|
126
|
-
|
127
|
-
self
|
122
|
+
new(transformed_hash)
|
128
123
|
end
|
129
124
|
|
130
125
|
# Deserializes the data based on type
|
131
126
|
# @param string type Data type
|
132
127
|
# @param string value Value to be deserialized
|
133
128
|
# @return [Object] Deserialized data
|
134
|
-
def _deserialize(type, value)
|
129
|
+
def self._deserialize(type, value)
|
135
130
|
case type.to_sym
|
136
131
|
when :Time
|
137
132
|
Time.parse(value)
|
@@ -166,7 +161,7 @@ module Conekta
|
|
166
161
|
else # model
|
167
162
|
# models (e.g. Pet) or oneOf
|
168
163
|
klass = Conekta.const_get(type)
|
169
|
-
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
164
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
170
165
|
end
|
171
166
|
end
|
172
167
|
|
@@ -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
|
|
@@ -274,6 +274,7 @@ module Conekta
|
|
274
274
|
# Show invalid properties with the reasons. Usually used together with valid?
|
275
275
|
# @return Array for valid properties with the reasons
|
276
276
|
def list_invalid_properties
|
277
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
277
278
|
invalid_properties = Array.new
|
278
279
|
if !@metadata.nil? && @metadata.length > 100
|
279
280
|
invalid_properties.push('invalid value for "metadata", number of items must be less than or equal to 100.')
|
@@ -285,6 +286,7 @@ module Conekta
|
|
285
286
|
# Check to see if the all the properties in the model are valid
|
286
287
|
# @return true if the model is valid
|
287
288
|
def valid?
|
289
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
288
290
|
return false if !@metadata.nil? && @metadata.length > 100
|
289
291
|
true
|
290
292
|
end
|
@@ -292,7 +294,11 @@ module Conekta
|
|
292
294
|
# Custom attribute writer method with validation
|
293
295
|
# @param [Object] metadata Value to be assigned
|
294
296
|
def metadata=(metadata)
|
295
|
-
if
|
297
|
+
if metadata.nil?
|
298
|
+
fail ArgumentError, 'metadata cannot be nil'
|
299
|
+
end
|
300
|
+
|
301
|
+
if metadata.length > 100
|
296
302
|
fail ArgumentError, 'invalid value for "metadata", number of items must be less than or equal to 100.'
|
297
303
|
end
|
298
304
|
|
@@ -348,37 +354,30 @@ module Conekta
|
|
348
354
|
# @param [Hash] attributes Model attributes in the form of hash
|
349
355
|
# @return [Object] Returns the model itself
|
350
356
|
def self.build_from_hash(attributes)
|
351
|
-
new.build_from_hash(attributes)
|
352
|
-
end
|
353
|
-
|
354
|
-
# Builds the object from hash
|
355
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
356
|
-
# @return [Object] Returns the model itself
|
357
|
-
def build_from_hash(attributes)
|
358
357
|
return nil unless attributes.is_a?(Hash)
|
359
358
|
attributes = attributes.transform_keys(&:to_sym)
|
360
|
-
|
361
|
-
|
362
|
-
|
359
|
+
transformed_hash = {}
|
360
|
+
openapi_types.each_pair do |key, type|
|
361
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
362
|
+
transformed_hash["#{key}"] = nil
|
363
363
|
elsif type =~ /\AArray<(.*)>/i
|
364
364
|
# check to ensure the input is an array given that the attribute
|
365
365
|
# is documented as an array but the input is not
|
366
|
-
if attributes[
|
367
|
-
|
366
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
367
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
368
368
|
end
|
369
|
-
elsif !attributes[
|
370
|
-
|
369
|
+
elsif !attributes[attribute_map[key]].nil?
|
370
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
371
371
|
end
|
372
372
|
end
|
373
|
-
|
374
|
-
self
|
373
|
+
new(transformed_hash)
|
375
374
|
end
|
376
375
|
|
377
376
|
# Deserializes the data based on type
|
378
377
|
# @param string type Data type
|
379
378
|
# @param string value Value to be deserialized
|
380
379
|
# @return [Object] Deserialized data
|
381
|
-
def _deserialize(type, value)
|
380
|
+
def self._deserialize(type, value)
|
382
381
|
case type.to_sym
|
383
382
|
when :Time
|
384
383
|
Time.parse(value)
|
@@ -413,7 +412,7 @@ module Conekta
|
|
413
412
|
else # model
|
414
413
|
# models (e.g. Pet) or oneOf
|
415
414
|
klass = Conekta.const_get(type)
|
416
|
-
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
415
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
417
416
|
end
|
418
417
|
end
|
419
418
|
|
@@ -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,7 +15,8 @@ require 'time'
|
|
15
15
|
|
16
16
|
module Conekta
|
17
17
|
class OrderResponseCustomerInfo
|
18
|
-
|
18
|
+
# Custom reference
|
19
|
+
attr_accessor :customer_custom_reference
|
19
20
|
|
20
21
|
attr_accessor :name
|
21
22
|
|
@@ -25,16 +26,19 @@ module Conekta
|
|
25
26
|
|
26
27
|
attr_accessor :corporate
|
27
28
|
|
29
|
+
attr_accessor :object
|
30
|
+
|
28
31
|
attr_accessor :customer_id
|
29
32
|
|
30
33
|
# Attribute mapping from ruby-style variable name to JSON key.
|
31
34
|
def self.attribute_map
|
32
35
|
{
|
33
|
-
:'
|
36
|
+
:'customer_custom_reference' => :'customer_custom_reference',
|
34
37
|
:'name' => :'name',
|
35
38
|
:'email' => :'email',
|
36
39
|
:'phone' => :'phone',
|
37
40
|
:'corporate' => :'corporate',
|
41
|
+
:'object' => :'object',
|
38
42
|
:'customer_id' => :'customer_id'
|
39
43
|
}
|
40
44
|
end
|
@@ -47,11 +51,12 @@ module Conekta
|
|
47
51
|
# Attribute type mapping.
|
48
52
|
def self.openapi_types
|
49
53
|
{
|
50
|
-
:'
|
54
|
+
:'customer_custom_reference' => :'String',
|
51
55
|
:'name' => :'String',
|
52
56
|
:'email' => :'String',
|
53
57
|
:'phone' => :'String',
|
54
58
|
:'corporate' => :'Boolean',
|
59
|
+
:'object' => :'String',
|
55
60
|
:'customer_id' => :'String'
|
56
61
|
}
|
57
62
|
end
|
@@ -59,6 +64,7 @@ module Conekta
|
|
59
64
|
# List of attributes with nullable: true
|
60
65
|
def self.openapi_nullable
|
61
66
|
Set.new([
|
67
|
+
:'customer_custom_reference',
|
62
68
|
])
|
63
69
|
end
|
64
70
|
|
@@ -66,8 +72,7 @@ module Conekta
|
|
66
72
|
def self.openapi_all_of
|
67
73
|
[
|
68
74
|
:'CustomerInfoJustCustomerIdResponse',
|
69
|
-
:'
|
70
|
-
:'OrderResponseCustomerInfoAllOf'
|
75
|
+
:'OrderCustomerInfoResponse'
|
71
76
|
]
|
72
77
|
end
|
73
78
|
|
@@ -86,8 +91,8 @@ module Conekta
|
|
86
91
|
h[k.to_sym] = v
|
87
92
|
}
|
88
93
|
|
89
|
-
if attributes.key?(:'
|
90
|
-
self.
|
94
|
+
if attributes.key?(:'customer_custom_reference')
|
95
|
+
self.customer_custom_reference = attributes[:'customer_custom_reference']
|
91
96
|
end
|
92
97
|
|
93
98
|
if attributes.key?(:'name')
|
@@ -108,6 +113,10 @@ module Conekta
|
|
108
113
|
self.corporate = false
|
109
114
|
end
|
110
115
|
|
116
|
+
if attributes.key?(:'object')
|
117
|
+
self.object = attributes[:'object']
|
118
|
+
end
|
119
|
+
|
111
120
|
if attributes.key?(:'customer_id')
|
112
121
|
self.customer_id = attributes[:'customer_id']
|
113
122
|
end
|
@@ -116,6 +125,7 @@ module Conekta
|
|
116
125
|
# Show invalid properties with the reasons. Usually used together with valid?
|
117
126
|
# @return Array for valid properties with the reasons
|
118
127
|
def list_invalid_properties
|
128
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
119
129
|
invalid_properties = Array.new
|
120
130
|
invalid_properties
|
121
131
|
end
|
@@ -123,6 +133,7 @@ module Conekta
|
|
123
133
|
# Check to see if the all the properties in the model are valid
|
124
134
|
# @return true if the model is valid
|
125
135
|
def valid?
|
136
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
126
137
|
true
|
127
138
|
end
|
128
139
|
|
@@ -131,11 +142,12 @@ module Conekta
|
|
131
142
|
def ==(o)
|
132
143
|
return true if self.equal?(o)
|
133
144
|
self.class == o.class &&
|
134
|
-
|
145
|
+
customer_custom_reference == o.customer_custom_reference &&
|
135
146
|
name == o.name &&
|
136
147
|
email == o.email &&
|
137
148
|
phone == o.phone &&
|
138
149
|
corporate == o.corporate &&
|
150
|
+
object == o.object &&
|
139
151
|
customer_id == o.customer_id
|
140
152
|
end
|
141
153
|
|
@@ -148,44 +160,37 @@ module Conekta
|
|
148
160
|
# Calculates hash code according to all attributes.
|
149
161
|
# @return [Integer] Hash code
|
150
162
|
def hash
|
151
|
-
[
|
163
|
+
[customer_custom_reference, name, email, phone, corporate, object, customer_id].hash
|
152
164
|
end
|
153
165
|
|
154
166
|
# Builds the object from hash
|
155
167
|
# @param [Hash] attributes Model attributes in the form of hash
|
156
168
|
# @return [Object] Returns the model itself
|
157
169
|
def self.build_from_hash(attributes)
|
158
|
-
new.build_from_hash(attributes)
|
159
|
-
end
|
160
|
-
|
161
|
-
# Builds the object from hash
|
162
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
163
|
-
# @return [Object] Returns the model itself
|
164
|
-
def build_from_hash(attributes)
|
165
170
|
return nil unless attributes.is_a?(Hash)
|
166
171
|
attributes = attributes.transform_keys(&:to_sym)
|
167
|
-
|
168
|
-
|
169
|
-
|
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
|
170
176
|
elsif type =~ /\AArray<(.*)>/i
|
171
177
|
# check to ensure the input is an array given that the attribute
|
172
178
|
# is documented as an array but the input is not
|
173
|
-
if attributes[
|
174
|
-
|
179
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
180
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
175
181
|
end
|
176
|
-
elsif !attributes[
|
177
|
-
|
182
|
+
elsif !attributes[attribute_map[key]].nil?
|
183
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
178
184
|
end
|
179
185
|
end
|
180
|
-
|
181
|
-
self
|
186
|
+
new(transformed_hash)
|
182
187
|
end
|
183
188
|
|
184
189
|
# Deserializes the data based on type
|
185
190
|
# @param string type Data type
|
186
191
|
# @param string value Value to be deserialized
|
187
192
|
# @return [Object] Deserialized data
|
188
|
-
def _deserialize(type, value)
|
193
|
+
def self._deserialize(type, value)
|
189
194
|
case type.to_sym
|
190
195
|
when :Time
|
191
196
|
Time.parse(value)
|
@@ -220,7 +225,7 @@ module Conekta
|
|
220
225
|
else # model
|
221
226
|
# models (e.g. Pet) or oneOf
|
222
227
|
klass = Conekta.const_get(type)
|
223
|
-
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)
|
224
229
|
end
|
225
230
|
end
|
226
231
|
|