|
3 | 3 | /**
|
4 | 4 | * Hostinger API
|
5 | 5 | *
|
6 |
| - * API Version: 0.1.7 |
| 6 | + * API Version: 0.1.16 |
7 | 7 | *
|
8 | 8 | * NOTE: This file is auto-generated, DO NOT EDIT THIS FILE MANUALLY!
|
9 | 9 | * If you want to contribute or request a new feature, please create an issue or pull request on https://github.com/hostinger/api
|
@@ -3603,6 +3603,82 @@ export const BillingSubscriptionsApiAxiosParamCreator = function (configuration?
|
3603 | 3603 | options: localVarRequestOptions,
|
3604 | 3604 | };
|
3605 | 3605 | },
|
| 3606 | + /** |
| 3607 | + * Disable auto-renewal for a subscription. Use this endpoint when disable auto-renewal for a subscription. |
| 3608 | + * @summary Disable auto-renewal |
| 3609 | + * @param {string} subscriptionId Subscription ID |
| 3610 | + * @param {*} [options] Override http request option. |
| 3611 | + * @throws {RequiredError} |
| 3612 | + */ |
| 3613 | + disableAutoRenewalV1: async (subscriptionId: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => { |
| 3614 | + // verify required parameter 'subscriptionId' is not null or undefined |
| 3615 | + assertParamExists('disableAutoRenewalV1', 'subscriptionId', subscriptionId) |
| 3616 | + const localVarPath = `/api/billing/v1/subscriptions/{subscriptionId}/auto-renewal/disable` |
| 3617 | + .replace(`{${"subscriptionId"}}`, encodeURIComponent(String(subscriptionId))); |
| 3618 | + // use dummy base URL string because the URL constructor only accepts absolute URLs. |
| 3619 | + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); |
| 3620 | + let baseOptions; |
| 3621 | + if (configuration) { |
| 3622 | + baseOptions = configuration.baseOptions; |
| 3623 | + } |
| 3624 | + |
| 3625 | + const localVarRequestOptions = { method: 'DELETE', ...baseOptions, ...options}; |
| 3626 | + const localVarHeaderParameter = {} as any; |
| 3627 | + const localVarQueryParameter = {} as any; |
| 3628 | + |
| 3629 | + // authentication apiToken required |
| 3630 | + // http bearer authentication required |
| 3631 | + await setBearerAuthToObject(localVarHeaderParameter, configuration) |
| 3632 | + |
| 3633 | + |
| 3634 | + |
| 3635 | + setSearchParams(localVarUrlObj, localVarQueryParameter); |
| 3636 | + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; |
| 3637 | + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; |
| 3638 | + |
| 3639 | + return { |
| 3640 | + url: toPathString(localVarUrlObj), |
| 3641 | + options: localVarRequestOptions, |
| 3642 | + }; |
| 3643 | + }, |
| 3644 | + /** |
| 3645 | + * Enable auto-renewal for a subscription. Use this endpoint when enable auto-renewal for a subscription. |
| 3646 | + * @summary Enable auto-renewal |
| 3647 | + * @param {string} subscriptionId Subscription ID |
| 3648 | + * @param {*} [options] Override http request option. |
| 3649 | + * @throws {RequiredError} |
| 3650 | + */ |
| 3651 | + enableAutoRenewalV1: async (subscriptionId: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => { |
| 3652 | + // verify required parameter 'subscriptionId' is not null or undefined |
| 3653 | + assertParamExists('enableAutoRenewalV1', 'subscriptionId', subscriptionId) |
| 3654 | + const localVarPath = `/api/billing/v1/subscriptions/{subscriptionId}/auto-renewal/enable` |
| 3655 | + .replace(`{${"subscriptionId"}}`, encodeURIComponent(String(subscriptionId))); |
| 3656 | + // use dummy base URL string because the URL constructor only accepts absolute URLs. |
| 3657 | + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); |
| 3658 | + let baseOptions; |
| 3659 | + if (configuration) { |
| 3660 | + baseOptions = configuration.baseOptions; |
| 3661 | + } |
| 3662 | + |
| 3663 | + const localVarRequestOptions = { method: 'PATCH', ...baseOptions, ...options}; |
| 3664 | + const localVarHeaderParameter = {} as any; |
| 3665 | + const localVarQueryParameter = {} as any; |
| 3666 | + |
| 3667 | + // authentication apiToken required |
| 3668 | + // http bearer authentication required |
| 3669 | + await setBearerAuthToObject(localVarHeaderParameter, configuration) |
| 3670 | + |
| 3671 | + |
| 3672 | + |
| 3673 | + setSearchParams(localVarUrlObj, localVarQueryParameter); |
| 3674 | + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; |
| 3675 | + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; |
| 3676 | + |
| 3677 | + return { |
| 3678 | + url: toPathString(localVarUrlObj), |
| 3679 | + options: localVarRequestOptions, |
| 3680 | + }; |
| 3681 | + }, |
3606 | 3682 | /**
|
3607 | 3683 | * Retrieve a list of all subscriptions associated with your account. Use this endpoint to monitor active services and billing status.
|
3608 | 3684 | * @summary Get subscription list
|
@@ -3660,6 +3736,30 @@ export const BillingSubscriptionsApiFp = function(configuration?: Configuration)
|
3660 | 3736 | const localVarOperationServerBasePath = operationServerMap['BillingSubscriptionsApi.cancelSubscriptionV1']?.[0]?.url;
|
3661 | 3737 | return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
3662 | 3738 | },
|
| 3739 | + /** |
| 3740 | + * Disable auto-renewal for a subscription. Use this endpoint when disable auto-renewal for a subscription. |
| 3741 | + * @summary Disable auto-renewal |
| 3742 | + * @param {string} subscriptionId Subscription ID |
| 3743 | + * @param {*} [options] Override http request option. |
| 3744 | + * @throws {RequiredError} |
| 3745 | + */ |
| 3746 | + async disableAutoRenewalV1(subscriptionId: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<BillingV1SubscriptionSubscriptionResource>> { |
| 3747 | + const localVarAxiosArgs = await localVarAxiosParamCreator.disableAutoRenewalV1(subscriptionId, options); |
| 3748 | + const localVarOperationServerBasePath = operationServerMap['BillingSubscriptionsApi.disableAutoRenewalV1']?.[0]?.url; |
| 3749 | + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); |
| 3750 | + }, |
| 3751 | + /** |
| 3752 | + * Enable auto-renewal for a subscription. Use this endpoint when enable auto-renewal for a subscription. |
| 3753 | + * @summary Enable auto-renewal |
| 3754 | + * @param {string} subscriptionId Subscription ID |
| 3755 | + * @param {*} [options] Override http request option. |
| 3756 | + * @throws {RequiredError} |
| 3757 | + */ |
| 3758 | + async enableAutoRenewalV1(subscriptionId: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<BillingV1SubscriptionSubscriptionResource>> { |
| 3759 | + const localVarAxiosArgs = await localVarAxiosParamCreator.enableAutoRenewalV1(subscriptionId, options); |
| 3760 | + const localVarOperationServerBasePath = operationServerMap['BillingSubscriptionsApi.enableAutoRenewalV1']?.[0]?.url; |
| 3761 | + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); |
| 3762 | + }, |
3663 | 3763 | /**
|
3664 | 3764 | * Retrieve a list of all subscriptions associated with your account. Use this endpoint to monitor active services and billing status.
|
3665 | 3765 | * @summary Get subscription list
|
@@ -3692,6 +3792,26 @@ export const BillingSubscriptionsApiFactory = function (configuration?: Configur
|
3692 | 3792 | cancelSubscriptionV1(subscriptionId: string, billingV1SubscriptionCancelRequest: BillingV1SubscriptionCancelRequest, options?: RawAxiosRequestConfig): AxiosPromise<CommonSuccessEmptyResource> {
|
3693 | 3793 | return localVarFp.cancelSubscriptionV1(subscriptionId, billingV1SubscriptionCancelRequest, options).then((request) => request(axios, basePath));
|
3694 | 3794 | },
|
| 3795 | + /** |
| 3796 | + * Disable auto-renewal for a subscription. Use this endpoint when disable auto-renewal for a subscription. |
| 3797 | + * @summary Disable auto-renewal |
| 3798 | + * @param {string} subscriptionId Subscription ID |
| 3799 | + * @param {*} [options] Override http request option. |
| 3800 | + * @throws {RequiredError} |
| 3801 | + */ |
| 3802 | + disableAutoRenewalV1(subscriptionId: string, options?: RawAxiosRequestConfig): AxiosPromise<BillingV1SubscriptionSubscriptionResource> { |
| 3803 | + return localVarFp.disableAutoRenewalV1(subscriptionId, options).then((request) => request(axios, basePath)); |
| 3804 | + }, |
| 3805 | + /** |
| 3806 | + * Enable auto-renewal for a subscription. Use this endpoint when enable auto-renewal for a subscription. |
| 3807 | + * @summary Enable auto-renewal |
| 3808 | + * @param {string} subscriptionId Subscription ID |
| 3809 | + * @param {*} [options] Override http request option. |
| 3810 | + * @throws {RequiredError} |
| 3811 | + */ |
| 3812 | + enableAutoRenewalV1(subscriptionId: string, options?: RawAxiosRequestConfig): AxiosPromise<BillingV1SubscriptionSubscriptionResource> { |
| 3813 | + return localVarFp.enableAutoRenewalV1(subscriptionId, options).then((request) => request(axios, basePath)); |
| 3814 | + }, |
3695 | 3815 | /**
|
3696 | 3816 | * Retrieve a list of all subscriptions associated with your account. Use this endpoint to monitor active services and billing status.
|
3697 | 3817 | * @summary Get subscription list
|
@@ -3724,6 +3844,30 @@ export class BillingSubscriptionsApi extends BaseAPI {
|
3724 | 3844 | return BillingSubscriptionsApiFp(this.configuration).cancelSubscriptionV1(subscriptionId, billingV1SubscriptionCancelRequest, options).then((request) => request(this.axios, this.basePath));
|
3725 | 3845 | }
|
3726 | 3846 |
|
| 3847 | + /** |
| 3848 | + * Disable auto-renewal for a subscription. Use this endpoint when disable auto-renewal for a subscription. |
| 3849 | + * @summary Disable auto-renewal |
| 3850 | + * @param {string} subscriptionId Subscription ID |
| 3851 | + * @param {*} [options] Override http request option. |
| 3852 | + * @throws {RequiredError} |
| 3853 | + * @memberof BillingSubscriptionsApi |
| 3854 | + */ |
| 3855 | + public disableAutoRenewalV1(subscriptionId: string, options?: RawAxiosRequestConfig) { |
| 3856 | + return BillingSubscriptionsApiFp(this.configuration).disableAutoRenewalV1(subscriptionId, options).then((request) => request(this.axios, this.basePath)); |
| 3857 | + } |
| 3858 | + |
| 3859 | + /** |
| 3860 | + * Enable auto-renewal for a subscription. Use this endpoint when enable auto-renewal for a subscription. |
| 3861 | + * @summary Enable auto-renewal |
| 3862 | + * @param {string} subscriptionId Subscription ID |
| 3863 | + * @param {*} [options] Override http request option. |
| 3864 | + * @throws {RequiredError} |
| 3865 | + * @memberof BillingSubscriptionsApi |
| 3866 | + */ |
| 3867 | + public enableAutoRenewalV1(subscriptionId: string, options?: RawAxiosRequestConfig) { |
| 3868 | + return BillingSubscriptionsApiFp(this.configuration).enableAutoRenewalV1(subscriptionId, options).then((request) => request(this.axios, this.basePath)); |
| 3869 | + } |
| 3870 | + |
3727 | 3871 | /**
|
3728 | 3872 | * Retrieve a list of all subscriptions associated with your account. Use this endpoint to monitor active services and billing status.
|
3729 | 3873 | * @summary Get subscription list
|
|
0 commit comments