conekta 6.0.0 → 6.0.1
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/Makefile +9 -1
- data/README.md +17 -10
- data/VERSION +1 -1
- data/conekta.gemspec +4 -3
- data/config-ruby.json +32 -0
- 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/Customer.md +1 -1
- data/docs/CustomerAddress.md +3 -3
- data/docs/CustomerFiscalEntitiesRequestAddress.md +3 -3
- data/docs/CustomerResponse.md +11 -9
- data/docs/CustomerShippingContacts.md +4 -2
- data/docs/CustomerShippingContactsAddress.md +2 -2
- data/docs/CustomerShippingContactsDataResponse.md +3 -1
- data/docs/CustomerShippingContactsResponse.md +3 -1
- data/docs/CustomerShippingContactsResponseAddress.md +2 -2
- data/docs/CustomerUpdateShippingContacts.md +1 -1
- data/docs/CustomersApi.md +2 -2
- 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/{OrderResponseFiscalEntityAddressAllOf.md → OrderFiscalEntityAddressResponseAllOf.md} +2 -2
- 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 +2 -0
- data/docs/OrderResponseShippingContact.md +3 -1
- 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/UpdateCustomer.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 +39 -36
- data/lib/conekta/api_error.rb +1 -1
- data/lib/conekta/configuration.rb +13 -10
- data/lib/conekta/models/api_key_create_response.rb +14 -19
- 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 -19
- 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 -19
- 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 +22 -19
- 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 +22 -19
- data/lib/conekta/models/customer_fiscal_entities_request.rb +16 -19
- data/lib/conekta/models/customer_fiscal_entities_request_address.rb +22 -19
- data/lib/conekta/models/customer_fiscal_entities_response.rb +18 -19
- 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 -19
- data/lib/conekta/models/customer_response.rb +67 -20
- data/lib/conekta/models/customer_response_shipping_contacts.rb +18 -19
- 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 +54 -20
- 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 +14 -19
- data/lib/conekta/models/customer_update_shipping_contacts.rb +14 -19
- data/lib/conekta/models/customers_response.rb +18 -19
- data/lib/conekta/models/customers_response_all_of.rb +14 -19
- data/lib/conekta/models/delete_api_keys_response.rb +14 -19
- 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 -19
- 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 +14 -19
- 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 -19
- data/lib/conekta/models/get_api_keys_response_all_of.rb +14 -19
- data/lib/conekta/models/get_charges_response.rb +18 -19
- data/lib/conekta/models/get_charges_response_all_of.rb +14 -19
- data/lib/conekta/models/get_companies_response.rb +18 -19
- 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 -19
- data/lib/conekta/models/get_events_response_all_of.rb +14 -19
- data/lib/conekta/models/get_order_discount_lines_response.rb +18 -19
- 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 -19
- data/lib/conekta/models/get_payment_method_response_all_of.rb +14 -19
- data/lib/conekta/models/get_plans_response.rb +18 -19
- data/lib/conekta/models/get_plans_response_all_of.rb +14 -19
- data/lib/conekta/models/get_transactions_response.rb +18 -19
- data/lib/conekta/models/get_transactions_response_all_of.rb +14 -19
- data/lib/conekta/models/get_transfers_response.rb +18 -19
- data/lib/conekta/models/get_transfers_response_all_of.rb +14 -19
- data/lib/conekta/models/get_webhook_keys_response.rb +18 -19
- data/lib/conekta/models/get_webhook_keys_response_all_of.rb +14 -19
- data/lib/conekta/models/get_webhooks_response.rb +18 -19
- 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} +48 -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 -19
- 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 +27 -21
- data/lib/conekta/models/order_response_customer_info_all_of.rb +14 -19
- data/lib/conekta/models/order_response_discount_lines.rb +18 -19
- data/lib/conekta/models/order_response_discount_lines_all_of.rb +14 -19
- data/lib/conekta/models/order_response_products.rb +18 -19
- data/lib/conekta/models/order_response_products_all_of.rb +14 -19
- data/lib/conekta/models/order_response_shipping_contact.rb +46 -20
- 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 -19
- data/lib/conekta/models/payment_method_card.rb +16 -43
- data/lib/conekta/models/payment_method_card_request.rb +18 -19
- data/lib/conekta/models/payment_method_card_request_all_of.rb +14 -19
- data/lib/conekta/models/payment_method_card_response.rb +22 -19
- data/lib/conekta/models/payment_method_card_response_all_of.rb +14 -19
- data/lib/conekta/models/payment_method_cash.rb +16 -19
- data/lib/conekta/models/payment_method_cash_request.rb +16 -19
- data/lib/conekta/models/payment_method_cash_request_all_of.rb +14 -19
- data/lib/conekta/models/payment_method_cash_response.rb +22 -19
- 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 +22 -19
- data/lib/conekta/models/payment_method_spei_recurrent_all_of.rb +14 -19
- data/lib/conekta/models/payment_method_spei_request.rb +16 -19
- 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 +30 -21
- data/lib/conekta/models/product_data_response_all_of.rb +14 -19
- data/lib/conekta/models/product_order_response.rb +30 -21
- 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 +18 -19
- data/lib/conekta/models/shipping_order_response.rb +21 -20
- 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 -19
- 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 +22 -19
- 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 +25 -20
- 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 +11 -5
- 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 +46 -29
- data/docs/OrderResponseFiscalEntity.md +0 -24
- data/docs/OrderResponseFiscalEntityAddress.md +0 -34
@@ -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
|
|
@@ -116,6 +116,7 @@ module Conekta
|
|
116
116
|
# Show invalid properties with the reasons. Usually used together with valid?
|
117
117
|
# @return Array for valid properties with the reasons
|
118
118
|
def list_invalid_properties
|
119
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
119
120
|
invalid_properties = Array.new
|
120
121
|
invalid_properties
|
121
122
|
end
|
@@ -123,6 +124,7 @@ module Conekta
|
|
123
124
|
# Check to see if the all the properties in the model are valid
|
124
125
|
# @return true if the model is valid
|
125
126
|
def valid?
|
127
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
126
128
|
true
|
127
129
|
end
|
128
130
|
|
@@ -156,37 +158,30 @@ module Conekta
|
|
156
158
|
# @param [Hash] attributes Model attributes in the form of hash
|
157
159
|
# @return [Object] Returns the model itself
|
158
160
|
def self.build_from_hash(attributes)
|
159
|
-
new.build_from_hash(attributes)
|
160
|
-
end
|
161
|
-
|
162
|
-
# Builds the object from hash
|
163
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
164
|
-
# @return [Object] Returns the model itself
|
165
|
-
def build_from_hash(attributes)
|
166
161
|
return nil unless attributes.is_a?(Hash)
|
167
162
|
attributes = attributes.transform_keys(&:to_sym)
|
168
|
-
|
169
|
-
|
170
|
-
|
163
|
+
transformed_hash = {}
|
164
|
+
openapi_types.each_pair do |key, type|
|
165
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
166
|
+
transformed_hash["#{key}"] = nil
|
171
167
|
elsif type =~ /\AArray<(.*)>/i
|
172
168
|
# check to ensure the input is an array given that the attribute
|
173
169
|
# is documented as an array but the input is not
|
174
|
-
if attributes[
|
175
|
-
|
170
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
171
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
176
172
|
end
|
177
|
-
elsif !attributes[
|
178
|
-
|
173
|
+
elsif !attributes[attribute_map[key]].nil?
|
174
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
179
175
|
end
|
180
176
|
end
|
181
|
-
|
182
|
-
self
|
177
|
+
new(transformed_hash)
|
183
178
|
end
|
184
179
|
|
185
180
|
# Deserializes the data based on type
|
186
181
|
# @param string type Data type
|
187
182
|
# @param string value Value to be deserialized
|
188
183
|
# @return [Object] Deserialized data
|
189
|
-
def _deserialize(type, value)
|
184
|
+
def self._deserialize(type, value)
|
190
185
|
case type.to_sym
|
191
186
|
when :Time
|
192
187
|
Time.parse(value)
|
@@ -221,7 +216,7 @@ module Conekta
|
|
221
216
|
else # model
|
222
217
|
# models (e.g. Pet) or oneOf
|
223
218
|
klass = Conekta.const_get(type)
|
224
|
-
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
219
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
225
220
|
end
|
226
221
|
end
|
227
222
|
|
@@ -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
|
|
@@ -32,6 +32,9 @@ module Conekta
|
|
32
32
|
|
33
33
|
attr_accessor :deleted
|
34
34
|
|
35
|
+
# Metadata associated with the shipping contact
|
36
|
+
attr_accessor :metadata
|
37
|
+
|
35
38
|
attr_accessor :id
|
36
39
|
|
37
40
|
attr_accessor :object
|
@@ -48,6 +51,7 @@ module Conekta
|
|
48
51
|
:'parent_id' => :'parent_id',
|
49
52
|
:'default' => :'default',
|
50
53
|
:'deleted' => :'deleted',
|
54
|
+
:'metadata' => :'metadata',
|
51
55
|
:'id' => :'id',
|
52
56
|
:'object' => :'object',
|
53
57
|
:'created_at' => :'created_at'
|
@@ -69,6 +73,7 @@ module Conekta
|
|
69
73
|
:'parent_id' => :'String',
|
70
74
|
:'default' => :'Boolean',
|
71
75
|
:'deleted' => :'Boolean',
|
76
|
+
:'metadata' => :'Hash<String, Object>',
|
72
77
|
:'id' => :'String',
|
73
78
|
:'object' => :'String',
|
74
79
|
:'created_at' => :'Integer'
|
@@ -120,6 +125,8 @@ module Conekta
|
|
120
125
|
|
121
126
|
if attributes.key?(:'address')
|
122
127
|
self.address = attributes[:'address']
|
128
|
+
else
|
129
|
+
self.address = nil
|
123
130
|
end
|
124
131
|
|
125
132
|
if attributes.key?(:'parent_id')
|
@@ -134,27 +141,44 @@ module Conekta
|
|
134
141
|
self.deleted = attributes[:'deleted']
|
135
142
|
end
|
136
143
|
|
144
|
+
if attributes.key?(:'metadata')
|
145
|
+
if (value = attributes[:'metadata']).is_a?(Hash)
|
146
|
+
self.metadata = value
|
147
|
+
end
|
148
|
+
end
|
149
|
+
|
137
150
|
if attributes.key?(:'id')
|
138
151
|
self.id = attributes[:'id']
|
152
|
+
else
|
153
|
+
self.id = nil
|
139
154
|
end
|
140
155
|
|
141
156
|
if attributes.key?(:'object')
|
142
157
|
self.object = attributes[:'object']
|
158
|
+
else
|
159
|
+
self.object = nil
|
143
160
|
end
|
144
161
|
|
145
162
|
if attributes.key?(:'created_at')
|
146
163
|
self.created_at = attributes[:'created_at']
|
164
|
+
else
|
165
|
+
self.created_at = nil
|
147
166
|
end
|
148
167
|
end
|
149
168
|
|
150
169
|
# Show invalid properties with the reasons. Usually used together with valid?
|
151
170
|
# @return Array for valid properties with the reasons
|
152
171
|
def list_invalid_properties
|
172
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
153
173
|
invalid_properties = Array.new
|
154
174
|
if @address.nil?
|
155
175
|
invalid_properties.push('invalid value for "address", address cannot be nil.')
|
156
176
|
end
|
157
177
|
|
178
|
+
if !@metadata.nil? && @metadata.length > 100
|
179
|
+
invalid_properties.push('invalid value for "metadata", number of items must be less than or equal to 100.')
|
180
|
+
end
|
181
|
+
|
158
182
|
if @id.nil?
|
159
183
|
invalid_properties.push('invalid value for "id", id cannot be nil.')
|
160
184
|
end
|
@@ -173,13 +197,29 @@ module Conekta
|
|
173
197
|
# Check to see if the all the properties in the model are valid
|
174
198
|
# @return true if the model is valid
|
175
199
|
def valid?
|
200
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
176
201
|
return false if @address.nil?
|
202
|
+
return false if !@metadata.nil? && @metadata.length > 100
|
177
203
|
return false if @id.nil?
|
178
204
|
return false if @object.nil?
|
179
205
|
return false if @created_at.nil?
|
180
206
|
true
|
181
207
|
end
|
182
208
|
|
209
|
+
# Custom attribute writer method with validation
|
210
|
+
# @param [Object] metadata Value to be assigned
|
211
|
+
def metadata=(metadata)
|
212
|
+
if metadata.nil?
|
213
|
+
fail ArgumentError, 'metadata cannot be nil'
|
214
|
+
end
|
215
|
+
|
216
|
+
if metadata.length > 100
|
217
|
+
fail ArgumentError, 'invalid value for "metadata", number of items must be less than or equal to 100.'
|
218
|
+
end
|
219
|
+
|
220
|
+
@metadata = metadata
|
221
|
+
end
|
222
|
+
|
183
223
|
# Checks equality by comparing each attribute.
|
184
224
|
# @param [Object] Object to be compared
|
185
225
|
def ==(o)
|
@@ -192,6 +232,7 @@ module Conekta
|
|
192
232
|
parent_id == o.parent_id &&
|
193
233
|
default == o.default &&
|
194
234
|
deleted == o.deleted &&
|
235
|
+
metadata == o.metadata &&
|
195
236
|
id == o.id &&
|
196
237
|
object == o.object &&
|
197
238
|
created_at == o.created_at
|
@@ -206,44 +247,37 @@ module Conekta
|
|
206
247
|
# Calculates hash code according to all attributes.
|
207
248
|
# @return [Integer] Hash code
|
208
249
|
def hash
|
209
|
-
[phone, receiver, between_streets, address, parent_id, default, deleted, id, object, created_at].hash
|
250
|
+
[phone, receiver, between_streets, address, parent_id, default, deleted, metadata, id, object, created_at].hash
|
210
251
|
end
|
211
252
|
|
212
253
|
# Builds the object from hash
|
213
254
|
# @param [Hash] attributes Model attributes in the form of hash
|
214
255
|
# @return [Object] Returns the model itself
|
215
256
|
def self.build_from_hash(attributes)
|
216
|
-
new.build_from_hash(attributes)
|
217
|
-
end
|
218
|
-
|
219
|
-
# Builds the object from hash
|
220
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
221
|
-
# @return [Object] Returns the model itself
|
222
|
-
def build_from_hash(attributes)
|
223
257
|
return nil unless attributes.is_a?(Hash)
|
224
258
|
attributes = attributes.transform_keys(&:to_sym)
|
225
|
-
|
226
|
-
|
227
|
-
|
259
|
+
transformed_hash = {}
|
260
|
+
openapi_types.each_pair do |key, type|
|
261
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
262
|
+
transformed_hash["#{key}"] = nil
|
228
263
|
elsif type =~ /\AArray<(.*)>/i
|
229
264
|
# check to ensure the input is an array given that the attribute
|
230
265
|
# is documented as an array but the input is not
|
231
|
-
if attributes[
|
232
|
-
|
266
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
267
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
233
268
|
end
|
234
|
-
elsif !attributes[
|
235
|
-
|
269
|
+
elsif !attributes[attribute_map[key]].nil?
|
270
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
236
271
|
end
|
237
272
|
end
|
238
|
-
|
239
|
-
self
|
273
|
+
new(transformed_hash)
|
240
274
|
end
|
241
275
|
|
242
276
|
# Deserializes the data based on type
|
243
277
|
# @param string type Data type
|
244
278
|
# @param string value Value to be deserialized
|
245
279
|
# @return [Object] Deserialized data
|
246
|
-
def _deserialize(type, value)
|
280
|
+
def self._deserialize(type, value)
|
247
281
|
case type.to_sym
|
248
282
|
when :Time
|
249
283
|
Time.parse(value)
|
@@ -278,7 +312,7 @@ module Conekta
|
|
278
312
|
else # model
|
279
313
|
# models (e.g. Pet) or oneOf
|
280
314
|
klass = Conekta.const_get(type)
|
281
|
-
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
315
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
282
316
|
end
|
283
317
|
end
|
284
318
|
|
@@ -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,20 +67,27 @@ module Conekta
|
|
67
67
|
|
68
68
|
if attributes.key?(:'id')
|
69
69
|
self.id = attributes[:'id']
|
70
|
+
else
|
71
|
+
self.id = nil
|
70
72
|
end
|
71
73
|
|
72
74
|
if attributes.key?(:'object')
|
73
75
|
self.object = attributes[:'object']
|
76
|
+
else
|
77
|
+
self.object = nil
|
74
78
|
end
|
75
79
|
|
76
80
|
if attributes.key?(:'created_at')
|
77
81
|
self.created_at = attributes[:'created_at']
|
82
|
+
else
|
83
|
+
self.created_at = nil
|
78
84
|
end
|
79
85
|
end
|
80
86
|
|
81
87
|
# Show invalid properties with the reasons. Usually used together with valid?
|
82
88
|
# @return Array for valid properties with the reasons
|
83
89
|
def list_invalid_properties
|
90
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
84
91
|
invalid_properties = Array.new
|
85
92
|
if @id.nil?
|
86
93
|
invalid_properties.push('invalid value for "id", id cannot be nil.')
|
@@ -100,6 +107,7 @@ module Conekta
|
|
100
107
|
# Check to see if the all the properties in the model are valid
|
101
108
|
# @return true if the model is valid
|
102
109
|
def valid?
|
110
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
103
111
|
return false if @id.nil?
|
104
112
|
return false if @object.nil?
|
105
113
|
return false if @created_at.nil?
|
@@ -132,37 +140,30 @@ module Conekta
|
|
132
140
|
# @param [Hash] attributes Model attributes in the form of hash
|
133
141
|
# @return [Object] Returns the model itself
|
134
142
|
def self.build_from_hash(attributes)
|
135
|
-
new.build_from_hash(attributes)
|
136
|
-
end
|
137
|
-
|
138
|
-
# Builds the object from hash
|
139
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
140
|
-
# @return [Object] Returns the model itself
|
141
|
-
def build_from_hash(attributes)
|
142
143
|
return nil unless attributes.is_a?(Hash)
|
143
144
|
attributes = attributes.transform_keys(&:to_sym)
|
144
|
-
|
145
|
-
|
146
|
-
|
145
|
+
transformed_hash = {}
|
146
|
+
openapi_types.each_pair do |key, type|
|
147
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
148
|
+
transformed_hash["#{key}"] = nil
|
147
149
|
elsif type =~ /\AArray<(.*)>/i
|
148
150
|
# check to ensure the input is an array given that the attribute
|
149
151
|
# is documented as an array but the input is not
|
150
|
-
if attributes[
|
151
|
-
|
152
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
153
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
152
154
|
end
|
153
|
-
elsif !attributes[
|
154
|
-
|
155
|
+
elsif !attributes[attribute_map[key]].nil?
|
156
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
155
157
|
end
|
156
158
|
end
|
157
|
-
|
158
|
-
self
|
159
|
+
new(transformed_hash)
|
159
160
|
end
|
160
161
|
|
161
162
|
# Deserializes the data based on type
|
162
163
|
# @param string type Data type
|
163
164
|
# @param string value Value to be deserialized
|
164
165
|
# @return [Object] Deserialized data
|
165
|
-
def _deserialize(type, value)
|
166
|
+
def self._deserialize(type, value)
|
166
167
|
case type.to_sym
|
167
168
|
when :Time
|
168
169
|
Time.parse(value)
|
@@ -197,7 +198,7 @@ module Conekta
|
|
197
198
|
else # model
|
198
199
|
# models (e.g. Pet) or oneOf
|
199
200
|
klass = Conekta.const_get(type)
|
200
|
-
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
201
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
201
202
|
end
|
202
203
|
end
|
203
204
|
|
@@ -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
|
|
@@ -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.1.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
|
|