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
|
|
@@ -198,6 +198,7 @@ module Conekta
|
|
198
198
|
# Show invalid properties with the reasons. Usually used together with valid?
|
199
199
|
# @return Array for valid properties with the reasons
|
200
200
|
def list_invalid_properties
|
201
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
201
202
|
invalid_properties = Array.new
|
202
203
|
invalid_properties
|
203
204
|
end
|
@@ -205,6 +206,7 @@ module Conekta
|
|
205
206
|
# Check to see if the all the properties in the model are valid
|
206
207
|
# @return true if the model is valid
|
207
208
|
def valid?
|
209
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
208
210
|
true
|
209
211
|
end
|
210
212
|
|
@@ -247,37 +249,30 @@ module Conekta
|
|
247
249
|
# @param [Hash] attributes Model attributes in the form of hash
|
248
250
|
# @return [Object] Returns the model itself
|
249
251
|
def self.build_from_hash(attributes)
|
250
|
-
new.build_from_hash(attributes)
|
251
|
-
end
|
252
|
-
|
253
|
-
# Builds the object from hash
|
254
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
255
|
-
# @return [Object] Returns the model itself
|
256
|
-
def build_from_hash(attributes)
|
257
252
|
return nil unless attributes.is_a?(Hash)
|
258
253
|
attributes = attributes.transform_keys(&:to_sym)
|
259
|
-
|
260
|
-
|
261
|
-
|
254
|
+
transformed_hash = {}
|
255
|
+
openapi_types.each_pair do |key, type|
|
256
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
257
|
+
transformed_hash["#{key}"] = nil
|
262
258
|
elsif type =~ /\AArray<(.*)>/i
|
263
259
|
# check to ensure the input is an array given that the attribute
|
264
260
|
# is documented as an array but the input is not
|
265
|
-
if attributes[
|
266
|
-
|
261
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
262
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
267
263
|
end
|
268
|
-
elsif !attributes[
|
269
|
-
|
264
|
+
elsif !attributes[attribute_map[key]].nil?
|
265
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
270
266
|
end
|
271
267
|
end
|
272
|
-
|
273
|
-
self
|
268
|
+
new(transformed_hash)
|
274
269
|
end
|
275
270
|
|
276
271
|
# Deserializes the data based on type
|
277
272
|
# @param string type Data type
|
278
273
|
# @param string value Value to be deserialized
|
279
274
|
# @return [Object] Deserialized data
|
280
|
-
def _deserialize(type, value)
|
275
|
+
def self._deserialize(type, value)
|
281
276
|
case type.to_sym
|
282
277
|
when :Time
|
283
278
|
Time.parse(value)
|
@@ -312,7 +307,7 @@ module Conekta
|
|
312
307
|
else # model
|
313
308
|
# models (e.g. Pet) or oneOf
|
314
309
|
klass = Conekta.const_get(type)
|
315
|
-
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
310
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
316
311
|
end
|
317
312
|
end
|
318
313
|
|
@@ -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
|
|
@@ -149,40 +149,18 @@ module Conekta
|
|
149
149
|
# Show invalid properties with the reasons. Usually used together with valid?
|
150
150
|
# @return Array for valid properties with the reasons
|
151
151
|
def list_invalid_properties
|
152
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
152
153
|
invalid_properties = Array.new
|
153
|
-
if !@contract_id.nil? && @contract_id.to_s.length > 10
|
154
|
-
invalid_properties.push('invalid value for "contract_id", the character length must be smaller than or equal to 10.')
|
155
|
-
end
|
156
|
-
|
157
|
-
if !@contract_id.nil? && @contract_id.to_s.length < 10
|
158
|
-
invalid_properties.push('invalid value for "contract_id", the character length must be great than or equal to 10.')
|
159
|
-
end
|
160
|
-
|
161
154
|
invalid_properties
|
162
155
|
end
|
163
156
|
|
164
157
|
# Check to see if the all the properties in the model are valid
|
165
158
|
# @return true if the model is valid
|
166
159
|
def valid?
|
167
|
-
|
168
|
-
return false if !@contract_id.nil? && @contract_id.to_s.length < 10
|
160
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
169
161
|
true
|
170
162
|
end
|
171
163
|
|
172
|
-
# Custom attribute writer method with validation
|
173
|
-
# @param [Object] contract_id Value to be assigned
|
174
|
-
def contract_id=(contract_id)
|
175
|
-
if !contract_id.nil? && contract_id.to_s.length > 10
|
176
|
-
fail ArgumentError, 'invalid value for "contract_id", the character length must be smaller than or equal to 10.'
|
177
|
-
end
|
178
|
-
|
179
|
-
if !contract_id.nil? && contract_id.to_s.length < 10
|
180
|
-
fail ArgumentError, 'invalid value for "contract_id", the character length must be great than or equal to 10.'
|
181
|
-
end
|
182
|
-
|
183
|
-
@contract_id = contract_id
|
184
|
-
end
|
185
|
-
|
186
164
|
# Checks equality by comparing each attribute.
|
187
165
|
# @param [Object] Object to be compared
|
188
166
|
def ==(o)
|
@@ -217,37 +195,30 @@ module Conekta
|
|
217
195
|
# @param [Hash] attributes Model attributes in the form of hash
|
218
196
|
# @return [Object] Returns the model itself
|
219
197
|
def self.build_from_hash(attributes)
|
220
|
-
new.build_from_hash(attributes)
|
221
|
-
end
|
222
|
-
|
223
|
-
# Builds the object from hash
|
224
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
225
|
-
# @return [Object] Returns the model itself
|
226
|
-
def build_from_hash(attributes)
|
227
198
|
return nil unless attributes.is_a?(Hash)
|
228
199
|
attributes = attributes.transform_keys(&:to_sym)
|
229
|
-
|
230
|
-
|
231
|
-
|
200
|
+
transformed_hash = {}
|
201
|
+
openapi_types.each_pair do |key, type|
|
202
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
203
|
+
transformed_hash["#{key}"] = nil
|
232
204
|
elsif type =~ /\AArray<(.*)>/i
|
233
205
|
# check to ensure the input is an array given that the attribute
|
234
206
|
# is documented as an array but the input is not
|
235
|
-
if attributes[
|
236
|
-
|
207
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
208
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
237
209
|
end
|
238
|
-
elsif !attributes[
|
239
|
-
|
210
|
+
elsif !attributes[attribute_map[key]].nil?
|
211
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
240
212
|
end
|
241
213
|
end
|
242
|
-
|
243
|
-
self
|
214
|
+
new(transformed_hash)
|
244
215
|
end
|
245
216
|
|
246
217
|
# Deserializes the data based on type
|
247
218
|
# @param string type Data type
|
248
219
|
# @param string value Value to be deserialized
|
249
220
|
# @return [Object] Deserialized data
|
250
|
-
def _deserialize(type, value)
|
221
|
+
def self._deserialize(type, value)
|
251
222
|
case type.to_sym
|
252
223
|
when :Time
|
253
224
|
Time.parse(value)
|
@@ -282,7 +253,7 @@ module Conekta
|
|
282
253
|
else # model
|
283
254
|
# models (e.g. Pet) or oneOf
|
284
255
|
klass = Conekta.const_get(type)
|
285
|
-
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
256
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
286
257
|
end
|
287
258
|
end
|
288
259
|
|
@@ -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
|
|
@@ -125,6 +125,7 @@ module Conekta
|
|
125
125
|
# Show invalid properties with the reasons. Usually used together with valid?
|
126
126
|
# @return Array for valid properties with the reasons
|
127
127
|
def list_invalid_properties
|
128
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
128
129
|
invalid_properties = Array.new
|
129
130
|
invalid_properties
|
130
131
|
end
|
@@ -132,6 +133,7 @@ module Conekta
|
|
132
133
|
# Check to see if the all the properties in the model are valid
|
133
134
|
# @return true if the model is valid
|
134
135
|
def valid?
|
136
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
135
137
|
true
|
136
138
|
end
|
137
139
|
|
@@ -166,37 +168,30 @@ module Conekta
|
|
166
168
|
# @param [Hash] attributes Model attributes in the form of hash
|
167
169
|
# @return [Object] Returns the model itself
|
168
170
|
def self.build_from_hash(attributes)
|
169
|
-
new.build_from_hash(attributes)
|
170
|
-
end
|
171
|
-
|
172
|
-
# Builds the object from hash
|
173
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
174
|
-
# @return [Object] Returns the model itself
|
175
|
-
def build_from_hash(attributes)
|
176
171
|
return nil unless attributes.is_a?(Hash)
|
177
172
|
attributes = attributes.transform_keys(&:to_sym)
|
178
|
-
|
179
|
-
|
180
|
-
|
173
|
+
transformed_hash = {}
|
174
|
+
openapi_types.each_pair do |key, type|
|
175
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
176
|
+
transformed_hash["#{key}"] = nil
|
181
177
|
elsif type =~ /\AArray<(.*)>/i
|
182
178
|
# check to ensure the input is an array given that the attribute
|
183
179
|
# is documented as an array but the input is not
|
184
|
-
if attributes[
|
185
|
-
|
180
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
181
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
186
182
|
end
|
187
|
-
elsif !attributes[
|
188
|
-
|
183
|
+
elsif !attributes[attribute_map[key]].nil?
|
184
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
189
185
|
end
|
190
186
|
end
|
191
|
-
|
192
|
-
self
|
187
|
+
new(transformed_hash)
|
193
188
|
end
|
194
189
|
|
195
190
|
# Deserializes the data based on type
|
196
191
|
# @param string type Data type
|
197
192
|
# @param string value Value to be deserialized
|
198
193
|
# @return [Object] Deserialized data
|
199
|
-
def _deserialize(type, value)
|
194
|
+
def self._deserialize(type, value)
|
200
195
|
case type.to_sym
|
201
196
|
when :Time
|
202
197
|
Time.parse(value)
|
@@ -231,7 +226,7 @@ module Conekta
|
|
231
226
|
else # model
|
232
227
|
# models (e.g. Pet) or oneOf
|
233
228
|
klass = Conekta.const_get(type)
|
234
|
-
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
229
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
235
230
|
end
|
236
231
|
end
|
237
232
|
|
@@ -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
|
|
@@ -33,8 +33,6 @@ module Conekta
|
|
33
33
|
|
34
34
|
attr_accessor :failure_message
|
35
35
|
|
36
|
-
attr_accessor :fee
|
37
|
-
|
38
36
|
attr_accessor :id
|
39
37
|
|
40
38
|
attr_accessor :livemode
|
@@ -68,7 +66,6 @@ module Conekta
|
|
68
66
|
:'device_fingerprint' => :'device_fingerprint',
|
69
67
|
:'failure_code' => :'failure_code',
|
70
68
|
:'failure_message' => :'failure_message',
|
71
|
-
:'fee' => :'fee',
|
72
69
|
:'id' => :'id',
|
73
70
|
:'livemode' => :'livemode',
|
74
71
|
:'monthly_installments' => :'monthly_installments',
|
@@ -99,7 +96,6 @@ module Conekta
|
|
99
96
|
:'device_fingerprint' => :'String',
|
100
97
|
:'failure_code' => :'String',
|
101
98
|
:'failure_message' => :'String',
|
102
|
-
:'fee' => :'Integer',
|
103
99
|
:'id' => :'String',
|
104
100
|
:'livemode' => :'Boolean',
|
105
101
|
:'monthly_installments' => :'Integer',
|
@@ -174,10 +170,6 @@ module Conekta
|
|
174
170
|
self.failure_message = attributes[:'failure_message']
|
175
171
|
end
|
176
172
|
|
177
|
-
if attributes.key?(:'fee')
|
178
|
-
self.fee = attributes[:'fee']
|
179
|
-
end
|
180
|
-
|
181
173
|
if attributes.key?(:'id')
|
182
174
|
self.id = attributes[:'id']
|
183
175
|
end
|
@@ -224,6 +216,7 @@ module Conekta
|
|
224
216
|
# Show invalid properties with the reasons. Usually used together with valid?
|
225
217
|
# @return Array for valid properties with the reasons
|
226
218
|
def list_invalid_properties
|
219
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
227
220
|
invalid_properties = Array.new
|
228
221
|
invalid_properties
|
229
222
|
end
|
@@ -231,6 +224,7 @@ module Conekta
|
|
231
224
|
# Check to see if the all the properties in the model are valid
|
232
225
|
# @return true if the model is valid
|
233
226
|
def valid?
|
227
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
234
228
|
true
|
235
229
|
end
|
236
230
|
|
@@ -248,7 +242,6 @@ module Conekta
|
|
248
242
|
device_fingerprint == o.device_fingerprint &&
|
249
243
|
failure_code == o.failure_code &&
|
250
244
|
failure_message == o.failure_message &&
|
251
|
-
fee == o.fee &&
|
252
245
|
id == o.id &&
|
253
246
|
livemode == o.livemode &&
|
254
247
|
monthly_installments == o.monthly_installments &&
|
@@ -270,44 +263,37 @@ module Conekta
|
|
270
263
|
# Calculates hash code according to all attributes.
|
271
264
|
# @return [Integer] Hash code
|
272
265
|
def hash
|
273
|
-
[amount, channel, created_at, currency, customer_id, description, device_fingerprint, failure_code, failure_message,
|
266
|
+
[amount, channel, created_at, currency, customer_id, description, device_fingerprint, failure_code, failure_message, id, livemode, monthly_installments, object, order_id, paid_at, payment_method, reference_id, refunds, status].hash
|
274
267
|
end
|
275
268
|
|
276
269
|
# Builds the object from hash
|
277
270
|
# @param [Hash] attributes Model attributes in the form of hash
|
278
271
|
# @return [Object] Returns the model itself
|
279
272
|
def self.build_from_hash(attributes)
|
280
|
-
new.build_from_hash(attributes)
|
281
|
-
end
|
282
|
-
|
283
|
-
# Builds the object from hash
|
284
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
285
|
-
# @return [Object] Returns the model itself
|
286
|
-
def build_from_hash(attributes)
|
287
273
|
return nil unless attributes.is_a?(Hash)
|
288
274
|
attributes = attributes.transform_keys(&:to_sym)
|
289
|
-
|
290
|
-
|
291
|
-
|
275
|
+
transformed_hash = {}
|
276
|
+
openapi_types.each_pair do |key, type|
|
277
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
278
|
+
transformed_hash["#{key}"] = nil
|
292
279
|
elsif type =~ /\AArray<(.*)>/i
|
293
280
|
# check to ensure the input is an array given that the attribute
|
294
281
|
# is documented as an array but the input is not
|
295
|
-
if attributes[
|
296
|
-
|
282
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
283
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
297
284
|
end
|
298
|
-
elsif !attributes[
|
299
|
-
|
285
|
+
elsif !attributes[attribute_map[key]].nil?
|
286
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
300
287
|
end
|
301
288
|
end
|
302
|
-
|
303
|
-
self
|
289
|
+
new(transformed_hash)
|
304
290
|
end
|
305
291
|
|
306
292
|
# Deserializes the data based on type
|
307
293
|
# @param string type Data type
|
308
294
|
# @param string value Value to be deserialized
|
309
295
|
# @return [Object] Deserialized data
|
310
|
-
def _deserialize(type, value)
|
296
|
+
def self._deserialize(type, value)
|
311
297
|
case type.to_sym
|
312
298
|
when :Time
|
313
299
|
Time.parse(value)
|
@@ -342,7 +328,7 @@ module Conekta
|
|
342
328
|
else # model
|
343
329
|
# models (e.g. Pet) or oneOf
|
344
330
|
klass = Conekta.const_get(type)
|
345
|
-
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
331
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
346
332
|
end
|
347
333
|
end
|
348
334
|
|
@@ -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
|
|
@@ -18,9 +18,6 @@ module Conekta
|
|
18
18
|
class ChargeRequest
|
19
19
|
attr_accessor :amount
|
20
20
|
|
21
|
-
# How many months without interest to apply, it can be 3, 6, 9, 12 or 18
|
22
|
-
attr_accessor :monthly_installments
|
23
|
-
|
24
21
|
attr_accessor :payment_method
|
25
22
|
|
26
23
|
# Custom reference to add to the charge
|
@@ -30,7 +27,6 @@ module Conekta
|
|
30
27
|
def self.attribute_map
|
31
28
|
{
|
32
29
|
:'amount' => :'amount',
|
33
|
-
:'monthly_installments' => :'monthly_installments',
|
34
30
|
:'payment_method' => :'payment_method',
|
35
31
|
:'reference_id' => :'reference_id'
|
36
32
|
}
|
@@ -45,7 +41,6 @@ module Conekta
|
|
45
41
|
def self.openapi_types
|
46
42
|
{
|
47
43
|
:'amount' => :'Integer',
|
48
|
-
:'monthly_installments' => :'Integer',
|
49
44
|
:'payment_method' => :'ChargeRequestPaymentMethod',
|
50
45
|
:'reference_id' => :'String'
|
51
46
|
}
|
@@ -76,12 +71,10 @@ module Conekta
|
|
76
71
|
self.amount = attributes[:'amount']
|
77
72
|
end
|
78
73
|
|
79
|
-
if attributes.key?(:'monthly_installments')
|
80
|
-
self.monthly_installments = attributes[:'monthly_installments']
|
81
|
-
end
|
82
|
-
|
83
74
|
if attributes.key?(:'payment_method')
|
84
75
|
self.payment_method = attributes[:'payment_method']
|
76
|
+
else
|
77
|
+
self.payment_method = nil
|
85
78
|
end
|
86
79
|
|
87
80
|
if attributes.key?(:'reference_id')
|
@@ -92,6 +85,7 @@ module Conekta
|
|
92
85
|
# Show invalid properties with the reasons. Usually used together with valid?
|
93
86
|
# @return Array for valid properties with the reasons
|
94
87
|
def list_invalid_properties
|
88
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
95
89
|
invalid_properties = Array.new
|
96
90
|
if @payment_method.nil?
|
97
91
|
invalid_properties.push('invalid value for "payment_method", payment_method cannot be nil.')
|
@@ -103,6 +97,7 @@ module Conekta
|
|
103
97
|
# Check to see if the all the properties in the model are valid
|
104
98
|
# @return true if the model is valid
|
105
99
|
def valid?
|
100
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
106
101
|
return false if @payment_method.nil?
|
107
102
|
true
|
108
103
|
end
|
@@ -113,7 +108,6 @@ module Conekta
|
|
113
108
|
return true if self.equal?(o)
|
114
109
|
self.class == o.class &&
|
115
110
|
amount == o.amount &&
|
116
|
-
monthly_installments == o.monthly_installments &&
|
117
111
|
payment_method == o.payment_method &&
|
118
112
|
reference_id == o.reference_id
|
119
113
|
end
|
@@ -127,44 +121,37 @@ module Conekta
|
|
127
121
|
# Calculates hash code according to all attributes.
|
128
122
|
# @return [Integer] Hash code
|
129
123
|
def hash
|
130
|
-
[amount,
|
124
|
+
[amount, payment_method, reference_id].hash
|
131
125
|
end
|
132
126
|
|
133
127
|
# Builds the object from hash
|
134
128
|
# @param [Hash] attributes Model attributes in the form of hash
|
135
129
|
# @return [Object] Returns the model itself
|
136
130
|
def self.build_from_hash(attributes)
|
137
|
-
new.build_from_hash(attributes)
|
138
|
-
end
|
139
|
-
|
140
|
-
# Builds the object from hash
|
141
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
142
|
-
# @return [Object] Returns the model itself
|
143
|
-
def build_from_hash(attributes)
|
144
131
|
return nil unless attributes.is_a?(Hash)
|
145
132
|
attributes = attributes.transform_keys(&:to_sym)
|
146
|
-
|
147
|
-
|
148
|
-
|
133
|
+
transformed_hash = {}
|
134
|
+
openapi_types.each_pair do |key, type|
|
135
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
136
|
+
transformed_hash["#{key}"] = nil
|
149
137
|
elsif type =~ /\AArray<(.*)>/i
|
150
138
|
# check to ensure the input is an array given that the attribute
|
151
139
|
# is documented as an array but the input is not
|
152
|
-
if attributes[
|
153
|
-
|
140
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
141
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
154
142
|
end
|
155
|
-
elsif !attributes[
|
156
|
-
|
143
|
+
elsif !attributes[attribute_map[key]].nil?
|
144
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
157
145
|
end
|
158
146
|
end
|
159
|
-
|
160
|
-
self
|
147
|
+
new(transformed_hash)
|
161
148
|
end
|
162
149
|
|
163
150
|
# Deserializes the data based on type
|
164
151
|
# @param string type Data type
|
165
152
|
# @param string value Value to be deserialized
|
166
153
|
# @return [Object] Deserialized data
|
167
|
-
def _deserialize(type, value)
|
154
|
+
def self._deserialize(type, value)
|
168
155
|
case type.to_sym
|
169
156
|
when :Time
|
170
157
|
Time.parse(value)
|
@@ -199,7 +186,7 @@ module Conekta
|
|
199
186
|
else # model
|
200
187
|
# models (e.g. Pet) or oneOf
|
201
188
|
klass = Conekta.const_get(type)
|
202
|
-
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
189
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
203
190
|
end
|
204
191
|
end
|
205
192
|
|