hostinger-api-sdk 1.21.1 → 1.22.1
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.
- package/README.md +2 -2
- package/api.ts +99 -1
- package/base.ts +1 -1
- package/common.ts +2 -2
- package/configuration.ts +2 -2
- package/dist/api.d.ts +323 -267
- package/dist/api.js +75 -1
- package/dist/base.d.ts +1 -1
- package/dist/base.js +1 -1
- package/dist/common.d.ts +1 -1
- package/dist/common.js +1 -1
- package/dist/configuration.d.ts +1 -1
- package/dist/configuration.js +2 -2
- package/dist/esm/api.d.ts +323 -267
- package/dist/esm/api.js +75 -1
- package/dist/esm/base.d.ts +1 -1
- package/dist/esm/base.js +1 -1
- package/dist/esm/common.d.ts +1 -1
- package/dist/esm/common.js +1 -1
- package/dist/esm/configuration.d.ts +1 -1
- package/dist/esm/configuration.js +2 -2
- package/dist/esm/index.d.ts +1 -1
- package/dist/esm/index.js +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/docs/BillingSubscriptionsApi.md +59 -0
- package/docs/BillingV1SubscriptionRenewalRenewRequest.md +22 -0
- package/index.ts +1 -1
- package/package.json +1 -1
package/dist/api.js
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
/**
|
|
5
5
|
* Hostinger API
|
|
6
6
|
*
|
|
7
|
-
* API Version: 1.
|
|
7
|
+
* API Version: 1.23.0
|
|
8
8
|
*
|
|
9
9
|
* NOTE: This file is auto-generated, DO NOT EDIT THIS FILE MANUALLY!
|
|
10
10
|
* If you want to contribute or request a new feature, please create an issue or pull request on https://github.com/hostinger/api
|
|
@@ -3373,6 +3373,41 @@ const BillingSubscriptionsApiAxiosParamCreator = function (configuration) {
|
|
|
3373
3373
|
options: localVarRequestOptions,
|
|
3374
3374
|
};
|
|
3375
3375
|
}),
|
|
3376
|
+
/**
|
|
3377
|
+
* Create a renewal order for an existing Hostinger subscription. This endpoint places a renewal order for a single subscription, leveraging the existing billing infrastructure. Use the [subscriptions endpoint](#tag/billing-subscriptions) to look up the `subscriptionId` values available for renewal. If no payment method is provided, your default payment method will be used automatically. Use this endpoint to renew any subscription available in your account.
|
|
3378
|
+
* @summary Renew subscription
|
|
3379
|
+
* @param {string} subscriptionId Subscription ID
|
|
3380
|
+
* @param {BillingV1SubscriptionRenewalRenewRequest} [billingV1SubscriptionRenewalRenewRequest]
|
|
3381
|
+
* @param {*} [options] Override http request option.
|
|
3382
|
+
* @throws {RequiredError}
|
|
3383
|
+
*/
|
|
3384
|
+
renewSubscriptionV1: (subscriptionId_1, billingV1SubscriptionRenewalRenewRequest_1, ...args_1) => __awaiter(this, [subscriptionId_1, billingV1SubscriptionRenewalRenewRequest_1, ...args_1], void 0, function* (subscriptionId, billingV1SubscriptionRenewalRenewRequest, options = {}) {
|
|
3385
|
+
// verify required parameter 'subscriptionId' is not null or undefined
|
|
3386
|
+
(0, common_1.assertParamExists)('renewSubscriptionV1', 'subscriptionId', subscriptionId);
|
|
3387
|
+
const localVarPath = `/api/billing/v1/subscriptions/{subscriptionId}/renew`
|
|
3388
|
+
.replace(`{${"subscriptionId"}}`, encodeURIComponent(String(subscriptionId)));
|
|
3389
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
3390
|
+
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
3391
|
+
let baseOptions;
|
|
3392
|
+
if (configuration) {
|
|
3393
|
+
baseOptions = configuration.baseOptions;
|
|
3394
|
+
}
|
|
3395
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
|
|
3396
|
+
const localVarHeaderParameter = {};
|
|
3397
|
+
const localVarQueryParameter = {};
|
|
3398
|
+
// authentication apiToken required
|
|
3399
|
+
// http bearer authentication required
|
|
3400
|
+
yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
|
|
3401
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
3402
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
3403
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
3404
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
3405
|
+
localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(billingV1SubscriptionRenewalRenewRequest, localVarRequestOptions, configuration);
|
|
3406
|
+
return {
|
|
3407
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
3408
|
+
options: localVarRequestOptions,
|
|
3409
|
+
};
|
|
3410
|
+
}),
|
|
3376
3411
|
};
|
|
3377
3412
|
};
|
|
3378
3413
|
exports.BillingSubscriptionsApiAxiosParamCreator = BillingSubscriptionsApiAxiosParamCreator;
|
|
@@ -3427,6 +3462,22 @@ const BillingSubscriptionsApiFp = function (configuration) {
|
|
|
3427
3462
|
return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
3428
3463
|
});
|
|
3429
3464
|
},
|
|
3465
|
+
/**
|
|
3466
|
+
* Create a renewal order for an existing Hostinger subscription. This endpoint places a renewal order for a single subscription, leveraging the existing billing infrastructure. Use the [subscriptions endpoint](#tag/billing-subscriptions) to look up the `subscriptionId` values available for renewal. If no payment method is provided, your default payment method will be used automatically. Use this endpoint to renew any subscription available in your account.
|
|
3467
|
+
* @summary Renew subscription
|
|
3468
|
+
* @param {string} subscriptionId Subscription ID
|
|
3469
|
+
* @param {BillingV1SubscriptionRenewalRenewRequest} [billingV1SubscriptionRenewalRenewRequest]
|
|
3470
|
+
* @param {*} [options] Override http request option.
|
|
3471
|
+
* @throws {RequiredError}
|
|
3472
|
+
*/
|
|
3473
|
+
renewSubscriptionV1(subscriptionId, billingV1SubscriptionRenewalRenewRequest, options) {
|
|
3474
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
3475
|
+
var _a, _b;
|
|
3476
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.renewSubscriptionV1(subscriptionId, billingV1SubscriptionRenewalRenewRequest, options);
|
|
3477
|
+
const localVarOperationServerBasePath = (_b = (_a = base_1.operationServerMap['BillingSubscriptionsApi.renewSubscriptionV1']) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.url;
|
|
3478
|
+
return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
3479
|
+
});
|
|
3480
|
+
},
|
|
3430
3481
|
};
|
|
3431
3482
|
};
|
|
3432
3483
|
exports.BillingSubscriptionsApiFp = BillingSubscriptionsApiFp;
|
|
@@ -3466,6 +3517,17 @@ const BillingSubscriptionsApiFactory = function (configuration, basePath, axios)
|
|
|
3466
3517
|
getSubscriptionListV1(options) {
|
|
3467
3518
|
return localVarFp.getSubscriptionListV1(options).then((request) => request(axios, basePath));
|
|
3468
3519
|
},
|
|
3520
|
+
/**
|
|
3521
|
+
* Create a renewal order for an existing Hostinger subscription. This endpoint places a renewal order for a single subscription, leveraging the existing billing infrastructure. Use the [subscriptions endpoint](#tag/billing-subscriptions) to look up the `subscriptionId` values available for renewal. If no payment method is provided, your default payment method will be used automatically. Use this endpoint to renew any subscription available in your account.
|
|
3522
|
+
* @summary Renew subscription
|
|
3523
|
+
* @param {string} subscriptionId Subscription ID
|
|
3524
|
+
* @param {BillingV1SubscriptionRenewalRenewRequest} [billingV1SubscriptionRenewalRenewRequest]
|
|
3525
|
+
* @param {*} [options] Override http request option.
|
|
3526
|
+
* @throws {RequiredError}
|
|
3527
|
+
*/
|
|
3528
|
+
renewSubscriptionV1(subscriptionId, billingV1SubscriptionRenewalRenewRequest, options) {
|
|
3529
|
+
return localVarFp.renewSubscriptionV1(subscriptionId, billingV1SubscriptionRenewalRenewRequest, options).then((request) => request(axios, basePath));
|
|
3530
|
+
},
|
|
3469
3531
|
};
|
|
3470
3532
|
};
|
|
3471
3533
|
exports.BillingSubscriptionsApiFactory = BillingSubscriptionsApiFactory;
|
|
@@ -3508,6 +3570,18 @@ class BillingSubscriptionsApi extends base_1.BaseAPI {
|
|
|
3508
3570
|
getSubscriptionListV1(options) {
|
|
3509
3571
|
return (0, exports.BillingSubscriptionsApiFp)(this.configuration).getSubscriptionListV1(options).then((request) => request(this.axios, this.basePath));
|
|
3510
3572
|
}
|
|
3573
|
+
/**
|
|
3574
|
+
* Create a renewal order for an existing Hostinger subscription. This endpoint places a renewal order for a single subscription, leveraging the existing billing infrastructure. Use the [subscriptions endpoint](#tag/billing-subscriptions) to look up the `subscriptionId` values available for renewal. If no payment method is provided, your default payment method will be used automatically. Use this endpoint to renew any subscription available in your account.
|
|
3575
|
+
* @summary Renew subscription
|
|
3576
|
+
* @param {string} subscriptionId Subscription ID
|
|
3577
|
+
* @param {BillingV1SubscriptionRenewalRenewRequest} [billingV1SubscriptionRenewalRenewRequest]
|
|
3578
|
+
* @param {*} [options] Override http request option.
|
|
3579
|
+
* @throws {RequiredError}
|
|
3580
|
+
* @memberof BillingSubscriptionsApi
|
|
3581
|
+
*/
|
|
3582
|
+
renewSubscriptionV1(subscriptionId, billingV1SubscriptionRenewalRenewRequest, options) {
|
|
3583
|
+
return (0, exports.BillingSubscriptionsApiFp)(this.configuration).renewSubscriptionV1(subscriptionId, billingV1SubscriptionRenewalRenewRequest, options).then((request) => request(this.axios, this.basePath));
|
|
3584
|
+
}
|
|
3511
3585
|
}
|
|
3512
3586
|
exports.BillingSubscriptionsApi = BillingSubscriptionsApi;
|
|
3513
3587
|
/**
|
package/dist/base.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Hostinger API
|
|
3
3
|
*
|
|
4
|
-
* API Version: 1.
|
|
4
|
+
* API Version: 1.23.0
|
|
5
5
|
*
|
|
6
6
|
* NOTE: This file is auto-generated, DO NOT EDIT THIS FILE MANUALLY!
|
|
7
7
|
* If you want to contribute or request a new feature, please create an issue or pull request on https://github.com/hostinger/api
|
package/dist/base.js
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
/**
|
|
5
5
|
* Hostinger API
|
|
6
6
|
*
|
|
7
|
-
* API Version: 1.
|
|
7
|
+
* API Version: 1.23.0
|
|
8
8
|
*
|
|
9
9
|
* NOTE: This file is auto-generated, DO NOT EDIT THIS FILE MANUALLY!
|
|
10
10
|
* If you want to contribute or request a new feature, please create an issue or pull request on https://github.com/hostinger/api
|
package/dist/common.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Hostinger API
|
|
3
3
|
*
|
|
4
|
-
* API Version: 1.
|
|
4
|
+
* API Version: 1.23.0
|
|
5
5
|
*
|
|
6
6
|
* NOTE: This file is auto-generated, DO NOT EDIT THIS FILE MANUALLY!
|
|
7
7
|
* If you want to contribute or request a new feature, please create an issue or pull request on https://github.com/hostinger/api
|
package/dist/common.js
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
/**
|
|
5
5
|
* Hostinger API
|
|
6
6
|
*
|
|
7
|
-
* API Version: 1.
|
|
7
|
+
* API Version: 1.23.0
|
|
8
8
|
*
|
|
9
9
|
* NOTE: This file is auto-generated, DO NOT EDIT THIS FILE MANUALLY!
|
|
10
10
|
* If you want to contribute or request a new feature, please create an issue or pull request on https://github.com/hostinger/api
|
package/dist/configuration.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Hostinger API
|
|
3
3
|
*
|
|
4
|
-
* API Version: 1.
|
|
4
|
+
* API Version: 1.23.0
|
|
5
5
|
*
|
|
6
6
|
* NOTE: This file is auto-generated, DO NOT EDIT THIS FILE MANUALLY!
|
|
7
7
|
* If you want to contribute or request a new feature, please create an issue or pull request on https://github.com/hostinger/api
|
package/dist/configuration.js
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
/**
|
|
5
5
|
* Hostinger API
|
|
6
6
|
*
|
|
7
|
-
* API Version: 1.
|
|
7
|
+
* API Version: 1.23.0
|
|
8
8
|
*
|
|
9
9
|
* NOTE: This file is auto-generated, DO NOT EDIT THIS FILE MANUALLY!
|
|
10
10
|
* If you want to contribute or request a new feature, please create an issue or pull request on https://github.com/hostinger/api
|
|
@@ -16,7 +16,7 @@ class Configuration {
|
|
|
16
16
|
var _a;
|
|
17
17
|
this.accessToken = param.accessToken;
|
|
18
18
|
this.basePath = param.basePath;
|
|
19
|
-
this.baseOptions = Object.assign(Object.assign({}, param.baseOptions), { headers: Object.assign({ 'User-Agent': "hostinger-typescript-sdk/1.
|
|
19
|
+
this.baseOptions = Object.assign(Object.assign({}, param.baseOptions), { headers: Object.assign({ 'User-Agent': "hostinger-typescript-sdk/1.22.1" }, (_a = param.baseOptions) === null || _a === void 0 ? void 0 : _a.headers) });
|
|
20
20
|
this.formDataCtor = param.formDataCtor;
|
|
21
21
|
}
|
|
22
22
|
/**
|