conekta 7.0.3 → 9.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/Makefile +3 -3
- data/README.md +52 -49
- data/VERSION +1 -1
- data/conekta.gemspec +2 -2
- data/config-ruby.json +4 -1
- data/docs/AntifraudApi.md +14 -14
- data/docs/ApiKeyCreateResponse.md +3 -3
- data/docs/ApiKeysApi.md +5 -5
- data/docs/{BalanceCommonField.md → BalanceCommonFielsResponse.md} +2 -2
- data/docs/BalanceResponse.md +9 -9
- data/docs/BalancesApi.md +1 -1
- data/docs/{PaymentMethodCashResponseAllOfAgreements.md → CashAgreementsResponse.md} +2 -2
- data/docs/ChargeOrderResponsePaymentMethod.md +1 -1
- data/docs/ChargeResponse.md +3 -1
- data/docs/ChargebackFileResponse.md +24 -0
- data/docs/ChargebackResponse.md +38 -0
- data/docs/ChargesApi.md +4 -4
- data/docs/ChargesDataResponse.md +3 -1
- data/docs/ChargesOrderResponse.md +5 -1
- data/docs/Checkout.md +13 -5
- data/docs/CheckoutOrderTemplate.md +5 -3
- data/docs/CheckoutOrderTemplateCustomerInfo.md +2 -2
- data/docs/CheckoutResponse.md +9 -7
- data/docs/CompaniesApi.md +80 -8
- data/docs/CompanyDocumentRequest.md +1 -1
- data/docs/CompanyResponse.md +6 -2
- data/docs/CreateCustomerFiscalEntitiesResponse.md +1 -1
- data/docs/CreateCustomerPaymentMethodsResponse.md +3 -3
- data/docs/{CreateRiskRulesData.md → CreateRuleWhitelistRequest.md} +2 -2
- data/docs/Customer.md +2 -2
- data/docs/CustomerDetails.md +24 -0
- data/docs/CustomerFiscalEntitiesDataResponse.md +1 -1
- data/docs/{CustomerInfoJustCustomerId.md → CustomerInfoCustomerId.md} +2 -2
- data/docs/CustomerPaymentMethodsData.md +3 -3
- data/docs/CustomerPortalResponse.md +40 -0
- data/docs/CustomerShippingContactsAddress.md +3 -1
- data/docs/CustomerShippingContactsDataResponse.md +1 -1
- data/docs/{CustomerShippingContacts.md → CustomerShippingContactsRequest.md} +3 -3
- data/docs/{CustomerShippingContactsResponseAddress.md → CustomerShippingContactsRequestAddress.md} +3 -5
- data/docs/CustomerShippingContactsResponse.md +1 -1
- data/docs/{CustomerUpdateShippingContacts.md → CustomerUpdateShippingContactsRequest.md} +3 -3
- data/docs/CustomersApi.md +19 -19
- data/docs/CustomersResponse.md +3 -3
- data/docs/DiscountsApi.md +5 -5
- data/docs/EventResponse.md +1 -1
- data/docs/EventsApi.md +9 -9
- data/docs/{CustomerFiscalEntitiesRequest.md → FiscalEntityRequest.md} +3 -3
- data/docs/{CustomerAddress.md → FiscalEntityRequestAddress.md} +2 -2
- data/docs/GetCustomerPaymentMethodDataResponse.md +3 -3
- data/docs/LogResponseForRequest.md +56 -0
- data/docs/LogsApi.md +10 -10
- data/docs/LogsResponseData.md +7 -7
- data/docs/{LogsResponse.md → LogsResponseForRequest.md} +2 -2
- data/docs/OrderChargesResponse.md +4 -0
- data/docs/OrderCheckoutRequest.md +46 -0
- data/docs/OrderRequest.md +9 -9
- data/docs/OrderRequestCustomerInfo.md +2 -2
- data/docs/OrderResponse.md +5 -1
- data/docs/OrderResponseCheckout.md +14 -10
- data/docs/OrderResponseCustomerInfo.md +2 -2
- data/docs/{OrderDiscountLinesResponse.md → OrderResponseDiscountLines.md} +6 -2
- data/docs/OrderResponseShippingContact.md +7 -7
- data/docs/OrderResponseShippingLines.md +26 -0
- data/docs/{Page.md → OrderResponseTaxLines.md} +9 -3
- data/docs/OrderTaxRequest.md +1 -1
- data/docs/{UpdateOrderTaxResponse.md → OrderTaxResponse.md} +2 -2
- data/docs/{OrderUpdateRequest.md → OrderUpdate.md} +9 -9
- data/docs/{OrderUpdateRequestCustomerInfo.md → OrderUpdateCustomerInfo.md} +6 -6
- data/docs/OrdersApi.md +17 -15
- data/docs/{UpdateOrderTaxRequest.md → OrdersUpdateTaxesRequest.md} +2 -2
- data/docs/PaymentLinkApi.md +7 -7
- data/docs/PaymentMethodBnplPayment.md +1 -1
- data/docs/PaymentMethodCardResponse.md +2 -0
- data/docs/PaymentMethodCashRecurrentResponse.md +1 -1
- data/docs/PaymentMethodCashResponse.md +1 -1
- data/docs/{PaymentMethodSpeiRecurrent.md → PaymentMethodSpeiRecurrentResponse.md} +2 -2
- data/docs/PaymentMethodTokenRequest.md +1 -1
- data/docs/PaymentMethodsApi.md +10 -10
- data/docs/{PayoutOrder.md → PayoutOrderRequest.md} +7 -5
- data/docs/{CustomerInfoJustCustomerIdResponse.md → PayoutOrderRequestCustomerInfo.md} +3 -3
- data/docs/PayoutOrderResponse.md +4 -4
- data/docs/PayoutOrderResponseCustomerInfo.md +3 -3
- data/docs/PayoutOrdersApi.md +10 -10
- data/docs/PayoutOrdersResponse.md +3 -3
- data/docs/PlansApi.md +16 -12
- data/docs/Product.md +3 -3
- data/docs/ProductsApi.md +3 -3
- data/docs/{ResendRequest.md → ResendEventRequest.md} +3 -3
- data/docs/RiskRulesData.md +1 -1
- data/docs/ShippingContactsApi.md +15 -15
- data/docs/ShippingLinesDataResponse.md +32 -0
- data/docs/ShippingRequest.md +1 -1
- data/docs/ShippingsApi.md +3 -3
- data/docs/SubscriptionDetails.md +36 -0
- data/docs/SubscriptionDetailsCard.md +40 -0
- data/docs/SubscriptionDetailsPlan.md +36 -0
- data/docs/SubscriptionsApi.md +28 -28
- data/docs/SubscriptionsCustomerPortalApi.md +159 -0
- data/docs/TaxLinesDataResponse.md +28 -0
- data/docs/TaxesApi.md +19 -19
- data/docs/TokenRequest.md +20 -0
- data/docs/{TokenCard.md → TokenRequestCard.md} +2 -2
- data/docs/{TokenCheckout.md → TokenRequestCheckout.md} +2 -2
- data/docs/TokenResponseCheckout.md +1 -1
- data/docs/TokensApi.md +8 -8
- data/docs/TransactionsApi.md +2 -2
- data/docs/TransfersApi.md +2 -2
- data/docs/UpdateCustomer.md +2 -2
- data/docs/UpdateCustomerFiscalEntitiesResponse.md +1 -1
- data/docs/UpdateCustomerPaymentMethodsResponse.md +3 -3
- data/docs/{CustomerUpdateFiscalEntitiesRequest.md → UpdateFiscalEntityRequest.md} +3 -3
- data/docs/{UpdatePaymentMethods.md → UpdatePaymentMethodsCard.md} +2 -2
- data/docs/{PlanUpdateRequest.md → UpdatePlan.md} +2 -2
- data/docs/{WebhookUpdateRequest.md → UpdateWebhook.md} +2 -2
- data/docs/{SubscriptionUpdateRequest.md → UpdatesASubscription.md} +2 -2
- data/docs/WebhookKeysApi.md +5 -5
- data/docs/WebhookLog.md +1 -1
- data/docs/WebhookResponse.md +1 -1
- data/docs/WebhooksApi.md +12 -12
- data/examples/one_time_charge_pbb.rb +23 -6
- data/lib/conekta/api/antifraud_api.rb +22 -22
- data/lib/conekta/api/api_keys_api.rb +10 -10
- data/lib/conekta/api/balances_api.rb +3 -3
- data/lib/conekta/api/charges_api.rb +9 -9
- data/lib/conekta/api/companies_api.rb +76 -12
- data/lib/conekta/api/customers_api.rb +32 -32
- data/lib/conekta/api/discounts_api.rb +12 -12
- data/lib/conekta/api/events_api.rb +16 -16
- data/lib/conekta/api/logs_api.rb +11 -11
- data/lib/conekta/api/orders_api.rb +28 -25
- data/lib/conekta/api/payment_link_api.rb +12 -12
- data/lib/conekta/api/payment_methods_api.rb +19 -19
- data/lib/conekta/api/payout_orders_api.rb +17 -17
- data/lib/conekta/api/plans_api.rb +25 -19
- data/lib/conekta/api/products_api.rb +8 -8
- data/lib/conekta/api/shipping_contacts_api.rb +26 -26
- data/lib/conekta/api/shippings_api.rb +8 -8
- data/lib/conekta/api/subscriptions_api.rb +52 -52
- data/lib/conekta/api/subscriptions_customer_portal_api.rb +168 -0
- data/lib/conekta/api/taxes_api.rb +26 -26
- data/lib/conekta/api/tokens_api.rb +14 -14
- data/lib/conekta/api/transactions_api.rb +5 -5
- data/lib/conekta/api/transfers_api.rb +5 -5
- data/lib/conekta/api/webhook_keys_api.rb +10 -10
- data/lib/conekta/api/webhooks_api.rb +21 -21
- data/lib/conekta/api_client.rb +31 -27
- data/lib/conekta/api_error.rb +2 -2
- data/lib/conekta/api_model_base.rb +88 -0
- data/lib/conekta/configuration.rb +2 -4
- data/lib/conekta/models/api_key_create_response.rb +26 -102
- data/lib/conekta/models/api_key_request.rb +22 -79
- data/lib/conekta/models/api_key_response.rb +12 -81
- data/lib/conekta/models/api_key_update_request.rb +12 -79
- data/lib/conekta/models/{balance_common_field.rb → balance_common_fiels_response.rb} +13 -80
- data/lib/conekta/models/balance_response.rb +21 -88
- data/lib/conekta/models/blacklist_rule_response.rb +12 -79
- data/lib/conekta/models/{payment_method_cash_response_all_of_agreements.rb → cash_agreements_response.rb} +13 -80
- data/lib/conekta/models/charge_order_response.rb +12 -83
- data/lib/conekta/models/charge_order_response_payment_method.rb +3 -3
- data/lib/conekta/models/charge_request.rb +22 -79
- data/lib/conekta/models/charge_request_payment_method.rb +4 -5
- data/lib/conekta/models/charge_response.rb +103 -84
- data/lib/conekta/models/charge_response_channel.rb +12 -79
- data/lib/conekta/models/charge_response_payment_method.rb +2 -2
- data/lib/conekta/models/charge_response_refunds.rb +32 -89
- data/lib/conekta/models/charge_response_refunds_data.rb +52 -79
- data/lib/conekta/models/charge_update_request.rb +12 -79
- data/lib/conekta/models/{risk_rules.rb → chargeback_file_response.rb} +48 -89
- data/lib/conekta/models/chargeback_response.rb +298 -0
- data/lib/conekta/models/charges_data_response.rb +103 -91
- data/lib/conekta/models/charges_order_response.rb +54 -88
- data/lib/conekta/models/checkout.rb +162 -91
- data/lib/conekta/models/checkout_order_template.rb +50 -95
- data/lib/conekta/models/checkout_order_template_customer_info.rb +5 -6
- data/lib/conekta/models/checkout_response.rb +89 -82
- data/lib/conekta/models/checkouts_response.rb +32 -89
- data/lib/conekta/models/company_document_request.rb +42 -79
- data/lib/conekta/models/company_document_response.rb +32 -79
- data/lib/conekta/models/company_response.rb +151 -85
- data/lib/conekta/models/create_company_request.rb +12 -79
- data/lib/conekta/models/create_company_request_bank_account_info.rb +12 -79
- data/lib/conekta/models/create_company_request_comercial_info.rb +12 -79
- data/lib/conekta/models/create_company_request_fiscal_info.rb +12 -79
- data/lib/conekta/models/create_customer_fiscal_entities_response.rb +54 -90
- data/lib/conekta/models/create_customer_payment_methods_request.rb +4 -5
- data/lib/conekta/models/create_customer_payment_methods_response.rb +4 -4
- data/lib/conekta/models/{create_risk_rules_data.rb → create_rule_whitelist_request.rb} +43 -80
- data/lib/conekta/models/customer.rb +44 -82
- data/lib/conekta/models/customer_antifraud_info.rb +12 -79
- data/lib/conekta/models/customer_antifraud_info_response.rb +12 -79
- data/lib/conekta/models/{product_order_response_all_of.rb → customer_details.rb} +30 -87
- data/lib/conekta/models/customer_fiscal_entities_data_response.rb +54 -90
- data/lib/conekta/models/customer_fiscal_entities_response.rb +32 -86
- data/lib/conekta/models/customer_info.rb +42 -79
- data/lib/conekta/models/{customer_info_just_customer_id.rb → customer_info_customer_id.rb} +23 -80
- data/lib/conekta/models/customer_payment_methods_data.rb +4 -4
- data/lib/conekta/models/customer_payment_methods_request.rb +4 -5
- data/lib/conekta/models/customer_payment_methods_response.rb +32 -89
- data/lib/conekta/models/{customer_shipping_contacts_data_response_all_of.rb → customer_portal_response.rb} +108 -105
- data/lib/conekta/models/customer_response.rb +62 -82
- data/lib/conekta/models/customer_response_shipping_contacts.rb +32 -86
- data/lib/conekta/models/customer_shipping_contacts_address.rb +22 -83
- data/lib/conekta/models/customer_shipping_contacts_data_response.rb +53 -89
- data/lib/conekta/models/{customer_shipping_contacts.rb → customer_shipping_contacts_request.rb} +25 -84
- data/lib/conekta/models/{customer_shipping_contacts_response_address.rb → customer_shipping_contacts_request_address.rb} +16 -91
- data/lib/conekta/models/customer_shipping_contacts_response.rb +13 -81
- data/lib/conekta/models/{customer_update_shipping_contacts.rb → customer_update_shipping_contacts_request.rb} +15 -84
- data/lib/conekta/models/customers_response.rb +47 -104
- data/lib/conekta/models/delete_api_keys_response.rb +12 -87
- data/lib/conekta/models/deleted_blacklist_rule_response.rb +12 -79
- data/lib/conekta/models/deleted_whitelist_rule_response.rb +12 -79
- data/lib/conekta/models/details_error.rb +12 -80
- data/lib/conekta/models/discount_lines_data_response.rb +62 -86
- data/lib/conekta/models/discount_lines_response.rb +62 -86
- data/lib/conekta/models/email_checkout_request.rb +22 -79
- data/lib/conekta/models/error.rb +12 -87
- data/lib/conekta/models/event_response.rb +12 -79
- data/lib/conekta/models/event_types.rb +2 -2
- data/lib/conekta/models/events_resend_response.rb +12 -79
- data/lib/conekta/models/fiscal_entity_address.rb +62 -80
- data/lib/conekta/models/{customer_fiscal_entities_request.rb → fiscal_entity_request.rb} +25 -84
- data/lib/conekta/models/{customer_address.rb → fiscal_entity_request_address.rb} +43 -80
- data/lib/conekta/models/get_api_keys_response.rb +32 -89
- data/lib/conekta/models/get_charges_response.rb +32 -89
- data/lib/conekta/models/get_companies_response.rb +32 -89
- data/lib/conekta/models/get_customer_payment_method_data_response.rb +4 -4
- data/lib/conekta/models/get_events_response.rb +32 -89
- data/lib/conekta/models/get_order_discount_lines_response.rb +32 -89
- data/lib/conekta/models/get_orders_response.rb +42 -90
- data/lib/conekta/models/get_payment_method_response.rb +32 -89
- data/lib/conekta/models/get_plans_response.rb +32 -89
- data/lib/conekta/models/get_transactions_response.rb +32 -89
- data/lib/conekta/models/get_transfers_response.rb +32 -89
- data/lib/conekta/models/get_webhook_keys_response.rb +32 -89
- data/lib/conekta/models/get_webhooks_response.rb +32 -89
- data/lib/conekta/models/{log_response.rb → log_response_for_request.rb} +45 -89
- data/lib/conekta/models/logs_response_data.rb +14 -88
- data/lib/conekta/models/{logs_response.rb → logs_response_for_request.rb} +13 -83
- data/lib/conekta/models/order_capture_request.rb +12 -79
- data/lib/conekta/models/order_channel_response.rb +12 -79
- data/lib/conekta/models/order_charges_response.rb +53 -87
- data/lib/conekta/models/{checkout_request.rb → order_checkout_request.rb} +81 -90
- data/lib/conekta/models/order_discount_lines_request.rb +32 -79
- data/lib/conekta/models/order_fiscal_entity_address_response.rb +62 -87
- data/lib/conekta/models/order_fiscal_entity_request.rb +22 -81
- data/lib/conekta/models/order_fiscal_entity_response.rb +52 -83
- data/lib/conekta/models/order_next_action_response.rb +12 -79
- data/lib/conekta/models/order_next_action_response_redirect_to_url.rb +12 -79
- data/lib/conekta/models/order_refund_request.rb +32 -79
- data/lib/conekta/models/order_request.rb +40 -89
- data/lib/conekta/models/order_request_customer_info.rb +5 -6
- data/lib/conekta/models/order_response.rb +32 -82
- data/lib/conekta/models/order_response_checkout.rb +146 -84
- data/lib/conekta/models/order_response_customer_info.rb +22 -98
- data/lib/conekta/models/order_response_discount_lines.rb +54 -87
- data/lib/conekta/models/order_response_products.rb +32 -89
- data/lib/conekta/models/order_response_shipping_contact.rb +41 -116
- data/lib/conekta/models/{order_discount_lines_response.rb → order_response_shipping_lines.rb} +56 -89
- data/lib/conekta/models/{order_response_charges.rb → order_response_tax_lines.rb} +56 -90
- data/lib/conekta/models/order_tax_request.rb +14 -81
- data/lib/conekta/models/{update_order_tax_response.rb → order_tax_response.rb} +25 -89
- data/lib/conekta/models/{order_update_request.rb → order_update.rb} +20 -91
- data/lib/conekta/models/{order_update_request_customer_info.rb → order_update_customer_info.rb} +6 -7
- data/lib/conekta/models/order_update_fiscal_entity_request.rb +22 -81
- data/lib/conekta/models/{update_order_tax_request.rb → orders_update_taxes_request.rb} +17 -90
- data/lib/conekta/models/payment_method_bank_transfer.rb +22 -96
- data/lib/conekta/models/payment_method_bnpl_payment.rb +66 -86
- data/lib/conekta/models/payment_method_bnpl_request.rb +64 -88
- data/lib/conekta/models/payment_method_card.rb +22 -86
- data/lib/conekta/models/payment_method_card_request.rb +48 -92
- data/lib/conekta/models/payment_method_card_response.rb +63 -87
- data/lib/conekta/models/payment_method_cash.rb +22 -89
- data/lib/conekta/models/payment_method_cash_recurrent_response.rb +53 -87
- data/lib/conekta/models/payment_method_cash_request.rb +22 -86
- data/lib/conekta/models/payment_method_cash_response.rb +53 -87
- data/lib/conekta/models/payment_method_general_request.rb +22 -79
- data/lib/conekta/models/payment_method_pbb_payment.rb +67 -91
- data/lib/conekta/models/payment_method_pbb_request.rb +22 -86
- data/lib/conekta/models/{payment_method_spei_recurrent.rb → payment_method_spei_recurrent_response.rb} +53 -87
- data/lib/conekta/models/payment_method_spei_request.rb +22 -86
- data/lib/conekta/models/payment_method_token_request.rb +33 -87
- data/lib/conekta/models/payout.rb +22 -79
- data/lib/conekta/models/payout_method.rb +22 -79
- data/lib/conekta/models/payout_order_payouts_item.rb +62 -79
- data/lib/conekta/models/{payout_order.rb → payout_order_request.rb} +102 -82
- data/lib/conekta/models/{customer_info_just_customer_id_response.rb → payout_order_request_customer_info.rb} +31 -80
- data/lib/conekta/models/payout_order_response.rb +146 -79
- data/lib/conekta/models/payout_order_response_customer_info.rb +38 -103
- data/lib/conekta/models/payout_orders_response.rb +47 -104
- data/lib/conekta/models/plan_request.rb +22 -79
- data/lib/conekta/models/plan_response.rb +12 -81
- data/lib/conekta/models/product.rb +22 -79
- data/lib/conekta/models/product_data_response.rb +22 -86
- data/lib/conekta/models/product_order_response.rb +22 -86
- data/lib/conekta/models/{resend_request.rb → resend_event_request.rb} +23 -80
- data/lib/conekta/models/risk_rules_data.rb +12 -79
- data/lib/conekta/models/risk_rules_list.rb +32 -89
- data/lib/conekta/models/{discount_lines_response_all_of.rb → shipping_lines_data_response.rb} +105 -99
- data/lib/conekta/models/shipping_order_response.rb +12 -86
- data/lib/conekta/models/shipping_request.rb +12 -79
- data/lib/conekta/models/sms_checkout_request.rb +22 -79
- data/lib/conekta/models/{order_response_shipping_contact_all_of.rb → subscription_details.rb} +87 -90
- data/lib/conekta/models/{payment_method_card_response_all_of.rb → subscription_details_card.rb} +68 -118
- data/lib/conekta/models/{product_data_response_all_of.rb → subscription_details_plan.rb} +83 -87
- data/lib/conekta/models/subscription_events_response.rb +32 -89
- data/lib/conekta/models/subscription_request.rb +22 -79
- data/lib/conekta/models/subscription_response.rb +12 -86
- data/lib/conekta/models/{payment_method_response.rb → tax_lines_data_response.rb} +118 -112
- data/lib/conekta/models/{token.rb → token_request.rb} +15 -84
- data/lib/conekta/models/{token_card.rb → token_request_card.rb} +33 -80
- data/lib/conekta/models/{token_checkout.rb → token_request_checkout.rb} +13 -80
- data/lib/conekta/models/token_response.rb +52 -80
- data/lib/conekta/models/token_response_checkout.rb +12 -79
- data/lib/conekta/models/transaction_response.rb +112 -79
- data/lib/conekta/models/transfer_destination_response.rb +12 -79
- data/lib/conekta/models/transfer_method_response.rb +12 -79
- data/lib/conekta/models/transfer_response.rb +12 -79
- data/lib/conekta/models/transfers_response.rb +12 -79
- data/lib/conekta/models/update_customer.rb +14 -82
- data/lib/conekta/models/update_customer_antifraud_info.rb +12 -79
- data/lib/conekta/models/update_customer_fiscal_entities_response.rb +54 -90
- data/lib/conekta/models/update_customer_payment_methods_response.rb +4 -4
- data/lib/conekta/models/{customer_update_fiscal_entities_request.rb → update_fiscal_entity_request.rb} +15 -84
- data/lib/conekta/models/update_order_discount_lines_request.rb +12 -79
- data/lib/conekta/models/{update_payment_methods.rb → update_payment_methods_card.rb} +13 -80
- data/lib/conekta/models/{plan_update_request.rb → update_plan.rb} +13 -80
- data/lib/conekta/models/update_product.rb +14 -85
- data/lib/conekta/models/{webhook_update_request.rb → update_webhook.rb} +13 -80
- data/lib/conekta/models/{subscription_update_request.rb → updates_a_subscription.rb} +13 -80
- data/lib/conekta/models/webhook_key_create_response.rb +12 -79
- data/lib/conekta/models/webhook_key_delete_response.rb +12 -79
- data/lib/conekta/models/webhook_key_request.rb +12 -79
- data/lib/conekta/models/webhook_key_response.rb +12 -80
- data/lib/conekta/models/webhook_key_update_request.rb +12 -79
- data/lib/conekta/models/webhook_log.rb +12 -79
- data/lib/conekta/models/webhook_request.rb +12 -79
- data/lib/conekta/models/webhook_response.rb +12 -79
- data/lib/conekta/models/whitelistlist_rule_response.rb +12 -79
- data/lib/conekta/version.rb +3 -3
- data/lib/conekta.rb +44 -42
- data/spec/api/antifraud_api_spec.rb +4 -4
- data/spec/api/api_keys_api_spec.rb +2 -2
- data/spec/api/balances_api_spec.rb +2 -2
- data/spec/api/charges_api_spec.rb +2 -2
- data/spec/api/companies_api_spec.rb +14 -2
- data/spec/api/customers_api_spec.rb +4 -4
- data/spec/api/discounts_api_spec.rb +2 -2
- data/spec/api/events_api_spec.rb +3 -3
- data/spec/api/logs_api_spec.rb +4 -4
- data/spec/api/orders_api_spec.rb +4 -3
- data/spec/api/payment_link_api_spec.rb +2 -2
- data/spec/api/payment_methods_api_spec.rb +3 -3
- data/spec/api/payout_orders_api_spec.rb +3 -3
- data/spec/api/plans_api_spec.rb +5 -3
- data/spec/api/products_api_spec.rb +2 -2
- data/spec/api/shipping_contacts_api_spec.rb +4 -4
- data/spec/api/shippings_api_spec.rb +2 -2
- data/spec/api/subscriptions_api_spec.rb +4 -4
- data/spec/api/subscriptions_customer_portal_api_spec.rb +63 -0
- data/spec/api/taxes_api_spec.rb +6 -6
- data/spec/api/tokens_api_spec.rb +4 -4
- data/spec/api/transactions_api_spec.rb +2 -2
- data/spec/api/transfers_api_spec.rb +2 -2
- data/spec/api/webhook_keys_api_spec.rb +2 -2
- data/spec/api/webhooks_api_spec.rb +3 -3
- data/spec/spec_helper.rb +2 -2
- metadata +104 -147
- data/docs/ApiKeyResponseOnDelete.md +0 -34
- data/docs/ChargesOrderResponseAllOfData.md +0 -52
- data/docs/CheckoutRequest.md +0 -40
- data/docs/CompanyResponseDocumentsInner.md +0 -22
- data/docs/CustomerPaymentMethodRequest.md +0 -18
- data/docs/Details.md +0 -18
- data/docs/LogResponse.md +0 -56
- data/docs/OrderCustomerInfoResponse.md +0 -28
- data/docs/OrdersResponse.md +0 -18
- data/docs/Pagination.md +0 -20
- data/docs/PaymentMethod.md +0 -20
- data/docs/PaymentMethodResponse.md +0 -26
- data/docs/Token.md +0 -20
- data/lib/conekta/models/api_key_create_response_all_of.rb +0 -215
- data/lib/conekta/models/api_key_response_on_delete.rb +0 -297
- data/lib/conekta/models/charge_data_payment_method_bank_transfer_response.rb +0 -362
- data/lib/conekta/models/charge_data_payment_method_card_response.rb +0 -308
- data/lib/conekta/models/charge_data_payment_method_cash_response.rb +0 -281
- data/lib/conekta/models/charge_response_refunds_all_of.rb +0 -217
- data/lib/conekta/models/charges_order_response_all_of_data.rb +0 -439
- data/lib/conekta/models/checkouts_response_all_of.rb +0 -216
- data/lib/conekta/models/company_fiscal_info_address_response.rb +0 -330
- data/lib/conekta/models/company_fiscal_info_response.rb +0 -309
- data/lib/conekta/models/company_payout_destination_response.rb +0 -312
- data/lib/conekta/models/company_response_documents_inner.rb +0 -270
- data/lib/conekta/models/create_customer_fiscal_entities_response_all_of.rb +0 -271
- data/lib/conekta/models/customer_fiscal_entities_request_address.rb +0 -308
- data/lib/conekta/models/customer_fiscal_entities_response_all_of.rb +0 -216
- data/lib/conekta/models/customer_payment_method_request.rb +0 -223
- data/lib/conekta/models/customer_payment_methods.rb +0 -216
- data/lib/conekta/models/customer_response_shipping_contacts_all_of.rb +0 -216
- data/lib/conekta/models/customers_response_all_of.rb +0 -216
- data/lib/conekta/models/delete_api_keys_response_all_of.rb +0 -214
- data/lib/conekta/models/details.rb +0 -216
- data/lib/conekta/models/error_all_of.rb +0 -234
- data/lib/conekta/models/get_api_keys_response_all_of.rb +0 -216
- data/lib/conekta/models/get_charges_response_all_of.rb +0 -216
- data/lib/conekta/models/get_companies_response_all_of.rb +0 -216
- data/lib/conekta/models/get_events_response_all_of.rb +0 -216
- data/lib/conekta/models/get_order_discount_lines_response_all_of.rb +0 -216
- data/lib/conekta/models/get_payment_method_response_all_of.rb +0 -216
- data/lib/conekta/models/get_plans_response_all_of.rb +0 -216
- data/lib/conekta/models/get_transactions_response_all_of.rb +0 -217
- data/lib/conekta/models/get_transfers_response_all_of.rb +0 -217
- data/lib/conekta/models/get_webhook_keys_response_all_of.rb +0 -216
- data/lib/conekta/models/get_webhooks_response_all_of.rb +0 -216
- data/lib/conekta/models/order_customer_info_response.rb +0 -263
- data/lib/conekta/models/order_fiscal_entity_address_response_all_of.rb +0 -214
- data/lib/conekta/models/order_response_charges_all_of.rb +0 -216
- data/lib/conekta/models/order_response_customer_info_all_of.rb +0 -214
- data/lib/conekta/models/order_response_discount_lines_all_of.rb +0 -216
- data/lib/conekta/models/order_response_products_all_of.rb +0 -216
- data/lib/conekta/models/orders_response.rb +0 -223
- data/lib/conekta/models/page.rb +0 -228
- data/lib/conekta/models/pagination.rb +0 -240
- data/lib/conekta/models/payment_method.rb +0 -230
- data/lib/conekta/models/payment_method_card_request_all_of.rb +0 -215
- data/lib/conekta/models/payment_method_cash_request_all_of.rb +0 -214
- data/lib/conekta/models/payment_method_cash_response_all_of.rb +0 -251
- data/lib/conekta/models/payment_method_spei_recurrent_all_of.rb +0 -224
- data/lib/conekta/models/update_customer_fiscal_entities_response_all_of.rb +0 -271
- data/lib/conekta/models/update_order_tax_response_all_of.rb +0 -232
|
@@ -3,10 +3,10 @@
|
|
|
3
3
|
|
|
4
4
|
#Conekta sdk
|
|
5
5
|
|
|
6
|
-
The version of the OpenAPI document: 2.
|
|
6
|
+
The version of the OpenAPI document: 2.3.0
|
|
7
7
|
Contact: engineering@conekta.com
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
|
9
|
-
Generator version: 7.
|
|
9
|
+
Generator version: 7.24.0
|
|
10
10
|
|
|
11
11
|
=end
|
|
12
12
|
|
|
@@ -14,7 +14,9 @@ require 'date'
|
|
|
14
14
|
require 'time'
|
|
15
15
|
|
|
16
16
|
module Conekta
|
|
17
|
-
class PayoutOrdersResponse
|
|
17
|
+
class PayoutOrdersResponse < ApiModelBase
|
|
18
|
+
attr_accessor :data
|
|
19
|
+
|
|
18
20
|
# Indicates if there are more pages to be requested
|
|
19
21
|
attr_accessor :has_more
|
|
20
22
|
|
|
@@ -27,51 +29,44 @@ module Conekta
|
|
|
27
29
|
# Url of the previous page.
|
|
28
30
|
attr_accessor :previous_page_url
|
|
29
31
|
|
|
30
|
-
attr_accessor :data
|
|
31
|
-
|
|
32
32
|
# Attribute mapping from ruby-style variable name to JSON key.
|
|
33
33
|
def self.attribute_map
|
|
34
34
|
{
|
|
35
|
+
:'data' => :'data',
|
|
35
36
|
:'has_more' => :'has_more',
|
|
36
37
|
:'object' => :'object',
|
|
37
38
|
:'next_page_url' => :'next_page_url',
|
|
38
|
-
:'previous_page_url' => :'previous_page_url'
|
|
39
|
-
:'data' => :'data'
|
|
39
|
+
:'previous_page_url' => :'previous_page_url'
|
|
40
40
|
}
|
|
41
41
|
end
|
|
42
42
|
|
|
43
|
+
# Returns attribute mapping this model knows about
|
|
44
|
+
def self.acceptable_attribute_map
|
|
45
|
+
attribute_map
|
|
46
|
+
end
|
|
47
|
+
|
|
43
48
|
# Returns all the JSON keys this model knows about
|
|
44
49
|
def self.acceptable_attributes
|
|
45
|
-
|
|
50
|
+
acceptable_attribute_map.values
|
|
46
51
|
end
|
|
47
52
|
|
|
48
53
|
# Attribute type mapping.
|
|
49
54
|
def self.openapi_types
|
|
50
55
|
{
|
|
56
|
+
:'data' => :'Array<PayoutOrderResponse>',
|
|
51
57
|
:'has_more' => :'Boolean',
|
|
52
58
|
:'object' => :'String',
|
|
53
59
|
:'next_page_url' => :'String',
|
|
54
|
-
:'previous_page_url' => :'String'
|
|
55
|
-
:'data' => :'Array<PayoutOrderResponse>'
|
|
60
|
+
:'previous_page_url' => :'String'
|
|
56
61
|
}
|
|
57
62
|
end
|
|
58
63
|
|
|
59
64
|
# List of attributes with nullable: true
|
|
60
65
|
def self.openapi_nullable
|
|
61
66
|
Set.new([
|
|
62
|
-
:'next_page_url',
|
|
63
|
-
:'previous_page_url',
|
|
64
67
|
])
|
|
65
68
|
end
|
|
66
69
|
|
|
67
|
-
# List of class defined in allOf (OpenAPI v3)
|
|
68
|
-
def self.openapi_all_of
|
|
69
|
-
[
|
|
70
|
-
:'Page',
|
|
71
|
-
:'Pagination'
|
|
72
|
-
]
|
|
73
|
-
end
|
|
74
|
-
|
|
75
70
|
# Initializes the object
|
|
76
71
|
# @param [Hash] attributes Model attributes in the form of hash
|
|
77
72
|
def initialize(attributes = {})
|
|
@@ -80,13 +75,20 @@ module Conekta
|
|
|
80
75
|
end
|
|
81
76
|
|
|
82
77
|
# check to see if the attribute exists and convert string to symbol for hash key
|
|
78
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
83
79
|
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
84
|
-
if (!
|
|
85
|
-
fail ArgumentError, "`#{k}` is not a valid attribute in `Conekta::PayoutOrdersResponse`. Please check the name to make sure it's valid. List of attributes: " +
|
|
80
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
81
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Conekta::PayoutOrdersResponse`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
86
82
|
end
|
|
87
83
|
h[k.to_sym] = v
|
|
88
84
|
}
|
|
89
85
|
|
|
86
|
+
if attributes.key?(:'data')
|
|
87
|
+
if (value = attributes[:'data']).is_a?(Array)
|
|
88
|
+
self.data = value
|
|
89
|
+
end
|
|
90
|
+
end
|
|
91
|
+
|
|
90
92
|
if attributes.key?(:'has_more')
|
|
91
93
|
self.has_more = attributes[:'has_more']
|
|
92
94
|
else
|
|
@@ -106,12 +108,6 @@ module Conekta
|
|
|
106
108
|
if attributes.key?(:'previous_page_url')
|
|
107
109
|
self.previous_page_url = attributes[:'previous_page_url']
|
|
108
110
|
end
|
|
109
|
-
|
|
110
|
-
if attributes.key?(:'data')
|
|
111
|
-
if (value = attributes[:'data']).is_a?(Array)
|
|
112
|
-
self.data = value
|
|
113
|
-
end
|
|
114
|
-
end
|
|
115
111
|
end
|
|
116
112
|
|
|
117
113
|
# Show invalid properties with the reasons. Usually used together with valid?
|
|
@@ -139,16 +135,36 @@ module Conekta
|
|
|
139
135
|
true
|
|
140
136
|
end
|
|
141
137
|
|
|
138
|
+
# Custom attribute writer method with validation
|
|
139
|
+
# @param [Object] has_more Value to be assigned
|
|
140
|
+
def has_more=(has_more)
|
|
141
|
+
if has_more.nil?
|
|
142
|
+
fail ArgumentError, 'has_more cannot be nil'
|
|
143
|
+
end
|
|
144
|
+
|
|
145
|
+
@has_more = has_more
|
|
146
|
+
end
|
|
147
|
+
|
|
148
|
+
# Custom attribute writer method with validation
|
|
149
|
+
# @param [Object] object Value to be assigned
|
|
150
|
+
def object=(object)
|
|
151
|
+
if object.nil?
|
|
152
|
+
fail ArgumentError, 'object cannot be nil'
|
|
153
|
+
end
|
|
154
|
+
|
|
155
|
+
@object = object
|
|
156
|
+
end
|
|
157
|
+
|
|
142
158
|
# Checks equality by comparing each attribute.
|
|
143
159
|
# @param [Object] Object to be compared
|
|
144
160
|
def ==(o)
|
|
145
161
|
return true if self.equal?(o)
|
|
146
162
|
self.class == o.class &&
|
|
163
|
+
data == o.data &&
|
|
147
164
|
has_more == o.has_more &&
|
|
148
165
|
object == o.object &&
|
|
149
166
|
next_page_url == o.next_page_url &&
|
|
150
|
-
previous_page_url == o.previous_page_url
|
|
151
|
-
data == o.data
|
|
167
|
+
previous_page_url == o.previous_page_url
|
|
152
168
|
end
|
|
153
169
|
|
|
154
170
|
# @see the `==` method
|
|
@@ -160,7 +176,7 @@ module Conekta
|
|
|
160
176
|
# Calculates hash code according to all attributes.
|
|
161
177
|
# @return [Integer] Hash code
|
|
162
178
|
def hash
|
|
163
|
-
[has_more, object, next_page_url, previous_page_url
|
|
179
|
+
[data, has_more, object, next_page_url, previous_page_url].hash
|
|
164
180
|
end
|
|
165
181
|
|
|
166
182
|
# Builds the object from hash
|
|
@@ -186,61 +202,6 @@ module Conekta
|
|
|
186
202
|
new(transformed_hash)
|
|
187
203
|
end
|
|
188
204
|
|
|
189
|
-
# Deserializes the data based on type
|
|
190
|
-
# @param string type Data type
|
|
191
|
-
# @param string value Value to be deserialized
|
|
192
|
-
# @return [Object] Deserialized data
|
|
193
|
-
def self._deserialize(type, value)
|
|
194
|
-
case type.to_sym
|
|
195
|
-
when :Time
|
|
196
|
-
Time.parse(value)
|
|
197
|
-
when :Date
|
|
198
|
-
Date.parse(value)
|
|
199
|
-
when :String
|
|
200
|
-
value.to_s
|
|
201
|
-
when :Integer
|
|
202
|
-
value.to_i
|
|
203
|
-
when :Float
|
|
204
|
-
value.to_f
|
|
205
|
-
when :Boolean
|
|
206
|
-
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
|
207
|
-
true
|
|
208
|
-
else
|
|
209
|
-
false
|
|
210
|
-
end
|
|
211
|
-
when :Object
|
|
212
|
-
# generic object (usually a Hash), return directly
|
|
213
|
-
value
|
|
214
|
-
when /\AArray<(?<inner_type>.+)>\z/
|
|
215
|
-
inner_type = Regexp.last_match[:inner_type]
|
|
216
|
-
value.map { |v| _deserialize(inner_type, v) }
|
|
217
|
-
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
|
218
|
-
k_type = Regexp.last_match[:k_type]
|
|
219
|
-
v_type = Regexp.last_match[:v_type]
|
|
220
|
-
{}.tap do |hash|
|
|
221
|
-
value.each do |k, v|
|
|
222
|
-
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
|
223
|
-
end
|
|
224
|
-
end
|
|
225
|
-
else # model
|
|
226
|
-
# models (e.g. Pet) or oneOf
|
|
227
|
-
klass = Conekta.const_get(type)
|
|
228
|
-
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
|
229
|
-
end
|
|
230
|
-
end
|
|
231
|
-
|
|
232
|
-
# Returns the string representation of the object
|
|
233
|
-
# @return [String] String presentation of the object
|
|
234
|
-
def to_s
|
|
235
|
-
to_hash.to_s
|
|
236
|
-
end
|
|
237
|
-
|
|
238
|
-
# to_body is an alias to to_hash (backward compatibility)
|
|
239
|
-
# @return [Hash] Returns the object in the form of hash
|
|
240
|
-
def to_body
|
|
241
|
-
to_hash
|
|
242
|
-
end
|
|
243
|
-
|
|
244
205
|
# Returns the object in the form of hash
|
|
245
206
|
# @return [Hash] Returns the object in the form of hash
|
|
246
207
|
def to_hash
|
|
@@ -257,24 +218,6 @@ module Conekta
|
|
|
257
218
|
hash
|
|
258
219
|
end
|
|
259
220
|
|
|
260
|
-
# Outputs non-array value in the form of hash
|
|
261
|
-
# For object, use to_hash. Otherwise, just return the value
|
|
262
|
-
# @param [Object] value Any valid value
|
|
263
|
-
# @return [Hash] Returns the value in the form of hash
|
|
264
|
-
def _to_hash(value)
|
|
265
|
-
if value.is_a?(Array)
|
|
266
|
-
value.compact.map { |v| _to_hash(v) }
|
|
267
|
-
elsif value.is_a?(Hash)
|
|
268
|
-
{}.tap do |hash|
|
|
269
|
-
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
270
|
-
end
|
|
271
|
-
elsif value.respond_to? :to_hash
|
|
272
|
-
value.to_hash
|
|
273
|
-
else
|
|
274
|
-
value
|
|
275
|
-
end
|
|
276
|
-
end
|
|
277
|
-
|
|
278
221
|
end
|
|
279
222
|
|
|
280
223
|
end
|
|
@@ -3,10 +3,10 @@
|
|
|
3
3
|
|
|
4
4
|
#Conekta sdk
|
|
5
5
|
|
|
6
|
-
The version of the OpenAPI document: 2.
|
|
6
|
+
The version of the OpenAPI document: 2.3.0
|
|
7
7
|
Contact: engineering@conekta.com
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
|
9
|
-
Generator version: 7.
|
|
9
|
+
Generator version: 7.24.0
|
|
10
10
|
|
|
11
11
|
=end
|
|
12
12
|
|
|
@@ -15,7 +15,7 @@ require 'time'
|
|
|
15
15
|
|
|
16
16
|
module Conekta
|
|
17
17
|
# a plan
|
|
18
|
-
class PlanRequest
|
|
18
|
+
class PlanRequest < ApiModelBase
|
|
19
19
|
# The amount in cents that will be charged on the interval specified.
|
|
20
20
|
attr_accessor :amount
|
|
21
21
|
|
|
@@ -84,9 +84,14 @@ module Conekta
|
|
|
84
84
|
}
|
|
85
85
|
end
|
|
86
86
|
|
|
87
|
+
# Returns attribute mapping this model knows about
|
|
88
|
+
def self.acceptable_attribute_map
|
|
89
|
+
attribute_map
|
|
90
|
+
end
|
|
91
|
+
|
|
87
92
|
# Returns all the JSON keys this model knows about
|
|
88
93
|
def self.acceptable_attributes
|
|
89
|
-
|
|
94
|
+
acceptable_attribute_map.values
|
|
90
95
|
end
|
|
91
96
|
|
|
92
97
|
# Attribute type mapping.
|
|
@@ -119,9 +124,10 @@ module Conekta
|
|
|
119
124
|
end
|
|
120
125
|
|
|
121
126
|
# check to see if the attribute exists and convert string to symbol for hash key
|
|
127
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
122
128
|
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
123
|
-
if (!
|
|
124
|
-
fail ArgumentError, "`#{k}` is not a valid attribute in `Conekta::PlanRequest`. Please check the name to make sure it's valid. List of attributes: " +
|
|
129
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
130
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Conekta::PlanRequest`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
125
131
|
end
|
|
126
132
|
h[k.to_sym] = v
|
|
127
133
|
}
|
|
@@ -289,6 +295,16 @@ module Conekta
|
|
|
289
295
|
@interval = interval
|
|
290
296
|
end
|
|
291
297
|
|
|
298
|
+
# Custom attribute writer method with validation
|
|
299
|
+
# @param [Object] name Value to be assigned
|
|
300
|
+
def name=(name)
|
|
301
|
+
if name.nil?
|
|
302
|
+
fail ArgumentError, 'name cannot be nil'
|
|
303
|
+
end
|
|
304
|
+
|
|
305
|
+
@name = name
|
|
306
|
+
end
|
|
307
|
+
|
|
292
308
|
# Custom attribute writer method with validation
|
|
293
309
|
# @param [Object] max_retries Value to be assigned
|
|
294
310
|
def max_retries=(max_retries)
|
|
@@ -369,61 +385,6 @@ module Conekta
|
|
|
369
385
|
new(transformed_hash)
|
|
370
386
|
end
|
|
371
387
|
|
|
372
|
-
# Deserializes the data based on type
|
|
373
|
-
# @param string type Data type
|
|
374
|
-
# @param string value Value to be deserialized
|
|
375
|
-
# @return [Object] Deserialized data
|
|
376
|
-
def self._deserialize(type, value)
|
|
377
|
-
case type.to_sym
|
|
378
|
-
when :Time
|
|
379
|
-
Time.parse(value)
|
|
380
|
-
when :Date
|
|
381
|
-
Date.parse(value)
|
|
382
|
-
when :String
|
|
383
|
-
value.to_s
|
|
384
|
-
when :Integer
|
|
385
|
-
value.to_i
|
|
386
|
-
when :Float
|
|
387
|
-
value.to_f
|
|
388
|
-
when :Boolean
|
|
389
|
-
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
|
390
|
-
true
|
|
391
|
-
else
|
|
392
|
-
false
|
|
393
|
-
end
|
|
394
|
-
when :Object
|
|
395
|
-
# generic object (usually a Hash), return directly
|
|
396
|
-
value
|
|
397
|
-
when /\AArray<(?<inner_type>.+)>\z/
|
|
398
|
-
inner_type = Regexp.last_match[:inner_type]
|
|
399
|
-
value.map { |v| _deserialize(inner_type, v) }
|
|
400
|
-
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
|
401
|
-
k_type = Regexp.last_match[:k_type]
|
|
402
|
-
v_type = Regexp.last_match[:v_type]
|
|
403
|
-
{}.tap do |hash|
|
|
404
|
-
value.each do |k, v|
|
|
405
|
-
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
|
406
|
-
end
|
|
407
|
-
end
|
|
408
|
-
else # model
|
|
409
|
-
# models (e.g. Pet) or oneOf
|
|
410
|
-
klass = Conekta.const_get(type)
|
|
411
|
-
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
|
412
|
-
end
|
|
413
|
-
end
|
|
414
|
-
|
|
415
|
-
# Returns the string representation of the object
|
|
416
|
-
# @return [String] String presentation of the object
|
|
417
|
-
def to_s
|
|
418
|
-
to_hash.to_s
|
|
419
|
-
end
|
|
420
|
-
|
|
421
|
-
# to_body is an alias to to_hash (backward compatibility)
|
|
422
|
-
# @return [Hash] Returns the object in the form of hash
|
|
423
|
-
def to_body
|
|
424
|
-
to_hash
|
|
425
|
-
end
|
|
426
|
-
|
|
427
388
|
# Returns the object in the form of hash
|
|
428
389
|
# @return [Hash] Returns the object in the form of hash
|
|
429
390
|
def to_hash
|
|
@@ -440,24 +401,6 @@ module Conekta
|
|
|
440
401
|
hash
|
|
441
402
|
end
|
|
442
403
|
|
|
443
|
-
# Outputs non-array value in the form of hash
|
|
444
|
-
# For object, use to_hash. Otherwise, just return the value
|
|
445
|
-
# @param [Object] value Any valid value
|
|
446
|
-
# @return [Hash] Returns the value in the form of hash
|
|
447
|
-
def _to_hash(value)
|
|
448
|
-
if value.is_a?(Array)
|
|
449
|
-
value.compact.map { |v| _to_hash(v) }
|
|
450
|
-
elsif value.is_a?(Hash)
|
|
451
|
-
{}.tap do |hash|
|
|
452
|
-
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
453
|
-
end
|
|
454
|
-
elsif value.respond_to? :to_hash
|
|
455
|
-
value.to_hash
|
|
456
|
-
else
|
|
457
|
-
value
|
|
458
|
-
end
|
|
459
|
-
end
|
|
460
|
-
|
|
461
404
|
end
|
|
462
405
|
|
|
463
406
|
end
|
|
@@ -3,10 +3,10 @@
|
|
|
3
3
|
|
|
4
4
|
#Conekta sdk
|
|
5
5
|
|
|
6
|
-
The version of the OpenAPI document: 2.
|
|
6
|
+
The version of the OpenAPI document: 2.3.0
|
|
7
7
|
Contact: engineering@conekta.com
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
|
9
|
-
Generator version: 7.
|
|
9
|
+
Generator version: 7.24.0
|
|
10
10
|
|
|
11
11
|
=end
|
|
12
12
|
|
|
@@ -15,7 +15,7 @@ require 'time'
|
|
|
15
15
|
|
|
16
16
|
module Conekta
|
|
17
17
|
# plans model
|
|
18
|
-
class PlanResponse
|
|
18
|
+
class PlanResponse < ApiModelBase
|
|
19
19
|
attr_accessor :amount
|
|
20
20
|
|
|
21
21
|
attr_accessor :created_at
|
|
@@ -61,9 +61,14 @@ module Conekta
|
|
|
61
61
|
}
|
|
62
62
|
end
|
|
63
63
|
|
|
64
|
+
# Returns attribute mapping this model knows about
|
|
65
|
+
def self.acceptable_attribute_map
|
|
66
|
+
attribute_map
|
|
67
|
+
end
|
|
68
|
+
|
|
64
69
|
# Returns all the JSON keys this model knows about
|
|
65
70
|
def self.acceptable_attributes
|
|
66
|
-
|
|
71
|
+
acceptable_attribute_map.values
|
|
67
72
|
end
|
|
68
73
|
|
|
69
74
|
# Attribute type mapping.
|
|
@@ -88,8 +93,6 @@ module Conekta
|
|
|
88
93
|
# List of attributes with nullable: true
|
|
89
94
|
def self.openapi_nullable
|
|
90
95
|
Set.new([
|
|
91
|
-
:'expiry_count',
|
|
92
|
-
:'trial_period_days',
|
|
93
96
|
])
|
|
94
97
|
end
|
|
95
98
|
|
|
@@ -101,9 +104,10 @@ module Conekta
|
|
|
101
104
|
end
|
|
102
105
|
|
|
103
106
|
# check to see if the attribute exists and convert string to symbol for hash key
|
|
107
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
104
108
|
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
105
|
-
if (!
|
|
106
|
-
fail ArgumentError, "`#{k}` is not a valid attribute in `Conekta::PlanResponse`. Please check the name to make sure it's valid. List of attributes: " +
|
|
109
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
110
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Conekta::PlanResponse`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
107
111
|
end
|
|
108
112
|
h[k.to_sym] = v
|
|
109
113
|
}
|
|
@@ -250,61 +254,6 @@ module Conekta
|
|
|
250
254
|
new(transformed_hash)
|
|
251
255
|
end
|
|
252
256
|
|
|
253
|
-
# Deserializes the data based on type
|
|
254
|
-
# @param string type Data type
|
|
255
|
-
# @param string value Value to be deserialized
|
|
256
|
-
# @return [Object] Deserialized data
|
|
257
|
-
def self._deserialize(type, value)
|
|
258
|
-
case type.to_sym
|
|
259
|
-
when :Time
|
|
260
|
-
Time.parse(value)
|
|
261
|
-
when :Date
|
|
262
|
-
Date.parse(value)
|
|
263
|
-
when :String
|
|
264
|
-
value.to_s
|
|
265
|
-
when :Integer
|
|
266
|
-
value.to_i
|
|
267
|
-
when :Float
|
|
268
|
-
value.to_f
|
|
269
|
-
when :Boolean
|
|
270
|
-
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
|
271
|
-
true
|
|
272
|
-
else
|
|
273
|
-
false
|
|
274
|
-
end
|
|
275
|
-
when :Object
|
|
276
|
-
# generic object (usually a Hash), return directly
|
|
277
|
-
value
|
|
278
|
-
when /\AArray<(?<inner_type>.+)>\z/
|
|
279
|
-
inner_type = Regexp.last_match[:inner_type]
|
|
280
|
-
value.map { |v| _deserialize(inner_type, v) }
|
|
281
|
-
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
|
282
|
-
k_type = Regexp.last_match[:k_type]
|
|
283
|
-
v_type = Regexp.last_match[:v_type]
|
|
284
|
-
{}.tap do |hash|
|
|
285
|
-
value.each do |k, v|
|
|
286
|
-
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
|
287
|
-
end
|
|
288
|
-
end
|
|
289
|
-
else # model
|
|
290
|
-
# models (e.g. Pet) or oneOf
|
|
291
|
-
klass = Conekta.const_get(type)
|
|
292
|
-
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
|
293
|
-
end
|
|
294
|
-
end
|
|
295
|
-
|
|
296
|
-
# Returns the string representation of the object
|
|
297
|
-
# @return [String] String presentation of the object
|
|
298
|
-
def to_s
|
|
299
|
-
to_hash.to_s
|
|
300
|
-
end
|
|
301
|
-
|
|
302
|
-
# to_body is an alias to to_hash (backward compatibility)
|
|
303
|
-
# @return [Hash] Returns the object in the form of hash
|
|
304
|
-
def to_body
|
|
305
|
-
to_hash
|
|
306
|
-
end
|
|
307
|
-
|
|
308
257
|
# Returns the object in the form of hash
|
|
309
258
|
# @return [Hash] Returns the object in the form of hash
|
|
310
259
|
def to_hash
|
|
@@ -321,24 +270,6 @@ module Conekta
|
|
|
321
270
|
hash
|
|
322
271
|
end
|
|
323
272
|
|
|
324
|
-
# Outputs non-array value in the form of hash
|
|
325
|
-
# For object, use to_hash. Otherwise, just return the value
|
|
326
|
-
# @param [Object] value Any valid value
|
|
327
|
-
# @return [Hash] Returns the value in the form of hash
|
|
328
|
-
def _to_hash(value)
|
|
329
|
-
if value.is_a?(Array)
|
|
330
|
-
value.compact.map { |v| _to_hash(v) }
|
|
331
|
-
elsif value.is_a?(Hash)
|
|
332
|
-
{}.tap do |hash|
|
|
333
|
-
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
334
|
-
end
|
|
335
|
-
elsif value.respond_to? :to_hash
|
|
336
|
-
value.to_hash
|
|
337
|
-
else
|
|
338
|
-
value
|
|
339
|
-
end
|
|
340
|
-
end
|
|
341
|
-
|
|
342
273
|
end
|
|
343
274
|
|
|
344
275
|
end
|
|
@@ -3,10 +3,10 @@
|
|
|
3
3
|
|
|
4
4
|
#Conekta sdk
|
|
5
5
|
|
|
6
|
-
The version of the OpenAPI document: 2.
|
|
6
|
+
The version of the OpenAPI document: 2.3.0
|
|
7
7
|
Contact: engineering@conekta.com
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
|
9
|
-
Generator version: 7.
|
|
9
|
+
Generator version: 7.24.0
|
|
10
10
|
|
|
11
11
|
=end
|
|
12
12
|
|
|
@@ -14,7 +14,7 @@ require 'date'
|
|
|
14
14
|
require 'time'
|
|
15
15
|
|
|
16
16
|
module Conekta
|
|
17
|
-
class Product
|
|
17
|
+
class Product < ApiModelBase
|
|
18
18
|
attr_accessor :antifraud_info
|
|
19
19
|
|
|
20
20
|
# The brand of the item.
|
|
@@ -56,9 +56,14 @@ module Conekta
|
|
|
56
56
|
}
|
|
57
57
|
end
|
|
58
58
|
|
|
59
|
+
# Returns attribute mapping this model knows about
|
|
60
|
+
def self.acceptable_attribute_map
|
|
61
|
+
attribute_map
|
|
62
|
+
end
|
|
63
|
+
|
|
59
64
|
# Returns all the JSON keys this model knows about
|
|
60
65
|
def self.acceptable_attributes
|
|
61
|
-
|
|
66
|
+
acceptable_attribute_map.values
|
|
62
67
|
end
|
|
63
68
|
|
|
64
69
|
# Attribute type mapping.
|
|
@@ -90,9 +95,10 @@ module Conekta
|
|
|
90
95
|
end
|
|
91
96
|
|
|
92
97
|
# check to see if the attribute exists and convert string to symbol for hash key
|
|
98
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
93
99
|
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
94
|
-
if (!
|
|
95
|
-
fail ArgumentError, "`#{k}` is not a valid attribute in `Conekta::Product`. Please check the name to make sure it's valid. List of attributes: " +
|
|
100
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
101
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Conekta::Product`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
96
102
|
end
|
|
97
103
|
h[k.to_sym] = v
|
|
98
104
|
}
|
|
@@ -224,6 +230,16 @@ module Conekta
|
|
|
224
230
|
@metadata = metadata
|
|
225
231
|
end
|
|
226
232
|
|
|
233
|
+
# Custom attribute writer method with validation
|
|
234
|
+
# @param [Object] name Value to be assigned
|
|
235
|
+
def name=(name)
|
|
236
|
+
if name.nil?
|
|
237
|
+
fail ArgumentError, 'name cannot be nil'
|
|
238
|
+
end
|
|
239
|
+
|
|
240
|
+
@name = name
|
|
241
|
+
end
|
|
242
|
+
|
|
227
243
|
# Custom attribute writer method with validation
|
|
228
244
|
# @param [Object] quantity Value to be assigned
|
|
229
245
|
def quantity=(quantity)
|
|
@@ -303,61 +319,6 @@ module Conekta
|
|
|
303
319
|
new(transformed_hash)
|
|
304
320
|
end
|
|
305
321
|
|
|
306
|
-
# Deserializes the data based on type
|
|
307
|
-
# @param string type Data type
|
|
308
|
-
# @param string value Value to be deserialized
|
|
309
|
-
# @return [Object] Deserialized data
|
|
310
|
-
def self._deserialize(type, value)
|
|
311
|
-
case type.to_sym
|
|
312
|
-
when :Time
|
|
313
|
-
Time.parse(value)
|
|
314
|
-
when :Date
|
|
315
|
-
Date.parse(value)
|
|
316
|
-
when :String
|
|
317
|
-
value.to_s
|
|
318
|
-
when :Integer
|
|
319
|
-
value.to_i
|
|
320
|
-
when :Float
|
|
321
|
-
value.to_f
|
|
322
|
-
when :Boolean
|
|
323
|
-
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
|
324
|
-
true
|
|
325
|
-
else
|
|
326
|
-
false
|
|
327
|
-
end
|
|
328
|
-
when :Object
|
|
329
|
-
# generic object (usually a Hash), return directly
|
|
330
|
-
value
|
|
331
|
-
when /\AArray<(?<inner_type>.+)>\z/
|
|
332
|
-
inner_type = Regexp.last_match[:inner_type]
|
|
333
|
-
value.map { |v| _deserialize(inner_type, v) }
|
|
334
|
-
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
|
335
|
-
k_type = Regexp.last_match[:k_type]
|
|
336
|
-
v_type = Regexp.last_match[:v_type]
|
|
337
|
-
{}.tap do |hash|
|
|
338
|
-
value.each do |k, v|
|
|
339
|
-
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
|
340
|
-
end
|
|
341
|
-
end
|
|
342
|
-
else # model
|
|
343
|
-
# models (e.g. Pet) or oneOf
|
|
344
|
-
klass = Conekta.const_get(type)
|
|
345
|
-
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
|
346
|
-
end
|
|
347
|
-
end
|
|
348
|
-
|
|
349
|
-
# Returns the string representation of the object
|
|
350
|
-
# @return [String] String presentation of the object
|
|
351
|
-
def to_s
|
|
352
|
-
to_hash.to_s
|
|
353
|
-
end
|
|
354
|
-
|
|
355
|
-
# to_body is an alias to to_hash (backward compatibility)
|
|
356
|
-
# @return [Hash] Returns the object in the form of hash
|
|
357
|
-
def to_body
|
|
358
|
-
to_hash
|
|
359
|
-
end
|
|
360
|
-
|
|
361
322
|
# Returns the object in the form of hash
|
|
362
323
|
# @return [Hash] Returns the object in the form of hash
|
|
363
324
|
def to_hash
|
|
@@ -374,24 +335,6 @@ module Conekta
|
|
|
374
335
|
hash
|
|
375
336
|
end
|
|
376
337
|
|
|
377
|
-
# Outputs non-array value in the form of hash
|
|
378
|
-
# For object, use to_hash. Otherwise, just return the value
|
|
379
|
-
# @param [Object] value Any valid value
|
|
380
|
-
# @return [Hash] Returns the value in the form of hash
|
|
381
|
-
def _to_hash(value)
|
|
382
|
-
if value.is_a?(Array)
|
|
383
|
-
value.compact.map { |v| _to_hash(v) }
|
|
384
|
-
elsif value.is_a?(Hash)
|
|
385
|
-
{}.tap do |hash|
|
|
386
|
-
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
387
|
-
end
|
|
388
|
-
elsif value.respond_to? :to_hash
|
|
389
|
-
value.to_hash
|
|
390
|
-
else
|
|
391
|
-
value
|
|
392
|
-
end
|
|
393
|
-
end
|
|
394
|
-
|
|
395
338
|
end
|
|
396
339
|
|
|
397
340
|
end
|