conekta 6.0.4 → 7.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 +2 -2
- data/README.md +34 -16
- data/VERSION +1 -1
- data/conekta.gemspec +1 -1
- data/config-ruby.json +1 -1
- data/docs/AntifraudApi.md +6 -6
- data/docs/ApiKeyCreateResponse.md +2 -2
- data/docs/ApiKeyResponse.md +2 -2
- data/docs/ApiKeyResponseOnDelete.md +2 -2
- data/docs/ApiKeysApi.md +5 -5
- data/docs/BalancesApi.md +1 -1
- data/docs/ChargeOrderResponsePaymentMethod.md +3 -0
- data/docs/ChargeRequestPaymentMethod.md +3 -1
- data/docs/ChargeResponse.md +8 -8
- data/docs/ChargeResponsePaymentMethod.md +3 -0
- data/docs/ChargesApi.md +82 -4
- data/docs/ChargesDataResponse.md +8 -8
- data/docs/ChargesOrderResponse.md +22 -0
- data/docs/ChargesOrderResponseAllOfData.md +52 -0
- data/docs/Checkout.md +1 -1
- data/docs/CheckoutRequest.md +3 -1
- data/docs/CheckoutResponse.md +2 -2
- data/docs/CompaniesApi.md +2 -2
- data/docs/CreateCustomerPaymentMethodsResponse.md +1 -0
- data/docs/Customer.md +4 -0
- data/docs/CustomerPaymentMethodRequest.md +1 -1
- data/docs/CustomerPaymentMethodsData.md +1 -0
- data/docs/CustomerResponse.md +4 -0
- data/docs/CustomersApi.md +7 -7
- data/docs/DeleteApiKeysResponse.md +5 -3
- data/docs/DiscountsApi.md +5 -5
- data/docs/EventsApi.md +12 -12
- data/docs/GetCustomerPaymentMethodDataResponse.md +1 -0
- data/docs/LogResponse.md +3 -3
- data/docs/LogsApi.md +2 -2
- data/docs/LogsResponseData.md +3 -3
- data/docs/OrderChannelResponse.md +24 -0
- data/docs/{OrderResponseCharges.md → OrderChargesResponse.md} +2 -2
- data/docs/{OrderResponseDiscountLines.md → OrderDiscountLinesResponse.md} +2 -2
- data/docs/OrderRequest.md +5 -5
- data/docs/OrderResponse.md +3 -3
- data/docs/OrderResponseCheckout.md +4 -2
- data/docs/OrderUpdateRequest.md +3 -3
- data/docs/OrdersApi.md +8 -8
- data/docs/PaymentLinkApi.md +7 -7
- data/docs/PaymentMethodBankTransfer.md +1 -1
- data/docs/PaymentMethodBnplPayment.md +32 -0
- data/docs/PaymentMethodBnplRequest.md +28 -0
- data/docs/PaymentMethodCardRequest.md +1 -1
- data/docs/PaymentMethodCash.md +7 -3
- data/docs/PaymentMethodCashRequest.md +1 -1
- data/docs/PaymentMethodCashResponse.md +6 -4
- data/docs/PaymentMethodCashResponseAllOfAgreements.md +20 -0
- data/docs/PaymentMethodSpeiRequest.md +1 -1
- data/docs/PaymentMethodTokenRequest.md +3 -3
- data/docs/PaymentMethodsApi.md +5 -5
- data/docs/PayoutOrdersApi.md +77 -3
- data/docs/PlanRequest.md +5 -1
- data/docs/PlanResponse.md +5 -1
- data/docs/PlansApi.md +5 -5
- data/docs/ProductsApi.md +3 -3
- data/docs/ResendRequest.md +18 -0
- data/docs/ShippingContactsApi.md +3 -3
- data/docs/ShippingsApi.md +3 -3
- data/docs/SubscriptionsApi.md +793 -73
- data/docs/TaxesApi.md +3 -3
- data/docs/TokensApi.md +1 -1
- data/docs/TransactionsApi.md +2 -2
- data/docs/TransfersApi.md +2 -2
- data/docs/UpdateCustomer.md +4 -0
- data/docs/UpdateCustomerPaymentMethodsResponse.md +1 -0
- data/docs/WebhookKeysApi.md +5 -5
- data/docs/WebhookRequest.md +2 -2
- data/docs/WebhookResponse.md +10 -14
- data/docs/WebhookUpdateRequest.md +5 -5
- data/docs/WebhooksApi.md +8 -8
- data/lib/conekta/api/antifraud_api.rb +7 -7
- data/lib/conekta/api/api_keys_api.rb +6 -6
- data/lib/conekta/api/balances_api.rb +2 -2
- data/lib/conekta/api/charges_api.rb +88 -4
- data/lib/conekta/api/companies_api.rb +3 -3
- data/lib/conekta/api/customers_api.rb +8 -8
- data/lib/conekta/api/discounts_api.rb +6 -6
- data/lib/conekta/api/events_api.rb +21 -16
- data/lib/conekta/api/logs_api.rb +3 -3
- data/lib/conekta/api/orders_api.rb +9 -9
- data/lib/conekta/api/payment_link_api.rb +7 -7
- data/lib/conekta/api/payment_methods_api.rb +5 -5
- data/lib/conekta/api/payout_orders_api.rb +74 -4
- data/lib/conekta/api/plans_api.rb +6 -6
- data/lib/conekta/api/products_api.rb +4 -4
- data/lib/conekta/api/shipping_contacts_api.rb +4 -4
- data/lib/conekta/api/shippings_api.rb +4 -4
- data/lib/conekta/api/subscriptions_api.rb +826 -63
- data/lib/conekta/api/taxes_api.rb +4 -4
- data/lib/conekta/api/tokens_api.rb +2 -2
- data/lib/conekta/api/transactions_api.rb +3 -3
- data/lib/conekta/api/transfers_api.rb +3 -3
- data/lib/conekta/api/webhook_keys_api.rb +6 -6
- data/lib/conekta/api/webhooks_api.rb +7 -7
- data/lib/conekta/api_client.rb +1 -1
- data/lib/conekta/api_error.rb +1 -1
- data/lib/conekta/configuration.rb +1 -1
- data/lib/conekta/models/api_key_create_response.rb +13 -12
- data/lib/conekta/models/api_key_request.rb +1 -1
- data/lib/conekta/models/api_key_response.rb +13 -12
- data/lib/conekta/models/api_key_response_on_delete.rb +10 -9
- data/lib/conekta/models/api_key_update_request.rb +1 -1
- data/lib/conekta/models/balance_common_field.rb +1 -1
- data/lib/conekta/models/balance_response.rb +1 -1
- data/lib/conekta/models/blacklist_rule_response.rb +1 -1
- data/lib/conekta/models/charge_order_response.rb +1 -1
- data/lib/conekta/models/charge_order_response_payment_method.rb +3 -1
- data/lib/conekta/models/charge_request.rb +1 -1
- data/lib/conekta/models/charge_request_payment_method.rb +2 -1
- data/lib/conekta/models/charge_response.rb +58 -1
- data/lib/conekta/models/charge_response_channel.rb +1 -1
- data/lib/conekta/models/charge_response_payment_method.rb +3 -1
- data/lib/conekta/models/charge_response_refunds.rb +1 -1
- data/lib/conekta/models/charge_response_refunds_data.rb +1 -1
- data/lib/conekta/models/charge_update_request.rb +1 -1
- data/lib/conekta/models/charges_data_response.rb +58 -1
- data/lib/conekta/models/charges_order_response.rb +258 -0
- data/lib/conekta/models/charges_order_response_all_of_data.rb +439 -0
- data/lib/conekta/models/checkout.rb +1 -1
- data/lib/conekta/models/checkout_order_template.rb +1 -1
- data/lib/conekta/models/checkout_order_template_customer_info.rb +1 -1
- data/lib/conekta/models/checkout_request.rb +13 -3
- data/lib/conekta/models/checkout_response.rb +2 -1
- data/lib/conekta/models/checkouts_response.rb +1 -1
- data/lib/conekta/models/company_fiscal_info_address_response.rb +1 -1
- data/lib/conekta/models/company_fiscal_info_response.rb +1 -1
- data/lib/conekta/models/company_payout_destination_response.rb +1 -1
- data/lib/conekta/models/company_response.rb +1 -1
- data/lib/conekta/models/create_customer_fiscal_entities_response.rb +1 -1
- data/lib/conekta/models/create_customer_payment_methods_request.rb +1 -1
- data/lib/conekta/models/create_customer_payment_methods_response.rb +2 -1
- data/lib/conekta/models/create_risk_rules_data.rb +1 -1
- data/lib/conekta/models/customer.rb +22 -2
- data/lib/conekta/models/customer_address.rb +1 -1
- data/lib/conekta/models/customer_antifraud_info.rb +1 -1
- data/lib/conekta/models/customer_antifraud_info_response.rb +1 -1
- data/lib/conekta/models/customer_fiscal_entities_data_response.rb +1 -1
- data/lib/conekta/models/customer_fiscal_entities_request.rb +1 -1
- data/lib/conekta/models/customer_fiscal_entities_response.rb +1 -1
- data/lib/conekta/models/customer_info.rb +1 -1
- data/lib/conekta/models/customer_info_just_customer_id.rb +1 -1
- data/lib/conekta/models/customer_info_just_customer_id_response.rb +1 -1
- data/lib/conekta/models/customer_payment_method_request.rb +1 -1
- data/lib/conekta/models/customer_payment_methods_data.rb +2 -1
- data/lib/conekta/models/customer_payment_methods_request.rb +1 -1
- data/lib/conekta/models/customer_payment_methods_response.rb +1 -1
- data/lib/conekta/models/customer_response.rb +22 -2
- data/lib/conekta/models/customer_response_shipping_contacts.rb +1 -1
- data/lib/conekta/models/customer_shipping_contacts.rb +2 -2
- data/lib/conekta/models/customer_shipping_contacts_address.rb +1 -1
- data/lib/conekta/models/customer_shipping_contacts_data_response.rb +1 -1
- data/lib/conekta/models/customer_shipping_contacts_response.rb +1 -1
- data/lib/conekta/models/customer_shipping_contacts_response_address.rb +1 -1
- data/lib/conekta/models/customer_update_fiscal_entities_request.rb +1 -1
- data/lib/conekta/models/customer_update_shipping_contacts.rb +2 -2
- data/lib/conekta/models/customers_response.rb +1 -1
- data/lib/conekta/models/delete_api_keys_response.rb +22 -11
- data/lib/conekta/models/deleted_blacklist_rule_response.rb +1 -1
- data/lib/conekta/models/deleted_whitelist_rule_response.rb +1 -1
- data/lib/conekta/models/details.rb +1 -1
- data/lib/conekta/models/details_error.rb +1 -1
- data/lib/conekta/models/discount_lines_data_response.rb +1 -1
- data/lib/conekta/models/discount_lines_response.rb +1 -1
- data/lib/conekta/models/email_checkout_request.rb +1 -1
- data/lib/conekta/models/error.rb +1 -1
- data/lib/conekta/models/event_response.rb +1 -1
- data/lib/conekta/models/event_types.rb +1 -1
- data/lib/conekta/models/events_resend_response.rb +1 -1
- data/lib/conekta/models/fiscal_entity_address.rb +1 -1
- data/lib/conekta/models/get_api_keys_response.rb +1 -1
- data/lib/conekta/models/get_charges_response.rb +1 -1
- data/lib/conekta/models/get_companies_response.rb +1 -1
- data/lib/conekta/models/get_customer_payment_method_data_response.rb +2 -1
- data/lib/conekta/models/get_events_response.rb +1 -1
- data/lib/conekta/models/get_order_discount_lines_response.rb +1 -1
- data/lib/conekta/models/get_orders_response.rb +1 -1
- data/lib/conekta/models/get_payment_method_response.rb +1 -1
- data/lib/conekta/models/get_plans_response.rb +1 -1
- data/lib/conekta/models/get_transactions_response.rb +1 -1
- data/lib/conekta/models/get_transfers_response.rb +1 -1
- data/lib/conekta/models/get_webhook_keys_response.rb +1 -1
- data/lib/conekta/models/get_webhooks_response.rb +1 -1
- data/lib/conekta/models/log_response.rb +1 -1
- data/lib/conekta/models/logs_response.rb +1 -1
- data/lib/conekta/models/logs_response_data.rb +1 -1
- data/lib/conekta/models/order_capture_request.rb +1 -1
- data/lib/conekta/models/order_channel_response.rb +241 -0
- data/lib/conekta/models/order_charges_response.rb +258 -0
- data/lib/conekta/models/order_customer_info_response.rb +1 -1
- data/lib/conekta/models/order_discount_lines_request.rb +1 -1
- data/lib/conekta/models/order_discount_lines_response.rb +257 -0
- data/lib/conekta/models/order_fiscal_entity_address_response.rb +1 -1
- data/lib/conekta/models/order_fiscal_entity_request.rb +1 -1
- data/lib/conekta/models/order_fiscal_entity_response.rb +1 -1
- data/lib/conekta/models/order_next_action_response.rb +1 -1
- data/lib/conekta/models/order_next_action_response_redirect_to_url.rb +1 -1
- data/lib/conekta/models/order_refund_request.rb +1 -2
- data/lib/conekta/models/order_request.rb +6 -6
- data/lib/conekta/models/order_request_customer_info.rb +1 -1
- data/lib/conekta/models/order_response.rb +4 -4
- data/lib/conekta/models/order_response_checkout.rb +14 -2
- data/lib/conekta/models/order_response_customer_info.rb +1 -1
- data/lib/conekta/models/order_response_products.rb +1 -1
- data/lib/conekta/models/order_response_shipping_contact.rb +1 -1
- data/lib/conekta/models/order_tax_request.rb +1 -1
- data/lib/conekta/models/order_update_fiscal_entity_request.rb +1 -1
- data/lib/conekta/models/order_update_request.rb +4 -4
- data/lib/conekta/models/order_update_request_customer_info.rb +1 -1
- data/lib/conekta/models/orders_response.rb +1 -1
- data/lib/conekta/models/page.rb +1 -1
- data/lib/conekta/models/pagination.rb +1 -1
- data/lib/conekta/models/payment_method.rb +1 -1
- data/lib/conekta/models/payment_method_bank_transfer.rb +2 -2
- data/lib/conekta/models/payment_method_bnpl_payment.rb +311 -0
- data/lib/conekta/models/payment_method_bnpl_request.rb +348 -0
- data/lib/conekta/models/payment_method_card.rb +1 -1
- data/lib/conekta/models/payment_method_card_request.rb +1 -1
- data/lib/conekta/models/payment_method_card_response.rb +1 -1
- data/lib/conekta/models/payment_method_cash.rb +22 -2
- data/lib/conekta/models/payment_method_cash_request.rb +1 -1
- data/lib/conekta/models/payment_method_cash_response.rb +14 -2
- data/lib/conekta/models/payment_method_cash_response_all_of_agreements.rb +225 -0
- data/lib/conekta/models/payment_method_general_request.rb +1 -1
- data/lib/conekta/models/payment_method_response.rb +1 -1
- data/lib/conekta/models/payment_method_spei_recurrent.rb +1 -1
- data/lib/conekta/models/payment_method_spei_request.rb +1 -1
- data/lib/conekta/models/payment_method_token_request.rb +2 -2
- data/lib/conekta/models/payout.rb +1 -1
- data/lib/conekta/models/payout_method.rb +1 -1
- data/lib/conekta/models/payout_order.rb +1 -1
- data/lib/conekta/models/payout_order_payouts_item.rb +1 -1
- data/lib/conekta/models/payout_order_response.rb +1 -1
- data/lib/conekta/models/payout_order_response_customer_info.rb +1 -1
- data/lib/conekta/models/payout_orders_response.rb +1 -1
- data/lib/conekta/models/plan_request.rb +63 -5
- data/lib/conekta/models/plan_response.rb +24 -6
- data/lib/conekta/models/plan_update_request.rb +1 -1
- data/lib/conekta/models/product.rb +1 -1
- data/lib/conekta/models/product_data_response.rb +1 -1
- data/lib/conekta/models/product_order_response.rb +1 -1
- data/lib/conekta/models/resend_request.rb +224 -0
- data/lib/conekta/models/risk_rules_data.rb +1 -1
- data/lib/conekta/models/risk_rules_list.rb +1 -1
- data/lib/conekta/models/shipping_order_response.rb +1 -1
- data/lib/conekta/models/shipping_request.rb +1 -1
- data/lib/conekta/models/sms_checkout_request.rb +1 -1
- data/lib/conekta/models/subscription_events_response.rb +1 -1
- data/lib/conekta/models/subscription_request.rb +1 -1
- data/lib/conekta/models/subscription_response.rb +1 -1
- data/lib/conekta/models/subscription_update_request.rb +1 -1
- data/lib/conekta/models/token.rb +1 -1
- data/lib/conekta/models/token_card.rb +1 -1
- data/lib/conekta/models/token_checkout.rb +1 -1
- data/lib/conekta/models/token_response.rb +1 -1
- data/lib/conekta/models/token_response_checkout.rb +1 -1
- data/lib/conekta/models/transaction_response.rb +1 -1
- data/lib/conekta/models/transfer_destination_response.rb +1 -1
- data/lib/conekta/models/transfer_method_response.rb +1 -1
- data/lib/conekta/models/transfer_response.rb +1 -1
- data/lib/conekta/models/transfers_response.rb +1 -1
- data/lib/conekta/models/update_customer.rb +22 -2
- data/lib/conekta/models/update_customer_antifraud_info.rb +1 -1
- data/lib/conekta/models/update_customer_fiscal_entities_response.rb +1 -1
- data/lib/conekta/models/update_customer_payment_methods_response.rb +2 -1
- data/lib/conekta/models/update_order_discount_lines_request.rb +1 -1
- data/lib/conekta/models/update_order_tax_request.rb +1 -1
- data/lib/conekta/models/update_order_tax_response.rb +1 -1
- data/lib/conekta/models/update_payment_methods.rb +1 -1
- data/lib/conekta/models/update_product.rb +1 -1
- data/lib/conekta/models/webhook_key_create_response.rb +1 -1
- data/lib/conekta/models/webhook_key_delete_response.rb +1 -1
- data/lib/conekta/models/webhook_key_request.rb +1 -1
- data/lib/conekta/models/webhook_key_response.rb +1 -1
- data/lib/conekta/models/webhook_key_update_request.rb +1 -1
- data/lib/conekta/models/webhook_log.rb +1 -1
- data/lib/conekta/models/webhook_request.rb +11 -16
- data/lib/conekta/models/webhook_response.rb +28 -39
- data/lib/conekta/models/webhook_update_request.rb +20 -28
- data/lib/conekta/models/whitelistlist_rule_response.rb +1 -1
- data/lib/conekta/version.rb +2 -2
- data/lib/conekta.rb +10 -3
- data/spec/api/antifraud_api_spec.rb +8 -65
- data/spec/api/api_keys_api_spec.rb +7 -51
- data/spec/api/balances_api_spec.rb +3 -12
- data/spec/api/charges_api_spec.rb +30 -83
- data/spec/api/companies_api_spec.rb +5 -13
- data/spec/api/customers_api_spec.rb +13 -184
- data/spec/api/discounts_api_spec.rb +7 -46
- data/spec/api/events_api_spec.rb +7 -24
- data/spec/api/logs_api_spec.rb +3 -15
- data/spec/api/orders_api_spec.rb +19 -247
- data/spec/api/payment_link_api_spec.rb +9 -82
- data/spec/api/payment_methods_api_spec.rb +6 -41
- data/spec/api/payout_orders_api_spec.rb +14 -1
- data/spec/api/plans_api_spec.rb +7 -42
- data/spec/api/products_api_spec.rb +5 -30
- data/spec/api/shipping_contacts_api_spec.rb +5 -41
- data/spec/api/shippings_api_spec.rb +5 -32
- data/spec/api/subscriptions_api_spec.rb +168 -68
- data/spec/api/taxes_api_spec.rb +5 -34
- data/spec/api/tokens_api_spec.rb +3 -31
- data/spec/api/transactions_api_spec.rb +8 -21
- data/spec/api/transfers_api_spec.rb +4 -34
- data/spec/api/webhook_keys_api_spec.rb +7 -49
- data/spec/api/webhooks_api_spec.rb +9 -42
- data/spec/spec_helper.rb +1 -1
- metadata +36 -22
- data/spec/api/base_test.rb +0 -9
data/docs/SubscriptionsApi.md
CHANGED
@@ -4,22 +4,31 @@ All URIs are relative to *https://api.conekta.io*
|
|
4
4
|
|
5
5
|
| Method | HTTP request | Description |
|
6
6
|
| ------ | ------------ | ----------- |
|
7
|
-
| [**cancel_subscription**](SubscriptionsApi.md#cancel_subscription) | **POST** /customers/{id}/subscription/cancel | Cancel Subscription |
|
8
|
-
| [**create_subscription**](SubscriptionsApi.md#create_subscription) | **POST** /customers/{id}/subscription | Create Subscription |
|
9
|
-
| [**
|
10
|
-
| [**
|
11
|
-
| [**pause_subscription**](SubscriptionsApi.md#pause_subscription) | **POST** /customers/{id}/subscription/pause | Pause Subscription |
|
12
|
-
| [**resume_subscription**](SubscriptionsApi.md#resume_subscription) | **POST** /customers/{id}/subscription/resume | Resume Subscription |
|
13
|
-
| [**
|
7
|
+
| [**cancel_subscription**](SubscriptionsApi.md#cancel_subscription) | **POST** /customers/{id}/subscription/cancel | Cancel Subscription [Deprecated] |
|
8
|
+
| [**create_subscription**](SubscriptionsApi.md#create_subscription) | **POST** /customers/{id}/subscription | Create Subscription [Deprecated] |
|
9
|
+
| [**get_subscription**](SubscriptionsApi.md#get_subscription) | **GET** /customers/{id}/subscription | Get Subscription [Deprecated] |
|
10
|
+
| [**get_subscription_events**](SubscriptionsApi.md#get_subscription_events) | **GET** /customers/{id}/subscription/events | Get Subscription Events [Deprecated] |
|
11
|
+
| [**pause_subscription**](SubscriptionsApi.md#pause_subscription) | **POST** /customers/{id}/subscription/pause | Pause Subscription [Deprecated] |
|
12
|
+
| [**resume_subscription**](SubscriptionsApi.md#resume_subscription) | **POST** /customers/{id}/subscription/resume | Resume Subscription [Deprecated] |
|
13
|
+
| [**subscription_cancel**](SubscriptionsApi.md#subscription_cancel) | **POST** /customers/{customer_id}/subscriptions/{id}/cancel | Cancel Subscription |
|
14
|
+
| [**subscription_create**](SubscriptionsApi.md#subscription_create) | **POST** /customers/{customer_id}/subscriptions | Create Subscription |
|
15
|
+
| [**subscription_events**](SubscriptionsApi.md#subscription_events) | **GET** /customers/{customer_id}/subscriptions/{id}/events | Get Subscription Events |
|
16
|
+
| [**subscription_list**](SubscriptionsApi.md#subscription_list) | **GET** /customers/{customer_id}/subscriptions | List Subscriptions |
|
17
|
+
| [**subscription_pause**](SubscriptionsApi.md#subscription_pause) | **POST** /customers/{customer_id}/subscriptions/{id}/pause | Pause Subscription |
|
18
|
+
| [**subscription_resume**](SubscriptionsApi.md#subscription_resume) | **POST** /customers/{customer_id}/subscriptions/{id}/resume | Resume Subscription |
|
19
|
+
| [**subscription_update**](SubscriptionsApi.md#subscription_update) | **PUT** /customers/{customer_id}/subscriptions/{id} | Update Subscription |
|
20
|
+
| [**subscriptions_get**](SubscriptionsApi.md#subscriptions_get) | **GET** /customers/{customer_id}/subscriptions/{id} | Get Subscription |
|
21
|
+
| [**subscriptions_retry**](SubscriptionsApi.md#subscriptions_retry) | **POST** /customers/{customer_id}/subscriptions/{id}/retry | Retry Failed Payment |
|
22
|
+
| [**update_subscription**](SubscriptionsApi.md#update_subscription) | **PUT** /customers/{id}/subscription | Update Subscription [Deprecated] |
|
14
23
|
|
15
24
|
|
16
25
|
## cancel_subscription
|
17
26
|
|
18
27
|
> <SubscriptionResponse> cancel_subscription(id, opts)
|
19
28
|
|
20
|
-
Cancel Subscription
|
29
|
+
Cancel Subscription [Deprecated]
|
21
30
|
|
22
|
-
|
31
|
+
DEPRECATED: This endpoint will be removed in version 2.3.0.
|
23
32
|
|
24
33
|
### Examples
|
25
34
|
|
@@ -40,7 +49,7 @@ opts = {
|
|
40
49
|
}
|
41
50
|
|
42
51
|
begin
|
43
|
-
# Cancel Subscription
|
52
|
+
# Cancel Subscription [Deprecated]
|
44
53
|
result = api_instance.cancel_subscription(id, opts)
|
45
54
|
p result
|
46
55
|
rescue Conekta::ApiError => e
|
@@ -56,7 +65,7 @@ This returns an Array which contains the response data, status code and headers.
|
|
56
65
|
|
57
66
|
```ruby
|
58
67
|
begin
|
59
|
-
# Cancel Subscription
|
68
|
+
# Cancel Subscription [Deprecated]
|
60
69
|
data, status_code, headers = api_instance.cancel_subscription_with_http_info(id, opts)
|
61
70
|
p status_code # => 2xx
|
62
71
|
p headers # => { ... }
|
@@ -85,16 +94,16 @@ end
|
|
85
94
|
### HTTP request headers
|
86
95
|
|
87
96
|
- **Content-Type**: Not defined
|
88
|
-
- **Accept**: application/vnd.conekta-v2.
|
97
|
+
- **Accept**: application/vnd.conekta-v2.2.0+json
|
89
98
|
|
90
99
|
|
91
100
|
## create_subscription
|
92
101
|
|
93
102
|
> <SubscriptionResponse> create_subscription(id, subscription_request, opts)
|
94
103
|
|
95
|
-
Create Subscription
|
104
|
+
Create Subscription [Deprecated]
|
96
105
|
|
97
|
-
You can create the subscription to include the plans that your customers consume
|
106
|
+
DEPRECATED: This endpoint will be removed in version 2.3.0. You can create the subscription to include the plans that your customers consume
|
98
107
|
|
99
108
|
### Examples
|
100
109
|
|
@@ -116,7 +125,7 @@ opts = {
|
|
116
125
|
}
|
117
126
|
|
118
127
|
begin
|
119
|
-
# Create Subscription
|
128
|
+
# Create Subscription [Deprecated]
|
120
129
|
result = api_instance.create_subscription(id, subscription_request, opts)
|
121
130
|
p result
|
122
131
|
rescue Conekta::ApiError => e
|
@@ -132,7 +141,7 @@ This returns an Array which contains the response data, status code and headers.
|
|
132
141
|
|
133
142
|
```ruby
|
134
143
|
begin
|
135
|
-
# Create Subscription
|
144
|
+
# Create Subscription [Deprecated]
|
136
145
|
data, status_code, headers = api_instance.create_subscription_with_http_info(id, subscription_request, opts)
|
137
146
|
p status_code # => 2xx
|
138
147
|
p headers # => { ... }
|
@@ -162,16 +171,16 @@ end
|
|
162
171
|
### HTTP request headers
|
163
172
|
|
164
173
|
- **Content-Type**: application/json
|
165
|
-
- **Accept**: application/vnd.conekta-v2.
|
174
|
+
- **Accept**: application/vnd.conekta-v2.2.0+json
|
166
175
|
|
167
176
|
|
168
|
-
##
|
177
|
+
## get_subscription
|
169
178
|
|
170
|
-
> <
|
179
|
+
> <SubscriptionResponse> get_subscription(id, opts)
|
171
180
|
|
172
|
-
Get
|
181
|
+
Get Subscription [Deprecated]
|
173
182
|
|
174
|
-
|
183
|
+
DEPRECATED: This endpoint will be removed in version 2.3.0.
|
175
184
|
|
176
185
|
### Examples
|
177
186
|
|
@@ -187,34 +196,33 @@ end
|
|
187
196
|
api_instance = Conekta::SubscriptionsApi.new
|
188
197
|
id = '6307a60c41de27127515a575' # String | Identifier of the resource
|
189
198
|
opts = {
|
190
|
-
accept_language: 'es'
|
191
|
-
x_child_company_id: '6441b6376b60c3a638da80af' # String | In the case of a holding company, the company id of the child company to which will process the request.
|
199
|
+
accept_language: 'es' # String | Use for knowing which language to use
|
192
200
|
}
|
193
201
|
|
194
202
|
begin
|
195
|
-
# Get
|
196
|
-
result = api_instance.
|
203
|
+
# Get Subscription [Deprecated]
|
204
|
+
result = api_instance.get_subscription(id, opts)
|
197
205
|
p result
|
198
206
|
rescue Conekta::ApiError => e
|
199
|
-
puts "Error when calling SubscriptionsApi->
|
207
|
+
puts "Error when calling SubscriptionsApi->get_subscription: #{e}"
|
200
208
|
end
|
201
209
|
```
|
202
210
|
|
203
|
-
#### Using the
|
211
|
+
#### Using the get_subscription_with_http_info variant
|
204
212
|
|
205
213
|
This returns an Array which contains the response data, status code and headers.
|
206
214
|
|
207
|
-
> <Array(<
|
215
|
+
> <Array(<SubscriptionResponse>, Integer, Hash)> get_subscription_with_http_info(id, opts)
|
208
216
|
|
209
217
|
```ruby
|
210
218
|
begin
|
211
|
-
# Get
|
212
|
-
data, status_code, headers = api_instance.
|
219
|
+
# Get Subscription [Deprecated]
|
220
|
+
data, status_code, headers = api_instance.get_subscription_with_http_info(id, opts)
|
213
221
|
p status_code # => 2xx
|
214
222
|
p headers # => { ... }
|
215
|
-
p data # => <
|
223
|
+
p data # => <SubscriptionResponse>
|
216
224
|
rescue Conekta::ApiError => e
|
217
|
-
puts "Error when calling SubscriptionsApi->
|
225
|
+
puts "Error when calling SubscriptionsApi->get_subscription_with_http_info: #{e}"
|
218
226
|
end
|
219
227
|
```
|
220
228
|
|
@@ -224,11 +232,10 @@ end
|
|
224
232
|
| ---- | ---- | ----------- | ----- |
|
225
233
|
| **id** | **String** | Identifier of the resource | |
|
226
234
|
| **accept_language** | **String** | Use for knowing which language to use | [optional][default to 'es'] |
|
227
|
-
| **x_child_company_id** | **String** | In the case of a holding company, the company id of the child company to which will process the request. | [optional] |
|
228
235
|
|
229
236
|
### Return type
|
230
237
|
|
231
|
-
[**
|
238
|
+
[**SubscriptionResponse**](SubscriptionResponse.md)
|
232
239
|
|
233
240
|
### Authorization
|
234
241
|
|
@@ -237,14 +244,16 @@ end
|
|
237
244
|
### HTTP request headers
|
238
245
|
|
239
246
|
- **Content-Type**: Not defined
|
240
|
-
- **Accept**: application/vnd.conekta-v2.
|
247
|
+
- **Accept**: application/vnd.conekta-v2.2.0+json
|
241
248
|
|
242
249
|
|
243
|
-
##
|
250
|
+
## get_subscription_events
|
244
251
|
|
245
|
-
> <
|
252
|
+
> <SubscriptionEventsResponse> get_subscription_events(id, opts)
|
246
253
|
|
247
|
-
Get Subscription
|
254
|
+
Get Subscription Events [Deprecated]
|
255
|
+
|
256
|
+
DEPRECATED: This endpoint will be removed in version 2.3.0. You can get the events of the subscription(s) of a client, with the customer id
|
248
257
|
|
249
258
|
### Examples
|
250
259
|
|
@@ -260,33 +269,34 @@ end
|
|
260
269
|
api_instance = Conekta::SubscriptionsApi.new
|
261
270
|
id = '6307a60c41de27127515a575' # String | Identifier of the resource
|
262
271
|
opts = {
|
263
|
-
accept_language: 'es' # String | Use for knowing which language to use
|
272
|
+
accept_language: 'es', # String | Use for knowing which language to use
|
273
|
+
x_child_company_id: '6441b6376b60c3a638da80af' # String | In the case of a holding company, the company id of the child company to which will process the request.
|
264
274
|
}
|
265
275
|
|
266
276
|
begin
|
267
|
-
# Get Subscription
|
268
|
-
result = api_instance.
|
277
|
+
# Get Subscription Events [Deprecated]
|
278
|
+
result = api_instance.get_subscription_events(id, opts)
|
269
279
|
p result
|
270
280
|
rescue Conekta::ApiError => e
|
271
|
-
puts "Error when calling SubscriptionsApi->
|
281
|
+
puts "Error when calling SubscriptionsApi->get_subscription_events: #{e}"
|
272
282
|
end
|
273
283
|
```
|
274
284
|
|
275
|
-
#### Using the
|
285
|
+
#### Using the get_subscription_events_with_http_info variant
|
276
286
|
|
277
287
|
This returns an Array which contains the response data, status code and headers.
|
278
288
|
|
279
|
-
> <Array(<
|
289
|
+
> <Array(<SubscriptionEventsResponse>, Integer, Hash)> get_subscription_events_with_http_info(id, opts)
|
280
290
|
|
281
291
|
```ruby
|
282
292
|
begin
|
283
|
-
# Get Subscription
|
284
|
-
data, status_code, headers = api_instance.
|
293
|
+
# Get Subscription Events [Deprecated]
|
294
|
+
data, status_code, headers = api_instance.get_subscription_events_with_http_info(id, opts)
|
285
295
|
p status_code # => 2xx
|
286
296
|
p headers # => { ... }
|
287
|
-
p data # => <
|
297
|
+
p data # => <SubscriptionEventsResponse>
|
288
298
|
rescue Conekta::ApiError => e
|
289
|
-
puts "Error when calling SubscriptionsApi->
|
299
|
+
puts "Error when calling SubscriptionsApi->get_subscription_events_with_http_info: #{e}"
|
290
300
|
end
|
291
301
|
```
|
292
302
|
|
@@ -296,10 +306,11 @@ end
|
|
296
306
|
| ---- | ---- | ----------- | ----- |
|
297
307
|
| **id** | **String** | Identifier of the resource | |
|
298
308
|
| **accept_language** | **String** | Use for knowing which language to use | [optional][default to 'es'] |
|
309
|
+
| **x_child_company_id** | **String** | In the case of a holding company, the company id of the child company to which will process the request. | [optional] |
|
299
310
|
|
300
311
|
### Return type
|
301
312
|
|
302
|
-
[**
|
313
|
+
[**SubscriptionEventsResponse**](SubscriptionEventsResponse.md)
|
303
314
|
|
304
315
|
### Authorization
|
305
316
|
|
@@ -308,16 +319,16 @@ end
|
|
308
319
|
### HTTP request headers
|
309
320
|
|
310
321
|
- **Content-Type**: Not defined
|
311
|
-
- **Accept**: application/vnd.conekta-v2.
|
322
|
+
- **Accept**: application/vnd.conekta-v2.2.0+json
|
312
323
|
|
313
324
|
|
314
325
|
## pause_subscription
|
315
326
|
|
316
327
|
> <SubscriptionResponse> pause_subscription(id, opts)
|
317
328
|
|
318
|
-
Pause Subscription
|
329
|
+
Pause Subscription [Deprecated]
|
319
330
|
|
320
|
-
|
331
|
+
DEPRECATED: This endpoint will be removed in version 2.3.0.
|
321
332
|
|
322
333
|
### Examples
|
323
334
|
|
@@ -338,7 +349,7 @@ opts = {
|
|
338
349
|
}
|
339
350
|
|
340
351
|
begin
|
341
|
-
# Pause Subscription
|
352
|
+
# Pause Subscription [Deprecated]
|
342
353
|
result = api_instance.pause_subscription(id, opts)
|
343
354
|
p result
|
344
355
|
rescue Conekta::ApiError => e
|
@@ -354,7 +365,7 @@ This returns an Array which contains the response data, status code and headers.
|
|
354
365
|
|
355
366
|
```ruby
|
356
367
|
begin
|
357
|
-
# Pause Subscription
|
368
|
+
# Pause Subscription [Deprecated]
|
358
369
|
data, status_code, headers = api_instance.pause_subscription_with_http_info(id, opts)
|
359
370
|
p status_code # => 2xx
|
360
371
|
p headers # => { ... }
|
@@ -383,16 +394,16 @@ end
|
|
383
394
|
### HTTP request headers
|
384
395
|
|
385
396
|
- **Content-Type**: Not defined
|
386
|
-
- **Accept**: application/vnd.conekta-v2.
|
397
|
+
- **Accept**: application/vnd.conekta-v2.2.0+json
|
387
398
|
|
388
399
|
|
389
400
|
## resume_subscription
|
390
401
|
|
391
402
|
> <SubscriptionResponse> resume_subscription(id, opts)
|
392
403
|
|
393
|
-
Resume Subscription
|
404
|
+
Resume Subscription [Deprecated]
|
394
405
|
|
395
|
-
|
406
|
+
DEPRECATED: This endpoint will be removed in version 2.3.0.
|
396
407
|
|
397
408
|
### Examples
|
398
409
|
|
@@ -413,7 +424,7 @@ opts = {
|
|
413
424
|
}
|
414
425
|
|
415
426
|
begin
|
416
|
-
# Resume Subscription
|
427
|
+
# Resume Subscription [Deprecated]
|
417
428
|
result = api_instance.resume_subscription(id, opts)
|
418
429
|
p result
|
419
430
|
rescue Conekta::ApiError => e
|
@@ -429,7 +440,7 @@ This returns an Array which contains the response data, status code and headers.
|
|
429
440
|
|
430
441
|
```ruby
|
431
442
|
begin
|
432
|
-
# Resume Subscription
|
443
|
+
# Resume Subscription [Deprecated]
|
433
444
|
data, status_code, headers = api_instance.resume_subscription_with_http_info(id, opts)
|
434
445
|
p status_code # => 2xx
|
435
446
|
p headers # => { ... }
|
@@ -458,16 +469,16 @@ end
|
|
458
469
|
### HTTP request headers
|
459
470
|
|
460
471
|
- **Content-Type**: Not defined
|
461
|
-
- **Accept**: application/vnd.conekta-v2.
|
472
|
+
- **Accept**: application/vnd.conekta-v2.2.0+json
|
462
473
|
|
463
474
|
|
464
|
-
##
|
475
|
+
## subscription_cancel
|
465
476
|
|
466
|
-
> <SubscriptionResponse>
|
477
|
+
> <SubscriptionResponse> subscription_cancel(customer_id, id, opts)
|
467
478
|
|
468
|
-
|
479
|
+
Cancel Subscription
|
469
480
|
|
470
|
-
|
481
|
+
Cancel a specific subscription
|
471
482
|
|
472
483
|
### Examples
|
473
484
|
|
@@ -481,31 +492,740 @@ Conekta.configure do |config|
|
|
481
492
|
end
|
482
493
|
|
483
494
|
api_instance = Conekta::SubscriptionsApi.new
|
484
|
-
|
485
|
-
|
495
|
+
customer_id = 'cus_2tGzG1GxtDAZHEGPH' # String | Identifier of the customer resource
|
496
|
+
id = 'sub_2tGzG1GxtDAZHEGPH' # String | Identifier of the subscription resource
|
486
497
|
opts = {
|
487
498
|
accept_language: 'es', # String | Use for knowing which language to use
|
488
499
|
x_child_company_id: '6441b6376b60c3a638da80af' # String | In the case of a holding company, the company id of the child company to which will process the request.
|
489
500
|
}
|
490
501
|
|
491
502
|
begin
|
492
|
-
#
|
493
|
-
result = api_instance.
|
503
|
+
# Cancel Subscription
|
504
|
+
result = api_instance.subscription_cancel(customer_id, id, opts)
|
494
505
|
p result
|
495
506
|
rescue Conekta::ApiError => e
|
496
|
-
puts "Error when calling SubscriptionsApi->
|
507
|
+
puts "Error when calling SubscriptionsApi->subscription_cancel: #{e}"
|
497
508
|
end
|
498
509
|
```
|
499
510
|
|
500
|
-
#### Using the
|
511
|
+
#### Using the subscription_cancel_with_http_info variant
|
501
512
|
|
502
513
|
This returns an Array which contains the response data, status code and headers.
|
503
514
|
|
504
|
-
> <Array(<SubscriptionResponse>, Integer, Hash)>
|
515
|
+
> <Array(<SubscriptionResponse>, Integer, Hash)> subscription_cancel_with_http_info(customer_id, id, opts)
|
505
516
|
|
506
517
|
```ruby
|
507
518
|
begin
|
508
|
-
#
|
519
|
+
# Cancel Subscription
|
520
|
+
data, status_code, headers = api_instance.subscription_cancel_with_http_info(customer_id, id, opts)
|
521
|
+
p status_code # => 2xx
|
522
|
+
p headers # => { ... }
|
523
|
+
p data # => <SubscriptionResponse>
|
524
|
+
rescue Conekta::ApiError => e
|
525
|
+
puts "Error when calling SubscriptionsApi->subscription_cancel_with_http_info: #{e}"
|
526
|
+
end
|
527
|
+
```
|
528
|
+
|
529
|
+
### Parameters
|
530
|
+
|
531
|
+
| Name | Type | Description | Notes |
|
532
|
+
| ---- | ---- | ----------- | ----- |
|
533
|
+
| **customer_id** | **String** | Identifier of the customer resource | |
|
534
|
+
| **id** | **String** | Identifier of the subscription resource | |
|
535
|
+
| **accept_language** | **String** | Use for knowing which language to use | [optional][default to 'es'] |
|
536
|
+
| **x_child_company_id** | **String** | In the case of a holding company, the company id of the child company to which will process the request. | [optional] |
|
537
|
+
|
538
|
+
### Return type
|
539
|
+
|
540
|
+
[**SubscriptionResponse**](SubscriptionResponse.md)
|
541
|
+
|
542
|
+
### Authorization
|
543
|
+
|
544
|
+
[bearerAuth](../README.md#bearerAuth)
|
545
|
+
|
546
|
+
### HTTP request headers
|
547
|
+
|
548
|
+
- **Content-Type**: Not defined
|
549
|
+
- **Accept**: application/vnd.conekta-v2.2.0+json
|
550
|
+
|
551
|
+
|
552
|
+
## subscription_create
|
553
|
+
|
554
|
+
> <SubscriptionResponse> subscription_create(customer_id, subscription_request, opts)
|
555
|
+
|
556
|
+
Create Subscription
|
557
|
+
|
558
|
+
Create a new subscription for a customer (keeps existing subscriptions active)
|
559
|
+
|
560
|
+
### Examples
|
561
|
+
|
562
|
+
```ruby
|
563
|
+
require 'time'
|
564
|
+
require 'conekta'
|
565
|
+
# setup authorization
|
566
|
+
Conekta.configure do |config|
|
567
|
+
# Configure Bearer authorization: bearerAuth
|
568
|
+
config.access_token = 'YOUR_BEARER_TOKEN'
|
569
|
+
end
|
570
|
+
|
571
|
+
api_instance = Conekta::SubscriptionsApi.new
|
572
|
+
customer_id = 'cus_2tGzG1GxtDAZHEGPH' # String | Identifier of the customer resource
|
573
|
+
subscription_request = Conekta::SubscriptionRequest.new({plan_id: 'f84gdgf5g48r15fd21g8w424fd1'}) # SubscriptionRequest | requested field for subscriptions
|
574
|
+
opts = {
|
575
|
+
accept_language: 'es', # String | Use for knowing which language to use
|
576
|
+
x_child_company_id: '6441b6376b60c3a638da80af' # String | In the case of a holding company, the company id of the child company to which will process the request.
|
577
|
+
}
|
578
|
+
|
579
|
+
begin
|
580
|
+
# Create Subscription
|
581
|
+
result = api_instance.subscription_create(customer_id, subscription_request, opts)
|
582
|
+
p result
|
583
|
+
rescue Conekta::ApiError => e
|
584
|
+
puts "Error when calling SubscriptionsApi->subscription_create: #{e}"
|
585
|
+
end
|
586
|
+
```
|
587
|
+
|
588
|
+
#### Using the subscription_create_with_http_info variant
|
589
|
+
|
590
|
+
This returns an Array which contains the response data, status code and headers.
|
591
|
+
|
592
|
+
> <Array(<SubscriptionResponse>, Integer, Hash)> subscription_create_with_http_info(customer_id, subscription_request, opts)
|
593
|
+
|
594
|
+
```ruby
|
595
|
+
begin
|
596
|
+
# Create Subscription
|
597
|
+
data, status_code, headers = api_instance.subscription_create_with_http_info(customer_id, subscription_request, opts)
|
598
|
+
p status_code # => 2xx
|
599
|
+
p headers # => { ... }
|
600
|
+
p data # => <SubscriptionResponse>
|
601
|
+
rescue Conekta::ApiError => e
|
602
|
+
puts "Error when calling SubscriptionsApi->subscription_create_with_http_info: #{e}"
|
603
|
+
end
|
604
|
+
```
|
605
|
+
|
606
|
+
### Parameters
|
607
|
+
|
608
|
+
| Name | Type | Description | Notes |
|
609
|
+
| ---- | ---- | ----------- | ----- |
|
610
|
+
| **customer_id** | **String** | Identifier of the customer resource | |
|
611
|
+
| **subscription_request** | [**SubscriptionRequest**](SubscriptionRequest.md) | requested field for subscriptions | |
|
612
|
+
| **accept_language** | **String** | Use for knowing which language to use | [optional][default to 'es'] |
|
613
|
+
| **x_child_company_id** | **String** | In the case of a holding company, the company id of the child company to which will process the request. | [optional] |
|
614
|
+
|
615
|
+
### Return type
|
616
|
+
|
617
|
+
[**SubscriptionResponse**](SubscriptionResponse.md)
|
618
|
+
|
619
|
+
### Authorization
|
620
|
+
|
621
|
+
[bearerAuth](../README.md#bearerAuth)
|
622
|
+
|
623
|
+
### HTTP request headers
|
624
|
+
|
625
|
+
- **Content-Type**: application/json
|
626
|
+
- **Accept**: application/vnd.conekta-v2.2.0+json
|
627
|
+
|
628
|
+
|
629
|
+
## subscription_events
|
630
|
+
|
631
|
+
> <SubscriptionEventsResponse> subscription_events(customer_id, id, opts)
|
632
|
+
|
633
|
+
Get Subscription Events
|
634
|
+
|
635
|
+
Get events for a specific subscription
|
636
|
+
|
637
|
+
### Examples
|
638
|
+
|
639
|
+
```ruby
|
640
|
+
require 'time'
|
641
|
+
require 'conekta'
|
642
|
+
# setup authorization
|
643
|
+
Conekta.configure do |config|
|
644
|
+
# Configure Bearer authorization: bearerAuth
|
645
|
+
config.access_token = 'YOUR_BEARER_TOKEN'
|
646
|
+
end
|
647
|
+
|
648
|
+
api_instance = Conekta::SubscriptionsApi.new
|
649
|
+
customer_id = 'cus_2tGzG1GxtDAZHEGPH' # String | Identifier of the customer resource
|
650
|
+
id = 'sub_2tGzG1GxtDAZHEGPH' # String | Identifier of the subscription resource
|
651
|
+
opts = {
|
652
|
+
accept_language: 'es', # String | Use for knowing which language to use
|
653
|
+
x_child_company_id: '6441b6376b60c3a638da80af', # String | In the case of a holding company, the company id of the child company to which will process the request.
|
654
|
+
limit: 56, # Integer | The numbers of items to return, the maximum value is 250
|
655
|
+
search: 'search_example', # String | General order search, e.g. by mail, reference etc.
|
656
|
+
_next: '_next_example', # String | next page
|
657
|
+
previous: 'previous_example' # String | previous page
|
658
|
+
}
|
659
|
+
|
660
|
+
begin
|
661
|
+
# Get Subscription Events
|
662
|
+
result = api_instance.subscription_events(customer_id, id, opts)
|
663
|
+
p result
|
664
|
+
rescue Conekta::ApiError => e
|
665
|
+
puts "Error when calling SubscriptionsApi->subscription_events: #{e}"
|
666
|
+
end
|
667
|
+
```
|
668
|
+
|
669
|
+
#### Using the subscription_events_with_http_info variant
|
670
|
+
|
671
|
+
This returns an Array which contains the response data, status code and headers.
|
672
|
+
|
673
|
+
> <Array(<SubscriptionEventsResponse>, Integer, Hash)> subscription_events_with_http_info(customer_id, id, opts)
|
674
|
+
|
675
|
+
```ruby
|
676
|
+
begin
|
677
|
+
# Get Subscription Events
|
678
|
+
data, status_code, headers = api_instance.subscription_events_with_http_info(customer_id, id, opts)
|
679
|
+
p status_code # => 2xx
|
680
|
+
p headers # => { ... }
|
681
|
+
p data # => <SubscriptionEventsResponse>
|
682
|
+
rescue Conekta::ApiError => e
|
683
|
+
puts "Error when calling SubscriptionsApi->subscription_events_with_http_info: #{e}"
|
684
|
+
end
|
685
|
+
```
|
686
|
+
|
687
|
+
### Parameters
|
688
|
+
|
689
|
+
| Name | Type | Description | Notes |
|
690
|
+
| ---- | ---- | ----------- | ----- |
|
691
|
+
| **customer_id** | **String** | Identifier of the customer resource | |
|
692
|
+
| **id** | **String** | Identifier of the subscription resource | |
|
693
|
+
| **accept_language** | **String** | Use for knowing which language to use | [optional][default to 'es'] |
|
694
|
+
| **x_child_company_id** | **String** | In the case of a holding company, the company id of the child company to which will process the request. | [optional] |
|
695
|
+
| **limit** | **Integer** | The numbers of items to return, the maximum value is 250 | [optional][default to 20] |
|
696
|
+
| **search** | **String** | General order search, e.g. by mail, reference etc. | [optional] |
|
697
|
+
| **_next** | **String** | next page | [optional] |
|
698
|
+
| **previous** | **String** | previous page | [optional] |
|
699
|
+
|
700
|
+
### Return type
|
701
|
+
|
702
|
+
[**SubscriptionEventsResponse**](SubscriptionEventsResponse.md)
|
703
|
+
|
704
|
+
### Authorization
|
705
|
+
|
706
|
+
[bearerAuth](../README.md#bearerAuth)
|
707
|
+
|
708
|
+
### HTTP request headers
|
709
|
+
|
710
|
+
- **Content-Type**: Not defined
|
711
|
+
- **Accept**: application/vnd.conekta-v2.2.0+json
|
712
|
+
|
713
|
+
|
714
|
+
## subscription_list
|
715
|
+
|
716
|
+
> <SubscriptionResponse> subscription_list(customer_id, opts)
|
717
|
+
|
718
|
+
List Subscriptions
|
719
|
+
|
720
|
+
Get a list of subscriptions for a customer
|
721
|
+
|
722
|
+
### Examples
|
723
|
+
|
724
|
+
```ruby
|
725
|
+
require 'time'
|
726
|
+
require 'conekta'
|
727
|
+
# setup authorization
|
728
|
+
Conekta.configure do |config|
|
729
|
+
# Configure Bearer authorization: bearerAuth
|
730
|
+
config.access_token = 'YOUR_BEARER_TOKEN'
|
731
|
+
end
|
732
|
+
|
733
|
+
api_instance = Conekta::SubscriptionsApi.new
|
734
|
+
customer_id = 'cus_2tGzG1GxtDAZHEGPH' # String | Identifier of the customer resource
|
735
|
+
opts = {
|
736
|
+
accept_language: 'es', # String | Use for knowing which language to use
|
737
|
+
x_child_company_id: '6441b6376b60c3a638da80af', # String | In the case of a holding company, the company id of the child company to which will process the request.
|
738
|
+
limit: 56, # Integer | The numbers of items to return, the maximum value is 250
|
739
|
+
search: 'search_example', # String | General order search, e.g. by mail, reference etc.
|
740
|
+
_next: '_next_example', # String | next page
|
741
|
+
previous: 'previous_example' # String | previous page
|
742
|
+
}
|
743
|
+
|
744
|
+
begin
|
745
|
+
# List Subscriptions
|
746
|
+
result = api_instance.subscription_list(customer_id, opts)
|
747
|
+
p result
|
748
|
+
rescue Conekta::ApiError => e
|
749
|
+
puts "Error when calling SubscriptionsApi->subscription_list: #{e}"
|
750
|
+
end
|
751
|
+
```
|
752
|
+
|
753
|
+
#### Using the subscription_list_with_http_info variant
|
754
|
+
|
755
|
+
This returns an Array which contains the response data, status code and headers.
|
756
|
+
|
757
|
+
> <Array(<SubscriptionResponse>, Integer, Hash)> subscription_list_with_http_info(customer_id, opts)
|
758
|
+
|
759
|
+
```ruby
|
760
|
+
begin
|
761
|
+
# List Subscriptions
|
762
|
+
data, status_code, headers = api_instance.subscription_list_with_http_info(customer_id, opts)
|
763
|
+
p status_code # => 2xx
|
764
|
+
p headers # => { ... }
|
765
|
+
p data # => <SubscriptionResponse>
|
766
|
+
rescue Conekta::ApiError => e
|
767
|
+
puts "Error when calling SubscriptionsApi->subscription_list_with_http_info: #{e}"
|
768
|
+
end
|
769
|
+
```
|
770
|
+
|
771
|
+
### Parameters
|
772
|
+
|
773
|
+
| Name | Type | Description | Notes |
|
774
|
+
| ---- | ---- | ----------- | ----- |
|
775
|
+
| **customer_id** | **String** | Identifier of the customer resource | |
|
776
|
+
| **accept_language** | **String** | Use for knowing which language to use | [optional][default to 'es'] |
|
777
|
+
| **x_child_company_id** | **String** | In the case of a holding company, the company id of the child company to which will process the request. | [optional] |
|
778
|
+
| **limit** | **Integer** | The numbers of items to return, the maximum value is 250 | [optional][default to 20] |
|
779
|
+
| **search** | **String** | General order search, e.g. by mail, reference etc. | [optional] |
|
780
|
+
| **_next** | **String** | next page | [optional] |
|
781
|
+
| **previous** | **String** | previous page | [optional] |
|
782
|
+
|
783
|
+
### Return type
|
784
|
+
|
785
|
+
[**SubscriptionResponse**](SubscriptionResponse.md)
|
786
|
+
|
787
|
+
### Authorization
|
788
|
+
|
789
|
+
[bearerAuth](../README.md#bearerAuth)
|
790
|
+
|
791
|
+
### HTTP request headers
|
792
|
+
|
793
|
+
- **Content-Type**: Not defined
|
794
|
+
- **Accept**: application/vnd.conekta-v2.2.0+json
|
795
|
+
|
796
|
+
|
797
|
+
## subscription_pause
|
798
|
+
|
799
|
+
> <SubscriptionResponse> subscription_pause(customer_id, id, opts)
|
800
|
+
|
801
|
+
Pause Subscription
|
802
|
+
|
803
|
+
Pause a specific subscription
|
804
|
+
|
805
|
+
### Examples
|
806
|
+
|
807
|
+
```ruby
|
808
|
+
require 'time'
|
809
|
+
require 'conekta'
|
810
|
+
# setup authorization
|
811
|
+
Conekta.configure do |config|
|
812
|
+
# Configure Bearer authorization: bearerAuth
|
813
|
+
config.access_token = 'YOUR_BEARER_TOKEN'
|
814
|
+
end
|
815
|
+
|
816
|
+
api_instance = Conekta::SubscriptionsApi.new
|
817
|
+
customer_id = 'cus_2tGzG1GxtDAZHEGPH' # String | Identifier of the customer resource
|
818
|
+
id = 'sub_2tGzG1GxtDAZHEGPH' # String | Identifier of the subscription resource
|
819
|
+
opts = {
|
820
|
+
accept_language: 'es', # String | Use for knowing which language to use
|
821
|
+
x_child_company_id: '6441b6376b60c3a638da80af' # String | In the case of a holding company, the company id of the child company to which will process the request.
|
822
|
+
}
|
823
|
+
|
824
|
+
begin
|
825
|
+
# Pause Subscription
|
826
|
+
result = api_instance.subscription_pause(customer_id, id, opts)
|
827
|
+
p result
|
828
|
+
rescue Conekta::ApiError => e
|
829
|
+
puts "Error when calling SubscriptionsApi->subscription_pause: #{e}"
|
830
|
+
end
|
831
|
+
```
|
832
|
+
|
833
|
+
#### Using the subscription_pause_with_http_info variant
|
834
|
+
|
835
|
+
This returns an Array which contains the response data, status code and headers.
|
836
|
+
|
837
|
+
> <Array(<SubscriptionResponse>, Integer, Hash)> subscription_pause_with_http_info(customer_id, id, opts)
|
838
|
+
|
839
|
+
```ruby
|
840
|
+
begin
|
841
|
+
# Pause Subscription
|
842
|
+
data, status_code, headers = api_instance.subscription_pause_with_http_info(customer_id, id, opts)
|
843
|
+
p status_code # => 2xx
|
844
|
+
p headers # => { ... }
|
845
|
+
p data # => <SubscriptionResponse>
|
846
|
+
rescue Conekta::ApiError => e
|
847
|
+
puts "Error when calling SubscriptionsApi->subscription_pause_with_http_info: #{e}"
|
848
|
+
end
|
849
|
+
```
|
850
|
+
|
851
|
+
### Parameters
|
852
|
+
|
853
|
+
| Name | Type | Description | Notes |
|
854
|
+
| ---- | ---- | ----------- | ----- |
|
855
|
+
| **customer_id** | **String** | Identifier of the customer resource | |
|
856
|
+
| **id** | **String** | Identifier of the subscription resource | |
|
857
|
+
| **accept_language** | **String** | Use for knowing which language to use | [optional][default to 'es'] |
|
858
|
+
| **x_child_company_id** | **String** | In the case of a holding company, the company id of the child company to which will process the request. | [optional] |
|
859
|
+
|
860
|
+
### Return type
|
861
|
+
|
862
|
+
[**SubscriptionResponse**](SubscriptionResponse.md)
|
863
|
+
|
864
|
+
### Authorization
|
865
|
+
|
866
|
+
[bearerAuth](../README.md#bearerAuth)
|
867
|
+
|
868
|
+
### HTTP request headers
|
869
|
+
|
870
|
+
- **Content-Type**: Not defined
|
871
|
+
- **Accept**: application/vnd.conekta-v2.2.0+json
|
872
|
+
|
873
|
+
|
874
|
+
## subscription_resume
|
875
|
+
|
876
|
+
> <SubscriptionResponse> subscription_resume(customer_id, id, opts)
|
877
|
+
|
878
|
+
Resume Subscription
|
879
|
+
|
880
|
+
Resume a specific paused subscription
|
881
|
+
|
882
|
+
### Examples
|
883
|
+
|
884
|
+
```ruby
|
885
|
+
require 'time'
|
886
|
+
require 'conekta'
|
887
|
+
# setup authorization
|
888
|
+
Conekta.configure do |config|
|
889
|
+
# Configure Bearer authorization: bearerAuth
|
890
|
+
config.access_token = 'YOUR_BEARER_TOKEN'
|
891
|
+
end
|
892
|
+
|
893
|
+
api_instance = Conekta::SubscriptionsApi.new
|
894
|
+
customer_id = 'cus_2tGzG1GxtDAZHEGPH' # String | Identifier of the customer resource
|
895
|
+
id = 'sub_2tGzG1GxtDAZHEGPH' # String | Identifier of the subscription resource
|
896
|
+
opts = {
|
897
|
+
accept_language: 'es', # String | Use for knowing which language to use
|
898
|
+
x_child_company_id: '6441b6376b60c3a638da80af' # String | In the case of a holding company, the company id of the child company to which will process the request.
|
899
|
+
}
|
900
|
+
|
901
|
+
begin
|
902
|
+
# Resume Subscription
|
903
|
+
result = api_instance.subscription_resume(customer_id, id, opts)
|
904
|
+
p result
|
905
|
+
rescue Conekta::ApiError => e
|
906
|
+
puts "Error when calling SubscriptionsApi->subscription_resume: #{e}"
|
907
|
+
end
|
908
|
+
```
|
909
|
+
|
910
|
+
#### Using the subscription_resume_with_http_info variant
|
911
|
+
|
912
|
+
This returns an Array which contains the response data, status code and headers.
|
913
|
+
|
914
|
+
> <Array(<SubscriptionResponse>, Integer, Hash)> subscription_resume_with_http_info(customer_id, id, opts)
|
915
|
+
|
916
|
+
```ruby
|
917
|
+
begin
|
918
|
+
# Resume Subscription
|
919
|
+
data, status_code, headers = api_instance.subscription_resume_with_http_info(customer_id, id, opts)
|
920
|
+
p status_code # => 2xx
|
921
|
+
p headers # => { ... }
|
922
|
+
p data # => <SubscriptionResponse>
|
923
|
+
rescue Conekta::ApiError => e
|
924
|
+
puts "Error when calling SubscriptionsApi->subscription_resume_with_http_info: #{e}"
|
925
|
+
end
|
926
|
+
```
|
927
|
+
|
928
|
+
### Parameters
|
929
|
+
|
930
|
+
| Name | Type | Description | Notes |
|
931
|
+
| ---- | ---- | ----------- | ----- |
|
932
|
+
| **customer_id** | **String** | Identifier of the customer resource | |
|
933
|
+
| **id** | **String** | Identifier of the subscription resource | |
|
934
|
+
| **accept_language** | **String** | Use for knowing which language to use | [optional][default to 'es'] |
|
935
|
+
| **x_child_company_id** | **String** | In the case of a holding company, the company id of the child company to which will process the request. | [optional] |
|
936
|
+
|
937
|
+
### Return type
|
938
|
+
|
939
|
+
[**SubscriptionResponse**](SubscriptionResponse.md)
|
940
|
+
|
941
|
+
### Authorization
|
942
|
+
|
943
|
+
[bearerAuth](../README.md#bearerAuth)
|
944
|
+
|
945
|
+
### HTTP request headers
|
946
|
+
|
947
|
+
- **Content-Type**: Not defined
|
948
|
+
- **Accept**: application/vnd.conekta-v2.2.0+json
|
949
|
+
|
950
|
+
|
951
|
+
## subscription_update
|
952
|
+
|
953
|
+
> <SubscriptionResponse> subscription_update(customer_id, id, subscription_update_request, opts)
|
954
|
+
|
955
|
+
Update Subscription
|
956
|
+
|
957
|
+
Update a specific subscription
|
958
|
+
|
959
|
+
### Examples
|
960
|
+
|
961
|
+
```ruby
|
962
|
+
require 'time'
|
963
|
+
require 'conekta'
|
964
|
+
# setup authorization
|
965
|
+
Conekta.configure do |config|
|
966
|
+
# Configure Bearer authorization: bearerAuth
|
967
|
+
config.access_token = 'YOUR_BEARER_TOKEN'
|
968
|
+
end
|
969
|
+
|
970
|
+
api_instance = Conekta::SubscriptionsApi.new
|
971
|
+
customer_id = 'cus_2tGzG1GxtDAZHEGPH' # String | Identifier of the customer resource
|
972
|
+
id = 'sub_2tGzG1GxtDAZHEGPH' # String | Identifier of the subscription resource
|
973
|
+
subscription_update_request = Conekta::SubscriptionUpdateRequest.new # SubscriptionUpdateRequest | requested field for update a subscription
|
974
|
+
opts = {
|
975
|
+
accept_language: 'es', # String | Use for knowing which language to use
|
976
|
+
x_child_company_id: '6441b6376b60c3a638da80af' # String | In the case of a holding company, the company id of the child company to which will process the request.
|
977
|
+
}
|
978
|
+
|
979
|
+
begin
|
980
|
+
# Update Subscription
|
981
|
+
result = api_instance.subscription_update(customer_id, id, subscription_update_request, opts)
|
982
|
+
p result
|
983
|
+
rescue Conekta::ApiError => e
|
984
|
+
puts "Error when calling SubscriptionsApi->subscription_update: #{e}"
|
985
|
+
end
|
986
|
+
```
|
987
|
+
|
988
|
+
#### Using the subscription_update_with_http_info variant
|
989
|
+
|
990
|
+
This returns an Array which contains the response data, status code and headers.
|
991
|
+
|
992
|
+
> <Array(<SubscriptionResponse>, Integer, Hash)> subscription_update_with_http_info(customer_id, id, subscription_update_request, opts)
|
993
|
+
|
994
|
+
```ruby
|
995
|
+
begin
|
996
|
+
# Update Subscription
|
997
|
+
data, status_code, headers = api_instance.subscription_update_with_http_info(customer_id, id, subscription_update_request, opts)
|
998
|
+
p status_code # => 2xx
|
999
|
+
p headers # => { ... }
|
1000
|
+
p data # => <SubscriptionResponse>
|
1001
|
+
rescue Conekta::ApiError => e
|
1002
|
+
puts "Error when calling SubscriptionsApi->subscription_update_with_http_info: #{e}"
|
1003
|
+
end
|
1004
|
+
```
|
1005
|
+
|
1006
|
+
### Parameters
|
1007
|
+
|
1008
|
+
| Name | Type | Description | Notes |
|
1009
|
+
| ---- | ---- | ----------- | ----- |
|
1010
|
+
| **customer_id** | **String** | Identifier of the customer resource | |
|
1011
|
+
| **id** | **String** | Identifier of the subscription resource | |
|
1012
|
+
| **subscription_update_request** | [**SubscriptionUpdateRequest**](SubscriptionUpdateRequest.md) | requested field for update a subscription | |
|
1013
|
+
| **accept_language** | **String** | Use for knowing which language to use | [optional][default to 'es'] |
|
1014
|
+
| **x_child_company_id** | **String** | In the case of a holding company, the company id of the child company to which will process the request. | [optional] |
|
1015
|
+
|
1016
|
+
### Return type
|
1017
|
+
|
1018
|
+
[**SubscriptionResponse**](SubscriptionResponse.md)
|
1019
|
+
|
1020
|
+
### Authorization
|
1021
|
+
|
1022
|
+
[bearerAuth](../README.md#bearerAuth)
|
1023
|
+
|
1024
|
+
### HTTP request headers
|
1025
|
+
|
1026
|
+
- **Content-Type**: application/json
|
1027
|
+
- **Accept**: application/vnd.conekta-v2.2.0+json
|
1028
|
+
|
1029
|
+
|
1030
|
+
## subscriptions_get
|
1031
|
+
|
1032
|
+
> <SubscriptionResponse> subscriptions_get(customer_id, id, opts)
|
1033
|
+
|
1034
|
+
Get Subscription
|
1035
|
+
|
1036
|
+
Retrieve a specific subscription
|
1037
|
+
|
1038
|
+
### Examples
|
1039
|
+
|
1040
|
+
```ruby
|
1041
|
+
require 'time'
|
1042
|
+
require 'conekta'
|
1043
|
+
# setup authorization
|
1044
|
+
Conekta.configure do |config|
|
1045
|
+
# Configure Bearer authorization: bearerAuth
|
1046
|
+
config.access_token = 'YOUR_BEARER_TOKEN'
|
1047
|
+
end
|
1048
|
+
|
1049
|
+
api_instance = Conekta::SubscriptionsApi.new
|
1050
|
+
customer_id = 'cus_2tGzG1GxtDAZHEGPH' # String | Identifier of the customer resource
|
1051
|
+
id = 'sub_2tGzG1GxtDAZHEGPH' # String | Identifier of the subscription resource
|
1052
|
+
opts = {
|
1053
|
+
accept_language: 'es', # String | Use for knowing which language to use
|
1054
|
+
x_child_company_id: '6441b6376b60c3a638da80af' # String | In the case of a holding company, the company id of the child company to which will process the request.
|
1055
|
+
}
|
1056
|
+
|
1057
|
+
begin
|
1058
|
+
# Get Subscription
|
1059
|
+
result = api_instance.subscriptions_get(customer_id, id, opts)
|
1060
|
+
p result
|
1061
|
+
rescue Conekta::ApiError => e
|
1062
|
+
puts "Error when calling SubscriptionsApi->subscriptions_get: #{e}"
|
1063
|
+
end
|
1064
|
+
```
|
1065
|
+
|
1066
|
+
#### Using the subscriptions_get_with_http_info variant
|
1067
|
+
|
1068
|
+
This returns an Array which contains the response data, status code and headers.
|
1069
|
+
|
1070
|
+
> <Array(<SubscriptionResponse>, Integer, Hash)> subscriptions_get_with_http_info(customer_id, id, opts)
|
1071
|
+
|
1072
|
+
```ruby
|
1073
|
+
begin
|
1074
|
+
# Get Subscription
|
1075
|
+
data, status_code, headers = api_instance.subscriptions_get_with_http_info(customer_id, id, opts)
|
1076
|
+
p status_code # => 2xx
|
1077
|
+
p headers # => { ... }
|
1078
|
+
p data # => <SubscriptionResponse>
|
1079
|
+
rescue Conekta::ApiError => e
|
1080
|
+
puts "Error when calling SubscriptionsApi->subscriptions_get_with_http_info: #{e}"
|
1081
|
+
end
|
1082
|
+
```
|
1083
|
+
|
1084
|
+
### Parameters
|
1085
|
+
|
1086
|
+
| Name | Type | Description | Notes |
|
1087
|
+
| ---- | ---- | ----------- | ----- |
|
1088
|
+
| **customer_id** | **String** | Identifier of the customer resource | |
|
1089
|
+
| **id** | **String** | Identifier of the subscription resource | |
|
1090
|
+
| **accept_language** | **String** | Use for knowing which language to use | [optional][default to 'es'] |
|
1091
|
+
| **x_child_company_id** | **String** | In the case of a holding company, the company id of the child company to which will process the request. | [optional] |
|
1092
|
+
|
1093
|
+
### Return type
|
1094
|
+
|
1095
|
+
[**SubscriptionResponse**](SubscriptionResponse.md)
|
1096
|
+
|
1097
|
+
### Authorization
|
1098
|
+
|
1099
|
+
[bearerAuth](../README.md#bearerAuth)
|
1100
|
+
|
1101
|
+
### HTTP request headers
|
1102
|
+
|
1103
|
+
- **Content-Type**: Not defined
|
1104
|
+
- **Accept**: application/vnd.conekta-v2.2.0+json
|
1105
|
+
|
1106
|
+
|
1107
|
+
## subscriptions_retry
|
1108
|
+
|
1109
|
+
> <SubscriptionResponse> subscriptions_retry(customer_id, id, opts)
|
1110
|
+
|
1111
|
+
Retry Failed Payment
|
1112
|
+
|
1113
|
+
Retry a failed payment for a specific subscription
|
1114
|
+
|
1115
|
+
### Examples
|
1116
|
+
|
1117
|
+
```ruby
|
1118
|
+
require 'time'
|
1119
|
+
require 'conekta'
|
1120
|
+
# setup authorization
|
1121
|
+
Conekta.configure do |config|
|
1122
|
+
# Configure Bearer authorization: bearerAuth
|
1123
|
+
config.access_token = 'YOUR_BEARER_TOKEN'
|
1124
|
+
end
|
1125
|
+
|
1126
|
+
api_instance = Conekta::SubscriptionsApi.new
|
1127
|
+
customer_id = 'cus_2tGzG1GxtDAZHEGPH' # String | Identifier of the customer resource
|
1128
|
+
id = 'sub_2tGzG1GxtDAZHEGPH' # String | Identifier of the subscription resource
|
1129
|
+
opts = {
|
1130
|
+
accept_language: 'es', # String | Use for knowing which language to use
|
1131
|
+
x_child_company_id: '6441b6376b60c3a638da80af' # String | In the case of a holding company, the company id of the child company to which will process the request.
|
1132
|
+
}
|
1133
|
+
|
1134
|
+
begin
|
1135
|
+
# Retry Failed Payment
|
1136
|
+
result = api_instance.subscriptions_retry(customer_id, id, opts)
|
1137
|
+
p result
|
1138
|
+
rescue Conekta::ApiError => e
|
1139
|
+
puts "Error when calling SubscriptionsApi->subscriptions_retry: #{e}"
|
1140
|
+
end
|
1141
|
+
```
|
1142
|
+
|
1143
|
+
#### Using the subscriptions_retry_with_http_info variant
|
1144
|
+
|
1145
|
+
This returns an Array which contains the response data, status code and headers.
|
1146
|
+
|
1147
|
+
> <Array(<SubscriptionResponse>, Integer, Hash)> subscriptions_retry_with_http_info(customer_id, id, opts)
|
1148
|
+
|
1149
|
+
```ruby
|
1150
|
+
begin
|
1151
|
+
# Retry Failed Payment
|
1152
|
+
data, status_code, headers = api_instance.subscriptions_retry_with_http_info(customer_id, id, opts)
|
1153
|
+
p status_code # => 2xx
|
1154
|
+
p headers # => { ... }
|
1155
|
+
p data # => <SubscriptionResponse>
|
1156
|
+
rescue Conekta::ApiError => e
|
1157
|
+
puts "Error when calling SubscriptionsApi->subscriptions_retry_with_http_info: #{e}"
|
1158
|
+
end
|
1159
|
+
```
|
1160
|
+
|
1161
|
+
### Parameters
|
1162
|
+
|
1163
|
+
| Name | Type | Description | Notes |
|
1164
|
+
| ---- | ---- | ----------- | ----- |
|
1165
|
+
| **customer_id** | **String** | Identifier of the customer resource | |
|
1166
|
+
| **id** | **String** | Identifier of the subscription resource | |
|
1167
|
+
| **accept_language** | **String** | Use for knowing which language to use | [optional][default to 'es'] |
|
1168
|
+
| **x_child_company_id** | **String** | In the case of a holding company, the company id of the child company to which will process the request. | [optional] |
|
1169
|
+
|
1170
|
+
### Return type
|
1171
|
+
|
1172
|
+
[**SubscriptionResponse**](SubscriptionResponse.md)
|
1173
|
+
|
1174
|
+
### Authorization
|
1175
|
+
|
1176
|
+
[bearerAuth](../README.md#bearerAuth)
|
1177
|
+
|
1178
|
+
### HTTP request headers
|
1179
|
+
|
1180
|
+
- **Content-Type**: Not defined
|
1181
|
+
- **Accept**: application/vnd.conekta-v2.2.0+json
|
1182
|
+
|
1183
|
+
|
1184
|
+
## update_subscription
|
1185
|
+
|
1186
|
+
> <SubscriptionResponse> update_subscription(id, subscription_update_request, opts)
|
1187
|
+
|
1188
|
+
Update Subscription [Deprecated]
|
1189
|
+
|
1190
|
+
DEPRECATED: This endpoint will be removed in version 2.3.0. You can modify the subscription to change the plans that your customers consume
|
1191
|
+
|
1192
|
+
### Examples
|
1193
|
+
|
1194
|
+
```ruby
|
1195
|
+
require 'time'
|
1196
|
+
require 'conekta'
|
1197
|
+
# setup authorization
|
1198
|
+
Conekta.configure do |config|
|
1199
|
+
# Configure Bearer authorization: bearerAuth
|
1200
|
+
config.access_token = 'YOUR_BEARER_TOKEN'
|
1201
|
+
end
|
1202
|
+
|
1203
|
+
api_instance = Conekta::SubscriptionsApi.new
|
1204
|
+
id = '6307a60c41de27127515a575' # String | Identifier of the resource
|
1205
|
+
subscription_update_request = Conekta::SubscriptionUpdateRequest.new # SubscriptionUpdateRequest | requested field for update a subscription
|
1206
|
+
opts = {
|
1207
|
+
accept_language: 'es', # String | Use for knowing which language to use
|
1208
|
+
x_child_company_id: '6441b6376b60c3a638da80af' # String | In the case of a holding company, the company id of the child company to which will process the request.
|
1209
|
+
}
|
1210
|
+
|
1211
|
+
begin
|
1212
|
+
# Update Subscription [Deprecated]
|
1213
|
+
result = api_instance.update_subscription(id, subscription_update_request, opts)
|
1214
|
+
p result
|
1215
|
+
rescue Conekta::ApiError => e
|
1216
|
+
puts "Error when calling SubscriptionsApi->update_subscription: #{e}"
|
1217
|
+
end
|
1218
|
+
```
|
1219
|
+
|
1220
|
+
#### Using the update_subscription_with_http_info variant
|
1221
|
+
|
1222
|
+
This returns an Array which contains the response data, status code and headers.
|
1223
|
+
|
1224
|
+
> <Array(<SubscriptionResponse>, Integer, Hash)> update_subscription_with_http_info(id, subscription_update_request, opts)
|
1225
|
+
|
1226
|
+
```ruby
|
1227
|
+
begin
|
1228
|
+
# Update Subscription [Deprecated]
|
509
1229
|
data, status_code, headers = api_instance.update_subscription_with_http_info(id, subscription_update_request, opts)
|
510
1230
|
p status_code # => 2xx
|
511
1231
|
p headers # => { ... }
|
@@ -535,5 +1255,5 @@ end
|
|
535
1255
|
### HTTP request headers
|
536
1256
|
|
537
1257
|
- **Content-Type**: application/json
|
538
|
-
- **Accept**: application/vnd.conekta-v2.
|
1258
|
+
- **Accept**: application/vnd.conekta-v2.2.0+json
|
539
1259
|
|