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