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
|
|
@@ -29,6 +29,8 @@ module Conekta
|
|
29
29
|
# List of [discounts](https://developers.conekta.com/v2.1.0/reference/orderscreatediscountline) that are applied to the order. You must have at least one discount.
|
30
30
|
attr_accessor :discount_lines
|
31
31
|
|
32
|
+
attr_accessor :fiscal_entity
|
33
|
+
|
32
34
|
# List of [products](https://developers.conekta.com/v2.1.0/reference/orderscreateproduct) that are sold in the order. You must have at least one product.
|
33
35
|
attr_accessor :line_items
|
34
36
|
|
@@ -44,6 +46,9 @@ module Conekta
|
|
44
46
|
# Indicates the processing mode for the order, either ecommerce, recurrent or validation.
|
45
47
|
attr_accessor :processing_mode
|
46
48
|
|
49
|
+
# Indicates the redirection callback upon completion of the 3DS2 flow.
|
50
|
+
attr_accessor :return_url
|
51
|
+
|
47
52
|
attr_accessor :shipping_contact
|
48
53
|
|
49
54
|
# List of [shipping costs](https://developers.conekta.com/v2.1.0/reference/orderscreateshipping). If the online store offers digital products.
|
@@ -52,6 +57,9 @@ module Conekta
|
|
52
57
|
# List of [taxes](https://developers.conekta.com/v2.1.0/reference/orderscreatetaxes) that are applied to the order.
|
53
58
|
attr_accessor :tax_lines
|
54
59
|
|
60
|
+
# Indicates the 3DS2 mode for the order, either smart or strict.
|
61
|
+
attr_accessor :three_ds_mode
|
62
|
+
|
55
63
|
# Attribute mapping from ruby-style variable name to JSON key.
|
56
64
|
def self.attribute_map
|
57
65
|
{
|
@@ -60,14 +68,17 @@ module Conekta
|
|
60
68
|
:'currency' => :'currency',
|
61
69
|
:'customer_info' => :'customer_info',
|
62
70
|
:'discount_lines' => :'discount_lines',
|
71
|
+
:'fiscal_entity' => :'fiscal_entity',
|
63
72
|
:'line_items' => :'line_items',
|
64
73
|
:'metadata' => :'metadata',
|
65
74
|
:'needs_shipping_contact' => :'needs_shipping_contact',
|
66
75
|
:'pre_authorize' => :'pre_authorize',
|
67
76
|
:'processing_mode' => :'processing_mode',
|
77
|
+
:'return_url' => :'return_url',
|
68
78
|
:'shipping_contact' => :'shipping_contact',
|
69
79
|
:'shipping_lines' => :'shipping_lines',
|
70
|
-
:'tax_lines' => :'tax_lines'
|
80
|
+
:'tax_lines' => :'tax_lines',
|
81
|
+
:'three_ds_mode' => :'three_ds_mode'
|
71
82
|
}
|
72
83
|
end
|
73
84
|
|
@@ -84,14 +95,17 @@ module Conekta
|
|
84
95
|
:'currency' => :'String',
|
85
96
|
:'customer_info' => :'OrderRequestCustomerInfo',
|
86
97
|
:'discount_lines' => :'Array<OrderDiscountLinesRequest>',
|
98
|
+
:'fiscal_entity' => :'OrderFiscalEntityRequest',
|
87
99
|
:'line_items' => :'Array<Product>',
|
88
100
|
:'metadata' => :'Hash<String, Object>',
|
89
101
|
:'needs_shipping_contact' => :'Boolean',
|
90
102
|
:'pre_authorize' => :'Boolean',
|
91
103
|
:'processing_mode' => :'String',
|
104
|
+
:'return_url' => :'String',
|
92
105
|
:'shipping_contact' => :'CustomerShippingContacts',
|
93
106
|
:'shipping_lines' => :'Array<ShippingRequest>',
|
94
|
-
:'tax_lines' => :'Array<OrderTaxRequest>'
|
107
|
+
:'tax_lines' => :'Array<OrderTaxRequest>',
|
108
|
+
:'three_ds_mode' => :'String'
|
95
109
|
}
|
96
110
|
end
|
97
111
|
|
@@ -128,10 +142,14 @@ module Conekta
|
|
128
142
|
|
129
143
|
if attributes.key?(:'currency')
|
130
144
|
self.currency = attributes[:'currency']
|
145
|
+
else
|
146
|
+
self.currency = nil
|
131
147
|
end
|
132
148
|
|
133
149
|
if attributes.key?(:'customer_info')
|
134
150
|
self.customer_info = attributes[:'customer_info']
|
151
|
+
else
|
152
|
+
self.customer_info = nil
|
135
153
|
end
|
136
154
|
|
137
155
|
if attributes.key?(:'discount_lines')
|
@@ -140,10 +158,16 @@ module Conekta
|
|
140
158
|
end
|
141
159
|
end
|
142
160
|
|
161
|
+
if attributes.key?(:'fiscal_entity')
|
162
|
+
self.fiscal_entity = attributes[:'fiscal_entity']
|
163
|
+
end
|
164
|
+
|
143
165
|
if attributes.key?(:'line_items')
|
144
166
|
if (value = attributes[:'line_items']).is_a?(Array)
|
145
167
|
self.line_items = value
|
146
168
|
end
|
169
|
+
else
|
170
|
+
self.line_items = nil
|
147
171
|
end
|
148
172
|
|
149
173
|
if attributes.key?(:'metadata')
|
@@ -166,6 +190,10 @@ module Conekta
|
|
166
190
|
self.processing_mode = attributes[:'processing_mode']
|
167
191
|
end
|
168
192
|
|
193
|
+
if attributes.key?(:'return_url')
|
194
|
+
self.return_url = attributes[:'return_url']
|
195
|
+
end
|
196
|
+
|
169
197
|
if attributes.key?(:'shipping_contact')
|
170
198
|
self.shipping_contact = attributes[:'shipping_contact']
|
171
199
|
end
|
@@ -181,11 +209,16 @@ module Conekta
|
|
181
209
|
self.tax_lines = value
|
182
210
|
end
|
183
211
|
end
|
212
|
+
|
213
|
+
if attributes.key?(:'three_ds_mode')
|
214
|
+
self.three_ds_mode = attributes[:'three_ds_mode']
|
215
|
+
end
|
184
216
|
end
|
185
217
|
|
186
218
|
# Show invalid properties with the reasons. Usually used together with valid?
|
187
219
|
# @return Array for valid properties with the reasons
|
188
220
|
def list_invalid_properties
|
221
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
189
222
|
invalid_properties = Array.new
|
190
223
|
if @currency.nil?
|
191
224
|
invalid_properties.push('invalid value for "currency", currency cannot be nil.')
|
@@ -213,6 +246,7 @@ module Conekta
|
|
213
246
|
# Check to see if the all the properties in the model are valid
|
214
247
|
# @return true if the model is valid
|
215
248
|
def valid?
|
249
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
216
250
|
return false if @currency.nil?
|
217
251
|
return false if @currency.to_s.length > 3
|
218
252
|
return false if @customer_info.nil?
|
@@ -238,7 +272,11 @@ module Conekta
|
|
238
272
|
# Custom attribute writer method with validation
|
239
273
|
# @param [Object] metadata Value to be assigned
|
240
274
|
def metadata=(metadata)
|
241
|
-
if
|
275
|
+
if metadata.nil?
|
276
|
+
fail ArgumentError, 'metadata cannot be nil'
|
277
|
+
end
|
278
|
+
|
279
|
+
if metadata.length > 100
|
242
280
|
fail ArgumentError, 'invalid value for "metadata", number of items must be less than or equal to 100.'
|
243
281
|
end
|
244
282
|
|
@@ -255,14 +293,17 @@ module Conekta
|
|
255
293
|
currency == o.currency &&
|
256
294
|
customer_info == o.customer_info &&
|
257
295
|
discount_lines == o.discount_lines &&
|
296
|
+
fiscal_entity == o.fiscal_entity &&
|
258
297
|
line_items == o.line_items &&
|
259
298
|
metadata == o.metadata &&
|
260
299
|
needs_shipping_contact == o.needs_shipping_contact &&
|
261
300
|
pre_authorize == o.pre_authorize &&
|
262
301
|
processing_mode == o.processing_mode &&
|
302
|
+
return_url == o.return_url &&
|
263
303
|
shipping_contact == o.shipping_contact &&
|
264
304
|
shipping_lines == o.shipping_lines &&
|
265
|
-
tax_lines == o.tax_lines
|
305
|
+
tax_lines == o.tax_lines &&
|
306
|
+
three_ds_mode == o.three_ds_mode
|
266
307
|
end
|
267
308
|
|
268
309
|
# @see the `==` method
|
@@ -274,44 +315,37 @@ module Conekta
|
|
274
315
|
# Calculates hash code according to all attributes.
|
275
316
|
# @return [Integer] Hash code
|
276
317
|
def hash
|
277
|
-
[charges, checkout, currency, customer_info, discount_lines, line_items, metadata, needs_shipping_contact, pre_authorize, processing_mode, shipping_contact, shipping_lines, tax_lines].hash
|
318
|
+
[charges, checkout, currency, customer_info, discount_lines, fiscal_entity, line_items, metadata, needs_shipping_contact, pre_authorize, processing_mode, return_url, shipping_contact, shipping_lines, tax_lines, three_ds_mode].hash
|
278
319
|
end
|
279
320
|
|
280
321
|
# Builds the object from hash
|
281
322
|
# @param [Hash] attributes Model attributes in the form of hash
|
282
323
|
# @return [Object] Returns the model itself
|
283
324
|
def self.build_from_hash(attributes)
|
284
|
-
new.build_from_hash(attributes)
|
285
|
-
end
|
286
|
-
|
287
|
-
# Builds the object from hash
|
288
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
289
|
-
# @return [Object] Returns the model itself
|
290
|
-
def build_from_hash(attributes)
|
291
325
|
return nil unless attributes.is_a?(Hash)
|
292
326
|
attributes = attributes.transform_keys(&:to_sym)
|
293
|
-
|
294
|
-
|
295
|
-
|
327
|
+
transformed_hash = {}
|
328
|
+
openapi_types.each_pair do |key, type|
|
329
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
330
|
+
transformed_hash["#{key}"] = nil
|
296
331
|
elsif type =~ /\AArray<(.*)>/i
|
297
332
|
# check to ensure the input is an array given that the attribute
|
298
333
|
# is documented as an array but the input is not
|
299
|
-
if attributes[
|
300
|
-
|
334
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
335
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
301
336
|
end
|
302
|
-
elsif !attributes[
|
303
|
-
|
337
|
+
elsif !attributes[attribute_map[key]].nil?
|
338
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
304
339
|
end
|
305
340
|
end
|
306
|
-
|
307
|
-
self
|
341
|
+
new(transformed_hash)
|
308
342
|
end
|
309
343
|
|
310
344
|
# Deserializes the data based on type
|
311
345
|
# @param string type Data type
|
312
346
|
# @param string value Value to be deserialized
|
313
347
|
# @return [Object] Deserialized data
|
314
|
-
def _deserialize(type, value)
|
348
|
+
def self._deserialize(type, value)
|
315
349
|
case type.to_sym
|
316
350
|
when :Time
|
317
351
|
Time.parse(value)
|
@@ -346,7 +380,7 @@ module Conekta
|
|
346
380
|
else # model
|
347
381
|
# models (e.g. Pet) or oneOf
|
348
382
|
klass = Conekta.const_get(type)
|
349
|
-
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
383
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
350
384
|
end
|
351
385
|
end
|
352
386
|
|
@@ -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
|
|
@@ -91,7 +91,7 @@ module Conekta
|
|
91
91
|
# raise if data contains keys that are not known to the model
|
92
92
|
raise unless (data.keys - const.acceptable_attributes).empty?
|
93
93
|
model = const.build_from_hash(data)
|
94
|
-
return model if model
|
94
|
+
return model if model
|
95
95
|
end
|
96
96
|
end
|
97
97
|
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.1.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.1.0
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
@@ -78,10 +78,14 @@ module Conekta
|
|
78
78
|
|
79
79
|
if attributes.key?(:'has_more')
|
80
80
|
self.has_more = attributes[:'has_more']
|
81
|
+
else
|
82
|
+
self.has_more = nil
|
81
83
|
end
|
82
84
|
|
83
85
|
if attributes.key?(:'object')
|
84
86
|
self.object = attributes[:'object']
|
87
|
+
else
|
88
|
+
self.object = nil
|
85
89
|
end
|
86
90
|
|
87
91
|
if attributes.key?(:'data')
|
@@ -94,6 +98,7 @@ module Conekta
|
|
94
98
|
# Show invalid properties with the reasons. Usually used together with valid?
|
95
99
|
# @return Array for valid properties with the reasons
|
96
100
|
def list_invalid_properties
|
101
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
97
102
|
invalid_properties = Array.new
|
98
103
|
if @has_more.nil?
|
99
104
|
invalid_properties.push('invalid value for "has_more", has_more cannot be nil.')
|
@@ -109,6 +114,7 @@ module Conekta
|
|
109
114
|
# Check to see if the all the properties in the model are valid
|
110
115
|
# @return true if the model is valid
|
111
116
|
def valid?
|
117
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
112
118
|
return false if @has_more.nil?
|
113
119
|
return false if @object.nil?
|
114
120
|
true
|
@@ -140,37 +146,30 @@ module Conekta
|
|
140
146
|
# @param [Hash] attributes Model attributes in the form of hash
|
141
147
|
# @return [Object] Returns the model itself
|
142
148
|
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
149
|
return nil unless attributes.is_a?(Hash)
|
151
150
|
attributes = attributes.transform_keys(&:to_sym)
|
152
|
-
|
153
|
-
|
154
|
-
|
151
|
+
transformed_hash = {}
|
152
|
+
openapi_types.each_pair do |key, type|
|
153
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
154
|
+
transformed_hash["#{key}"] = nil
|
155
155
|
elsif type =~ /\AArray<(.*)>/i
|
156
156
|
# check to ensure the input is an array given that the attribute
|
157
157
|
# is documented as an array but the input is not
|
158
|
-
if attributes[
|
159
|
-
|
158
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
159
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
160
160
|
end
|
161
|
-
elsif !attributes[
|
162
|
-
|
161
|
+
elsif !attributes[attribute_map[key]].nil?
|
162
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
163
163
|
end
|
164
164
|
end
|
165
|
-
|
166
|
-
self
|
165
|
+
new(transformed_hash)
|
167
166
|
end
|
168
167
|
|
169
168
|
# Deserializes the data based on type
|
170
169
|
# @param string type Data type
|
171
170
|
# @param string value Value to be deserialized
|
172
171
|
# @return [Object] Deserialized data
|
173
|
-
def _deserialize(type, value)
|
172
|
+
def self._deserialize(type, value)
|
174
173
|
case type.to_sym
|
175
174
|
when :Time
|
176
175
|
Time.parse(value)
|
@@ -205,7 +204,7 @@ module Conekta
|
|
205
204
|
else # model
|
206
205
|
# models (e.g. Pet) or oneOf
|
207
206
|
klass = Conekta.const_get(type)
|
208
|
-
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
207
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
209
208
|
end
|
210
209
|
end
|
211
210
|
|
@@ -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
|
|