From 71d26fe106854cb4a7e48c8a7312b5ae74f88296 Mon Sep 17 00:00:00 2001 From: Franklin Date: Mon, 29 Apr 2024 09:17:38 -0500 Subject: [PATCH 1/4] Update OpenAPI Generator version to 7.5.0 new 6.0.3 version update new entities --- .openapi-generator/FILES | 18 + .openapi-generator/VERSION | 2 +- Makefile | 2 +- README.md | 22 +- VERSION | 2 +- conekta.gemspec | 3 +- config-ruby.json | 2 +- docs/CheckoutRequest.md | 2 + docs/EventTypes.md | 15 + docs/OrderResponseCheckout.md | 2 + docs/OrdersApi.md | 16 +- docs/Payout.md | 18 + docs/PayoutMethod.md | 18 + docs/PayoutOrder.md | 30 ++ docs/PayoutOrderPayoutsItem.md | 32 ++ docs/PayoutOrderResponse.md | 44 ++ docs/PayoutOrderResponseCustomerInfo.md | 30 ++ docs/PayoutOrdersApi.md | 235 +++++++++ docs/PayoutOrdersResponse.md | 26 + docs/Product.md | 2 +- docs/ProductDataResponse.md | 2 +- docs/ProductOrderResponse.md | 2 +- docs/WebhooksApi.md | 2 + lib/conekta.rb | 11 +- lib/conekta/api/antifraud_api.rb | 2 +- lib/conekta/api/api_keys_api.rb | 2 +- lib/conekta/api/balances_api.rb | 2 +- lib/conekta/api/charges_api.rb | 2 +- lib/conekta/api/companies_api.rb | 2 +- lib/conekta/api/customers_api.rb | 2 +- lib/conekta/api/discounts_api.rb | 2 +- lib/conekta/api/events_api.rb | 2 +- lib/conekta/api/logs_api.rb | 2 +- lib/conekta/api/orders_api.rb | 23 +- lib/conekta/api/payment_link_api.rb | 2 +- lib/conekta/api/payment_methods_api.rb | 2 +- lib/conekta/api/payout_orders_api.rb | 251 ++++++++++ lib/conekta/api/plans_api.rb | 2 +- lib/conekta/api/products_api.rb | 2 +- lib/conekta/api/shipping_contacts_api.rb | 2 +- lib/conekta/api/shippings_api.rb | 2 +- lib/conekta/api/subscriptions_api.rb | 2 +- lib/conekta/api/taxes_api.rb | 2 +- lib/conekta/api/tokens_api.rb | 2 +- lib/conekta/api/transactions_api.rb | 2 +- lib/conekta/api/transfers_api.rb | 2 +- lib/conekta/api/webhook_keys_api.rb | 2 +- lib/conekta/api/webhooks_api.rb | 5 +- lib/conekta/api_client.rb | 5 +- lib/conekta/api_error.rb | 2 +- lib/conekta/configuration.rb | 2 +- lib/conekta/models/api_key_create_response.rb | 2 +- lib/conekta/models/api_key_request.rb | 2 +- lib/conekta/models/api_key_response.rb | 2 +- .../models/api_key_response_on_delete.rb | 2 +- lib/conekta/models/api_key_update_request.rb | 2 +- lib/conekta/models/balance_common_field.rb | 2 +- lib/conekta/models/balance_response.rb | 2 +- lib/conekta/models/blacklist_rule_response.rb | 2 +- lib/conekta/models/charge_order_response.rb | 2 +- .../charge_order_response_payment_method.rb | 2 +- lib/conekta/models/charge_request.rb | 2 +- .../models/charge_request_payment_method.rb | 2 +- lib/conekta/models/charge_response.rb | 2 +- lib/conekta/models/charge_response_channel.rb | 2 +- .../models/charge_response_payment_method.rb | 2 +- lib/conekta/models/charge_response_refunds.rb | 2 +- .../models/charge_response_refunds_data.rb | 2 +- lib/conekta/models/charge_update_request.rb | 2 +- lib/conekta/models/charges_data_response.rb | 2 +- lib/conekta/models/checkout.rb | 2 +- lib/conekta/models/checkout_order_template.rb | 2 +- .../checkout_order_template_customer_info.rb | 4 +- lib/conekta/models/checkout_request.rb | 14 +- lib/conekta/models/checkout_response.rb | 2 +- lib/conekta/models/checkouts_response.rb | 2 +- .../company_fiscal_info_address_response.rb | 2 +- .../models/company_fiscal_info_response.rb | 2 +- .../company_payout_destination_response.rb | 2 +- lib/conekta/models/company_response.rb | 2 +- ...reate_customer_fiscal_entities_response.rb | 2 +- ...create_customer_payment_methods_request.rb | 4 +- ...reate_customer_payment_methods_response.rb | 2 +- lib/conekta/models/create_risk_rules_data.rb | 2 +- lib/conekta/models/customer.rb | 2 +- lib/conekta/models/customer_address.rb | 2 +- lib/conekta/models/customer_antifraud_info.rb | 2 +- .../customer_antifraud_info_response.rb | 2 +- .../customer_fiscal_entities_data_response.rb | 2 +- .../customer_fiscal_entities_request.rb | 2 +- .../customer_fiscal_entities_response.rb | 2 +- lib/conekta/models/customer_info.rb | 2 +- .../models/customer_info_just_customer_id.rb | 2 +- ...customer_info_just_customer_id_response.rb | 2 +- .../models/customer_payment_method_request.rb | 2 +- .../models/customer_payment_methods_data.rb | 2 +- .../customer_payment_methods_request.rb | 4 +- .../customer_payment_methods_response.rb | 2 +- lib/conekta/models/customer_response.rb | 2 +- .../customer_response_shipping_contacts.rb | 2 +- .../models/customer_shipping_contacts.rb | 2 +- .../customer_shipping_contacts_address.rb | 2 +- ...ustomer_shipping_contacts_data_response.rb | 2 +- .../customer_shipping_contacts_response.rb | 2 +- ...omer_shipping_contacts_response_address.rb | 2 +- ...customer_update_fiscal_entities_request.rb | 2 +- .../customer_update_shipping_contacts.rb | 2 +- lib/conekta/models/customers_response.rb | 2 +- .../models/delete_api_keys_response.rb | 2 +- .../models/deleted_blacklist_rule_response.rb | 2 +- .../models/deleted_whitelist_rule_response.rb | 2 +- lib/conekta/models/details.rb | 2 +- lib/conekta/models/details_error.rb | 2 +- .../models/discount_lines_data_response.rb | 2 +- lib/conekta/models/discount_lines_response.rb | 2 +- lib/conekta/models/email_checkout_request.rb | 2 +- lib/conekta/models/error.rb | 2 +- lib/conekta/models/event_response.rb | 2 +- lib/conekta/models/event_types.rb | 43 ++ lib/conekta/models/events_resend_response.rb | 2 +- lib/conekta/models/fiscal_entity_address.rb | 2 +- lib/conekta/models/get_api_keys_response.rb | 2 +- lib/conekta/models/get_charges_response.rb | 2 +- lib/conekta/models/get_companies_response.rb | 2 +- ...t_customer_payment_method_data_response.rb | 2 +- lib/conekta/models/get_events_response.rb | 2 +- .../get_order_discount_lines_response.rb | 2 +- lib/conekta/models/get_orders_response.rb | 2 +- .../models/get_payment_method_response.rb | 2 +- lib/conekta/models/get_plans_response.rb | 2 +- .../models/get_transactions_response.rb | 2 +- lib/conekta/models/get_transfers_response.rb | 2 +- .../models/get_webhook_keys_response.rb | 2 +- lib/conekta/models/get_webhooks_response.rb | 2 +- lib/conekta/models/log_response.rb | 2 +- lib/conekta/models/logs_response.rb | 2 +- lib/conekta/models/logs_response_data.rb | 2 +- lib/conekta/models/order_capture_request.rb | 2 +- .../models/order_customer_info_response.rb | 2 +- .../models/order_discount_lines_request.rb | 2 +- .../order_fiscal_entity_address_response.rb | 2 +- .../models/order_fiscal_entity_request.rb | 2 +- .../models/order_fiscal_entity_response.rb | 2 +- .../models/order_next_action_response.rb | 2 +- ...er_next_action_response_redirect_to_url.rb | 2 +- lib/conekta/models/order_refund_request.rb | 2 +- lib/conekta/models/order_request.rb | 2 +- .../models/order_request_customer_info.rb | 4 +- lib/conekta/models/order_response.rb | 2 +- lib/conekta/models/order_response_charges.rb | 2 +- lib/conekta/models/order_response_checkout.rb | 15 +- .../models/order_response_customer_info.rb | 2 +- .../models/order_response_discount_lines.rb | 2 +- lib/conekta/models/order_response_products.rb | 2 +- .../models/order_response_shipping_contact.rb | 2 +- lib/conekta/models/order_tax_request.rb | 2 +- .../order_update_fiscal_entity_request.rb | 2 +- lib/conekta/models/order_update_request.rb | 2 +- .../order_update_request_customer_info.rb | 4 +- lib/conekta/models/orders_response.rb | 2 +- lib/conekta/models/page.rb | 2 +- lib/conekta/models/pagination.rb | 2 +- lib/conekta/models/payment_method.rb | 2 +- .../models/payment_method_bank_transfer.rb | 2 +- lib/conekta/models/payment_method_card.rb | 2 +- .../models/payment_method_card_request.rb | 2 +- .../models/payment_method_card_response.rb | 2 +- lib/conekta/models/payment_method_cash.rb | 2 +- .../models/payment_method_cash_request.rb | 2 +- .../models/payment_method_cash_response.rb | 2 +- lib/conekta/models/payment_method_response.rb | 2 +- .../models/payment_method_spei_recurrent.rb | 2 +- .../models/payment_method_spei_request.rb | 2 +- lib/conekta/models/payout.rb | 222 +++++++++ lib/conekta/models/payout_method.rb | 223 +++++++++ lib/conekta/models/payout_order.rb | 339 +++++++++++++ .../models/payout_order_payouts_item.rb | 320 ++++++++++++ lib/conekta/models/payout_order_response.rb | 466 ++++++++++++++++++ .../payout_order_response_customer_info.rb | 288 +++++++++++ lib/conekta/models/payout_orders_response.rb | 280 +++++++++++ lib/conekta/models/plan_request.rb | 2 +- lib/conekta/models/plan_response.rb | 2 +- lib/conekta/models/plan_update_request.rb | 2 +- lib/conekta/models/product.rb | 4 +- lib/conekta/models/product_data_response.rb | 4 +- lib/conekta/models/product_order_response.rb | 4 +- lib/conekta/models/risk_rules_data.rb | 2 +- lib/conekta/models/risk_rules_list.rb | 2 +- lib/conekta/models/shipping_order_response.rb | 2 +- lib/conekta/models/shipping_request.rb | 2 +- lib/conekta/models/sms_checkout_request.rb | 2 +- .../models/subscription_events_response.rb | 2 +- lib/conekta/models/subscription_request.rb | 2 +- lib/conekta/models/subscription_response.rb | 2 +- .../models/subscription_update_request.rb | 2 +- lib/conekta/models/token.rb | 2 +- lib/conekta/models/token_card.rb | 2 +- lib/conekta/models/token_checkout.rb | 2 +- lib/conekta/models/token_response.rb | 2 +- lib/conekta/models/token_response_checkout.rb | 2 +- lib/conekta/models/transaction_response.rb | 2 +- .../models/transfer_destination_response.rb | 2 +- .../models/transfer_method_response.rb | 2 +- lib/conekta/models/transfer_response.rb | 2 +- lib/conekta/models/transfers_response.rb | 2 +- lib/conekta/models/update_customer.rb | 2 +- .../models/update_customer_antifraud_info.rb | 2 +- ...pdate_customer_fiscal_entities_response.rb | 2 +- ...pdate_customer_payment_methods_response.rb | 2 +- .../update_order_discount_lines_request.rb | 2 +- .../models/update_order_tax_request.rb | 2 +- .../models/update_order_tax_response.rb | 2 +- lib/conekta/models/update_payment_methods.rb | 2 +- lib/conekta/models/update_product.rb | 2 +- .../models/webhook_key_create_response.rb | 2 +- .../models/webhook_key_delete_response.rb | 2 +- lib/conekta/models/webhook_key_request.rb | 2 +- lib/conekta/models/webhook_key_response.rb | 2 +- .../models/webhook_key_update_request.rb | 2 +- lib/conekta/models/webhook_log.rb | 2 +- lib/conekta/models/webhook_request.rb | 2 +- lib/conekta/models/webhook_response.rb | 2 +- lib/conekta/models/webhook_update_request.rb | 2 +- .../models/whitelistlist_rule_response.rb | 2 +- lib/conekta/version.rb | 4 +- spec/api/payout_orders_api_spec.rb | 77 +++ spec/spec_helper.rb | 2 +- 227 files changed, 3282 insertions(+), 221 deletions(-) create mode 100644 docs/EventTypes.md create mode 100644 docs/Payout.md create mode 100644 docs/PayoutMethod.md create mode 100644 docs/PayoutOrder.md create mode 100644 docs/PayoutOrderPayoutsItem.md create mode 100644 docs/PayoutOrderResponse.md create mode 100644 docs/PayoutOrderResponseCustomerInfo.md create mode 100644 docs/PayoutOrdersApi.md create mode 100644 docs/PayoutOrdersResponse.md create mode 100644 lib/conekta/api/payout_orders_api.rb create mode 100644 lib/conekta/models/event_types.rb create mode 100644 lib/conekta/models/payout.rb create mode 100644 lib/conekta/models/payout_method.rb create mode 100644 lib/conekta/models/payout_order.rb create mode 100644 lib/conekta/models/payout_order_payouts_item.rb create mode 100644 lib/conekta/models/payout_order_response.rb create mode 100644 lib/conekta/models/payout_order_response_customer_info.rb create mode 100644 lib/conekta/models/payout_orders_response.rb create mode 100644 spec/api/payout_orders_api_spec.rb diff --git a/.openapi-generator/FILES b/.openapi-generator/FILES index cee7153..a7baa24 100644 --- a/.openapi-generator/FILES +++ b/.openapi-generator/FILES @@ -84,6 +84,7 @@ docs/DiscountsApi.md docs/EmailCheckoutRequest.md docs/Error.md docs/EventResponse.md +docs/EventTypes.md docs/EventsApi.md docs/EventsResendResponse.md docs/FiscalEntityAddress.md @@ -143,6 +144,14 @@ docs/PaymentMethodResponse.md docs/PaymentMethodSpeiRecurrent.md docs/PaymentMethodSpeiRequest.md docs/PaymentMethodsApi.md +docs/Payout.md +docs/PayoutMethod.md +docs/PayoutOrder.md +docs/PayoutOrderPayoutsItem.md +docs/PayoutOrderResponse.md +docs/PayoutOrderResponseCustomerInfo.md +docs/PayoutOrdersApi.md +docs/PayoutOrdersResponse.md docs/PlanRequest.md docs/PlanResponse.md docs/PlanUpdateRequest.md @@ -211,6 +220,7 @@ lib/conekta/api/logs_api.rb lib/conekta/api/orders_api.rb lib/conekta/api/payment_link_api.rb lib/conekta/api/payment_methods_api.rb +lib/conekta/api/payout_orders_api.rb lib/conekta/api/plans_api.rb lib/conekta/api/products_api.rb lib/conekta/api/shipping_contacts_api.rb @@ -292,6 +302,7 @@ lib/conekta/models/discount_lines_response.rb lib/conekta/models/email_checkout_request.rb lib/conekta/models/error.rb lib/conekta/models/event_response.rb +lib/conekta/models/event_types.rb lib/conekta/models/events_resend_response.rb lib/conekta/models/fiscal_entity_address.rb lib/conekta/models/get_api_keys_response.rb @@ -346,6 +357,13 @@ lib/conekta/models/payment_method_cash_response.rb lib/conekta/models/payment_method_response.rb lib/conekta/models/payment_method_spei_recurrent.rb lib/conekta/models/payment_method_spei_request.rb +lib/conekta/models/payout.rb +lib/conekta/models/payout_method.rb +lib/conekta/models/payout_order.rb +lib/conekta/models/payout_order_payouts_item.rb +lib/conekta/models/payout_order_response.rb +lib/conekta/models/payout_order_response_customer_info.rb +lib/conekta/models/payout_orders_response.rb lib/conekta/models/plan_request.rb lib/conekta/models/plan_response.rb lib/conekta/models/plan_update_request.rb diff --git a/.openapi-generator/VERSION b/.openapi-generator/VERSION index 4b49d9b..18bb418 100644 --- a/.openapi-generator/VERSION +++ b/.openapi-generator/VERSION @@ -1 +1 @@ -7.2.0 \ No newline at end of file +7.5.0 diff --git a/Makefile b/Makefile index d915f21..682965b 100644 --- a/Makefile +++ b/Makefile @@ -3,7 +3,7 @@ ci-test: ruby: rm -rf docs && rm -rf lib/models && \ docker run --rm \ - -v ${PWD}:/local openapitools/openapi-generator-cli:v7.2.0 generate \ + -v ${PWD}:/local openapitools/openapi-generator-cli:v7.5.0 generate \ -i https://raw.githubusercontent.com/conekta/openapi/main/_build/api.yaml \ -g ruby \ -o /local \ diff --git a/README.md b/README.md index 386a22f..c3cd37a 100644 --- a/README.md +++ b/README.md @@ -7,8 +7,9 @@ Conekta sdk This SDK is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project: - API version: 2.1.0 -- Package version: 6.0.2 -- Build date: 2023-12-26T16:28:22.789356234Z[Etc/UTC] +- Package version: 6.0.3 +- Build date: 2024-04-29T14:00:59.671114609Z[Etc/UTC] +- Generator version: 7.5.0 - Build package: org.openapitools.codegen.languages.RubyClientCodegen For more information, please visit [https://github.com/conekta/openapi/issues](https://github.com/conekta/openapi/issues) @@ -25,16 +26,16 @@ gem build conekta.gemspec Then either install the gem locally: ```shell -gem install ./conekta-6.0.2.gem +gem install ./conekta-6.0.3.gem ``` -(for development, run `gem install --dev ./conekta-6.0.2.gem` to install the development dependencies) +(for development, run `gem install --dev ./conekta-6.0.3.gem` to install the development dependencies) or publish the gem to a gem hosting service, e.g. [RubyGems](https://rubygems.org/). Finally add this to the Gemfile: - gem 'conekta', '~> 6.0.2' + gem 'conekta', '~> 6.0.3' ### Install from Git @@ -142,6 +143,9 @@ Class | Method | HTTP request | Description *Conekta::PaymentMethodsApi* | [**delete_customer_payment_methods**](docs/PaymentMethodsApi.md#delete_customer_payment_methods) | **DELETE** /customers/{id}/payment_sources/{payment_method_id} | Delete Payment Method *Conekta::PaymentMethodsApi* | [**get_customer_payment_methods**](docs/PaymentMethodsApi.md#get_customer_payment_methods) | **GET** /customers/{id}/payment_sources | Get Payment Methods *Conekta::PaymentMethodsApi* | [**update_customer_payment_methods**](docs/PaymentMethodsApi.md#update_customer_payment_methods) | **PUT** /customers/{id}/payment_sources/{payment_method_id} | Update Payment Method +*Conekta::PayoutOrdersApi* | [**create_payout_order**](docs/PayoutOrdersApi.md#create_payout_order) | **POST** /payout_orders | Create payout order +*Conekta::PayoutOrdersApi* | [**get_payout_order_by_id**](docs/PayoutOrdersApi.md#get_payout_order_by_id) | **GET** /payout_orders/{id} | Get Payout Order +*Conekta::PayoutOrdersApi* | [**get_payout_orders**](docs/PayoutOrdersApi.md#get_payout_orders) | **GET** /payout_orders | Get a list of Payout Orders *Conekta::PlansApi* | [**create_plan**](docs/PlansApi.md#create_plan) | **POST** /plans | Create Plan *Conekta::PlansApi* | [**delete_plan**](docs/PlansApi.md#delete_plan) | **DELETE** /plans/{id} | Delete Plan *Conekta::PlansApi* | [**get_plan**](docs/PlansApi.md#get_plan) | **GET** /plans/{id} | Get Plan @@ -253,6 +257,7 @@ Class | Method | HTTP request | Description - [Conekta::EmailCheckoutRequest](docs/EmailCheckoutRequest.md) - [Conekta::Error](docs/Error.md) - [Conekta::EventResponse](docs/EventResponse.md) + - [Conekta::EventTypes](docs/EventTypes.md) - [Conekta::EventsResendResponse](docs/EventsResendResponse.md) - [Conekta::FiscalEntityAddress](docs/FiscalEntityAddress.md) - [Conekta::GetApiKeysResponse](docs/GetApiKeysResponse.md) @@ -307,6 +312,13 @@ Class | Method | HTTP request | Description - [Conekta::PaymentMethodResponse](docs/PaymentMethodResponse.md) - [Conekta::PaymentMethodSpeiRecurrent](docs/PaymentMethodSpeiRecurrent.md) - [Conekta::PaymentMethodSpeiRequest](docs/PaymentMethodSpeiRequest.md) + - [Conekta::Payout](docs/Payout.md) + - [Conekta::PayoutMethod](docs/PayoutMethod.md) + - [Conekta::PayoutOrder](docs/PayoutOrder.md) + - [Conekta::PayoutOrderPayoutsItem](docs/PayoutOrderPayoutsItem.md) + - [Conekta::PayoutOrderResponse](docs/PayoutOrderResponse.md) + - [Conekta::PayoutOrderResponseCustomerInfo](docs/PayoutOrderResponseCustomerInfo.md) + - [Conekta::PayoutOrdersResponse](docs/PayoutOrdersResponse.md) - [Conekta::PlanRequest](docs/PlanRequest.md) - [Conekta::PlanResponse](docs/PlanResponse.md) - [Conekta::PlanUpdateRequest](docs/PlanUpdateRequest.md) diff --git a/VERSION b/VERSION index 9b9a244..090ea9d 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -6.0.2 +6.0.3 diff --git a/conekta.gemspec b/conekta.gemspec index 0c6864a..48b5eeb 100644 --- a/conekta.gemspec +++ b/conekta.gemspec @@ -8,7 +8,7 @@ The version of the OpenAPI document: 2.1.0 Contact: engineering@conekta.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.2.0 +Generator version: 7.5.0 =end @@ -30,6 +30,7 @@ Gem::Specification.new do |s| s.add_runtime_dependency 'faraday', '>= 1.0.1', '< 3.0' s.add_runtime_dependency 'faraday-multipart' + s.add_runtime_dependency 'marcel' s.add_development_dependency 'rspec', '~> 3.6', '>= 3.6.0' diff --git a/config-ruby.json b/config-ruby.json index f6bb53c..2f09097 100644 --- a/config-ruby.json +++ b/config-ruby.json @@ -3,7 +3,7 @@ "gemAuthor": "Conekta", "gemName" : "conekta", "gemLicense": "MIT", - "gemVersion": "6.0.2", + "gemVersion": "6.0.3", "hideGenerationTimestamp": false, "moduleName": "Conekta", "gemSummary" : "This library provides https://api.conekta.io operations", diff --git a/docs/CheckoutRequest.md b/docs/CheckoutRequest.md index 8355c4e..d3ffe8c 100644 --- a/docs/CheckoutRequest.md +++ b/docs/CheckoutRequest.md @@ -11,6 +11,7 @@ | **monthly_installments_options** | **Array<Integer>** | | [optional] | | **name** | **String** | Reason for payment | [optional] | | **on_demand_enabled** | **Boolean** | | [optional] | +| **redirection_time** | **Integer** | number of seconds to wait before redirecting to the success_url | [optional] | | **success_url** | **String** | Redirection url back to the site in case of successful payment, applies only to HostedPayment | [optional] | | **type** | **String** | This field represents the type of checkout | [optional] | @@ -27,6 +28,7 @@ instance = Conekta::CheckoutRequest.new( monthly_installments_options: [3,6,12], name: null, on_demand_enabled: true, + redirection_time: 10, success_url: null, type: Integration ) diff --git a/docs/EventTypes.md b/docs/EventTypes.md new file mode 100644 index 0000000..c8d7023 --- /dev/null +++ b/docs/EventTypes.md @@ -0,0 +1,15 @@ +# Conekta::EventTypes + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | + +## Example + +```ruby +require 'conekta' + +instance = Conekta::EventTypes.new() +``` + diff --git a/docs/OrderResponseCheckout.md b/docs/OrderResponseCheckout.md index 7a39116..8de3269 100644 --- a/docs/OrderResponseCheckout.md +++ b/docs/OrderResponseCheckout.md @@ -23,6 +23,7 @@ | **on_demand_enabled** | **Boolean** | | [optional] | | **paid_payments_count** | **Integer** | | [optional] | | **recurrent** | **Boolean** | | [optional] | +| **redirection_time** | **Integer** | number of seconds to wait before redirecting to the success_url | [optional] | | **slug** | **String** | | [optional] | | **sms_sent** | **Integer** | | [optional] | | **success_url** | **String** | | [optional] | @@ -56,6 +57,7 @@ instance = Conekta::OrderResponseCheckout.new( on_demand_enabled: true, paid_payments_count: 0, recurrent: false, + redirection_time: 2, slug: 6fca054a85194c43971ecea35cc519bb, sms_sent: 0, success_url: http://187.216.228.66:2222/SysVentasPagos/Acceso.aspx, diff --git a/docs/OrdersApi.md b/docs/OrdersApi.md index 004d0d8..499a0be 100644 --- a/docs/OrdersApi.md +++ b/docs/OrdersApi.md @@ -265,7 +265,14 @@ opts = { limit: 56, # Integer | The numbers of items to return, the maximum value is 250 search: 'search_example', # String | General order search, e.g. by mail, reference etc. _next: '_next_example', # String | next page - previous: 'previous_example' # String | previous page + previous: 'previous_example', # String | previous page + payment_status: 'paid', # String | Filters by order status + last_payment_info_status: 'pending_payment', # String | Filters by last payment info status + created_at: 1612137600, # Integer | created equal to + created_at_gte: 1612137600, # Integer | created at greater than or equal to + created_at_lte: 1612137600, # Integer | created at less than or equal to + updated_at_gte: 1612137600, # Integer | updated at greater than or equal to + updated_at_lte: 1612137600 # Integer | updated at less than or equal to } begin @@ -305,6 +312,13 @@ end | **search** | **String** | General order search, e.g. by mail, reference etc. | [optional] | | **_next** | **String** | next page | [optional] | | **previous** | **String** | previous page | [optional] | +| **payment_status** | **String** | Filters by order status | [optional] | +| **last_payment_info_status** | **String** | Filters by last payment info status | [optional] | +| **created_at** | **Integer** | created equal to | [optional] | +| **created_at_gte** | **Integer** | created at greater than or equal to | [optional] | +| **created_at_lte** | **Integer** | created at less than or equal to | [optional] | +| **updated_at_gte** | **Integer** | updated at greater than or equal to | [optional] | +| **updated_at_lte** | **Integer** | updated at less than or equal to | [optional] | ### Return type diff --git a/docs/Payout.md b/docs/Payout.md new file mode 100644 index 0000000..295c089 --- /dev/null +++ b/docs/Payout.md @@ -0,0 +1,18 @@ +# Conekta::Payout + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **payout_method** | [**PayoutMethod**](PayoutMethod.md) | | | + +## Example + +```ruby +require 'conekta' + +instance = Conekta::Payout.new( + payout_method: null +) +``` + diff --git a/docs/PayoutMethod.md b/docs/PayoutMethod.md new file mode 100644 index 0000000..35e10ba --- /dev/null +++ b/docs/PayoutMethod.md @@ -0,0 +1,18 @@ +# Conekta::PayoutMethod + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **type** | **String** | The type of the payout method. | | + +## Example + +```ruby +require 'conekta' + +instance = Conekta::PayoutMethod.new( + type: cashout +) +``` + diff --git a/docs/PayoutOrder.md b/docs/PayoutOrder.md new file mode 100644 index 0000000..80fe171 --- /dev/null +++ b/docs/PayoutOrder.md @@ -0,0 +1,30 @@ +# Conekta::PayoutOrder + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **allowed_payout_methods** | **Array<String>** | The payout methods that are allowed for the payout order. | | +| **amount** | **Integer** | The amount of the payout order. | | +| **currency** | **String** | The currency in which the payout order is made. | [default to 'MXN'] | +| **customer_info** | [**CustomerInfoJustCustomerId**](CustomerInfoJustCustomerId.md) | | | +| **metadata** | **Hash<String, Object>** | The metadata of the payout order. | [optional] | +| **payout** | [**Payout**](Payout.md) | | | +| **reason** | **String** | The reason for the payout order. | | + +## Example + +```ruby +require 'conekta' + +instance = Conekta::PayoutOrder.new( + allowed_payout_methods: ["cashout"], + amount: 100, + currency: MXN, + customer_info: null, + metadata: {"custom_client_id":"12345"}, + payout: null, + reason: Payout order for the customer +) +``` + diff --git a/docs/PayoutOrderPayoutsItem.md b/docs/PayoutOrderPayoutsItem.md new file mode 100644 index 0000000..96f9ab4 --- /dev/null +++ b/docs/PayoutOrderPayoutsItem.md @@ -0,0 +1,32 @@ +# Conekta::PayoutOrderPayoutsItem + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **amount** | **Integer** | The amount of the payout. | | +| **currency** | **String** | The currency in which the payout is made. | | +| **expires_at** | **Integer** | The expiration date of the payout. | [optional] | +| **id** | **String** | The id of the payout. | | +| **livemode** | **Boolean** | The live mode of the payout. | | +| **object** | **String** | The object of the payout. | | +| **payout_order_id** | **String** | The id of the payout order. | [optional] | +| **status** | **String** | The status of the payout. | [optional] | + +## Example + +```ruby +require 'conekta' + +instance = Conekta::PayoutOrderPayoutsItem.new( + amount: 3000, + currency: MXN, + expires_at: 1677626837, + id: payout_2vZwsRAhhGp2dFDJx, + livemode: true, + object: payout, + payout_order_id: f2654d66-d740-457a-9a8c-f96b5196f44e, + status: open +) +``` + diff --git a/docs/PayoutOrderResponse.md b/docs/PayoutOrderResponse.md new file mode 100644 index 0000000..bdb33ea --- /dev/null +++ b/docs/PayoutOrderResponse.md @@ -0,0 +1,44 @@ +# Conekta::PayoutOrderResponse + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **allowed_payout_methods** | **Array<String>** | The payout methods that are allowed for the payout order. | | +| **amount** | **Integer** | The amount of the payout order. | | +| **created_at** | **Integer** | The creation date of the payout order. | | +| **currency** | **String** | The currency in which the payout order is made. | [default to 'MXN'] | +| **customer_info** | [**PayoutOrderResponseCustomerInfo**](PayoutOrderResponseCustomerInfo.md) | | | +| **expires_at** | **Integer** | The expiration date of the payout order. | [optional] | +| **id** | **String** | The id of the payout order. | | +| **livemode** | **Boolean** | The live mode of the payout order. | | +| **object** | **String** | The object of the payout order. | | +| **metadata** | **Hash<String, Object>** | The metadata of the payout order. | [optional] | +| **payouts** | [**Array<PayoutOrderPayoutsItem>**](PayoutOrderPayoutsItem.md) | The payout information of the payout order. | | +| **reason** | **String** | The reason for the payout order. | | +| **status** | **String** | The status of the payout order. | [optional] | +| **updated_at** | **Integer** | The update date of the payout order. | | + +## Example + +```ruby +require 'conekta' + +instance = Conekta::PayoutOrderResponse.new( + allowed_payout_methods: ["cashout"], + amount: 100, + created_at: 1677626837, + currency: MXN, + customer_info: null, + expires_at: 1677626837, + id: f2654d66-d740-457a-9a8c-f96b5196f44e, + livemode: true, + object: payout_order, + metadata: {"custom_client_id":"12345"}, + payouts: null, + reason: Payout order for the customer, + status: open, + updated_at: 1677626837 +) +``` + diff --git a/docs/PayoutOrderResponseCustomerInfo.md b/docs/PayoutOrderResponseCustomerInfo.md new file mode 100644 index 0000000..5405b38 --- /dev/null +++ b/docs/PayoutOrderResponseCustomerInfo.md @@ -0,0 +1,30 @@ +# Conekta::PayoutOrderResponseCustomerInfo + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **customer_custom_reference** | **String** | Custom reference | [optional] | +| **name** | **String** | | [optional] | +| **email** | **String** | | [optional] | +| **phone** | **String** | | [optional] | +| **corporate** | **Boolean** | | [optional][default to false] | +| **object** | **String** | | [optional] | +| **id** | **String** | The id of the customer. | | + +## Example + +```ruby +require 'conekta' + +instance = Conekta::PayoutOrderResponseCustomerInfo.new( + customer_custom_reference: custom_reference, + name: DevTest, + email: test@conekta.com, + phone: 5522997233, + corporate: null, + object: customer_info, + id: cus_23874283647 +) +``` + diff --git a/docs/PayoutOrdersApi.md b/docs/PayoutOrdersApi.md new file mode 100644 index 0000000..da8f18f --- /dev/null +++ b/docs/PayoutOrdersApi.md @@ -0,0 +1,235 @@ +# Conekta::PayoutOrdersApi + +All URIs are relative to *https://api.conekta.io* + +| Method | HTTP request | Description | +| ------ | ------------ | ----------- | +| [**create_payout_order**](PayoutOrdersApi.md#create_payout_order) | **POST** /payout_orders | Create payout order | +| [**get_payout_order_by_id**](PayoutOrdersApi.md#get_payout_order_by_id) | **GET** /payout_orders/{id} | Get Payout Order | +| [**get_payout_orders**](PayoutOrdersApi.md#get_payout_orders) | **GET** /payout_orders | Get a list of Payout Orders | + + +## create_payout_order + +> create_payout_order(payout_order, opts) + +Create payout order + +Create a new payout order. + +### Examples + +```ruby +require 'time' +require 'conekta' +# setup authorization +Conekta.configure do |config| + # Configure Bearer authorization: bearerAuth + config.access_token = 'YOUR_BEARER_TOKEN' +end + +api_instance = Conekta::PayoutOrdersApi.new +payout_order = Conekta::PayoutOrder.new({allowed_payout_methods: ["cashout"], amount: 100, currency: 'MXN', customer_info: Conekta::CustomerInfoJustCustomerId.new({customer_id: 'cus_23874283647'}), payout: Conekta::Payout.new({payout_method: Conekta::PayoutMethod.new({type: 'cashout'})}), reason: 'Payout order for the customer'}) # PayoutOrder | requested field for payout order +opts = { + accept_language: 'es' # String | Use for knowing which language to use +} + +begin + # Create payout order + result = api_instance.create_payout_order(payout_order, opts) + p result +rescue Conekta::ApiError => e + puts "Error when calling PayoutOrdersApi->create_payout_order: #{e}" +end +``` + +#### Using the create_payout_order_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> , Integer, Hash)> create_payout_order_with_http_info(payout_order, opts) + +```ruby +begin + # Create payout order + data, status_code, headers = api_instance.create_payout_order_with_http_info(payout_order, opts) + p status_code # => 2xx + p headers # => { ... } + p data # => +rescue Conekta::ApiError => e + puts "Error when calling PayoutOrdersApi->create_payout_order_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **payout_order** | [**PayoutOrder**](PayoutOrder.md) | requested field for payout order | | +| **accept_language** | **String** | Use for knowing which language to use | [optional][default to 'es'] | + +### Return type + +[**PayoutOrderResponse**](PayoutOrderResponse.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/vnd.conekta-v2.1.0+json + + +## get_payout_order_by_id + +> get_payout_order_by_id(id, opts) + +Get Payout Order + +Gets a payout Order resource that corresponds to a payout order ID. + +### Examples + +```ruby +require 'time' +require 'conekta' +# setup authorization +Conekta.configure do |config| + # Configure Bearer authorization: bearerAuth + config.access_token = 'YOUR_BEARER_TOKEN' +end + +api_instance = Conekta::PayoutOrdersApi.new +id = '6307a60c41de27127515a575' # String | Identifier of the resource +opts = { + accept_language: 'es' # String | Use for knowing which language to use +} + +begin + # Get Payout Order + result = api_instance.get_payout_order_by_id(id, opts) + p result +rescue Conekta::ApiError => e + puts "Error when calling PayoutOrdersApi->get_payout_order_by_id: #{e}" +end +``` + +#### Using the get_payout_order_by_id_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> , Integer, Hash)> get_payout_order_by_id_with_http_info(id, opts) + +```ruby +begin + # Get Payout Order + data, status_code, headers = api_instance.get_payout_order_by_id_with_http_info(id, opts) + p status_code # => 2xx + p headers # => { ... } + p data # => +rescue Conekta::ApiError => e + puts "Error when calling PayoutOrdersApi->get_payout_order_by_id_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **id** | **String** | Identifier of the resource | | +| **accept_language** | **String** | Use for knowing which language to use | [optional][default to 'es'] | + +### Return type + +[**PayoutOrderResponse**](PayoutOrderResponse.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/vnd.conekta-v2.1.0+json + + +## get_payout_orders + +> get_payout_orders(opts) + +Get a list of Payout Orders + +Get Payout order details in the form of a list + +### Examples + +```ruby +require 'time' +require 'conekta' +# setup authorization +Conekta.configure do |config| + # Configure Bearer authorization: bearerAuth + config.access_token = 'YOUR_BEARER_TOKEN' +end + +api_instance = Conekta::PayoutOrdersApi.new +opts = { + accept_language: 'es', # String | Use for knowing which language to use + limit: 56, # Integer | The numbers of items to return, the maximum value is 250 + search: 'search_example', # String | General order search, e.g. by mail, reference etc. + _next: '_next_example', # String | next page + previous: 'previous_example' # String | previous page +} + +begin + # Get a list of Payout Orders + result = api_instance.get_payout_orders(opts) + p result +rescue Conekta::ApiError => e + puts "Error when calling PayoutOrdersApi->get_payout_orders: #{e}" +end +``` + +#### Using the get_payout_orders_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> , Integer, Hash)> get_payout_orders_with_http_info(opts) + +```ruby +begin + # Get a list of Payout Orders + data, status_code, headers = api_instance.get_payout_orders_with_http_info(opts) + p status_code # => 2xx + p headers # => { ... } + p data # => +rescue Conekta::ApiError => e + puts "Error when calling PayoutOrdersApi->get_payout_orders_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **accept_language** | **String** | Use for knowing which language to use | [optional][default to 'es'] | +| **limit** | **Integer** | The numbers of items to return, the maximum value is 250 | [optional][default to 20] | +| **search** | **String** | General order search, e.g. by mail, reference etc. | [optional] | +| **_next** | **String** | next page | [optional] | +| **previous** | **String** | previous page | [optional] | + +### Return type + +[**PayoutOrdersResponse**](PayoutOrdersResponse.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/vnd.conekta-v2.1.0+json + diff --git a/docs/PayoutOrdersResponse.md b/docs/PayoutOrdersResponse.md new file mode 100644 index 0000000..28167c0 --- /dev/null +++ b/docs/PayoutOrdersResponse.md @@ -0,0 +1,26 @@ +# Conekta::PayoutOrdersResponse + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **has_more** | **Boolean** | Indicates if there are more pages to be requested | | +| **object** | **String** | Object type, in this case is list | | +| **next_page_url** | **String** | URL of the next page. | [optional] | +| **previous_page_url** | **String** | Url of the previous page. | [optional] | +| **data** | [**Array<PayoutOrderResponse>**](PayoutOrderResponse.md) | | [optional] | + +## Example + +```ruby +require 'conekta' + +instance = Conekta::PayoutOrdersResponse.new( + has_more: false, + object: list, + next_page_url: https://api.conekta.io/resources?limit=10&next=chrg_1, + previous_page_url: https://api.conekta.io/resources?limit=10&previous=chrg_1, + data: null +) +``` + diff --git a/docs/Product.md b/docs/Product.md index e08a31b..71029cc 100644 --- a/docs/Product.md +++ b/docs/Product.md @@ -7,7 +7,7 @@ | **antifraud_info** | **Hash<String, Object>** | | [optional] | | **brand** | **String** | The brand of the item. | [optional] | | **description** | **String** | Short description of the item | [optional] | -| **metadata** | **Hash<String, String>** | It is a key/value hash that can hold custom fields. Maximum 100 elements and allows special characters. | [optional] | +| **metadata** | **Hash<String, Object>** | It is a key/value hash that can hold custom fields. Maximum 100 elements and allows special characters. | [optional] | | **name** | **String** | The name of the item. It will be displayed in the order. | | | **quantity** | **Integer** | The quantity of the item in the order. | | | **sku** | **String** | The stock keeping unit for the item. It is used to identify the item in the order. | [optional] | diff --git a/docs/ProductDataResponse.md b/docs/ProductDataResponse.md index fc7d690..c789e8a 100644 --- a/docs/ProductDataResponse.md +++ b/docs/ProductDataResponse.md @@ -7,7 +7,7 @@ | **antifraud_info** | **Hash<String, Object>** | | [optional] | | **brand** | **String** | The brand of the item. | [optional] | | **description** | **String** | Short description of the item | [optional] | -| **metadata** | **Hash<String, String>** | It is a key/value hash that can hold custom fields. Maximum 100 elements and allows special characters. | [optional] | +| **metadata** | **Hash<String, Object>** | It is a key/value hash that can hold custom fields. Maximum 100 elements and allows special characters. | [optional] | | **name** | **String** | The name of the item. It will be displayed in the order. | | | **quantity** | **Integer** | The quantity of the item in the order. | | | **sku** | **String** | The stock keeping unit for the item. It is used to identify the item in the order. | [optional] | diff --git a/docs/ProductOrderResponse.md b/docs/ProductOrderResponse.md index b6a8c26..0bbd19d 100644 --- a/docs/ProductOrderResponse.md +++ b/docs/ProductOrderResponse.md @@ -7,7 +7,7 @@ | **antifraud_info** | **Hash<String, Object>** | | [optional] | | **brand** | **String** | The brand of the item. | [optional] | | **description** | **String** | Short description of the item | [optional] | -| **metadata** | **Hash<String, String>** | It is a key/value hash that can hold custom fields. Maximum 100 elements and allows special characters. | [optional] | +| **metadata** | **Hash<String, Object>** | It is a key/value hash that can hold custom fields. Maximum 100 elements and allows special characters. | [optional] | | **name** | **String** | The name of the item. It will be displayed in the order. | | | **quantity** | **Integer** | The quantity of the item in the order. | | | **sku** | **String** | The stock keeping unit for the item. It is used to identify the item in the order. | [optional] | diff --git a/docs/WebhooksApi.md b/docs/WebhooksApi.md index 5d69c60..0a70599 100644 --- a/docs/WebhooksApi.md +++ b/docs/WebhooksApi.md @@ -254,6 +254,7 @@ opts = { x_child_company_id: '6441b6376b60c3a638da80af', # String | In the case of a holding company, the company id of the child company to which will process the request. limit: 56, # Integer | The numbers of items to return, the maximum value is 250 search: 'search_example', # String | General order search, e.g. by mail, reference etc. + url: 'url_example', # String | url for webhook filter _next: '_next_example', # String | next page previous: 'previous_example' # String | previous page } @@ -293,6 +294,7 @@ end | **x_child_company_id** | **String** | In the case of a holding company, the company id of the child company to which will process the request. | [optional] | | **limit** | **Integer** | The numbers of items to return, the maximum value is 250 | [optional][default to 20] | | **search** | **String** | General order search, e.g. by mail, reference etc. | [optional] | +| **url** | **String** | url for webhook filter | [optional] | | **_next** | **String** | next page | [optional] | | **previous** | **String** | previous page | [optional] | diff --git a/lib/conekta.rb b/lib/conekta.rb index 1e19c54..a5b2271 100644 --- a/lib/conekta.rb +++ b/lib/conekta.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 2.1.0 Contact: engineering@conekta.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.2.0 +Generator version: 7.5.0 =end @@ -84,6 +84,7 @@ require 'conekta/models/email_checkout_request' require 'conekta/models/error' require 'conekta/models/event_response' +require 'conekta/models/event_types' require 'conekta/models/events_resend_response' require 'conekta/models/fiscal_entity_address' require 'conekta/models/get_api_keys_response' @@ -138,6 +139,13 @@ require 'conekta/models/payment_method_response' require 'conekta/models/payment_method_spei_recurrent' require 'conekta/models/payment_method_spei_request' +require 'conekta/models/payout' +require 'conekta/models/payout_method' +require 'conekta/models/payout_order' +require 'conekta/models/payout_order_payouts_item' +require 'conekta/models/payout_order_response' +require 'conekta/models/payout_order_response_customer_info' +require 'conekta/models/payout_orders_response' require 'conekta/models/plan_request' require 'conekta/models/plan_response' require 'conekta/models/plan_update_request' @@ -196,6 +204,7 @@ require 'conekta/api/orders_api' require 'conekta/api/payment_link_api' require 'conekta/api/payment_methods_api' +require 'conekta/api/payout_orders_api' require 'conekta/api/plans_api' require 'conekta/api/products_api' require 'conekta/api/shipping_contacts_api' diff --git a/lib/conekta/api/antifraud_api.rb b/lib/conekta/api/antifraud_api.rb index 1606323..6a10c23 100644 --- a/lib/conekta/api/antifraud_api.rb +++ b/lib/conekta/api/antifraud_api.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 2.1.0 Contact: engineering@conekta.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.2.0 +Generator version: 7.5.0 =end diff --git a/lib/conekta/api/api_keys_api.rb b/lib/conekta/api/api_keys_api.rb index 3823539..49ac788 100644 --- a/lib/conekta/api/api_keys_api.rb +++ b/lib/conekta/api/api_keys_api.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 2.1.0 Contact: engineering@conekta.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.2.0 +Generator version: 7.5.0 =end diff --git a/lib/conekta/api/balances_api.rb b/lib/conekta/api/balances_api.rb index 0bedf31..939d3a4 100644 --- a/lib/conekta/api/balances_api.rb +++ b/lib/conekta/api/balances_api.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 2.1.0 Contact: engineering@conekta.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.2.0 +Generator version: 7.5.0 =end diff --git a/lib/conekta/api/charges_api.rb b/lib/conekta/api/charges_api.rb index 38a8d35..a63fd75 100644 --- a/lib/conekta/api/charges_api.rb +++ b/lib/conekta/api/charges_api.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 2.1.0 Contact: engineering@conekta.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.2.0 +Generator version: 7.5.0 =end diff --git a/lib/conekta/api/companies_api.rb b/lib/conekta/api/companies_api.rb index 2c8dfd4..3fad0b4 100644 --- a/lib/conekta/api/companies_api.rb +++ b/lib/conekta/api/companies_api.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 2.1.0 Contact: engineering@conekta.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.2.0 +Generator version: 7.5.0 =end diff --git a/lib/conekta/api/customers_api.rb b/lib/conekta/api/customers_api.rb index abe94a9..9e22a5a 100644 --- a/lib/conekta/api/customers_api.rb +++ b/lib/conekta/api/customers_api.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 2.1.0 Contact: engineering@conekta.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.2.0 +Generator version: 7.5.0 =end diff --git a/lib/conekta/api/discounts_api.rb b/lib/conekta/api/discounts_api.rb index c638bef..a9e47cd 100644 --- a/lib/conekta/api/discounts_api.rb +++ b/lib/conekta/api/discounts_api.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 2.1.0 Contact: engineering@conekta.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.2.0 +Generator version: 7.5.0 =end diff --git a/lib/conekta/api/events_api.rb b/lib/conekta/api/events_api.rb index 0990f4c..4ebf9d9 100644 --- a/lib/conekta/api/events_api.rb +++ b/lib/conekta/api/events_api.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 2.1.0 Contact: engineering@conekta.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.2.0 +Generator version: 7.5.0 =end diff --git a/lib/conekta/api/logs_api.rb b/lib/conekta/api/logs_api.rb index ee78409..2f34af2 100644 --- a/lib/conekta/api/logs_api.rb +++ b/lib/conekta/api/logs_api.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 2.1.0 Contact: engineering@conekta.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.2.0 +Generator version: 7.5.0 =end diff --git a/lib/conekta/api/orders_api.rb b/lib/conekta/api/orders_api.rb index e4e14cc..98de3ab 100644 --- a/lib/conekta/api/orders_api.rb +++ b/lib/conekta/api/orders_api.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 2.1.0 Contact: engineering@conekta.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.2.0 +Generator version: 7.5.0 =end @@ -252,6 +252,13 @@ def get_order_by_id_with_http_info(id, opts = {}) # @option opts [String] :search General order search, e.g. by mail, reference etc. # @option opts [String] :_next next page # @option opts [String] :previous previous page + # @option opts [String] :payment_status Filters by order status + # @option opts [String] :last_payment_info_status Filters by last payment info status + # @option opts [Integer] :created_at created equal to + # @option opts [Integer] :created_at_gte created at greater than or equal to + # @option opts [Integer] :created_at_lte created at less than or equal to + # @option opts [Integer] :updated_at_gte updated at greater than or equal to + # @option opts [Integer] :updated_at_lte updated at less than or equal to # @return [GetOrdersResponse] def get_orders(opts = {}) data, _status_code, _headers = get_orders_with_http_info(opts) @@ -267,6 +274,13 @@ def get_orders(opts = {}) # @option opts [String] :search General order search, e.g. by mail, reference etc. # @option opts [String] :_next next page # @option opts [String] :previous previous page + # @option opts [String] :payment_status Filters by order status + # @option opts [String] :last_payment_info_status Filters by last payment info status + # @option opts [Integer] :created_at created equal to + # @option opts [Integer] :created_at_gte created at greater than or equal to + # @option opts [Integer] :created_at_lte created at less than or equal to + # @option opts [Integer] :updated_at_gte updated at greater than or equal to + # @option opts [Integer] :updated_at_lte updated at less than or equal to # @return [Array<(GetOrdersResponse, Integer, Hash)>] GetOrdersResponse data, response status code and response headers def get_orders_with_http_info(opts = {}) if @api_client.config.debugging @@ -293,6 +307,13 @@ def get_orders_with_http_info(opts = {}) query_params[:'search'] = opts[:'search'] if !opts[:'search'].nil? query_params[:'next'] = opts[:'_next'] if !opts[:'_next'].nil? query_params[:'previous'] = opts[:'previous'] if !opts[:'previous'].nil? + query_params[:'payment_status'] = opts[:'payment_status'] if !opts[:'payment_status'].nil? + query_params[:'last_payment_info.status'] = opts[:'last_payment_info_status'] if !opts[:'last_payment_info_status'].nil? + query_params[:'created_at'] = opts[:'created_at'] if !opts[:'created_at'].nil? + query_params[:'created_at.gte'] = opts[:'created_at_gte'] if !opts[:'created_at_gte'].nil? + query_params[:'created_at.lte'] = opts[:'created_at_lte'] if !opts[:'created_at_lte'].nil? + query_params[:'updated_at.gte'] = opts[:'updated_at_gte'] if !opts[:'updated_at_gte'].nil? + query_params[:'updated_at.lte'] = opts[:'updated_at_lte'] if !opts[:'updated_at_lte'].nil? # header parameters header_params = opts[:header_params] || {} diff --git a/lib/conekta/api/payment_link_api.rb b/lib/conekta/api/payment_link_api.rb index d841fc0..8b7526e 100644 --- a/lib/conekta/api/payment_link_api.rb +++ b/lib/conekta/api/payment_link_api.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 2.1.0 Contact: engineering@conekta.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.2.0 +Generator version: 7.5.0 =end diff --git a/lib/conekta/api/payment_methods_api.rb b/lib/conekta/api/payment_methods_api.rb index 4eecec9..660210c 100644 --- a/lib/conekta/api/payment_methods_api.rb +++ b/lib/conekta/api/payment_methods_api.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 2.1.0 Contact: engineering@conekta.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.2.0 +Generator version: 7.5.0 =end diff --git a/lib/conekta/api/payout_orders_api.rb b/lib/conekta/api/payout_orders_api.rb new file mode 100644 index 0000000..cd67495 --- /dev/null +++ b/lib/conekta/api/payout_orders_api.rb @@ -0,0 +1,251 @@ +=begin +#Conekta API + +#Conekta sdk + +The version of the OpenAPI document: 2.1.0 +Contact: engineering@conekta.com +Generated by: https://openapi-generator.tech +Generator version: 7.5.0 + +=end + +require 'cgi' + +module Conekta + class PayoutOrdersApi + attr_accessor :api_client + + def initialize(api_client = ApiClient.default) + @api_client = api_client + end + # Create payout order + # Create a new payout order. + # @param payout_order [PayoutOrder] requested field for payout order + # @param [Hash] opts the optional parameters + # @option opts [String] :accept_language Use for knowing which language to use (default to 'es') + # @return [PayoutOrderResponse] + def create_payout_order(payout_order, opts = {}) + data, _status_code, _headers = create_payout_order_with_http_info(payout_order, opts) + data + end + + # Create payout order + # Create a new payout order. + # @param payout_order [PayoutOrder] requested field for payout order + # @param [Hash] opts the optional parameters + # @option opts [String] :accept_language Use for knowing which language to use (default to 'es') + # @return [Array<(PayoutOrderResponse, Integer, Hash)>] PayoutOrderResponse data, response status code and response headers + def create_payout_order_with_http_info(payout_order, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: PayoutOrdersApi.create_payout_order ...' + end + # verify the required parameter 'payout_order' is set + if @api_client.config.client_side_validation && payout_order.nil? + fail ArgumentError, "Missing the required parameter 'payout_order' when calling PayoutOrdersApi.create_payout_order" + end + allowable_values = ["es", "en"] + if @api_client.config.client_side_validation && opts[:'accept_language'] && !allowable_values.include?(opts[:'accept_language']) + fail ArgumentError, "invalid value for \"accept_language\", must be one of #{allowable_values}" + end + # resource path + local_var_path = '/payout_orders' + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/vnd.conekta-v2.1.0+json']) + # HTTP header 'Content-Type' + content_type = @api_client.select_header_content_type(['application/json']) + if !content_type.nil? + header_params['Content-Type'] = content_type + end + header_params[:'Accept-Language'] = opts[:'accept_language'] if !opts[:'accept_language'].nil? + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] || @api_client.object_to_http_body(payout_order) + + # return_type + return_type = opts[:debug_return_type] || 'PayoutOrderResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || ['bearerAuth'] + + new_options = opts.merge( + :operation => :"PayoutOrdersApi.create_payout_order", + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: PayoutOrdersApi#create_payout_order\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Get Payout Order + # Gets a payout Order resource that corresponds to a payout order ID. + # @param id [String] Identifier of the resource + # @param [Hash] opts the optional parameters + # @option opts [String] :accept_language Use for knowing which language to use (default to 'es') + # @return [PayoutOrderResponse] + def get_payout_order_by_id(id, opts = {}) + data, _status_code, _headers = get_payout_order_by_id_with_http_info(id, opts) + data + end + + # Get Payout Order + # Gets a payout Order resource that corresponds to a payout order ID. + # @param id [String] Identifier of the resource + # @param [Hash] opts the optional parameters + # @option opts [String] :accept_language Use for knowing which language to use (default to 'es') + # @return [Array<(PayoutOrderResponse, Integer, Hash)>] PayoutOrderResponse data, response status code and response headers + def get_payout_order_by_id_with_http_info(id, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: PayoutOrdersApi.get_payout_order_by_id ...' + end + # verify the required parameter 'id' is set + if @api_client.config.client_side_validation && id.nil? + fail ArgumentError, "Missing the required parameter 'id' when calling PayoutOrdersApi.get_payout_order_by_id" + end + allowable_values = ["es", "en"] + if @api_client.config.client_side_validation && opts[:'accept_language'] && !allowable_values.include?(opts[:'accept_language']) + fail ArgumentError, "invalid value for \"accept_language\", must be one of #{allowable_values}" + end + # resource path + local_var_path = '/payout_orders/{id}'.sub('{' + 'id' + '}', CGI.escape(id.to_s)) + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/vnd.conekta-v2.1.0+json']) + header_params[:'Accept-Language'] = opts[:'accept_language'] if !opts[:'accept_language'].nil? + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] || 'PayoutOrderResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || ['bearerAuth'] + + new_options = opts.merge( + :operation => :"PayoutOrdersApi.get_payout_order_by_id", + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: PayoutOrdersApi#get_payout_order_by_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Get a list of Payout Orders + # Get Payout order details in the form of a list + # @param [Hash] opts the optional parameters + # @option opts [String] :accept_language Use for knowing which language to use (default to 'es') + # @option opts [Integer] :limit The numbers of items to return, the maximum value is 250 (default to 20) + # @option opts [String] :search General order search, e.g. by mail, reference etc. + # @option opts [String] :_next next page + # @option opts [String] :previous previous page + # @return [PayoutOrdersResponse] + def get_payout_orders(opts = {}) + data, _status_code, _headers = get_payout_orders_with_http_info(opts) + data + end + + # Get a list of Payout Orders + # Get Payout order details in the form of a list + # @param [Hash] opts the optional parameters + # @option opts [String] :accept_language Use for knowing which language to use (default to 'es') + # @option opts [Integer] :limit The numbers of items to return, the maximum value is 250 (default to 20) + # @option opts [String] :search General order search, e.g. by mail, reference etc. + # @option opts [String] :_next next page + # @option opts [String] :previous previous page + # @return [Array<(PayoutOrdersResponse, Integer, Hash)>] PayoutOrdersResponse data, response status code and response headers + def get_payout_orders_with_http_info(opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: PayoutOrdersApi.get_payout_orders ...' + end + allowable_values = ["es", "en"] + if @api_client.config.client_side_validation && opts[:'accept_language'] && !allowable_values.include?(opts[:'accept_language']) + fail ArgumentError, "invalid value for \"accept_language\", must be one of #{allowable_values}" + end + if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 250 + fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling PayoutOrdersApi.get_payout_orders, must be smaller than or equal to 250.' + end + + if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] < 1 + fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling PayoutOrdersApi.get_payout_orders, must be greater than or equal to 1.' + end + + # resource path + local_var_path = '/payout_orders' + + # query parameters + query_params = opts[:query_params] || {} + query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil? + query_params[:'search'] = opts[:'search'] if !opts[:'search'].nil? + query_params[:'next'] = opts[:'_next'] if !opts[:'_next'].nil? + query_params[:'previous'] = opts[:'previous'] if !opts[:'previous'].nil? + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/vnd.conekta-v2.1.0+json']) + header_params[:'Accept-Language'] = opts[:'accept_language'] if !opts[:'accept_language'].nil? + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] || 'PayoutOrdersResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || ['bearerAuth'] + + new_options = opts.merge( + :operation => :"PayoutOrdersApi.get_payout_orders", + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: PayoutOrdersApi#get_payout_orders\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + end +end diff --git a/lib/conekta/api/plans_api.rb b/lib/conekta/api/plans_api.rb index d3bfbd8..e4a5a08 100644 --- a/lib/conekta/api/plans_api.rb +++ b/lib/conekta/api/plans_api.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 2.1.0 Contact: engineering@conekta.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.2.0 +Generator version: 7.5.0 =end diff --git a/lib/conekta/api/products_api.rb b/lib/conekta/api/products_api.rb index 239adb1..4f77657 100644 --- a/lib/conekta/api/products_api.rb +++ b/lib/conekta/api/products_api.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 2.1.0 Contact: engineering@conekta.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.2.0 +Generator version: 7.5.0 =end diff --git a/lib/conekta/api/shipping_contacts_api.rb b/lib/conekta/api/shipping_contacts_api.rb index 853f1a0..87b70ec 100644 --- a/lib/conekta/api/shipping_contacts_api.rb +++ b/lib/conekta/api/shipping_contacts_api.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 2.1.0 Contact: engineering@conekta.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.2.0 +Generator version: 7.5.0 =end diff --git a/lib/conekta/api/shippings_api.rb b/lib/conekta/api/shippings_api.rb index 9639549..47576ac 100644 --- a/lib/conekta/api/shippings_api.rb +++ b/lib/conekta/api/shippings_api.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 2.1.0 Contact: engineering@conekta.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.2.0 +Generator version: 7.5.0 =end diff --git a/lib/conekta/api/subscriptions_api.rb b/lib/conekta/api/subscriptions_api.rb index 704f7c8..fad13ac 100644 --- a/lib/conekta/api/subscriptions_api.rb +++ b/lib/conekta/api/subscriptions_api.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 2.1.0 Contact: engineering@conekta.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.2.0 +Generator version: 7.5.0 =end diff --git a/lib/conekta/api/taxes_api.rb b/lib/conekta/api/taxes_api.rb index a08eeeb..7585b4b 100644 --- a/lib/conekta/api/taxes_api.rb +++ b/lib/conekta/api/taxes_api.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 2.1.0 Contact: engineering@conekta.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.2.0 +Generator version: 7.5.0 =end diff --git a/lib/conekta/api/tokens_api.rb b/lib/conekta/api/tokens_api.rb index 1425e25..0befa53 100644 --- a/lib/conekta/api/tokens_api.rb +++ b/lib/conekta/api/tokens_api.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 2.1.0 Contact: engineering@conekta.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.2.0 +Generator version: 7.5.0 =end diff --git a/lib/conekta/api/transactions_api.rb b/lib/conekta/api/transactions_api.rb index c126155..863c511 100644 --- a/lib/conekta/api/transactions_api.rb +++ b/lib/conekta/api/transactions_api.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 2.1.0 Contact: engineering@conekta.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.2.0 +Generator version: 7.5.0 =end diff --git a/lib/conekta/api/transfers_api.rb b/lib/conekta/api/transfers_api.rb index d30de14..ecbe911 100644 --- a/lib/conekta/api/transfers_api.rb +++ b/lib/conekta/api/transfers_api.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 2.1.0 Contact: engineering@conekta.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.2.0 +Generator version: 7.5.0 =end diff --git a/lib/conekta/api/webhook_keys_api.rb b/lib/conekta/api/webhook_keys_api.rb index fe045d9..0b32f09 100644 --- a/lib/conekta/api/webhook_keys_api.rb +++ b/lib/conekta/api/webhook_keys_api.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 2.1.0 Contact: engineering@conekta.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.2.0 +Generator version: 7.5.0 =end diff --git a/lib/conekta/api/webhooks_api.rb b/lib/conekta/api/webhooks_api.rb index 68bc806..563602d 100644 --- a/lib/conekta/api/webhooks_api.rb +++ b/lib/conekta/api/webhooks_api.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 2.1.0 Contact: engineering@conekta.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.2.0 +Generator version: 7.5.0 =end @@ -240,6 +240,7 @@ def get_webhook_with_http_info(id, opts = {}) # @option opts [String] :x_child_company_id In the case of a holding company, the company id of the child company to which will process the request. # @option opts [Integer] :limit The numbers of items to return, the maximum value is 250 (default to 20) # @option opts [String] :search General order search, e.g. by mail, reference etc. + # @option opts [String] :url url for webhook filter # @option opts [String] :_next next page # @option opts [String] :previous previous page # @return [GetWebhooksResponse] @@ -255,6 +256,7 @@ def get_webhooks(opts = {}) # @option opts [String] :x_child_company_id In the case of a holding company, the company id of the child company to which will process the request. # @option opts [Integer] :limit The numbers of items to return, the maximum value is 250 (default to 20) # @option opts [String] :search General order search, e.g. by mail, reference etc. + # @option opts [String] :url url for webhook filter # @option opts [String] :_next next page # @option opts [String] :previous previous page # @return [Array<(GetWebhooksResponse, Integer, Hash)>] GetWebhooksResponse data, response status code and response headers @@ -281,6 +283,7 @@ def get_webhooks_with_http_info(opts = {}) query_params = opts[:query_params] || {} query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil? query_params[:'search'] = opts[:'search'] if !opts[:'search'].nil? + query_params[:'url'] = opts[:'url'] if !opts[:'url'].nil? query_params[:'next'] = opts[:'_next'] if !opts[:'_next'].nil? query_params[:'previous'] = opts[:'previous'] if !opts[:'previous'].nil? diff --git a/lib/conekta/api_client.rb b/lib/conekta/api_client.rb index e8fa0f5..ff01758 100644 --- a/lib/conekta/api_client.rb +++ b/lib/conekta/api_client.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 2.1.0 Contact: engineering@conekta.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.2.0 +Generator version: 7.5.0 =end @@ -141,8 +141,7 @@ def build_request_body(header_params, form_params, body) form_params.each do |key, value| case value when ::File, ::Tempfile - # TODO hardcode to application/octet-stream, need better way to detect content type - data[key] = Faraday::FilePart.new(value.path, 'application/octet-stream', value.path) + data[key] = Faraday::FilePart.new(value.path, Marcel::MimeType.for(Pathname.new(value.path))) when ::Array, nil # let Faraday handle Array and nil parameters data[key] = value diff --git a/lib/conekta/api_error.rb b/lib/conekta/api_error.rb index 103c825..5f0edd6 100644 --- a/lib/conekta/api_error.rb +++ b/lib/conekta/api_error.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 2.1.0 Contact: engineering@conekta.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.2.0 +Generator version: 7.5.0 =end diff --git a/lib/conekta/configuration.rb b/lib/conekta/configuration.rb index 371ab47..0a7c61f 100644 --- a/lib/conekta/configuration.rb +++ b/lib/conekta/configuration.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 2.1.0 Contact: engineering@conekta.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.2.0 +Generator version: 7.5.0 =end diff --git a/lib/conekta/models/api_key_create_response.rb b/lib/conekta/models/api_key_create_response.rb index 07df7ab..ff7c79f 100644 --- a/lib/conekta/models/api_key_create_response.rb +++ b/lib/conekta/models/api_key_create_response.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 2.1.0 Contact: engineering@conekta.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.2.0 +Generator version: 7.5.0 =end diff --git a/lib/conekta/models/api_key_request.rb b/lib/conekta/models/api_key_request.rb index 5f1c763..ea93365 100644 --- a/lib/conekta/models/api_key_request.rb +++ b/lib/conekta/models/api_key_request.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 2.1.0 Contact: engineering@conekta.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.2.0 +Generator version: 7.5.0 =end diff --git a/lib/conekta/models/api_key_response.rb b/lib/conekta/models/api_key_response.rb index a357c6e..f736bf5 100644 --- a/lib/conekta/models/api_key_response.rb +++ b/lib/conekta/models/api_key_response.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 2.1.0 Contact: engineering@conekta.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.2.0 +Generator version: 7.5.0 =end diff --git a/lib/conekta/models/api_key_response_on_delete.rb b/lib/conekta/models/api_key_response_on_delete.rb index 9c46dcc..a568f91 100644 --- a/lib/conekta/models/api_key_response_on_delete.rb +++ b/lib/conekta/models/api_key_response_on_delete.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 2.1.0 Contact: engineering@conekta.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.2.0 +Generator version: 7.5.0 =end diff --git a/lib/conekta/models/api_key_update_request.rb b/lib/conekta/models/api_key_update_request.rb index 1c920e3..e21d4d3 100644 --- a/lib/conekta/models/api_key_update_request.rb +++ b/lib/conekta/models/api_key_update_request.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 2.1.0 Contact: engineering@conekta.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.2.0 +Generator version: 7.5.0 =end diff --git a/lib/conekta/models/balance_common_field.rb b/lib/conekta/models/balance_common_field.rb index 68b3baa..a917b3e 100644 --- a/lib/conekta/models/balance_common_field.rb +++ b/lib/conekta/models/balance_common_field.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 2.1.0 Contact: engineering@conekta.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.2.0 +Generator version: 7.5.0 =end diff --git a/lib/conekta/models/balance_response.rb b/lib/conekta/models/balance_response.rb index fa0ee58..9ae7dc4 100644 --- a/lib/conekta/models/balance_response.rb +++ b/lib/conekta/models/balance_response.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 2.1.0 Contact: engineering@conekta.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.2.0 +Generator version: 7.5.0 =end diff --git a/lib/conekta/models/blacklist_rule_response.rb b/lib/conekta/models/blacklist_rule_response.rb index 33135eb..451f009 100644 --- a/lib/conekta/models/blacklist_rule_response.rb +++ b/lib/conekta/models/blacklist_rule_response.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 2.1.0 Contact: engineering@conekta.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.2.0 +Generator version: 7.5.0 =end diff --git a/lib/conekta/models/charge_order_response.rb b/lib/conekta/models/charge_order_response.rb index e9eccf5..546181e 100644 --- a/lib/conekta/models/charge_order_response.rb +++ b/lib/conekta/models/charge_order_response.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 2.1.0 Contact: engineering@conekta.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.2.0 +Generator version: 7.5.0 =end diff --git a/lib/conekta/models/charge_order_response_payment_method.rb b/lib/conekta/models/charge_order_response_payment_method.rb index 05a15ab..3d46840 100644 --- a/lib/conekta/models/charge_order_response_payment_method.rb +++ b/lib/conekta/models/charge_order_response_payment_method.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 2.1.0 Contact: engineering@conekta.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.2.0 +Generator version: 7.5.0 =end diff --git a/lib/conekta/models/charge_request.rb b/lib/conekta/models/charge_request.rb index 0e5d353..bea6977 100644 --- a/lib/conekta/models/charge_request.rb +++ b/lib/conekta/models/charge_request.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 2.1.0 Contact: engineering@conekta.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.2.0 +Generator version: 7.5.0 =end diff --git a/lib/conekta/models/charge_request_payment_method.rb b/lib/conekta/models/charge_request_payment_method.rb index 83b23e0..419c216 100644 --- a/lib/conekta/models/charge_request_payment_method.rb +++ b/lib/conekta/models/charge_request_payment_method.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 2.1.0 Contact: engineering@conekta.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.2.0 +Generator version: 7.5.0 =end diff --git a/lib/conekta/models/charge_response.rb b/lib/conekta/models/charge_response.rb index b6c6205..36359c5 100644 --- a/lib/conekta/models/charge_response.rb +++ b/lib/conekta/models/charge_response.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 2.1.0 Contact: engineering@conekta.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.2.0 +Generator version: 7.5.0 =end diff --git a/lib/conekta/models/charge_response_channel.rb b/lib/conekta/models/charge_response_channel.rb index 0aa1b64..f937bb5 100644 --- a/lib/conekta/models/charge_response_channel.rb +++ b/lib/conekta/models/charge_response_channel.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 2.1.0 Contact: engineering@conekta.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.2.0 +Generator version: 7.5.0 =end diff --git a/lib/conekta/models/charge_response_payment_method.rb b/lib/conekta/models/charge_response_payment_method.rb index 15a303c..b04a78a 100644 --- a/lib/conekta/models/charge_response_payment_method.rb +++ b/lib/conekta/models/charge_response_payment_method.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 2.1.0 Contact: engineering@conekta.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.2.0 +Generator version: 7.5.0 =end diff --git a/lib/conekta/models/charge_response_refunds.rb b/lib/conekta/models/charge_response_refunds.rb index 5b26537..b2158ba 100644 --- a/lib/conekta/models/charge_response_refunds.rb +++ b/lib/conekta/models/charge_response_refunds.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 2.1.0 Contact: engineering@conekta.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.2.0 +Generator version: 7.5.0 =end diff --git a/lib/conekta/models/charge_response_refunds_data.rb b/lib/conekta/models/charge_response_refunds_data.rb index 25f952d..ada4bbe 100644 --- a/lib/conekta/models/charge_response_refunds_data.rb +++ b/lib/conekta/models/charge_response_refunds_data.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 2.1.0 Contact: engineering@conekta.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.2.0 +Generator version: 7.5.0 =end diff --git a/lib/conekta/models/charge_update_request.rb b/lib/conekta/models/charge_update_request.rb index 1e6db38..9b8c1a8 100644 --- a/lib/conekta/models/charge_update_request.rb +++ b/lib/conekta/models/charge_update_request.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 2.1.0 Contact: engineering@conekta.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.2.0 +Generator version: 7.5.0 =end diff --git a/lib/conekta/models/charges_data_response.rb b/lib/conekta/models/charges_data_response.rb index 7f9a94d..4c10c2d 100644 --- a/lib/conekta/models/charges_data_response.rb +++ b/lib/conekta/models/charges_data_response.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 2.1.0 Contact: engineering@conekta.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.2.0 +Generator version: 7.5.0 =end diff --git a/lib/conekta/models/checkout.rb b/lib/conekta/models/checkout.rb index 91b8749..37ec894 100644 --- a/lib/conekta/models/checkout.rb +++ b/lib/conekta/models/checkout.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 2.1.0 Contact: engineering@conekta.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.2.0 +Generator version: 7.5.0 =end diff --git a/lib/conekta/models/checkout_order_template.rb b/lib/conekta/models/checkout_order_template.rb index 864ab1c..aa145cc 100644 --- a/lib/conekta/models/checkout_order_template.rb +++ b/lib/conekta/models/checkout_order_template.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 2.1.0 Contact: engineering@conekta.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.2.0 +Generator version: 7.5.0 =end diff --git a/lib/conekta/models/checkout_order_template_customer_info.rb b/lib/conekta/models/checkout_order_template_customer_info.rb index 00709d4..8783b6b 100644 --- a/lib/conekta/models/checkout_order_template_customer_info.rb +++ b/lib/conekta/models/checkout_order_template_customer_info.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 2.1.0 Contact: engineering@conekta.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.2.0 +Generator version: 7.5.0 =end @@ -89,7 +89,7 @@ def find_and_cast_into_type(klass, data) return model if model else # raise if data contains keys that are not known to the model - raise unless (data.keys - const.acceptable_attributes).empty? + raise if const.respond_to?(:acceptable_attributes) && !(data.keys - const.acceptable_attributes).empty? model = const.build_from_hash(data) return model if model end diff --git a/lib/conekta/models/checkout_request.rb b/lib/conekta/models/checkout_request.rb index 70dfd36..6060e51 100644 --- a/lib/conekta/models/checkout_request.rb +++ b/lib/conekta/models/checkout_request.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 2.1.0 Contact: engineering@conekta.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.2.0 +Generator version: 7.5.0 =end @@ -34,6 +34,9 @@ class CheckoutRequest attr_accessor :on_demand_enabled + # number of seconds to wait before redirecting to the success_url + attr_accessor :redirection_time + # Redirection url back to the site in case of successful payment, applies only to HostedPayment attr_accessor :success_url @@ -50,6 +53,7 @@ def self.attribute_map :'monthly_installments_options' => :'monthly_installments_options', :'name' => :'name', :'on_demand_enabled' => :'on_demand_enabled', + :'redirection_time' => :'redirection_time', :'success_url' => :'success_url', :'type' => :'type' } @@ -70,6 +74,7 @@ def self.openapi_types :'monthly_installments_options' => :'Array', :'name' => :'String', :'on_demand_enabled' => :'Boolean', + :'redirection_time' => :'Integer', :'success_url' => :'String', :'type' => :'String' } @@ -130,6 +135,10 @@ def initialize(attributes = {}) self.on_demand_enabled = attributes[:'on_demand_enabled'] end + if attributes.key?(:'redirection_time') + self.redirection_time = attributes[:'redirection_time'] + end + if attributes.key?(:'success_url') self.success_url = attributes[:'success_url'] end @@ -171,6 +180,7 @@ def ==(o) monthly_installments_options == o.monthly_installments_options && name == o.name && on_demand_enabled == o.on_demand_enabled && + redirection_time == o.redirection_time && success_url == o.success_url && type == o.type end @@ -184,7 +194,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [allowed_payment_methods, expires_at, failure_url, monthly_installments_enabled, monthly_installments_options, name, on_demand_enabled, success_url, type].hash + [allowed_payment_methods, expires_at, failure_url, monthly_installments_enabled, monthly_installments_options, name, on_demand_enabled, redirection_time, success_url, type].hash end # Builds the object from hash diff --git a/lib/conekta/models/checkout_response.rb b/lib/conekta/models/checkout_response.rb index 31c6af1..910c8fa 100644 --- a/lib/conekta/models/checkout_response.rb +++ b/lib/conekta/models/checkout_response.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 2.1.0 Contact: engineering@conekta.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.2.0 +Generator version: 7.5.0 =end diff --git a/lib/conekta/models/checkouts_response.rb b/lib/conekta/models/checkouts_response.rb index bd959ef..48fc460 100644 --- a/lib/conekta/models/checkouts_response.rb +++ b/lib/conekta/models/checkouts_response.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 2.1.0 Contact: engineering@conekta.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.2.0 +Generator version: 7.5.0 =end diff --git a/lib/conekta/models/company_fiscal_info_address_response.rb b/lib/conekta/models/company_fiscal_info_address_response.rb index f356711..9acb841 100644 --- a/lib/conekta/models/company_fiscal_info_address_response.rb +++ b/lib/conekta/models/company_fiscal_info_address_response.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 2.1.0 Contact: engineering@conekta.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.2.0 +Generator version: 7.5.0 =end diff --git a/lib/conekta/models/company_fiscal_info_response.rb b/lib/conekta/models/company_fiscal_info_response.rb index ac6c537..de83112 100644 --- a/lib/conekta/models/company_fiscal_info_response.rb +++ b/lib/conekta/models/company_fiscal_info_response.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 2.1.0 Contact: engineering@conekta.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.2.0 +Generator version: 7.5.0 =end diff --git a/lib/conekta/models/company_payout_destination_response.rb b/lib/conekta/models/company_payout_destination_response.rb index 5866ae7..7f5c1ea 100644 --- a/lib/conekta/models/company_payout_destination_response.rb +++ b/lib/conekta/models/company_payout_destination_response.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 2.1.0 Contact: engineering@conekta.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.2.0 +Generator version: 7.5.0 =end diff --git a/lib/conekta/models/company_response.rb b/lib/conekta/models/company_response.rb index 130481d..3da1588 100644 --- a/lib/conekta/models/company_response.rb +++ b/lib/conekta/models/company_response.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 2.1.0 Contact: engineering@conekta.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.2.0 +Generator version: 7.5.0 =end diff --git a/lib/conekta/models/create_customer_fiscal_entities_response.rb b/lib/conekta/models/create_customer_fiscal_entities_response.rb index bded0d4..0656d46 100644 --- a/lib/conekta/models/create_customer_fiscal_entities_response.rb +++ b/lib/conekta/models/create_customer_fiscal_entities_response.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 2.1.0 Contact: engineering@conekta.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.2.0 +Generator version: 7.5.0 =end diff --git a/lib/conekta/models/create_customer_payment_methods_request.rb b/lib/conekta/models/create_customer_payment_methods_request.rb index 11b5cf9..1e277a7 100644 --- a/lib/conekta/models/create_customer_payment_methods_request.rb +++ b/lib/conekta/models/create_customer_payment_methods_request.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 2.1.0 Contact: engineering@conekta.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.2.0 +Generator version: 7.5.0 =end @@ -90,7 +90,7 @@ def find_and_cast_into_type(klass, data) return model if model else # raise if data contains keys that are not known to the model - raise unless (data.keys - const.acceptable_attributes).empty? + raise if const.respond_to?(:acceptable_attributes) && !(data.keys - const.acceptable_attributes).empty? model = const.build_from_hash(data) return model if model end diff --git a/lib/conekta/models/create_customer_payment_methods_response.rb b/lib/conekta/models/create_customer_payment_methods_response.rb index a52d0e2..eed0542 100644 --- a/lib/conekta/models/create_customer_payment_methods_response.rb +++ b/lib/conekta/models/create_customer_payment_methods_response.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 2.1.0 Contact: engineering@conekta.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.2.0 +Generator version: 7.5.0 =end diff --git a/lib/conekta/models/create_risk_rules_data.rb b/lib/conekta/models/create_risk_rules_data.rb index 91d2a7f..07ca27e 100644 --- a/lib/conekta/models/create_risk_rules_data.rb +++ b/lib/conekta/models/create_risk_rules_data.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 2.1.0 Contact: engineering@conekta.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.2.0 +Generator version: 7.5.0 =end diff --git a/lib/conekta/models/customer.rb b/lib/conekta/models/customer.rb index bf6256c..3f21a98 100644 --- a/lib/conekta/models/customer.rb +++ b/lib/conekta/models/customer.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 2.1.0 Contact: engineering@conekta.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.2.0 +Generator version: 7.5.0 =end diff --git a/lib/conekta/models/customer_address.rb b/lib/conekta/models/customer_address.rb index 3fa2265..a8abc25 100644 --- a/lib/conekta/models/customer_address.rb +++ b/lib/conekta/models/customer_address.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 2.1.0 Contact: engineering@conekta.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.2.0 +Generator version: 7.5.0 =end diff --git a/lib/conekta/models/customer_antifraud_info.rb b/lib/conekta/models/customer_antifraud_info.rb index 8bc7f6e..99f33bd 100644 --- a/lib/conekta/models/customer_antifraud_info.rb +++ b/lib/conekta/models/customer_antifraud_info.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 2.1.0 Contact: engineering@conekta.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.2.0 +Generator version: 7.5.0 =end diff --git a/lib/conekta/models/customer_antifraud_info_response.rb b/lib/conekta/models/customer_antifraud_info_response.rb index f689545..aad0f6f 100644 --- a/lib/conekta/models/customer_antifraud_info_response.rb +++ b/lib/conekta/models/customer_antifraud_info_response.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 2.1.0 Contact: engineering@conekta.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.2.0 +Generator version: 7.5.0 =end diff --git a/lib/conekta/models/customer_fiscal_entities_data_response.rb b/lib/conekta/models/customer_fiscal_entities_data_response.rb index aea4476..6ec48cd 100644 --- a/lib/conekta/models/customer_fiscal_entities_data_response.rb +++ b/lib/conekta/models/customer_fiscal_entities_data_response.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 2.1.0 Contact: engineering@conekta.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.2.0 +Generator version: 7.5.0 =end diff --git a/lib/conekta/models/customer_fiscal_entities_request.rb b/lib/conekta/models/customer_fiscal_entities_request.rb index 1e89390..08aff74 100644 --- a/lib/conekta/models/customer_fiscal_entities_request.rb +++ b/lib/conekta/models/customer_fiscal_entities_request.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 2.1.0 Contact: engineering@conekta.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.2.0 +Generator version: 7.5.0 =end diff --git a/lib/conekta/models/customer_fiscal_entities_response.rb b/lib/conekta/models/customer_fiscal_entities_response.rb index a991581..e651780 100644 --- a/lib/conekta/models/customer_fiscal_entities_response.rb +++ b/lib/conekta/models/customer_fiscal_entities_response.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 2.1.0 Contact: engineering@conekta.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.2.0 +Generator version: 7.5.0 =end diff --git a/lib/conekta/models/customer_info.rb b/lib/conekta/models/customer_info.rb index 92b35e6..caa4bc9 100644 --- a/lib/conekta/models/customer_info.rb +++ b/lib/conekta/models/customer_info.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 2.1.0 Contact: engineering@conekta.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.2.0 +Generator version: 7.5.0 =end diff --git a/lib/conekta/models/customer_info_just_customer_id.rb b/lib/conekta/models/customer_info_just_customer_id.rb index f29e946..ef3c5b5 100644 --- a/lib/conekta/models/customer_info_just_customer_id.rb +++ b/lib/conekta/models/customer_info_just_customer_id.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 2.1.0 Contact: engineering@conekta.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.2.0 +Generator version: 7.5.0 =end diff --git a/lib/conekta/models/customer_info_just_customer_id_response.rb b/lib/conekta/models/customer_info_just_customer_id_response.rb index 1a89f0d..c039b2d 100644 --- a/lib/conekta/models/customer_info_just_customer_id_response.rb +++ b/lib/conekta/models/customer_info_just_customer_id_response.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 2.1.0 Contact: engineering@conekta.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.2.0 +Generator version: 7.5.0 =end diff --git a/lib/conekta/models/customer_payment_method_request.rb b/lib/conekta/models/customer_payment_method_request.rb index 92ada4d..cc4d2ce 100644 --- a/lib/conekta/models/customer_payment_method_request.rb +++ b/lib/conekta/models/customer_payment_method_request.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 2.1.0 Contact: engineering@conekta.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.2.0 +Generator version: 7.5.0 =end diff --git a/lib/conekta/models/customer_payment_methods_data.rb b/lib/conekta/models/customer_payment_methods_data.rb index 5fe76ea..fa8b389 100644 --- a/lib/conekta/models/customer_payment_methods_data.rb +++ b/lib/conekta/models/customer_payment_methods_data.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 2.1.0 Contact: engineering@conekta.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.2.0 +Generator version: 7.5.0 =end diff --git a/lib/conekta/models/customer_payment_methods_request.rb b/lib/conekta/models/customer_payment_methods_request.rb index 0b439f3..9c00fa5 100644 --- a/lib/conekta/models/customer_payment_methods_request.rb +++ b/lib/conekta/models/customer_payment_methods_request.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 2.1.0 Contact: engineering@conekta.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.2.0 +Generator version: 7.5.0 =end @@ -89,7 +89,7 @@ def find_and_cast_into_type(klass, data) return model if model else # raise if data contains keys that are not known to the model - raise unless (data.keys - const.acceptable_attributes).empty? + raise if const.respond_to?(:acceptable_attributes) && !(data.keys - const.acceptable_attributes).empty? model = const.build_from_hash(data) return model if model end diff --git a/lib/conekta/models/customer_payment_methods_response.rb b/lib/conekta/models/customer_payment_methods_response.rb index cb3ff37..ffd3049 100644 --- a/lib/conekta/models/customer_payment_methods_response.rb +++ b/lib/conekta/models/customer_payment_methods_response.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 2.1.0 Contact: engineering@conekta.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.2.0 +Generator version: 7.5.0 =end diff --git a/lib/conekta/models/customer_response.rb b/lib/conekta/models/customer_response.rb index cf4a277..0a56088 100644 --- a/lib/conekta/models/customer_response.rb +++ b/lib/conekta/models/customer_response.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 2.1.0 Contact: engineering@conekta.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.2.0 +Generator version: 7.5.0 =end diff --git a/lib/conekta/models/customer_response_shipping_contacts.rb b/lib/conekta/models/customer_response_shipping_contacts.rb index b547e63..0942f77 100644 --- a/lib/conekta/models/customer_response_shipping_contacts.rb +++ b/lib/conekta/models/customer_response_shipping_contacts.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 2.1.0 Contact: engineering@conekta.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.2.0 +Generator version: 7.5.0 =end diff --git a/lib/conekta/models/customer_shipping_contacts.rb b/lib/conekta/models/customer_shipping_contacts.rb index e2617cc..bf465e5 100644 --- a/lib/conekta/models/customer_shipping_contacts.rb +++ b/lib/conekta/models/customer_shipping_contacts.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 2.1.0 Contact: engineering@conekta.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.2.0 +Generator version: 7.5.0 =end diff --git a/lib/conekta/models/customer_shipping_contacts_address.rb b/lib/conekta/models/customer_shipping_contacts_address.rb index 68a0a7a..55961d5 100644 --- a/lib/conekta/models/customer_shipping_contacts_address.rb +++ b/lib/conekta/models/customer_shipping_contacts_address.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 2.1.0 Contact: engineering@conekta.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.2.0 +Generator version: 7.5.0 =end diff --git a/lib/conekta/models/customer_shipping_contacts_data_response.rb b/lib/conekta/models/customer_shipping_contacts_data_response.rb index a130aef..8ecafca 100644 --- a/lib/conekta/models/customer_shipping_contacts_data_response.rb +++ b/lib/conekta/models/customer_shipping_contacts_data_response.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 2.1.0 Contact: engineering@conekta.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.2.0 +Generator version: 7.5.0 =end diff --git a/lib/conekta/models/customer_shipping_contacts_response.rb b/lib/conekta/models/customer_shipping_contacts_response.rb index b5f3fae..59dac4b 100644 --- a/lib/conekta/models/customer_shipping_contacts_response.rb +++ b/lib/conekta/models/customer_shipping_contacts_response.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 2.1.0 Contact: engineering@conekta.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.2.0 +Generator version: 7.5.0 =end diff --git a/lib/conekta/models/customer_shipping_contacts_response_address.rb b/lib/conekta/models/customer_shipping_contacts_response_address.rb index 84ecea1..5a8827f 100644 --- a/lib/conekta/models/customer_shipping_contacts_response_address.rb +++ b/lib/conekta/models/customer_shipping_contacts_response_address.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 2.1.0 Contact: engineering@conekta.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.2.0 +Generator version: 7.5.0 =end diff --git a/lib/conekta/models/customer_update_fiscal_entities_request.rb b/lib/conekta/models/customer_update_fiscal_entities_request.rb index 5ecb31d..1fe3556 100644 --- a/lib/conekta/models/customer_update_fiscal_entities_request.rb +++ b/lib/conekta/models/customer_update_fiscal_entities_request.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 2.1.0 Contact: engineering@conekta.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.2.0 +Generator version: 7.5.0 =end diff --git a/lib/conekta/models/customer_update_shipping_contacts.rb b/lib/conekta/models/customer_update_shipping_contacts.rb index 112ccea..e0b0665 100644 --- a/lib/conekta/models/customer_update_shipping_contacts.rb +++ b/lib/conekta/models/customer_update_shipping_contacts.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 2.1.0 Contact: engineering@conekta.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.2.0 +Generator version: 7.5.0 =end diff --git a/lib/conekta/models/customers_response.rb b/lib/conekta/models/customers_response.rb index 789a820..4242caf 100644 --- a/lib/conekta/models/customers_response.rb +++ b/lib/conekta/models/customers_response.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 2.1.0 Contact: engineering@conekta.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.2.0 +Generator version: 7.5.0 =end diff --git a/lib/conekta/models/delete_api_keys_response.rb b/lib/conekta/models/delete_api_keys_response.rb index bea0f48..eaac365 100644 --- a/lib/conekta/models/delete_api_keys_response.rb +++ b/lib/conekta/models/delete_api_keys_response.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 2.1.0 Contact: engineering@conekta.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.2.0 +Generator version: 7.5.0 =end diff --git a/lib/conekta/models/deleted_blacklist_rule_response.rb b/lib/conekta/models/deleted_blacklist_rule_response.rb index 2d38b55..a083a0a 100644 --- a/lib/conekta/models/deleted_blacklist_rule_response.rb +++ b/lib/conekta/models/deleted_blacklist_rule_response.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 2.1.0 Contact: engineering@conekta.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.2.0 +Generator version: 7.5.0 =end diff --git a/lib/conekta/models/deleted_whitelist_rule_response.rb b/lib/conekta/models/deleted_whitelist_rule_response.rb index 2487e23..8fdf27d 100644 --- a/lib/conekta/models/deleted_whitelist_rule_response.rb +++ b/lib/conekta/models/deleted_whitelist_rule_response.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 2.1.0 Contact: engineering@conekta.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.2.0 +Generator version: 7.5.0 =end diff --git a/lib/conekta/models/details.rb b/lib/conekta/models/details.rb index 4d592f3..62ea99a 100644 --- a/lib/conekta/models/details.rb +++ b/lib/conekta/models/details.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 2.1.0 Contact: engineering@conekta.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.2.0 +Generator version: 7.5.0 =end diff --git a/lib/conekta/models/details_error.rb b/lib/conekta/models/details_error.rb index 461751c..d18eb28 100644 --- a/lib/conekta/models/details_error.rb +++ b/lib/conekta/models/details_error.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 2.1.0 Contact: engineering@conekta.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.2.0 +Generator version: 7.5.0 =end diff --git a/lib/conekta/models/discount_lines_data_response.rb b/lib/conekta/models/discount_lines_data_response.rb index 1d8a08e..a6bb596 100644 --- a/lib/conekta/models/discount_lines_data_response.rb +++ b/lib/conekta/models/discount_lines_data_response.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 2.1.0 Contact: engineering@conekta.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.2.0 +Generator version: 7.5.0 =end diff --git a/lib/conekta/models/discount_lines_response.rb b/lib/conekta/models/discount_lines_response.rb index b9f30d4..1637632 100644 --- a/lib/conekta/models/discount_lines_response.rb +++ b/lib/conekta/models/discount_lines_response.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 2.1.0 Contact: engineering@conekta.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.2.0 +Generator version: 7.5.0 =end diff --git a/lib/conekta/models/email_checkout_request.rb b/lib/conekta/models/email_checkout_request.rb index d998ddd..a413853 100644 --- a/lib/conekta/models/email_checkout_request.rb +++ b/lib/conekta/models/email_checkout_request.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 2.1.0 Contact: engineering@conekta.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.2.0 +Generator version: 7.5.0 =end diff --git a/lib/conekta/models/error.rb b/lib/conekta/models/error.rb index b096876..d0883c4 100644 --- a/lib/conekta/models/error.rb +++ b/lib/conekta/models/error.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 2.1.0 Contact: engineering@conekta.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.2.0 +Generator version: 7.5.0 =end diff --git a/lib/conekta/models/event_response.rb b/lib/conekta/models/event_response.rb index 22711ff..2df75ac 100644 --- a/lib/conekta/models/event_response.rb +++ b/lib/conekta/models/event_response.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 2.1.0 Contact: engineering@conekta.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.2.0 +Generator version: 7.5.0 =end diff --git a/lib/conekta/models/event_types.rb b/lib/conekta/models/event_types.rb new file mode 100644 index 0000000..75e3972 --- /dev/null +++ b/lib/conekta/models/event_types.rb @@ -0,0 +1,43 @@ +=begin +#Conekta API + +#Conekta sdk + +The version of the OpenAPI document: 2.1.0 +Contact: engineering@conekta.com +Generated by: https://openapi-generator.tech +Generator version: 7.5.0 + +=end + +require 'date' +require 'time' + +module Conekta + class EventTypes + WEBHOOK_PING = "webhook_ping".freeze + ORDER_PAID = "order.paid".freeze + ORDER_EXPIRED = "order.expired".freeze + ORDER_CANCELED = "order.canceled".freeze + ORDER_PENDING_PAYMENT = "order.pending_payment".freeze + + def self.all_vars + @all_vars ||= [WEBHOOK_PING, ORDER_PAID, ORDER_EXPIRED, ORDER_CANCELED, ORDER_PENDING_PAYMENT].freeze + end + + # Builds the enum from string + # @param [String] The enum value in the form of the string + # @return [String] The enum value + def self.build_from_hash(value) + new.build_from_hash(value) + end + + # Builds the enum from string + # @param [String] The enum value in the form of the string + # @return [String] The enum value + def build_from_hash(value) + return value if EventTypes.all_vars.include?(value) + raise "Invalid ENUM value #{value} for class #EventTypes" + end + end +end diff --git a/lib/conekta/models/events_resend_response.rb b/lib/conekta/models/events_resend_response.rb index ccbd5b6..e1f3945 100644 --- a/lib/conekta/models/events_resend_response.rb +++ b/lib/conekta/models/events_resend_response.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 2.1.0 Contact: engineering@conekta.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.2.0 +Generator version: 7.5.0 =end diff --git a/lib/conekta/models/fiscal_entity_address.rb b/lib/conekta/models/fiscal_entity_address.rb index ce7c6b6..c383eb5 100644 --- a/lib/conekta/models/fiscal_entity_address.rb +++ b/lib/conekta/models/fiscal_entity_address.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 2.1.0 Contact: engineering@conekta.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.2.0 +Generator version: 7.5.0 =end diff --git a/lib/conekta/models/get_api_keys_response.rb b/lib/conekta/models/get_api_keys_response.rb index 7aef8fd..c240f3e 100644 --- a/lib/conekta/models/get_api_keys_response.rb +++ b/lib/conekta/models/get_api_keys_response.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 2.1.0 Contact: engineering@conekta.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.2.0 +Generator version: 7.5.0 =end diff --git a/lib/conekta/models/get_charges_response.rb b/lib/conekta/models/get_charges_response.rb index 373b6c8..eb5f18a 100644 --- a/lib/conekta/models/get_charges_response.rb +++ b/lib/conekta/models/get_charges_response.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 2.1.0 Contact: engineering@conekta.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.2.0 +Generator version: 7.5.0 =end diff --git a/lib/conekta/models/get_companies_response.rb b/lib/conekta/models/get_companies_response.rb index 6bda8d2..3e79155 100644 --- a/lib/conekta/models/get_companies_response.rb +++ b/lib/conekta/models/get_companies_response.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 2.1.0 Contact: engineering@conekta.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.2.0 +Generator version: 7.5.0 =end diff --git a/lib/conekta/models/get_customer_payment_method_data_response.rb b/lib/conekta/models/get_customer_payment_method_data_response.rb index 48240d5..6653e99 100644 --- a/lib/conekta/models/get_customer_payment_method_data_response.rb +++ b/lib/conekta/models/get_customer_payment_method_data_response.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 2.1.0 Contact: engineering@conekta.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.2.0 +Generator version: 7.5.0 =end diff --git a/lib/conekta/models/get_events_response.rb b/lib/conekta/models/get_events_response.rb index 9ed4c2a..db6e96f 100644 --- a/lib/conekta/models/get_events_response.rb +++ b/lib/conekta/models/get_events_response.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 2.1.0 Contact: engineering@conekta.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.2.0 +Generator version: 7.5.0 =end diff --git a/lib/conekta/models/get_order_discount_lines_response.rb b/lib/conekta/models/get_order_discount_lines_response.rb index 5379cfa..f6a5823 100644 --- a/lib/conekta/models/get_order_discount_lines_response.rb +++ b/lib/conekta/models/get_order_discount_lines_response.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 2.1.0 Contact: engineering@conekta.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.2.0 +Generator version: 7.5.0 =end diff --git a/lib/conekta/models/get_orders_response.rb b/lib/conekta/models/get_orders_response.rb index 78292d6..2801e9b 100644 --- a/lib/conekta/models/get_orders_response.rb +++ b/lib/conekta/models/get_orders_response.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 2.1.0 Contact: engineering@conekta.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.2.0 +Generator version: 7.5.0 =end diff --git a/lib/conekta/models/get_payment_method_response.rb b/lib/conekta/models/get_payment_method_response.rb index 0d6ce74..b49b448 100644 --- a/lib/conekta/models/get_payment_method_response.rb +++ b/lib/conekta/models/get_payment_method_response.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 2.1.0 Contact: engineering@conekta.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.2.0 +Generator version: 7.5.0 =end diff --git a/lib/conekta/models/get_plans_response.rb b/lib/conekta/models/get_plans_response.rb index 5e0af1c..31f3d06 100644 --- a/lib/conekta/models/get_plans_response.rb +++ b/lib/conekta/models/get_plans_response.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 2.1.0 Contact: engineering@conekta.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.2.0 +Generator version: 7.5.0 =end diff --git a/lib/conekta/models/get_transactions_response.rb b/lib/conekta/models/get_transactions_response.rb index 078b199..55fd06f 100644 --- a/lib/conekta/models/get_transactions_response.rb +++ b/lib/conekta/models/get_transactions_response.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 2.1.0 Contact: engineering@conekta.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.2.0 +Generator version: 7.5.0 =end diff --git a/lib/conekta/models/get_transfers_response.rb b/lib/conekta/models/get_transfers_response.rb index 2c37f5c..3b79c2d 100644 --- a/lib/conekta/models/get_transfers_response.rb +++ b/lib/conekta/models/get_transfers_response.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 2.1.0 Contact: engineering@conekta.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.2.0 +Generator version: 7.5.0 =end diff --git a/lib/conekta/models/get_webhook_keys_response.rb b/lib/conekta/models/get_webhook_keys_response.rb index 934364a..bf174b9 100644 --- a/lib/conekta/models/get_webhook_keys_response.rb +++ b/lib/conekta/models/get_webhook_keys_response.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 2.1.0 Contact: engineering@conekta.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.2.0 +Generator version: 7.5.0 =end diff --git a/lib/conekta/models/get_webhooks_response.rb b/lib/conekta/models/get_webhooks_response.rb index e3aef48..3d52e6b 100644 --- a/lib/conekta/models/get_webhooks_response.rb +++ b/lib/conekta/models/get_webhooks_response.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 2.1.0 Contact: engineering@conekta.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.2.0 +Generator version: 7.5.0 =end diff --git a/lib/conekta/models/log_response.rb b/lib/conekta/models/log_response.rb index 165c0b9..c9030cc 100644 --- a/lib/conekta/models/log_response.rb +++ b/lib/conekta/models/log_response.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 2.1.0 Contact: engineering@conekta.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.2.0 +Generator version: 7.5.0 =end diff --git a/lib/conekta/models/logs_response.rb b/lib/conekta/models/logs_response.rb index 26ff884..20aedc9 100644 --- a/lib/conekta/models/logs_response.rb +++ b/lib/conekta/models/logs_response.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 2.1.0 Contact: engineering@conekta.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.2.0 +Generator version: 7.5.0 =end diff --git a/lib/conekta/models/logs_response_data.rb b/lib/conekta/models/logs_response_data.rb index 27e2a3f..2826ae7 100644 --- a/lib/conekta/models/logs_response_data.rb +++ b/lib/conekta/models/logs_response_data.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 2.1.0 Contact: engineering@conekta.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.2.0 +Generator version: 7.5.0 =end diff --git a/lib/conekta/models/order_capture_request.rb b/lib/conekta/models/order_capture_request.rb index 5fedb9f..4a33c40 100644 --- a/lib/conekta/models/order_capture_request.rb +++ b/lib/conekta/models/order_capture_request.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 2.1.0 Contact: engineering@conekta.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.2.0 +Generator version: 7.5.0 =end diff --git a/lib/conekta/models/order_customer_info_response.rb b/lib/conekta/models/order_customer_info_response.rb index 9e6fbb1..fc58ece 100644 --- a/lib/conekta/models/order_customer_info_response.rb +++ b/lib/conekta/models/order_customer_info_response.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 2.1.0 Contact: engineering@conekta.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.2.0 +Generator version: 7.5.0 =end diff --git a/lib/conekta/models/order_discount_lines_request.rb b/lib/conekta/models/order_discount_lines_request.rb index f71d1fb..4035de5 100644 --- a/lib/conekta/models/order_discount_lines_request.rb +++ b/lib/conekta/models/order_discount_lines_request.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 2.1.0 Contact: engineering@conekta.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.2.0 +Generator version: 7.5.0 =end diff --git a/lib/conekta/models/order_fiscal_entity_address_response.rb b/lib/conekta/models/order_fiscal_entity_address_response.rb index 827e43b..debb18b 100644 --- a/lib/conekta/models/order_fiscal_entity_address_response.rb +++ b/lib/conekta/models/order_fiscal_entity_address_response.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 2.1.0 Contact: engineering@conekta.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.2.0 +Generator version: 7.5.0 =end diff --git a/lib/conekta/models/order_fiscal_entity_request.rb b/lib/conekta/models/order_fiscal_entity_request.rb index 82edc0b..296b942 100644 --- a/lib/conekta/models/order_fiscal_entity_request.rb +++ b/lib/conekta/models/order_fiscal_entity_request.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 2.1.0 Contact: engineering@conekta.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.2.0 +Generator version: 7.5.0 =end diff --git a/lib/conekta/models/order_fiscal_entity_response.rb b/lib/conekta/models/order_fiscal_entity_response.rb index 6426f6b..04c4f8b 100644 --- a/lib/conekta/models/order_fiscal_entity_response.rb +++ b/lib/conekta/models/order_fiscal_entity_response.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 2.1.0 Contact: engineering@conekta.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.2.0 +Generator version: 7.5.0 =end diff --git a/lib/conekta/models/order_next_action_response.rb b/lib/conekta/models/order_next_action_response.rb index e85c5fe..7daabe3 100644 --- a/lib/conekta/models/order_next_action_response.rb +++ b/lib/conekta/models/order_next_action_response.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 2.1.0 Contact: engineering@conekta.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.2.0 +Generator version: 7.5.0 =end diff --git a/lib/conekta/models/order_next_action_response_redirect_to_url.rb b/lib/conekta/models/order_next_action_response_redirect_to_url.rb index 59329a8..257d98b 100644 --- a/lib/conekta/models/order_next_action_response_redirect_to_url.rb +++ b/lib/conekta/models/order_next_action_response_redirect_to_url.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 2.1.0 Contact: engineering@conekta.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.2.0 +Generator version: 7.5.0 =end diff --git a/lib/conekta/models/order_refund_request.rb b/lib/conekta/models/order_refund_request.rb index ffc8e39..0675953 100644 --- a/lib/conekta/models/order_refund_request.rb +++ b/lib/conekta/models/order_refund_request.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 2.1.0 Contact: engineering@conekta.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.2.0 +Generator version: 7.5.0 =end diff --git a/lib/conekta/models/order_request.rb b/lib/conekta/models/order_request.rb index e28f090..954b6a1 100644 --- a/lib/conekta/models/order_request.rb +++ b/lib/conekta/models/order_request.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 2.1.0 Contact: engineering@conekta.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.2.0 +Generator version: 7.5.0 =end diff --git a/lib/conekta/models/order_request_customer_info.rb b/lib/conekta/models/order_request_customer_info.rb index 3808256..bb6b451 100644 --- a/lib/conekta/models/order_request_customer_info.rb +++ b/lib/conekta/models/order_request_customer_info.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 2.1.0 Contact: engineering@conekta.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.2.0 +Generator version: 7.5.0 =end @@ -89,7 +89,7 @@ def find_and_cast_into_type(klass, data) return model if model else # raise if data contains keys that are not known to the model - raise unless (data.keys - const.acceptable_attributes).empty? + raise if const.respond_to?(:acceptable_attributes) && !(data.keys - const.acceptable_attributes).empty? model = const.build_from_hash(data) return model if model end diff --git a/lib/conekta/models/order_response.rb b/lib/conekta/models/order_response.rb index 696b20b..b4319ad 100644 --- a/lib/conekta/models/order_response.rb +++ b/lib/conekta/models/order_response.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 2.1.0 Contact: engineering@conekta.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.2.0 +Generator version: 7.5.0 =end diff --git a/lib/conekta/models/order_response_charges.rb b/lib/conekta/models/order_response_charges.rb index a1a3fd4..5f74f71 100644 --- a/lib/conekta/models/order_response_charges.rb +++ b/lib/conekta/models/order_response_charges.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 2.1.0 Contact: engineering@conekta.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.2.0 +Generator version: 7.5.0 =end diff --git a/lib/conekta/models/order_response_checkout.rb b/lib/conekta/models/order_response_checkout.rb index 66edbcb..82507f2 100644 --- a/lib/conekta/models/order_response_checkout.rb +++ b/lib/conekta/models/order_response_checkout.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 2.1.0 Contact: engineering@conekta.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.2.0 +Generator version: 7.5.0 =end @@ -53,6 +53,9 @@ class OrderResponseCheckout attr_accessor :recurrent + # number of seconds to wait before redirecting to the success_url + attr_accessor :redirection_time + attr_accessor :slug attr_accessor :sms_sent @@ -89,6 +92,7 @@ def self.attribute_map :'on_demand_enabled' => :'on_demand_enabled', :'paid_payments_count' => :'paid_payments_count', :'recurrent' => :'recurrent', + :'redirection_time' => :'redirection_time', :'slug' => :'slug', :'sms_sent' => :'sms_sent', :'success_url' => :'success_url', @@ -126,6 +130,7 @@ def self.openapi_types :'on_demand_enabled' => :'Boolean', :'paid_payments_count' => :'Integer', :'recurrent' => :'Boolean', + :'redirection_time' => :'Integer', :'slug' => :'String', :'sms_sent' => :'Integer', :'success_url' => :'String', @@ -140,6 +145,7 @@ def self.openapi_types def self.openapi_nullable Set.new([ :'on_demand_enabled', + :'redirection_time', ]) end @@ -242,6 +248,10 @@ def initialize(attributes = {}) self.recurrent = attributes[:'recurrent'] end + if attributes.key?(:'redirection_time') + self.redirection_time = attributes[:'redirection_time'] + end + if attributes.key?(:'slug') self.slug = attributes[:'slug'] end @@ -329,6 +339,7 @@ def ==(o) on_demand_enabled == o.on_demand_enabled && paid_payments_count == o.paid_payments_count && recurrent == o.recurrent && + redirection_time == o.redirection_time && slug == o.slug && sms_sent == o.sms_sent && success_url == o.success_url && @@ -347,7 +358,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [allowed_payment_methods, can_not_expire, emails_sent, exclude_card_networks, expires_at, failure_url, force_3ds_flow, id, is_redirect_on_failure, livemode, metadata, monthly_installments_enabled, monthly_installments_options, name, needs_shipping_contact, object, on_demand_enabled, paid_payments_count, recurrent, slug, sms_sent, success_url, starts_at, status, type, url].hash + [allowed_payment_methods, can_not_expire, emails_sent, exclude_card_networks, expires_at, failure_url, force_3ds_flow, id, is_redirect_on_failure, livemode, metadata, monthly_installments_enabled, monthly_installments_options, name, needs_shipping_contact, object, on_demand_enabled, paid_payments_count, recurrent, redirection_time, slug, sms_sent, success_url, starts_at, status, type, url].hash end # Builds the object from hash diff --git a/lib/conekta/models/order_response_customer_info.rb b/lib/conekta/models/order_response_customer_info.rb index 2fdc72a..e448924 100644 --- a/lib/conekta/models/order_response_customer_info.rb +++ b/lib/conekta/models/order_response_customer_info.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 2.1.0 Contact: engineering@conekta.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.2.0 +Generator version: 7.5.0 =end diff --git a/lib/conekta/models/order_response_discount_lines.rb b/lib/conekta/models/order_response_discount_lines.rb index 632b2cd..1c938c6 100644 --- a/lib/conekta/models/order_response_discount_lines.rb +++ b/lib/conekta/models/order_response_discount_lines.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 2.1.0 Contact: engineering@conekta.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.2.0 +Generator version: 7.5.0 =end diff --git a/lib/conekta/models/order_response_products.rb b/lib/conekta/models/order_response_products.rb index b097b00..9345486 100644 --- a/lib/conekta/models/order_response_products.rb +++ b/lib/conekta/models/order_response_products.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 2.1.0 Contact: engineering@conekta.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.2.0 +Generator version: 7.5.0 =end diff --git a/lib/conekta/models/order_response_shipping_contact.rb b/lib/conekta/models/order_response_shipping_contact.rb index 9177690..0e7acc9 100644 --- a/lib/conekta/models/order_response_shipping_contact.rb +++ b/lib/conekta/models/order_response_shipping_contact.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 2.1.0 Contact: engineering@conekta.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.2.0 +Generator version: 7.5.0 =end diff --git a/lib/conekta/models/order_tax_request.rb b/lib/conekta/models/order_tax_request.rb index cb32f69..4822a0f 100644 --- a/lib/conekta/models/order_tax_request.rb +++ b/lib/conekta/models/order_tax_request.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 2.1.0 Contact: engineering@conekta.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.2.0 +Generator version: 7.5.0 =end diff --git a/lib/conekta/models/order_update_fiscal_entity_request.rb b/lib/conekta/models/order_update_fiscal_entity_request.rb index bc4a459..4d52b3b 100644 --- a/lib/conekta/models/order_update_fiscal_entity_request.rb +++ b/lib/conekta/models/order_update_fiscal_entity_request.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 2.1.0 Contact: engineering@conekta.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.2.0 +Generator version: 7.5.0 =end diff --git a/lib/conekta/models/order_update_request.rb b/lib/conekta/models/order_update_request.rb index 8ea0b86..674ce4e 100644 --- a/lib/conekta/models/order_update_request.rb +++ b/lib/conekta/models/order_update_request.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 2.1.0 Contact: engineering@conekta.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.2.0 +Generator version: 7.5.0 =end diff --git a/lib/conekta/models/order_update_request_customer_info.rb b/lib/conekta/models/order_update_request_customer_info.rb index 34d8e22..b542462 100644 --- a/lib/conekta/models/order_update_request_customer_info.rb +++ b/lib/conekta/models/order_update_request_customer_info.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 2.1.0 Contact: engineering@conekta.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.2.0 +Generator version: 7.5.0 =end @@ -88,7 +88,7 @@ def find_and_cast_into_type(klass, data) return model if model else # raise if data contains keys that are not known to the model - raise unless (data.keys - const.acceptable_attributes).empty? + raise if const.respond_to?(:acceptable_attributes) && !(data.keys - const.acceptable_attributes).empty? model = const.build_from_hash(data) return model if model end diff --git a/lib/conekta/models/orders_response.rb b/lib/conekta/models/orders_response.rb index fa5910e..cd6907c 100644 --- a/lib/conekta/models/orders_response.rb +++ b/lib/conekta/models/orders_response.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 2.1.0 Contact: engineering@conekta.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.2.0 +Generator version: 7.5.0 =end diff --git a/lib/conekta/models/page.rb b/lib/conekta/models/page.rb index 767d666..e794dd6 100644 --- a/lib/conekta/models/page.rb +++ b/lib/conekta/models/page.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 2.1.0 Contact: engineering@conekta.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.2.0 +Generator version: 7.5.0 =end diff --git a/lib/conekta/models/pagination.rb b/lib/conekta/models/pagination.rb index b48b87f..56c124d 100644 --- a/lib/conekta/models/pagination.rb +++ b/lib/conekta/models/pagination.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 2.1.0 Contact: engineering@conekta.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.2.0 +Generator version: 7.5.0 =end diff --git a/lib/conekta/models/payment_method.rb b/lib/conekta/models/payment_method.rb index 2b52c30..cf0b223 100644 --- a/lib/conekta/models/payment_method.rb +++ b/lib/conekta/models/payment_method.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 2.1.0 Contact: engineering@conekta.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.2.0 +Generator version: 7.5.0 =end diff --git a/lib/conekta/models/payment_method_bank_transfer.rb b/lib/conekta/models/payment_method_bank_transfer.rb index dd72782..e60d15c 100644 --- a/lib/conekta/models/payment_method_bank_transfer.rb +++ b/lib/conekta/models/payment_method_bank_transfer.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 2.1.0 Contact: engineering@conekta.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.2.0 +Generator version: 7.5.0 =end diff --git a/lib/conekta/models/payment_method_card.rb b/lib/conekta/models/payment_method_card.rb index 7def535..341911d 100644 --- a/lib/conekta/models/payment_method_card.rb +++ b/lib/conekta/models/payment_method_card.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 2.1.0 Contact: engineering@conekta.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.2.0 +Generator version: 7.5.0 =end diff --git a/lib/conekta/models/payment_method_card_request.rb b/lib/conekta/models/payment_method_card_request.rb index cd91961..5cf3507 100644 --- a/lib/conekta/models/payment_method_card_request.rb +++ b/lib/conekta/models/payment_method_card_request.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 2.1.0 Contact: engineering@conekta.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.2.0 +Generator version: 7.5.0 =end diff --git a/lib/conekta/models/payment_method_card_response.rb b/lib/conekta/models/payment_method_card_response.rb index 57c10cc..6219c0f 100644 --- a/lib/conekta/models/payment_method_card_response.rb +++ b/lib/conekta/models/payment_method_card_response.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 2.1.0 Contact: engineering@conekta.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.2.0 +Generator version: 7.5.0 =end diff --git a/lib/conekta/models/payment_method_cash.rb b/lib/conekta/models/payment_method_cash.rb index 8f19ce9..477bbda 100644 --- a/lib/conekta/models/payment_method_cash.rb +++ b/lib/conekta/models/payment_method_cash.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 2.1.0 Contact: engineering@conekta.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.2.0 +Generator version: 7.5.0 =end diff --git a/lib/conekta/models/payment_method_cash_request.rb b/lib/conekta/models/payment_method_cash_request.rb index fb7a68e..e2873ed 100644 --- a/lib/conekta/models/payment_method_cash_request.rb +++ b/lib/conekta/models/payment_method_cash_request.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 2.1.0 Contact: engineering@conekta.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.2.0 +Generator version: 7.5.0 =end diff --git a/lib/conekta/models/payment_method_cash_response.rb b/lib/conekta/models/payment_method_cash_response.rb index dec567f..66d8065 100644 --- a/lib/conekta/models/payment_method_cash_response.rb +++ b/lib/conekta/models/payment_method_cash_response.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 2.1.0 Contact: engineering@conekta.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.2.0 +Generator version: 7.5.0 =end diff --git a/lib/conekta/models/payment_method_response.rb b/lib/conekta/models/payment_method_response.rb index f6aad3c..7cbb655 100644 --- a/lib/conekta/models/payment_method_response.rb +++ b/lib/conekta/models/payment_method_response.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 2.1.0 Contact: engineering@conekta.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.2.0 +Generator version: 7.5.0 =end diff --git a/lib/conekta/models/payment_method_spei_recurrent.rb b/lib/conekta/models/payment_method_spei_recurrent.rb index 8f58a79..f540050 100644 --- a/lib/conekta/models/payment_method_spei_recurrent.rb +++ b/lib/conekta/models/payment_method_spei_recurrent.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 2.1.0 Contact: engineering@conekta.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.2.0 +Generator version: 7.5.0 =end diff --git a/lib/conekta/models/payment_method_spei_request.rb b/lib/conekta/models/payment_method_spei_request.rb index e49a18b..ec3fc3f 100644 --- a/lib/conekta/models/payment_method_spei_request.rb +++ b/lib/conekta/models/payment_method_spei_request.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 2.1.0 Contact: engineering@conekta.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.2.0 +Generator version: 7.5.0 =end diff --git a/lib/conekta/models/payout.rb b/lib/conekta/models/payout.rb new file mode 100644 index 0000000..e98a50b --- /dev/null +++ b/lib/conekta/models/payout.rb @@ -0,0 +1,222 @@ +=begin +#Conekta API + +#Conekta sdk + +The version of the OpenAPI document: 2.1.0 +Contact: engineering@conekta.com +Generated by: https://openapi-generator.tech +Generator version: 7.5.0 + +=end + +require 'date' +require 'time' + +module Conekta + # The payout information of the payout order. + class Payout + attr_accessor :payout_method + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'payout_method' => :'payout_method' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'payout_method' => :'PayoutMethod' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Conekta::Payout` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Conekta::Payout`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'payout_method') + self.payout_method = attributes[:'payout_method'] + else + self.payout_method = nil + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + if @payout_method.nil? + invalid_properties.push('invalid value for "payout_method", payout_method cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + return false if @payout_method.nil? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + payout_method == o.payout_method + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [payout_method].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = Conekta.const_get(type) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/lib/conekta/models/payout_method.rb b/lib/conekta/models/payout_method.rb new file mode 100644 index 0000000..42237c8 --- /dev/null +++ b/lib/conekta/models/payout_method.rb @@ -0,0 +1,223 @@ +=begin +#Conekta API + +#Conekta sdk + +The version of the OpenAPI document: 2.1.0 +Contact: engineering@conekta.com +Generated by: https://openapi-generator.tech +Generator version: 7.5.0 + +=end + +require 'date' +require 'time' + +module Conekta + # The payout method of the payout order. + class PayoutMethod + # The type of the payout method. + attr_accessor :type + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'type' => :'type' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'type' => :'String' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Conekta::PayoutMethod` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Conekta::PayoutMethod`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'type') + self.type = attributes[:'type'] + else + self.type = nil + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + if @type.nil? + invalid_properties.push('invalid value for "type", type cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + return false if @type.nil? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + type == o.type + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [type].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = Conekta.const_get(type) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/lib/conekta/models/payout_order.rb b/lib/conekta/models/payout_order.rb new file mode 100644 index 0000000..952d1b8 --- /dev/null +++ b/lib/conekta/models/payout_order.rb @@ -0,0 +1,339 @@ +=begin +#Conekta API + +#Conekta sdk + +The version of the OpenAPI document: 2.1.0 +Contact: engineering@conekta.com +Generated by: https://openapi-generator.tech +Generator version: 7.5.0 + +=end + +require 'date' +require 'time' + +module Conekta + # a payout order + class PayoutOrder + # The payout methods that are allowed for the payout order. + attr_accessor :allowed_payout_methods + + # The amount of the payout order. + attr_accessor :amount + + # The currency in which the payout order is made. + attr_accessor :currency + + attr_accessor :customer_info + + # The metadata of the payout order. + attr_accessor :metadata + + attr_accessor :payout + + # The reason for the payout order. + attr_accessor :reason + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'allowed_payout_methods' => :'allowed_payout_methods', + :'amount' => :'amount', + :'currency' => :'currency', + :'customer_info' => :'customer_info', + :'metadata' => :'metadata', + :'payout' => :'payout', + :'reason' => :'reason' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'allowed_payout_methods' => :'Array', + :'amount' => :'Integer', + :'currency' => :'String', + :'customer_info' => :'CustomerInfoJustCustomerId', + :'metadata' => :'Hash', + :'payout' => :'Payout', + :'reason' => :'String' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Conekta::PayoutOrder` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Conekta::PayoutOrder`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'allowed_payout_methods') + if (value = attributes[:'allowed_payout_methods']).is_a?(Array) + self.allowed_payout_methods = value + end + else + self.allowed_payout_methods = nil + end + + if attributes.key?(:'amount') + self.amount = attributes[:'amount'] + else + self.amount = nil + end + + if attributes.key?(:'currency') + self.currency = attributes[:'currency'] + else + self.currency = 'MXN' + end + + if attributes.key?(:'customer_info') + self.customer_info = attributes[:'customer_info'] + else + self.customer_info = nil + end + + if attributes.key?(:'metadata') + if (value = attributes[:'metadata']).is_a?(Hash) + self.metadata = value + end + end + + if attributes.key?(:'payout') + self.payout = attributes[:'payout'] + else + self.payout = nil + end + + if attributes.key?(:'reason') + self.reason = attributes[:'reason'] + else + self.reason = nil + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + if @allowed_payout_methods.nil? + invalid_properties.push('invalid value for "allowed_payout_methods", allowed_payout_methods cannot be nil.') + end + + if @amount.nil? + invalid_properties.push('invalid value for "amount", amount cannot be nil.') + end + + if @currency.nil? + invalid_properties.push('invalid value for "currency", currency cannot be nil.') + end + + if @customer_info.nil? + invalid_properties.push('invalid value for "customer_info", customer_info cannot be nil.') + end + + if !@metadata.nil? && @metadata.length > 100 + invalid_properties.push('invalid value for "metadata", number of items must be less than or equal to 100.') + end + + if @payout.nil? + invalid_properties.push('invalid value for "payout", payout cannot be nil.') + end + + if @reason.nil? + invalid_properties.push('invalid value for "reason", reason cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + return false if @allowed_payout_methods.nil? + return false if @amount.nil? + return false if @currency.nil? + return false if @customer_info.nil? + return false if !@metadata.nil? && @metadata.length > 100 + return false if @payout.nil? + return false if @reason.nil? + true + end + + # Custom attribute writer method with validation + # @param [Object] metadata Value to be assigned + def metadata=(metadata) + if metadata.nil? + fail ArgumentError, 'metadata cannot be nil' + end + + if metadata.length > 100 + fail ArgumentError, 'invalid value for "metadata", number of items must be less than or equal to 100.' + end + + @metadata = metadata + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + allowed_payout_methods == o.allowed_payout_methods && + amount == o.amount && + currency == o.currency && + customer_info == o.customer_info && + metadata == o.metadata && + payout == o.payout && + reason == o.reason + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [allowed_payout_methods, amount, currency, customer_info, metadata, payout, reason].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = Conekta.const_get(type) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/lib/conekta/models/payout_order_payouts_item.rb b/lib/conekta/models/payout_order_payouts_item.rb new file mode 100644 index 0000000..a9d6110 --- /dev/null +++ b/lib/conekta/models/payout_order_payouts_item.rb @@ -0,0 +1,320 @@ +=begin +#Conekta API + +#Conekta sdk + +The version of the OpenAPI document: 2.1.0 +Contact: engineering@conekta.com +Generated by: https://openapi-generator.tech +Generator version: 7.5.0 + +=end + +require 'date' +require 'time' + +module Conekta + class PayoutOrderPayoutsItem + # The amount of the payout. + attr_accessor :amount + + # The currency in which the payout is made. + attr_accessor :currency + + # The expiration date of the payout. + attr_accessor :expires_at + + # The id of the payout. + attr_accessor :id + + # The live mode of the payout. + attr_accessor :livemode + + # The object of the payout. + attr_accessor :object + + # The id of the payout order. + attr_accessor :payout_order_id + + # The status of the payout. + attr_accessor :status + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'amount' => :'amount', + :'currency' => :'currency', + :'expires_at' => :'expires_at', + :'id' => :'id', + :'livemode' => :'livemode', + :'object' => :'object', + :'payout_order_id' => :'payout_order_id', + :'status' => :'status' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'amount' => :'Integer', + :'currency' => :'String', + :'expires_at' => :'Integer', + :'id' => :'String', + :'livemode' => :'Boolean', + :'object' => :'String', + :'payout_order_id' => :'String', + :'status' => :'String' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Conekta::PayoutOrderPayoutsItem` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Conekta::PayoutOrderPayoutsItem`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'amount') + self.amount = attributes[:'amount'] + else + self.amount = nil + end + + if attributes.key?(:'currency') + self.currency = attributes[:'currency'] + else + self.currency = nil + end + + if attributes.key?(:'expires_at') + self.expires_at = attributes[:'expires_at'] + end + + if attributes.key?(:'id') + self.id = attributes[:'id'] + else + self.id = nil + end + + if attributes.key?(:'livemode') + self.livemode = attributes[:'livemode'] + else + self.livemode = nil + end + + if attributes.key?(:'object') + self.object = attributes[:'object'] + else + self.object = nil + end + + if attributes.key?(:'payout_order_id') + self.payout_order_id = attributes[:'payout_order_id'] + end + + if attributes.key?(:'status') + self.status = attributes[:'status'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + if @amount.nil? + invalid_properties.push('invalid value for "amount", amount cannot be nil.') + end + + if @currency.nil? + invalid_properties.push('invalid value for "currency", currency cannot be nil.') + end + + if @id.nil? + invalid_properties.push('invalid value for "id", id cannot be nil.') + end + + if @livemode.nil? + invalid_properties.push('invalid value for "livemode", livemode cannot be nil.') + end + + if @object.nil? + invalid_properties.push('invalid value for "object", object cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + return false if @amount.nil? + return false if @currency.nil? + return false if @id.nil? + return false if @livemode.nil? + return false if @object.nil? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + amount == o.amount && + currency == o.currency && + expires_at == o.expires_at && + id == o.id && + livemode == o.livemode && + object == o.object && + payout_order_id == o.payout_order_id && + status == o.status + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [amount, currency, expires_at, id, livemode, object, payout_order_id, status].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = Conekta.const_get(type) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/lib/conekta/models/payout_order_response.rb b/lib/conekta/models/payout_order_response.rb new file mode 100644 index 0000000..498dc80 --- /dev/null +++ b/lib/conekta/models/payout_order_response.rb @@ -0,0 +1,466 @@ +=begin +#Conekta API + +#Conekta sdk + +The version of the OpenAPI document: 2.1.0 +Contact: engineering@conekta.com +Generated by: https://openapi-generator.tech +Generator version: 7.5.0 + +=end + +require 'date' +require 'time' + +module Conekta + # payout order model response + class PayoutOrderResponse + # The payout methods that are allowed for the payout order. + attr_accessor :allowed_payout_methods + + # The amount of the payout order. + attr_accessor :amount + + # The creation date of the payout order. + attr_accessor :created_at + + # The currency in which the payout order is made. + attr_accessor :currency + + attr_accessor :customer_info + + # The expiration date of the payout order. + attr_accessor :expires_at + + # The id of the payout order. + attr_accessor :id + + # The live mode of the payout order. + attr_accessor :livemode + + # The object of the payout order. + attr_accessor :object + + # The metadata of the payout order. + attr_accessor :metadata + + # The payout information of the payout order. + attr_accessor :payouts + + # The reason for the payout order. + attr_accessor :reason + + # The status of the payout order. + attr_accessor :status + + # The update date of the payout order. + attr_accessor :updated_at + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'allowed_payout_methods' => :'allowed_payout_methods', + :'amount' => :'amount', + :'created_at' => :'created_at', + :'currency' => :'currency', + :'customer_info' => :'customer_info', + :'expires_at' => :'expires_at', + :'id' => :'id', + :'livemode' => :'livemode', + :'object' => :'object', + :'metadata' => :'metadata', + :'payouts' => :'payouts', + :'reason' => :'reason', + :'status' => :'status', + :'updated_at' => :'updated_at' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'allowed_payout_methods' => :'Array', + :'amount' => :'Integer', + :'created_at' => :'Integer', + :'currency' => :'String', + :'customer_info' => :'PayoutOrderResponseCustomerInfo', + :'expires_at' => :'Integer', + :'id' => :'String', + :'livemode' => :'Boolean', + :'object' => :'String', + :'metadata' => :'Hash', + :'payouts' => :'Array', + :'reason' => :'String', + :'status' => :'String', + :'updated_at' => :'Integer' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Conekta::PayoutOrderResponse` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Conekta::PayoutOrderResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'allowed_payout_methods') + if (value = attributes[:'allowed_payout_methods']).is_a?(Array) + self.allowed_payout_methods = value + end + else + self.allowed_payout_methods = nil + end + + if attributes.key?(:'amount') + self.amount = attributes[:'amount'] + else + self.amount = nil + end + + if attributes.key?(:'created_at') + self.created_at = attributes[:'created_at'] + else + self.created_at = nil + end + + if attributes.key?(:'currency') + self.currency = attributes[:'currency'] + else + self.currency = 'MXN' + end + + if attributes.key?(:'customer_info') + self.customer_info = attributes[:'customer_info'] + else + self.customer_info = nil + end + + if attributes.key?(:'expires_at') + self.expires_at = attributes[:'expires_at'] + end + + if attributes.key?(:'id') + self.id = attributes[:'id'] + else + self.id = nil + end + + if attributes.key?(:'livemode') + self.livemode = attributes[:'livemode'] + else + self.livemode = nil + end + + if attributes.key?(:'object') + self.object = attributes[:'object'] + else + self.object = nil + end + + if attributes.key?(:'metadata') + if (value = attributes[:'metadata']).is_a?(Hash) + self.metadata = value + end + end + + if attributes.key?(:'payouts') + if (value = attributes[:'payouts']).is_a?(Array) + self.payouts = value + end + else + self.payouts = nil + end + + if attributes.key?(:'reason') + self.reason = attributes[:'reason'] + else + self.reason = nil + end + + if attributes.key?(:'status') + self.status = attributes[:'status'] + end + + if attributes.key?(:'updated_at') + self.updated_at = attributes[:'updated_at'] + else + self.updated_at = nil + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + if @allowed_payout_methods.nil? + invalid_properties.push('invalid value for "allowed_payout_methods", allowed_payout_methods cannot be nil.') + end + + if @allowed_payout_methods.length < 1 + invalid_properties.push('invalid value for "allowed_payout_methods", number of items must be greater than or equal to 1.') + end + + if @amount.nil? + invalid_properties.push('invalid value for "amount", amount cannot be nil.') + end + + if @created_at.nil? + invalid_properties.push('invalid value for "created_at", created_at cannot be nil.') + end + + if @currency.nil? + invalid_properties.push('invalid value for "currency", currency cannot be nil.') + end + + if @customer_info.nil? + invalid_properties.push('invalid value for "customer_info", customer_info cannot be nil.') + end + + if @id.nil? + invalid_properties.push('invalid value for "id", id cannot be nil.') + end + + if @livemode.nil? + invalid_properties.push('invalid value for "livemode", livemode cannot be nil.') + end + + if @object.nil? + invalid_properties.push('invalid value for "object", object cannot be nil.') + end + + if !@metadata.nil? && @metadata.length > 100 + invalid_properties.push('invalid value for "metadata", number of items must be less than or equal to 100.') + end + + if @payouts.nil? + invalid_properties.push('invalid value for "payouts", payouts cannot be nil.') + end + + if @reason.nil? + invalid_properties.push('invalid value for "reason", reason cannot be nil.') + end + + if @updated_at.nil? + invalid_properties.push('invalid value for "updated_at", updated_at cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + return false if @allowed_payout_methods.nil? + return false if @allowed_payout_methods.length < 1 + return false if @amount.nil? + return false if @created_at.nil? + return false if @currency.nil? + return false if @customer_info.nil? + return false if @id.nil? + return false if @livemode.nil? + return false if @object.nil? + return false if !@metadata.nil? && @metadata.length > 100 + return false if @payouts.nil? + return false if @reason.nil? + return false if @updated_at.nil? + true + end + + # Custom attribute writer method with validation + # @param [Object] allowed_payout_methods Value to be assigned + def allowed_payout_methods=(allowed_payout_methods) + if allowed_payout_methods.nil? + fail ArgumentError, 'allowed_payout_methods cannot be nil' + end + + if allowed_payout_methods.length < 1 + fail ArgumentError, 'invalid value for "allowed_payout_methods", number of items must be greater than or equal to 1.' + end + + @allowed_payout_methods = allowed_payout_methods + end + + # Custom attribute writer method with validation + # @param [Object] metadata Value to be assigned + def metadata=(metadata) + if metadata.nil? + fail ArgumentError, 'metadata cannot be nil' + end + + if metadata.length > 100 + fail ArgumentError, 'invalid value for "metadata", number of items must be less than or equal to 100.' + end + + @metadata = metadata + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + allowed_payout_methods == o.allowed_payout_methods && + amount == o.amount && + created_at == o.created_at && + currency == o.currency && + customer_info == o.customer_info && + expires_at == o.expires_at && + id == o.id && + livemode == o.livemode && + object == o.object && + metadata == o.metadata && + payouts == o.payouts && + reason == o.reason && + status == o.status && + updated_at == o.updated_at + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [allowed_payout_methods, amount, created_at, currency, customer_info, expires_at, id, livemode, object, metadata, payouts, reason, status, updated_at].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = Conekta.const_get(type) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/lib/conekta/models/payout_order_response_customer_info.rb b/lib/conekta/models/payout_order_response_customer_info.rb new file mode 100644 index 0000000..2e8e768 --- /dev/null +++ b/lib/conekta/models/payout_order_response_customer_info.rb @@ -0,0 +1,288 @@ +=begin +#Conekta API + +#Conekta sdk + +The version of the OpenAPI document: 2.1.0 +Contact: engineering@conekta.com +Generated by: https://openapi-generator.tech +Generator version: 7.5.0 + +=end + +require 'date' +require 'time' + +module Conekta + # The customer information of the payout order. + class PayoutOrderResponseCustomerInfo + # Custom reference + attr_accessor :customer_custom_reference + + attr_accessor :name + + attr_accessor :email + + attr_accessor :phone + + attr_accessor :corporate + + attr_accessor :object + + # The id of the customer. + attr_accessor :id + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'customer_custom_reference' => :'customer_custom_reference', + :'name' => :'name', + :'email' => :'email', + :'phone' => :'phone', + :'corporate' => :'corporate', + :'object' => :'object', + :'id' => :'id' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'customer_custom_reference' => :'String', + :'name' => :'String', + :'email' => :'String', + :'phone' => :'String', + :'corporate' => :'Boolean', + :'object' => :'String', + :'id' => :'String' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + :'customer_custom_reference', + ]) + end + + # List of class defined in allOf (OpenAPI v3) + def self.openapi_all_of + [ + :'OrderCustomerInfoResponse' + ] + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Conekta::PayoutOrderResponseCustomerInfo` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Conekta::PayoutOrderResponseCustomerInfo`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'customer_custom_reference') + self.customer_custom_reference = attributes[:'customer_custom_reference'] + end + + if attributes.key?(:'name') + self.name = attributes[:'name'] + end + + if attributes.key?(:'email') + self.email = attributes[:'email'] + end + + if attributes.key?(:'phone') + self.phone = attributes[:'phone'] + end + + if attributes.key?(:'corporate') + self.corporate = attributes[:'corporate'] + else + self.corporate = false + end + + if attributes.key?(:'object') + self.object = attributes[:'object'] + end + + if attributes.key?(:'id') + self.id = attributes[:'id'] + else + self.id = nil + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + if @id.nil? + invalid_properties.push('invalid value for "id", id cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + return false if @id.nil? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + customer_custom_reference == o.customer_custom_reference && + name == o.name && + email == o.email && + phone == o.phone && + corporate == o.corporate && + object == o.object && + id == o.id + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [customer_custom_reference, name, email, phone, corporate, object, id].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = Conekta.const_get(type) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/lib/conekta/models/payout_orders_response.rb b/lib/conekta/models/payout_orders_response.rb new file mode 100644 index 0000000..765fd9f --- /dev/null +++ b/lib/conekta/models/payout_orders_response.rb @@ -0,0 +1,280 @@ +=begin +#Conekta API + +#Conekta sdk + +The version of the OpenAPI document: 2.1.0 +Contact: engineering@conekta.com +Generated by: https://openapi-generator.tech +Generator version: 7.5.0 + +=end + +require 'date' +require 'time' + +module Conekta + class PayoutOrdersResponse + # Indicates if there are more pages to be requested + attr_accessor :has_more + + # Object type, in this case is list + attr_accessor :object + + # URL of the next page. + attr_accessor :next_page_url + + # Url of the previous page. + attr_accessor :previous_page_url + + attr_accessor :data + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'has_more' => :'has_more', + :'object' => :'object', + :'next_page_url' => :'next_page_url', + :'previous_page_url' => :'previous_page_url', + :'data' => :'data' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'has_more' => :'Boolean', + :'object' => :'String', + :'next_page_url' => :'String', + :'previous_page_url' => :'String', + :'data' => :'Array' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + :'next_page_url', + :'previous_page_url', + ]) + end + + # List of class defined in allOf (OpenAPI v3) + def self.openapi_all_of + [ + :'Page', + :'Pagination' + ] + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Conekta::PayoutOrdersResponse` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Conekta::PayoutOrdersResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'has_more') + self.has_more = attributes[:'has_more'] + else + self.has_more = nil + end + + if attributes.key?(:'object') + self.object = attributes[:'object'] + else + self.object = nil + end + + if attributes.key?(:'next_page_url') + self.next_page_url = attributes[:'next_page_url'] + end + + if attributes.key?(:'previous_page_url') + self.previous_page_url = attributes[:'previous_page_url'] + end + + if attributes.key?(:'data') + if (value = attributes[:'data']).is_a?(Array) + self.data = value + end + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + if @has_more.nil? + invalid_properties.push('invalid value for "has_more", has_more cannot be nil.') + end + + if @object.nil? + invalid_properties.push('invalid value for "object", object cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + return false if @has_more.nil? + return false if @object.nil? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + has_more == o.has_more && + object == o.object && + next_page_url == o.next_page_url && + previous_page_url == o.previous_page_url && + data == o.data + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [has_more, object, next_page_url, previous_page_url, data].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = Conekta.const_get(type) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/lib/conekta/models/plan_request.rb b/lib/conekta/models/plan_request.rb index d9f4336..447db37 100644 --- a/lib/conekta/models/plan_request.rb +++ b/lib/conekta/models/plan_request.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 2.1.0 Contact: engineering@conekta.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.2.0 +Generator version: 7.5.0 =end diff --git a/lib/conekta/models/plan_response.rb b/lib/conekta/models/plan_response.rb index 16863e8..c21a3ab 100644 --- a/lib/conekta/models/plan_response.rb +++ b/lib/conekta/models/plan_response.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 2.1.0 Contact: engineering@conekta.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.2.0 +Generator version: 7.5.0 =end diff --git a/lib/conekta/models/plan_update_request.rb b/lib/conekta/models/plan_update_request.rb index 02b4adb..cbcd9ce 100644 --- a/lib/conekta/models/plan_update_request.rb +++ b/lib/conekta/models/plan_update_request.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 2.1.0 Contact: engineering@conekta.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.2.0 +Generator version: 7.5.0 =end diff --git a/lib/conekta/models/product.rb b/lib/conekta/models/product.rb index bddb4c4..7b65872 100644 --- a/lib/conekta/models/product.rb +++ b/lib/conekta/models/product.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 2.1.0 Contact: engineering@conekta.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.2.0 +Generator version: 7.5.0 =end @@ -67,7 +67,7 @@ def self.openapi_types :'antifraud_info' => :'Hash', :'brand' => :'String', :'description' => :'String', - :'metadata' => :'Hash', + :'metadata' => :'Hash', :'name' => :'String', :'quantity' => :'Integer', :'sku' => :'String', diff --git a/lib/conekta/models/product_data_response.rb b/lib/conekta/models/product_data_response.rb index 9f4cab8..2ba7050 100644 --- a/lib/conekta/models/product_data_response.rb +++ b/lib/conekta/models/product_data_response.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 2.1.0 Contact: engineering@conekta.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.2.0 +Generator version: 7.5.0 =end @@ -76,7 +76,7 @@ def self.openapi_types :'antifraud_info' => :'Hash', :'brand' => :'String', :'description' => :'String', - :'metadata' => :'Hash', + :'metadata' => :'Hash', :'name' => :'String', :'quantity' => :'Integer', :'sku' => :'String', diff --git a/lib/conekta/models/product_order_response.rb b/lib/conekta/models/product_order_response.rb index a966e92..1dfc069 100644 --- a/lib/conekta/models/product_order_response.rb +++ b/lib/conekta/models/product_order_response.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 2.1.0 Contact: engineering@conekta.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.2.0 +Generator version: 7.5.0 =end @@ -76,7 +76,7 @@ def self.openapi_types :'antifraud_info' => :'Hash', :'brand' => :'String', :'description' => :'String', - :'metadata' => :'Hash', + :'metadata' => :'Hash', :'name' => :'String', :'quantity' => :'Integer', :'sku' => :'String', diff --git a/lib/conekta/models/risk_rules_data.rb b/lib/conekta/models/risk_rules_data.rb index 82e68f8..282dcb1 100644 --- a/lib/conekta/models/risk_rules_data.rb +++ b/lib/conekta/models/risk_rules_data.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 2.1.0 Contact: engineering@conekta.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.2.0 +Generator version: 7.5.0 =end diff --git a/lib/conekta/models/risk_rules_list.rb b/lib/conekta/models/risk_rules_list.rb index 5914ecf..b7e28ea 100644 --- a/lib/conekta/models/risk_rules_list.rb +++ b/lib/conekta/models/risk_rules_list.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 2.1.0 Contact: engineering@conekta.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.2.0 +Generator version: 7.5.0 =end diff --git a/lib/conekta/models/shipping_order_response.rb b/lib/conekta/models/shipping_order_response.rb index 71f0f51..1d2d5cb 100644 --- a/lib/conekta/models/shipping_order_response.rb +++ b/lib/conekta/models/shipping_order_response.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 2.1.0 Contact: engineering@conekta.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.2.0 +Generator version: 7.5.0 =end diff --git a/lib/conekta/models/shipping_request.rb b/lib/conekta/models/shipping_request.rb index deb0bd3..a2e1c88 100644 --- a/lib/conekta/models/shipping_request.rb +++ b/lib/conekta/models/shipping_request.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 2.1.0 Contact: engineering@conekta.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.2.0 +Generator version: 7.5.0 =end diff --git a/lib/conekta/models/sms_checkout_request.rb b/lib/conekta/models/sms_checkout_request.rb index 199dc7d..50d17fd 100644 --- a/lib/conekta/models/sms_checkout_request.rb +++ b/lib/conekta/models/sms_checkout_request.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 2.1.0 Contact: engineering@conekta.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.2.0 +Generator version: 7.5.0 =end diff --git a/lib/conekta/models/subscription_events_response.rb b/lib/conekta/models/subscription_events_response.rb index db7e7c0..1b6a3ba 100644 --- a/lib/conekta/models/subscription_events_response.rb +++ b/lib/conekta/models/subscription_events_response.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 2.1.0 Contact: engineering@conekta.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.2.0 +Generator version: 7.5.0 =end diff --git a/lib/conekta/models/subscription_request.rb b/lib/conekta/models/subscription_request.rb index 52dbffb..8f37c49 100644 --- a/lib/conekta/models/subscription_request.rb +++ b/lib/conekta/models/subscription_request.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 2.1.0 Contact: engineering@conekta.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.2.0 +Generator version: 7.5.0 =end diff --git a/lib/conekta/models/subscription_response.rb b/lib/conekta/models/subscription_response.rb index 97fe905..86e5bfd 100644 --- a/lib/conekta/models/subscription_response.rb +++ b/lib/conekta/models/subscription_response.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 2.1.0 Contact: engineering@conekta.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.2.0 +Generator version: 7.5.0 =end diff --git a/lib/conekta/models/subscription_update_request.rb b/lib/conekta/models/subscription_update_request.rb index 432aa93..3ba22a9 100644 --- a/lib/conekta/models/subscription_update_request.rb +++ b/lib/conekta/models/subscription_update_request.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 2.1.0 Contact: engineering@conekta.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.2.0 +Generator version: 7.5.0 =end diff --git a/lib/conekta/models/token.rb b/lib/conekta/models/token.rb index f8544cb..abaf9e9 100644 --- a/lib/conekta/models/token.rb +++ b/lib/conekta/models/token.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 2.1.0 Contact: engineering@conekta.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.2.0 +Generator version: 7.5.0 =end diff --git a/lib/conekta/models/token_card.rb b/lib/conekta/models/token_card.rb index ec57489..dee4c23 100644 --- a/lib/conekta/models/token_card.rb +++ b/lib/conekta/models/token_card.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 2.1.0 Contact: engineering@conekta.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.2.0 +Generator version: 7.5.0 =end diff --git a/lib/conekta/models/token_checkout.rb b/lib/conekta/models/token_checkout.rb index a25655c..56fee47 100644 --- a/lib/conekta/models/token_checkout.rb +++ b/lib/conekta/models/token_checkout.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 2.1.0 Contact: engineering@conekta.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.2.0 +Generator version: 7.5.0 =end diff --git a/lib/conekta/models/token_response.rb b/lib/conekta/models/token_response.rb index 102b502..aaa612b 100644 --- a/lib/conekta/models/token_response.rb +++ b/lib/conekta/models/token_response.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 2.1.0 Contact: engineering@conekta.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.2.0 +Generator version: 7.5.0 =end diff --git a/lib/conekta/models/token_response_checkout.rb b/lib/conekta/models/token_response_checkout.rb index 96b7a76..94b9d07 100644 --- a/lib/conekta/models/token_response_checkout.rb +++ b/lib/conekta/models/token_response_checkout.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 2.1.0 Contact: engineering@conekta.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.2.0 +Generator version: 7.5.0 =end diff --git a/lib/conekta/models/transaction_response.rb b/lib/conekta/models/transaction_response.rb index fe16d1f..6cc0af2 100644 --- a/lib/conekta/models/transaction_response.rb +++ b/lib/conekta/models/transaction_response.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 2.1.0 Contact: engineering@conekta.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.2.0 +Generator version: 7.5.0 =end diff --git a/lib/conekta/models/transfer_destination_response.rb b/lib/conekta/models/transfer_destination_response.rb index 2a5bed5..3d1e6e3 100644 --- a/lib/conekta/models/transfer_destination_response.rb +++ b/lib/conekta/models/transfer_destination_response.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 2.1.0 Contact: engineering@conekta.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.2.0 +Generator version: 7.5.0 =end diff --git a/lib/conekta/models/transfer_method_response.rb b/lib/conekta/models/transfer_method_response.rb index fc51898..890a1fa 100644 --- a/lib/conekta/models/transfer_method_response.rb +++ b/lib/conekta/models/transfer_method_response.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 2.1.0 Contact: engineering@conekta.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.2.0 +Generator version: 7.5.0 =end diff --git a/lib/conekta/models/transfer_response.rb b/lib/conekta/models/transfer_response.rb index 00061f1..756ba39 100644 --- a/lib/conekta/models/transfer_response.rb +++ b/lib/conekta/models/transfer_response.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 2.1.0 Contact: engineering@conekta.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.2.0 +Generator version: 7.5.0 =end diff --git a/lib/conekta/models/transfers_response.rb b/lib/conekta/models/transfers_response.rb index 06e0148..125fc43 100644 --- a/lib/conekta/models/transfers_response.rb +++ b/lib/conekta/models/transfers_response.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 2.1.0 Contact: engineering@conekta.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.2.0 +Generator version: 7.5.0 =end diff --git a/lib/conekta/models/update_customer.rb b/lib/conekta/models/update_customer.rb index 847441b..dc0a49f 100644 --- a/lib/conekta/models/update_customer.rb +++ b/lib/conekta/models/update_customer.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 2.1.0 Contact: engineering@conekta.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.2.0 +Generator version: 7.5.0 =end diff --git a/lib/conekta/models/update_customer_antifraud_info.rb b/lib/conekta/models/update_customer_antifraud_info.rb index 99ac3fb..f691014 100644 --- a/lib/conekta/models/update_customer_antifraud_info.rb +++ b/lib/conekta/models/update_customer_antifraud_info.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 2.1.0 Contact: engineering@conekta.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.2.0 +Generator version: 7.5.0 =end diff --git a/lib/conekta/models/update_customer_fiscal_entities_response.rb b/lib/conekta/models/update_customer_fiscal_entities_response.rb index d879b85..134604d 100644 --- a/lib/conekta/models/update_customer_fiscal_entities_response.rb +++ b/lib/conekta/models/update_customer_fiscal_entities_response.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 2.1.0 Contact: engineering@conekta.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.2.0 +Generator version: 7.5.0 =end diff --git a/lib/conekta/models/update_customer_payment_methods_response.rb b/lib/conekta/models/update_customer_payment_methods_response.rb index b1ce522..c2bbcaf 100644 --- a/lib/conekta/models/update_customer_payment_methods_response.rb +++ b/lib/conekta/models/update_customer_payment_methods_response.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 2.1.0 Contact: engineering@conekta.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.2.0 +Generator version: 7.5.0 =end diff --git a/lib/conekta/models/update_order_discount_lines_request.rb b/lib/conekta/models/update_order_discount_lines_request.rb index 70fe74e..f2400a2 100644 --- a/lib/conekta/models/update_order_discount_lines_request.rb +++ b/lib/conekta/models/update_order_discount_lines_request.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 2.1.0 Contact: engineering@conekta.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.2.0 +Generator version: 7.5.0 =end diff --git a/lib/conekta/models/update_order_tax_request.rb b/lib/conekta/models/update_order_tax_request.rb index 88c69d7..3634f6c 100644 --- a/lib/conekta/models/update_order_tax_request.rb +++ b/lib/conekta/models/update_order_tax_request.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 2.1.0 Contact: engineering@conekta.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.2.0 +Generator version: 7.5.0 =end diff --git a/lib/conekta/models/update_order_tax_response.rb b/lib/conekta/models/update_order_tax_response.rb index d583182..e066229 100644 --- a/lib/conekta/models/update_order_tax_response.rb +++ b/lib/conekta/models/update_order_tax_response.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 2.1.0 Contact: engineering@conekta.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.2.0 +Generator version: 7.5.0 =end diff --git a/lib/conekta/models/update_payment_methods.rb b/lib/conekta/models/update_payment_methods.rb index 152326c..82319e5 100644 --- a/lib/conekta/models/update_payment_methods.rb +++ b/lib/conekta/models/update_payment_methods.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 2.1.0 Contact: engineering@conekta.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.2.0 +Generator version: 7.5.0 =end diff --git a/lib/conekta/models/update_product.rb b/lib/conekta/models/update_product.rb index 0ec4186..a822344 100644 --- a/lib/conekta/models/update_product.rb +++ b/lib/conekta/models/update_product.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 2.1.0 Contact: engineering@conekta.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.2.0 +Generator version: 7.5.0 =end diff --git a/lib/conekta/models/webhook_key_create_response.rb b/lib/conekta/models/webhook_key_create_response.rb index e1a12dd..c66ac50 100644 --- a/lib/conekta/models/webhook_key_create_response.rb +++ b/lib/conekta/models/webhook_key_create_response.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 2.1.0 Contact: engineering@conekta.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.2.0 +Generator version: 7.5.0 =end diff --git a/lib/conekta/models/webhook_key_delete_response.rb b/lib/conekta/models/webhook_key_delete_response.rb index 436c201..5127233 100644 --- a/lib/conekta/models/webhook_key_delete_response.rb +++ b/lib/conekta/models/webhook_key_delete_response.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 2.1.0 Contact: engineering@conekta.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.2.0 +Generator version: 7.5.0 =end diff --git a/lib/conekta/models/webhook_key_request.rb b/lib/conekta/models/webhook_key_request.rb index e4f31f5..0d6bfaf 100644 --- a/lib/conekta/models/webhook_key_request.rb +++ b/lib/conekta/models/webhook_key_request.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 2.1.0 Contact: engineering@conekta.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.2.0 +Generator version: 7.5.0 =end diff --git a/lib/conekta/models/webhook_key_response.rb b/lib/conekta/models/webhook_key_response.rb index e031c97..fa37df0 100644 --- a/lib/conekta/models/webhook_key_response.rb +++ b/lib/conekta/models/webhook_key_response.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 2.1.0 Contact: engineering@conekta.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.2.0 +Generator version: 7.5.0 =end diff --git a/lib/conekta/models/webhook_key_update_request.rb b/lib/conekta/models/webhook_key_update_request.rb index 1450d66..b66dc96 100644 --- a/lib/conekta/models/webhook_key_update_request.rb +++ b/lib/conekta/models/webhook_key_update_request.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 2.1.0 Contact: engineering@conekta.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.2.0 +Generator version: 7.5.0 =end diff --git a/lib/conekta/models/webhook_log.rb b/lib/conekta/models/webhook_log.rb index c178eee..ba487b8 100644 --- a/lib/conekta/models/webhook_log.rb +++ b/lib/conekta/models/webhook_log.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 2.1.0 Contact: engineering@conekta.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.2.0 +Generator version: 7.5.0 =end diff --git a/lib/conekta/models/webhook_request.rb b/lib/conekta/models/webhook_request.rb index 2982afe..94a3d21 100644 --- a/lib/conekta/models/webhook_request.rb +++ b/lib/conekta/models/webhook_request.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 2.1.0 Contact: engineering@conekta.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.2.0 +Generator version: 7.5.0 =end diff --git a/lib/conekta/models/webhook_response.rb b/lib/conekta/models/webhook_response.rb index d180215..c2d69e2 100644 --- a/lib/conekta/models/webhook_response.rb +++ b/lib/conekta/models/webhook_response.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 2.1.0 Contact: engineering@conekta.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.2.0 +Generator version: 7.5.0 =end diff --git a/lib/conekta/models/webhook_update_request.rb b/lib/conekta/models/webhook_update_request.rb index 10b8eb1..2de1da2 100644 --- a/lib/conekta/models/webhook_update_request.rb +++ b/lib/conekta/models/webhook_update_request.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 2.1.0 Contact: engineering@conekta.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.2.0 +Generator version: 7.5.0 =end diff --git a/lib/conekta/models/whitelistlist_rule_response.rb b/lib/conekta/models/whitelistlist_rule_response.rb index 41c9af0..65f272a 100644 --- a/lib/conekta/models/whitelistlist_rule_response.rb +++ b/lib/conekta/models/whitelistlist_rule_response.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 2.1.0 Contact: engineering@conekta.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.2.0 +Generator version: 7.5.0 =end diff --git a/lib/conekta/version.rb b/lib/conekta/version.rb index c3a2531..6b551c1 100644 --- a/lib/conekta/version.rb +++ b/lib/conekta/version.rb @@ -6,10 +6,10 @@ The version of the OpenAPI document: 2.1.0 Contact: engineering@conekta.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.2.0 +Generator version: 7.5.0 =end module Conekta - VERSION = '6.0.2' + VERSION = '6.0.3' end diff --git a/spec/api/payout_orders_api_spec.rb b/spec/api/payout_orders_api_spec.rb new file mode 100644 index 0000000..b68f7de --- /dev/null +++ b/spec/api/payout_orders_api_spec.rb @@ -0,0 +1,77 @@ +=begin +#Conekta API + +#Conekta sdk + +The version of the OpenAPI document: 2.1.0 +Contact: engineering@conekta.com +Generated by: https://openapi-generator.tech +Generator version: 7.5.0 + +=end + +require 'spec_helper' +require 'json' + +# Unit tests for Conekta::PayoutOrdersApi +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe 'PayoutOrdersApi' do + before do + # run before each test + @api_instance = Conekta::PayoutOrdersApi.new + end + + after do + # run after each test + end + + describe 'test an instance of PayoutOrdersApi' do + it 'should create an instance of PayoutOrdersApi' do + expect(@api_instance).to be_instance_of(Conekta::PayoutOrdersApi) + end + end + + # unit tests for create_payout_order + # Create payout order + # Create a new payout order. + # @param payout_order requested field for payout order + # @param [Hash] opts the optional parameters + # @option opts [String] :accept_language Use for knowing which language to use + # @return [PayoutOrderResponse] + describe 'create_payout_order test' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + # unit tests for get_payout_order_by_id + # Get Payout Order + # Gets a payout Order resource that corresponds to a payout order ID. + # @param id Identifier of the resource + # @param [Hash] opts the optional parameters + # @option opts [String] :accept_language Use for knowing which language to use + # @return [PayoutOrderResponse] + describe 'get_payout_order_by_id test' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + # unit tests for get_payout_orders + # Get a list of Payout Orders + # Get Payout order details in the form of a list + # @param [Hash] opts the optional parameters + # @option opts [String] :accept_language Use for knowing which language to use + # @option opts [Integer] :limit The numbers of items to return, the maximum value is 250 + # @option opts [String] :search General order search, e.g. by mail, reference etc. + # @option opts [String] :_next next page + # @option opts [String] :previous previous page + # @return [PayoutOrdersResponse] + describe 'get_payout_orders test' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + +end diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index 3ba741e..f06a3a1 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 2.1.0 Contact: engineering@conekta.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.2.0 +Generator version: 7.5.0 =end From 15434279a993d20b86104bec8c5d0c2999b829ef Mon Sep 17 00:00:00 2001 From: Franklin Date: Mon, 29 Apr 2024 09:18:22 -0500 Subject: [PATCH 2/4] Update OpenAPI Generator version to 7.5.0 new 6.0.3 version update new entities --- README.md | 2 +- lib/conekta/api_client.rb | 1 + templates/ruby/api_client.mustache | 1 + 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index c3cd37a..1a3f889 100644 --- a/README.md +++ b/README.md @@ -8,7 +8,7 @@ This SDK is automatically generated by the [OpenAPI Generator](https://openapi-g - API version: 2.1.0 - Package version: 6.0.3 -- Build date: 2024-04-29T14:00:59.671114609Z[Etc/UTC] +- Build date: 2024-04-29T14:11:53.612104515Z[Etc/UTC] - Generator version: 7.5.0 - Build package: org.openapitools.codegen.languages.RubyClientCodegen For more information, please visit [https://github.com/conekta/openapi/issues](https://github.com/conekta/openapi/issues) diff --git a/lib/conekta/api_client.rb b/lib/conekta/api_client.rb index ff01758..56c6ef9 100644 --- a/lib/conekta/api_client.rb +++ b/lib/conekta/api_client.rb @@ -17,6 +17,7 @@ require 'time' require 'faraday' require 'faraday/multipart' if Gem::Version.new(Faraday::VERSION) >= Gem::Version.new('2.0') +require 'marcel' module Conekta diff --git a/templates/ruby/api_client.mustache b/templates/ruby/api_client.mustache index 7de68a6..a521362 100644 --- a/templates/ruby/api_client.mustache +++ b/templates/ruby/api_client.mustache @@ -13,6 +13,7 @@ require 'typhoeus' {{#isFaraday}} require 'faraday' require 'faraday/multipart' if Gem::Version.new(Faraday::VERSION) >= Gem::Version.new('2.0') +require 'marcel' {{/isFaraday}} {{#isHttpx}} require 'httpx' From dbdc1eb68955d8f4738c6e132d87b4322910f7a8 Mon Sep 17 00:00:00 2001 From: Franklin Date: Mon, 29 Apr 2024 09:21:22 -0500 Subject: [PATCH 3/4] update mockoon/cli-action@v2 --- .github/workflows/CI.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 93e13aa..af8cdff 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -11,7 +11,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - ruby-version: [2.6, 2.7, '3.0', 3.1, 3.2] + ruby-version: [2.6, 2.7, 3.0, 3.1, 3.2] steps: - uses: actions/checkout@v3 @@ -24,7 +24,7 @@ jobs: run: bundle install - name: Run Mockoon CLI - uses: mockoon/cli-action@v1 + uses: mockoon/cli-action@v2 with: version: 'latest' data-file: 'https://raw.githubusercontent.com/conekta/openapi/main/mocks/conekta_api.json' From 637cef30ca2977d1f6686ad45707003fcb7ee406 Mon Sep 17 00:00:00 2001 From: Franklin Date: Mon, 29 Apr 2024 09:25:57 -0500 Subject: [PATCH 4/4] add ruby 3.3 supports --- .github/workflows/CI.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index af8cdff..9c47823 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -11,7 +11,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - ruby-version: [2.6, 2.7, 3.0, 3.1, 3.2] + ruby-version: [2.6, 2.7, 3.0, 3.1, 3.2, 3.3] steps: - uses: actions/checkout@v3