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
|
|
|
@@ -15,13 +15,19 @@ require 'time'
|
|
|
15
15
|
|
|
16
16
|
module Conekta
|
|
17
17
|
# The charges associated with the order
|
|
18
|
-
class OrderChargesResponse
|
|
18
|
+
class OrderChargesResponse < ApiModelBase
|
|
19
19
|
# Indicates if there are more pages to be requested
|
|
20
20
|
attr_accessor :has_more
|
|
21
21
|
|
|
22
22
|
# Object type, in this case is list
|
|
23
23
|
attr_accessor :object
|
|
24
24
|
|
|
25
|
+
# URL of the next page.
|
|
26
|
+
attr_accessor :next_page_url
|
|
27
|
+
|
|
28
|
+
# Url of the previous page.
|
|
29
|
+
attr_accessor :previous_page_url
|
|
30
|
+
|
|
25
31
|
attr_accessor :data
|
|
26
32
|
|
|
27
33
|
# Attribute mapping from ruby-style variable name to JSON key.
|
|
@@ -29,13 +35,20 @@ module Conekta
|
|
|
29
35
|
{
|
|
30
36
|
:'has_more' => :'has_more',
|
|
31
37
|
:'object' => :'object',
|
|
38
|
+
:'next_page_url' => :'next_page_url',
|
|
39
|
+
:'previous_page_url' => :'previous_page_url',
|
|
32
40
|
:'data' => :'data'
|
|
33
41
|
}
|
|
34
42
|
end
|
|
35
43
|
|
|
44
|
+
# Returns attribute mapping this model knows about
|
|
45
|
+
def self.acceptable_attribute_map
|
|
46
|
+
attribute_map
|
|
47
|
+
end
|
|
48
|
+
|
|
36
49
|
# Returns all the JSON keys this model knows about
|
|
37
50
|
def self.acceptable_attributes
|
|
38
|
-
|
|
51
|
+
acceptable_attribute_map.values
|
|
39
52
|
end
|
|
40
53
|
|
|
41
54
|
# Attribute type mapping.
|
|
@@ -43,6 +56,8 @@ module Conekta
|
|
|
43
56
|
{
|
|
44
57
|
:'has_more' => :'Boolean',
|
|
45
58
|
:'object' => :'String',
|
|
59
|
+
:'next_page_url' => :'String',
|
|
60
|
+
:'previous_page_url' => :'String',
|
|
46
61
|
:'data' => :'Array<ChargesDataResponse>'
|
|
47
62
|
}
|
|
48
63
|
end
|
|
@@ -53,13 +68,6 @@ module Conekta
|
|
|
53
68
|
])
|
|
54
69
|
end
|
|
55
70
|
|
|
56
|
-
# List of class defined in allOf (OpenAPI v3)
|
|
57
|
-
def self.openapi_all_of
|
|
58
|
-
[
|
|
59
|
-
:'Pagination'
|
|
60
|
-
]
|
|
61
|
-
end
|
|
62
|
-
|
|
63
71
|
# Initializes the object
|
|
64
72
|
# @param [Hash] attributes Model attributes in the form of hash
|
|
65
73
|
def initialize(attributes = {})
|
|
@@ -68,9 +76,10 @@ module Conekta
|
|
|
68
76
|
end
|
|
69
77
|
|
|
70
78
|
# check to see if the attribute exists and convert string to symbol for hash key
|
|
79
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
71
80
|
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
72
|
-
if (!
|
|
73
|
-
fail ArgumentError, "`#{k}` is not a valid attribute in `Conekta::OrderChargesResponse`. Please check the name to make sure it's valid. List of attributes: " +
|
|
81
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
82
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Conekta::OrderChargesResponse`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
74
83
|
end
|
|
75
84
|
h[k.to_sym] = v
|
|
76
85
|
}
|
|
@@ -87,6 +96,14 @@ module Conekta
|
|
|
87
96
|
self.object = nil
|
|
88
97
|
end
|
|
89
98
|
|
|
99
|
+
if attributes.key?(:'next_page_url')
|
|
100
|
+
self.next_page_url = attributes[:'next_page_url']
|
|
101
|
+
end
|
|
102
|
+
|
|
103
|
+
if attributes.key?(:'previous_page_url')
|
|
104
|
+
self.previous_page_url = attributes[:'previous_page_url']
|
|
105
|
+
end
|
|
106
|
+
|
|
90
107
|
if attributes.key?(:'data')
|
|
91
108
|
if (value = attributes[:'data']).is_a?(Array)
|
|
92
109
|
self.data = value
|
|
@@ -119,6 +136,26 @@ module Conekta
|
|
|
119
136
|
true
|
|
120
137
|
end
|
|
121
138
|
|
|
139
|
+
# Custom attribute writer method with validation
|
|
140
|
+
# @param [Object] has_more Value to be assigned
|
|
141
|
+
def has_more=(has_more)
|
|
142
|
+
if has_more.nil?
|
|
143
|
+
fail ArgumentError, 'has_more cannot be nil'
|
|
144
|
+
end
|
|
145
|
+
|
|
146
|
+
@has_more = has_more
|
|
147
|
+
end
|
|
148
|
+
|
|
149
|
+
# Custom attribute writer method with validation
|
|
150
|
+
# @param [Object] object Value to be assigned
|
|
151
|
+
def object=(object)
|
|
152
|
+
if object.nil?
|
|
153
|
+
fail ArgumentError, 'object cannot be nil'
|
|
154
|
+
end
|
|
155
|
+
|
|
156
|
+
@object = object
|
|
157
|
+
end
|
|
158
|
+
|
|
122
159
|
# Checks equality by comparing each attribute.
|
|
123
160
|
# @param [Object] Object to be compared
|
|
124
161
|
def ==(o)
|
|
@@ -126,6 +163,8 @@ module Conekta
|
|
|
126
163
|
self.class == o.class &&
|
|
127
164
|
has_more == o.has_more &&
|
|
128
165
|
object == o.object &&
|
|
166
|
+
next_page_url == o.next_page_url &&
|
|
167
|
+
previous_page_url == o.previous_page_url &&
|
|
129
168
|
data == o.data
|
|
130
169
|
end
|
|
131
170
|
|
|
@@ -138,7 +177,7 @@ module Conekta
|
|
|
138
177
|
# Calculates hash code according to all attributes.
|
|
139
178
|
# @return [Integer] Hash code
|
|
140
179
|
def hash
|
|
141
|
-
[has_more, object, data].hash
|
|
180
|
+
[has_more, object, next_page_url, previous_page_url, data].hash
|
|
142
181
|
end
|
|
143
182
|
|
|
144
183
|
# Builds the object from hash
|
|
@@ -164,61 +203,6 @@ module Conekta
|
|
|
164
203
|
new(transformed_hash)
|
|
165
204
|
end
|
|
166
205
|
|
|
167
|
-
# Deserializes the data based on type
|
|
168
|
-
# @param string type Data type
|
|
169
|
-
# @param string value Value to be deserialized
|
|
170
|
-
# @return [Object] Deserialized data
|
|
171
|
-
def self._deserialize(type, value)
|
|
172
|
-
case type.to_sym
|
|
173
|
-
when :Time
|
|
174
|
-
Time.parse(value)
|
|
175
|
-
when :Date
|
|
176
|
-
Date.parse(value)
|
|
177
|
-
when :String
|
|
178
|
-
value.to_s
|
|
179
|
-
when :Integer
|
|
180
|
-
value.to_i
|
|
181
|
-
when :Float
|
|
182
|
-
value.to_f
|
|
183
|
-
when :Boolean
|
|
184
|
-
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
|
185
|
-
true
|
|
186
|
-
else
|
|
187
|
-
false
|
|
188
|
-
end
|
|
189
|
-
when :Object
|
|
190
|
-
# generic object (usually a Hash), return directly
|
|
191
|
-
value
|
|
192
|
-
when /\AArray<(?<inner_type>.+)>\z/
|
|
193
|
-
inner_type = Regexp.last_match[:inner_type]
|
|
194
|
-
value.map { |v| _deserialize(inner_type, v) }
|
|
195
|
-
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
|
196
|
-
k_type = Regexp.last_match[:k_type]
|
|
197
|
-
v_type = Regexp.last_match[:v_type]
|
|
198
|
-
{}.tap do |hash|
|
|
199
|
-
value.each do |k, v|
|
|
200
|
-
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
|
201
|
-
end
|
|
202
|
-
end
|
|
203
|
-
else # model
|
|
204
|
-
# models (e.g. Pet) or oneOf
|
|
205
|
-
klass = Conekta.const_get(type)
|
|
206
|
-
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
|
207
|
-
end
|
|
208
|
-
end
|
|
209
|
-
|
|
210
|
-
# Returns the string representation of the object
|
|
211
|
-
# @return [String] String presentation of the object
|
|
212
|
-
def to_s
|
|
213
|
-
to_hash.to_s
|
|
214
|
-
end
|
|
215
|
-
|
|
216
|
-
# to_body is an alias to to_hash (backward compatibility)
|
|
217
|
-
# @return [Hash] Returns the object in the form of hash
|
|
218
|
-
def to_body
|
|
219
|
-
to_hash
|
|
220
|
-
end
|
|
221
|
-
|
|
222
206
|
# Returns the object in the form of hash
|
|
223
207
|
# @return [Hash] Returns the object in the form of hash
|
|
224
208
|
def to_hash
|
|
@@ -235,24 +219,6 @@ module Conekta
|
|
|
235
219
|
hash
|
|
236
220
|
end
|
|
237
221
|
|
|
238
|
-
# Outputs non-array value in the form of hash
|
|
239
|
-
# For object, use to_hash. Otherwise, just return the value
|
|
240
|
-
# @param [Object] value Any valid value
|
|
241
|
-
# @return [Hash] Returns the value in the form of hash
|
|
242
|
-
def _to_hash(value)
|
|
243
|
-
if value.is_a?(Array)
|
|
244
|
-
value.compact.map { |v| _to_hash(v) }
|
|
245
|
-
elsif value.is_a?(Hash)
|
|
246
|
-
{}.tap do |hash|
|
|
247
|
-
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
248
|
-
end
|
|
249
|
-
elsif value.respond_to? :to_hash
|
|
250
|
-
value.to_hash
|
|
251
|
-
else
|
|
252
|
-
value
|
|
253
|
-
end
|
|
254
|
-
end
|
|
255
|
-
|
|
256
222
|
end
|
|
257
223
|
|
|
258
224
|
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,20 +14,29 @@ require 'date'
|
|
|
14
14
|
require 'time'
|
|
15
15
|
|
|
16
16
|
module Conekta
|
|
17
|
-
# [Checkout](https://developers.conekta.com/v2.
|
|
18
|
-
class
|
|
19
|
-
# Are the payment methods available for this link. For subscriptions, only 'card' is allowed due to the recurring nature of the payments.
|
|
17
|
+
# [Checkout](https://developers.conekta.com/v2.3.0/reference/payment-link) details
|
|
18
|
+
class OrderCheckoutRequest < ApiModelBase
|
|
19
|
+
# Are the payment methods available for this link. For subscriptions, only 'card' is allowed due to the recurring nature of the payments. This field is mutually exclusive with excluded_payment_methods.
|
|
20
20
|
attr_accessor :allowed_payment_methods
|
|
21
21
|
|
|
22
|
+
# Payment methods to be excluded from the checkout. This field is mutually exclusive with allowed_payment_methods.
|
|
23
|
+
attr_accessor :excluded_payment_methods
|
|
24
|
+
|
|
25
|
+
# List of card networks to exclude from the checkout. This field is only applicable for card payments.
|
|
26
|
+
attr_accessor :exclude_card_networks
|
|
27
|
+
|
|
22
28
|
# List of plan IDs that will be available for subscription. This field is required for subscription payments.
|
|
23
29
|
attr_accessor :plan_ids
|
|
24
30
|
|
|
25
|
-
# Unix
|
|
31
|
+
# It is the time when the link will expire. It is expressed in seconds since the Unix epoch. The valid range is from 5 minutes to 365 days from the creation date.
|
|
26
32
|
attr_accessor :expires_at
|
|
27
33
|
|
|
28
34
|
# Redirection url back to the site in case of failed payment, applies only to HostedPayment.
|
|
29
35
|
attr_accessor :failure_url
|
|
30
36
|
|
|
37
|
+
# Indicates whether the card used for the payment should be saved for future purchases. This field is only applicable for card payments.
|
|
38
|
+
attr_accessor :force_save_card
|
|
39
|
+
|
|
31
40
|
attr_accessor :monthly_installments_enabled
|
|
32
41
|
|
|
33
42
|
attr_accessor :monthly_installments_options
|
|
@@ -46,7 +55,7 @@ module Conekta
|
|
|
46
55
|
# Redirection url back to the site in case of successful payment, applies only to HostedPayment
|
|
47
56
|
attr_accessor :success_url
|
|
48
57
|
|
|
49
|
-
# This field represents the type of checkout
|
|
58
|
+
# Required. This field represents the type of checkout, which determines the user experience during the payment process. 'HostedPayment' will redirect the customer to a Conekta-hosted page to complete the payment, while 'Integration' allows the payment process to be handled entirely on your site using Conekta's APIs and SDKs.
|
|
50
59
|
attr_accessor :type
|
|
51
60
|
|
|
52
61
|
class EnumAttributeValidator
|
|
@@ -75,9 +84,12 @@ module Conekta
|
|
|
75
84
|
def self.attribute_map
|
|
76
85
|
{
|
|
77
86
|
:'allowed_payment_methods' => :'allowed_payment_methods',
|
|
87
|
+
:'excluded_payment_methods' => :'excluded_payment_methods',
|
|
88
|
+
:'exclude_card_networks' => :'exclude_card_networks',
|
|
78
89
|
:'plan_ids' => :'plan_ids',
|
|
79
90
|
:'expires_at' => :'expires_at',
|
|
80
91
|
:'failure_url' => :'failure_url',
|
|
92
|
+
:'force_save_card' => :'force_save_card',
|
|
81
93
|
:'monthly_installments_enabled' => :'monthly_installments_enabled',
|
|
82
94
|
:'monthly_installments_options' => :'monthly_installments_options',
|
|
83
95
|
:'max_failed_retries' => :'max_failed_retries',
|
|
@@ -89,18 +101,26 @@ module Conekta
|
|
|
89
101
|
}
|
|
90
102
|
end
|
|
91
103
|
|
|
104
|
+
# Returns attribute mapping this model knows about
|
|
105
|
+
def self.acceptable_attribute_map
|
|
106
|
+
attribute_map
|
|
107
|
+
end
|
|
108
|
+
|
|
92
109
|
# Returns all the JSON keys this model knows about
|
|
93
110
|
def self.acceptable_attributes
|
|
94
|
-
|
|
111
|
+
acceptable_attribute_map.values
|
|
95
112
|
end
|
|
96
113
|
|
|
97
114
|
# Attribute type mapping.
|
|
98
115
|
def self.openapi_types
|
|
99
116
|
{
|
|
100
117
|
:'allowed_payment_methods' => :'Array<String>',
|
|
118
|
+
:'excluded_payment_methods' => :'Array<String>',
|
|
119
|
+
:'exclude_card_networks' => :'Array<String>',
|
|
101
120
|
:'plan_ids' => :'Array<String>',
|
|
102
121
|
:'expires_at' => :'Integer',
|
|
103
122
|
:'failure_url' => :'String',
|
|
123
|
+
:'force_save_card' => :'Boolean',
|
|
104
124
|
:'monthly_installments_enabled' => :'Boolean',
|
|
105
125
|
:'monthly_installments_options' => :'Array<Integer>',
|
|
106
126
|
:'max_failed_retries' => :'Integer',
|
|
@@ -122,13 +142,14 @@ module Conekta
|
|
|
122
142
|
# @param [Hash] attributes Model attributes in the form of hash
|
|
123
143
|
def initialize(attributes = {})
|
|
124
144
|
if (!attributes.is_a?(Hash))
|
|
125
|
-
fail ArgumentError, "The input argument (attributes) must be a hash in `Conekta::
|
|
145
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Conekta::OrderCheckoutRequest` initialize method"
|
|
126
146
|
end
|
|
127
147
|
|
|
128
148
|
# check to see if the attribute exists and convert string to symbol for hash key
|
|
149
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
129
150
|
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
130
|
-
if (!
|
|
131
|
-
fail ArgumentError, "`#{k}` is not a valid attribute in `Conekta::
|
|
151
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
152
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Conekta::OrderCheckoutRequest`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
132
153
|
end
|
|
133
154
|
h[k.to_sym] = v
|
|
134
155
|
}
|
|
@@ -137,8 +158,18 @@ module Conekta
|
|
|
137
158
|
if (value = attributes[:'allowed_payment_methods']).is_a?(Array)
|
|
138
159
|
self.allowed_payment_methods = value
|
|
139
160
|
end
|
|
140
|
-
|
|
141
|
-
|
|
161
|
+
end
|
|
162
|
+
|
|
163
|
+
if attributes.key?(:'excluded_payment_methods')
|
|
164
|
+
if (value = attributes[:'excluded_payment_methods']).is_a?(Array)
|
|
165
|
+
self.excluded_payment_methods = value
|
|
166
|
+
end
|
|
167
|
+
end
|
|
168
|
+
|
|
169
|
+
if attributes.key?(:'exclude_card_networks')
|
|
170
|
+
if (value = attributes[:'exclude_card_networks']).is_a?(Array)
|
|
171
|
+
self.exclude_card_networks = value
|
|
172
|
+
end
|
|
142
173
|
end
|
|
143
174
|
|
|
144
175
|
if attributes.key?(:'plan_ids')
|
|
@@ -155,6 +186,10 @@ module Conekta
|
|
|
155
186
|
self.failure_url = attributes[:'failure_url']
|
|
156
187
|
end
|
|
157
188
|
|
|
189
|
+
if attributes.key?(:'force_save_card')
|
|
190
|
+
self.force_save_card = attributes[:'force_save_card']
|
|
191
|
+
end
|
|
192
|
+
|
|
158
193
|
if attributes.key?(:'monthly_installments_enabled')
|
|
159
194
|
self.monthly_installments_enabled = attributes[:'monthly_installments_enabled']
|
|
160
195
|
end
|
|
@@ -195,8 +230,8 @@ module Conekta
|
|
|
195
230
|
def list_invalid_properties
|
|
196
231
|
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
197
232
|
invalid_properties = Array.new
|
|
198
|
-
if
|
|
199
|
-
invalid_properties.push('invalid value for "
|
|
233
|
+
if !@expires_at.nil? && @expires_at < 1
|
|
234
|
+
invalid_properties.push('invalid value for "expires_at", must be greater than or equal to 1.')
|
|
200
235
|
end
|
|
201
236
|
|
|
202
237
|
invalid_properties
|
|
@@ -206,19 +241,48 @@ module Conekta
|
|
|
206
241
|
# @return true if the model is valid
|
|
207
242
|
def valid?
|
|
208
243
|
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
209
|
-
return false if
|
|
244
|
+
return false if !@expires_at.nil? && @expires_at < 1
|
|
245
|
+
type_validator = EnumAttributeValidator.new('String', ["Integration", "HostedPayment"])
|
|
246
|
+
return false unless type_validator.valid?(@type)
|
|
210
247
|
true
|
|
211
248
|
end
|
|
212
249
|
|
|
250
|
+
# Custom attribute writer method with validation
|
|
251
|
+
# @param [Object] expires_at Value to be assigned
|
|
252
|
+
def expires_at=(expires_at)
|
|
253
|
+
if expires_at.nil?
|
|
254
|
+
fail ArgumentError, 'expires_at cannot be nil'
|
|
255
|
+
end
|
|
256
|
+
|
|
257
|
+
if expires_at < 1
|
|
258
|
+
fail ArgumentError, 'invalid value for "expires_at", must be greater than or equal to 1.'
|
|
259
|
+
end
|
|
260
|
+
|
|
261
|
+
@expires_at = expires_at
|
|
262
|
+
end
|
|
263
|
+
|
|
264
|
+
# Custom attribute writer method checking allowed values (enum).
|
|
265
|
+
# @param [Object] type Object to be assigned
|
|
266
|
+
def type=(type)
|
|
267
|
+
validator = EnumAttributeValidator.new('String', ["Integration", "HostedPayment"])
|
|
268
|
+
unless validator.valid?(type)
|
|
269
|
+
fail ArgumentError, "invalid value for \"type\", must be one of #{validator.allowable_values}."
|
|
270
|
+
end
|
|
271
|
+
@type = type
|
|
272
|
+
end
|
|
273
|
+
|
|
213
274
|
# Checks equality by comparing each attribute.
|
|
214
275
|
# @param [Object] Object to be compared
|
|
215
276
|
def ==(o)
|
|
216
277
|
return true if self.equal?(o)
|
|
217
278
|
self.class == o.class &&
|
|
218
279
|
allowed_payment_methods == o.allowed_payment_methods &&
|
|
280
|
+
excluded_payment_methods == o.excluded_payment_methods &&
|
|
281
|
+
exclude_card_networks == o.exclude_card_networks &&
|
|
219
282
|
plan_ids == o.plan_ids &&
|
|
220
283
|
expires_at == o.expires_at &&
|
|
221
284
|
failure_url == o.failure_url &&
|
|
285
|
+
force_save_card == o.force_save_card &&
|
|
222
286
|
monthly_installments_enabled == o.monthly_installments_enabled &&
|
|
223
287
|
monthly_installments_options == o.monthly_installments_options &&
|
|
224
288
|
max_failed_retries == o.max_failed_retries &&
|
|
@@ -238,7 +302,7 @@ module Conekta
|
|
|
238
302
|
# Calculates hash code according to all attributes.
|
|
239
303
|
# @return [Integer] Hash code
|
|
240
304
|
def hash
|
|
241
|
-
[allowed_payment_methods, plan_ids, expires_at, failure_url, monthly_installments_enabled, monthly_installments_options, max_failed_retries, name, on_demand_enabled, redirection_time, success_url, type].hash
|
|
305
|
+
[allowed_payment_methods, excluded_payment_methods, exclude_card_networks, plan_ids, expires_at, failure_url, force_save_card, monthly_installments_enabled, monthly_installments_options, max_failed_retries, name, on_demand_enabled, redirection_time, success_url, type].hash
|
|
242
306
|
end
|
|
243
307
|
|
|
244
308
|
# Builds the object from hash
|
|
@@ -264,61 +328,6 @@ module Conekta
|
|
|
264
328
|
new(transformed_hash)
|
|
265
329
|
end
|
|
266
330
|
|
|
267
|
-
# Deserializes the data based on type
|
|
268
|
-
# @param string type Data type
|
|
269
|
-
# @param string value Value to be deserialized
|
|
270
|
-
# @return [Object] Deserialized data
|
|
271
|
-
def self._deserialize(type, value)
|
|
272
|
-
case type.to_sym
|
|
273
|
-
when :Time
|
|
274
|
-
Time.parse(value)
|
|
275
|
-
when :Date
|
|
276
|
-
Date.parse(value)
|
|
277
|
-
when :String
|
|
278
|
-
value.to_s
|
|
279
|
-
when :Integer
|
|
280
|
-
value.to_i
|
|
281
|
-
when :Float
|
|
282
|
-
value.to_f
|
|
283
|
-
when :Boolean
|
|
284
|
-
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
|
285
|
-
true
|
|
286
|
-
else
|
|
287
|
-
false
|
|
288
|
-
end
|
|
289
|
-
when :Object
|
|
290
|
-
# generic object (usually a Hash), return directly
|
|
291
|
-
value
|
|
292
|
-
when /\AArray<(?<inner_type>.+)>\z/
|
|
293
|
-
inner_type = Regexp.last_match[:inner_type]
|
|
294
|
-
value.map { |v| _deserialize(inner_type, v) }
|
|
295
|
-
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
|
296
|
-
k_type = Regexp.last_match[:k_type]
|
|
297
|
-
v_type = Regexp.last_match[:v_type]
|
|
298
|
-
{}.tap do |hash|
|
|
299
|
-
value.each do |k, v|
|
|
300
|
-
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
|
301
|
-
end
|
|
302
|
-
end
|
|
303
|
-
else # model
|
|
304
|
-
# models (e.g. Pet) or oneOf
|
|
305
|
-
klass = Conekta.const_get(type)
|
|
306
|
-
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
|
307
|
-
end
|
|
308
|
-
end
|
|
309
|
-
|
|
310
|
-
# Returns the string representation of the object
|
|
311
|
-
# @return [String] String presentation of the object
|
|
312
|
-
def to_s
|
|
313
|
-
to_hash.to_s
|
|
314
|
-
end
|
|
315
|
-
|
|
316
|
-
# to_body is an alias to to_hash (backward compatibility)
|
|
317
|
-
# @return [Hash] Returns the object in the form of hash
|
|
318
|
-
def to_body
|
|
319
|
-
to_hash
|
|
320
|
-
end
|
|
321
|
-
|
|
322
331
|
# Returns the object in the form of hash
|
|
323
332
|
# @return [Hash] Returns the object in the form of hash
|
|
324
333
|
def to_hash
|
|
@@ -335,24 +344,6 @@ module Conekta
|
|
|
335
344
|
hash
|
|
336
345
|
end
|
|
337
346
|
|
|
338
|
-
# Outputs non-array value in the form of hash
|
|
339
|
-
# For object, use to_hash. Otherwise, just return the value
|
|
340
|
-
# @param [Object] value Any valid value
|
|
341
|
-
# @return [Hash] Returns the value in the form of hash
|
|
342
|
-
def _to_hash(value)
|
|
343
|
-
if value.is_a?(Array)
|
|
344
|
-
value.compact.map { |v| _to_hash(v) }
|
|
345
|
-
elsif value.is_a?(Hash)
|
|
346
|
-
{}.tap do |hash|
|
|
347
|
-
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
348
|
-
end
|
|
349
|
-
elsif value.respond_to? :to_hash
|
|
350
|
-
value.to_hash
|
|
351
|
-
else
|
|
352
|
-
value
|
|
353
|
-
end
|
|
354
|
-
end
|
|
355
|
-
|
|
356
347
|
end
|
|
357
348
|
|
|
358
349
|
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
|
# List of discounts that apply to the order.
|
|
18
|
-
class OrderDiscountLinesRequest
|
|
18
|
+
class OrderDiscountLinesRequest < ApiModelBase
|
|
19
19
|
# The amount to be deducted from the total sum of all payments, in cents.
|
|
20
20
|
attr_accessor :amount
|
|
21
21
|
|
|
@@ -34,9 +34,14 @@ module Conekta
|
|
|
34
34
|
}
|
|
35
35
|
end
|
|
36
36
|
|
|
37
|
+
# Returns attribute mapping this model knows about
|
|
38
|
+
def self.acceptable_attribute_map
|
|
39
|
+
attribute_map
|
|
40
|
+
end
|
|
41
|
+
|
|
37
42
|
# Returns all the JSON keys this model knows about
|
|
38
43
|
def self.acceptable_attributes
|
|
39
|
-
|
|
44
|
+
acceptable_attribute_map.values
|
|
40
45
|
end
|
|
41
46
|
|
|
42
47
|
# Attribute type mapping.
|
|
@@ -62,9 +67,10 @@ module Conekta
|
|
|
62
67
|
end
|
|
63
68
|
|
|
64
69
|
# check to see if the attribute exists and convert string to symbol for hash key
|
|
70
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
65
71
|
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
66
|
-
if (!
|
|
67
|
-
fail ArgumentError, "`#{k}` is not a valid attribute in `Conekta::OrderDiscountLinesRequest`. Please check the name to make sure it's valid. List of attributes: " +
|
|
72
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
73
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Conekta::OrderDiscountLinesRequest`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
68
74
|
end
|
|
69
75
|
h[k.to_sym] = v
|
|
70
76
|
}
|
|
@@ -137,6 +143,26 @@ module Conekta
|
|
|
137
143
|
@amount = amount
|
|
138
144
|
end
|
|
139
145
|
|
|
146
|
+
# Custom attribute writer method with validation
|
|
147
|
+
# @param [Object] code Value to be assigned
|
|
148
|
+
def code=(code)
|
|
149
|
+
if code.nil?
|
|
150
|
+
fail ArgumentError, 'code cannot be nil'
|
|
151
|
+
end
|
|
152
|
+
|
|
153
|
+
@code = code
|
|
154
|
+
end
|
|
155
|
+
|
|
156
|
+
# Custom attribute writer method with validation
|
|
157
|
+
# @param [Object] type Value to be assigned
|
|
158
|
+
def type=(type)
|
|
159
|
+
if type.nil?
|
|
160
|
+
fail ArgumentError, 'type cannot be nil'
|
|
161
|
+
end
|
|
162
|
+
|
|
163
|
+
@type = type
|
|
164
|
+
end
|
|
165
|
+
|
|
140
166
|
# Checks equality by comparing each attribute.
|
|
141
167
|
# @param [Object] Object to be compared
|
|
142
168
|
def ==(o)
|
|
@@ -182,61 +208,6 @@ module Conekta
|
|
|
182
208
|
new(transformed_hash)
|
|
183
209
|
end
|
|
184
210
|
|
|
185
|
-
# Deserializes the data based on type
|
|
186
|
-
# @param string type Data type
|
|
187
|
-
# @param string value Value to be deserialized
|
|
188
|
-
# @return [Object] Deserialized data
|
|
189
|
-
def self._deserialize(type, value)
|
|
190
|
-
case type.to_sym
|
|
191
|
-
when :Time
|
|
192
|
-
Time.parse(value)
|
|
193
|
-
when :Date
|
|
194
|
-
Date.parse(value)
|
|
195
|
-
when :String
|
|
196
|
-
value.to_s
|
|
197
|
-
when :Integer
|
|
198
|
-
value.to_i
|
|
199
|
-
when :Float
|
|
200
|
-
value.to_f
|
|
201
|
-
when :Boolean
|
|
202
|
-
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
|
203
|
-
true
|
|
204
|
-
else
|
|
205
|
-
false
|
|
206
|
-
end
|
|
207
|
-
when :Object
|
|
208
|
-
# generic object (usually a Hash), return directly
|
|
209
|
-
value
|
|
210
|
-
when /\AArray<(?<inner_type>.+)>\z/
|
|
211
|
-
inner_type = Regexp.last_match[:inner_type]
|
|
212
|
-
value.map { |v| _deserialize(inner_type, v) }
|
|
213
|
-
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
|
214
|
-
k_type = Regexp.last_match[:k_type]
|
|
215
|
-
v_type = Regexp.last_match[:v_type]
|
|
216
|
-
{}.tap do |hash|
|
|
217
|
-
value.each do |k, v|
|
|
218
|
-
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
|
219
|
-
end
|
|
220
|
-
end
|
|
221
|
-
else # model
|
|
222
|
-
# models (e.g. Pet) or oneOf
|
|
223
|
-
klass = Conekta.const_get(type)
|
|
224
|
-
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
|
225
|
-
end
|
|
226
|
-
end
|
|
227
|
-
|
|
228
|
-
# Returns the string representation of the object
|
|
229
|
-
# @return [String] String presentation of the object
|
|
230
|
-
def to_s
|
|
231
|
-
to_hash.to_s
|
|
232
|
-
end
|
|
233
|
-
|
|
234
|
-
# to_body is an alias to to_hash (backward compatibility)
|
|
235
|
-
# @return [Hash] Returns the object in the form of hash
|
|
236
|
-
def to_body
|
|
237
|
-
to_hash
|
|
238
|
-
end
|
|
239
|
-
|
|
240
211
|
# Returns the object in the form of hash
|
|
241
212
|
# @return [Hash] Returns the object in the form of hash
|
|
242
213
|
def to_hash
|
|
@@ -253,24 +224,6 @@ module Conekta
|
|
|
253
224
|
hash
|
|
254
225
|
end
|
|
255
226
|
|
|
256
|
-
# Outputs non-array value in the form of hash
|
|
257
|
-
# For object, use to_hash. Otherwise, just return the value
|
|
258
|
-
# @param [Object] value Any valid value
|
|
259
|
-
# @return [Hash] Returns the value in the form of hash
|
|
260
|
-
def _to_hash(value)
|
|
261
|
-
if value.is_a?(Array)
|
|
262
|
-
value.compact.map { |v| _to_hash(v) }
|
|
263
|
-
elsif value.is_a?(Hash)
|
|
264
|
-
{}.tap do |hash|
|
|
265
|
-
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
266
|
-
end
|
|
267
|
-
elsif value.respond_to? :to_hash
|
|
268
|
-
value.to_hash
|
|
269
|
-
else
|
|
270
|
-
value
|
|
271
|
-
end
|
|
272
|
-
end
|
|
273
|
-
|
|
274
227
|
end
|
|
275
228
|
|
|
276
229
|
end
|