UNPKG

@tennac-booking/sdk

Version:

OpenAPI client for @tennac-booking/sdk

226 lines (146 loc) 5.72 kB
# SubscriptionsManagerApi All URIs are relative to *http://localhost* |Method | HTTP request | Description| |------------- | ------------- | -------------| |[**archivePlan**](#archiveplan) | **POST** /api/subscriptions/plans/{productId}/archive | | |[**createPlan**](#createplan) | **POST** /api/subscriptions/plans | | |[**deletePlan**](#deleteplan) | **DELETE** /api/subscriptions/plans/{productId} | | |[**updatePlan**](#updateplan) | **PUT** /api/subscriptions/plans | | # **archivePlan** > DeleteSubscriptionPlanResponse archivePlan() Supprime (archive) un plan par productId (manager) ### Example ```typescript import { SubscriptionsManagerApi, Configuration } from '@tennac-booking/sdk'; const configuration = new Configuration(); const apiInstance = new SubscriptionsManagerApi(configuration); let productId: string; // (default to undefined) const { status, data } = await apiInstance.archivePlan( productId ); ``` ### Parameters |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| | **productId** | [**string**] | | defaults to undefined| ### Return type **DeleteSubscriptionPlanResponse** ### Authorization [bearerAuth](../README.md#bearerAuth) ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| |**200** | Plan archivé | - | |**400** | Bad Request | - | |**401** | Unauthorized | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **createPlan** > CreatePlan201Response createPlan(createSubscriptionPlanRequest) Crée un nouveau plan d\'abonnement (produit + price) pour le club (manager) ### Example ```typescript import { SubscriptionsManagerApi, Configuration, CreateSubscriptionPlanRequest } from '@tennac-booking/sdk'; const configuration = new Configuration(); const apiInstance = new SubscriptionsManagerApi(configuration); let createSubscriptionPlanRequest: CreateSubscriptionPlanRequest; // const { status, data } = await apiInstance.createPlan( createSubscriptionPlanRequest ); ``` ### Parameters |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| | **createSubscriptionPlanRequest** | **CreateSubscriptionPlanRequest**| | | ### Return type **CreatePlan201Response** ### Authorization [bearerAuth](../README.md#bearerAuth) ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| |**201** | Plan créé | - | |**400** | Bad Request | - | |**401** | Unauthorized | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **deletePlan** > DeleteSubscriptionPlanResponse deletePlan() Supprime un plan par productId (manager) ### Example ```typescript import { SubscriptionsManagerApi, Configuration } from '@tennac-booking/sdk'; const configuration = new Configuration(); const apiInstance = new SubscriptionsManagerApi(configuration); let productId: string; // (default to undefined) const { status, data } = await apiInstance.deletePlan( productId ); ``` ### Parameters |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| | **productId** | [**string**] | | defaults to undefined| ### Return type **DeleteSubscriptionPlanResponse** ### Authorization [bearerAuth](../README.md#bearerAuth) ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| |**200** | Plan supprimé | - | |**400** | Bad Request | - | |**401** | Unauthorized | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **updatePlan** > any updatePlan(updateSubscriptionPlanRequest) Met à jour un plan en annotant ses métadonnées et, si demandé, son prix (manager) ### Example ```typescript import { SubscriptionsManagerApi, Configuration, UpdateSubscriptionPlanRequest } from '@tennac-booking/sdk'; const configuration = new Configuration(); const apiInstance = new SubscriptionsManagerApi(configuration); let updateSubscriptionPlanRequest: UpdateSubscriptionPlanRequest; // const { status, data } = await apiInstance.updatePlan( updateSubscriptionPlanRequest ); ``` ### Parameters |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| | **updateSubscriptionPlanRequest** | **UpdateSubscriptionPlanRequest**| | | ### Return type **any** ### Authorization [bearerAuth](../README.md#bearerAuth) ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| |**200** | Plan mis à jour | - | |**400** | Bad Request | - | |**401** | Unauthorized | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)