From b39c2d31580a22efaa139ae94b66071e2da72a4c Mon Sep 17 00:00:00 2001 From: Rudkovskiy Date: Mon, 26 Feb 2024 16:26:50 +0200 Subject: [PATCH] remove BundleObtainParameters.js (#69) Co-authored-by: Viacheslav Rudkovskyi --- src/index.js | 2 -- src/services/BundleService.js | 8 ++++---- src/vo/BundleObtainParameters.js | 21 --------------------- 3 files changed, 4 insertions(+), 27 deletions(-) delete mode 100644 src/vo/BundleObtainParameters.js diff --git a/src/index.js b/src/index.js index 5c2209e..9b2f659 100644 --- a/src/index.js +++ b/src/index.js @@ -6,7 +6,6 @@ import Context from './vo/Context'; import Page from './vo/Page'; import ValidationParameters from './vo/ValidationParameters'; import ValidationResults from './vo/ValidationResults'; -import BundleObtainParameters from './vo/BundleObtainParameters'; // Services import Service from './services/Service'; @@ -70,7 +69,6 @@ export { Page, ValidationParameters, ValidationResults, - BundleObtainParameters, // Expose Services Service, diff --git a/src/services/BundleService.js b/src/services/BundleService.js index bf43d44..f56384c 100644 --- a/src/services/BundleService.js +++ b/src/services/BundleService.js @@ -163,18 +163,18 @@ export default { * @param number string * * licensee number - * @param bundleObtainParameters NetLicensing.BundleObtainParameters + * @param licenseeNumber String * * return array of licenses * @returns {Promise} */ - async obtain(context, number, bundleObtainParameters) { + async obtain(context, number, licenseeNumber) { CheckUtils.paramNotEmpty(number, Constants.NUMBER); - CheckUtils.paramNotEmpty(bundleObtainParameters.getLicenseeNumber(), Constants.Licensee.LICENSEE_NUMBER); + CheckUtils.paramNotEmpty(licenseeNumber, Constants.Licensee.LICENSEE_NUMBER); const { ENDPOINT_PATH, ENDPOINT_OBTAIN_PATH } = Constants.Bundle; - const queryParams = { [Constants.Licensee.LICENSEE_NUMBER]: bundleObtainParameters.getLicenseeNumber() }; + const queryParams = { [Constants.Licensee.LICENSEE_NUMBER]: licenseeNumber }; const { data: { items: { item: items } } } = await Service .post(context, `${ENDPOINT_PATH}/${number}/${ENDPOINT_OBTAIN_PATH}`, queryParams); diff --git a/src/vo/BundleObtainParameters.js b/src/vo/BundleObtainParameters.js deleted file mode 100644 index 956590a..0000000 --- a/src/vo/BundleObtainParameters.js +++ /dev/null @@ -1,21 +0,0 @@ -/** - * @author Labs64 - * @license Apache-2.0 - * @link https://netlicensing.io - * @copyright 2017 Labs64 NetLicensing - */ - -export default class BundleObtainParameters { - constructor() { - this.licenseeNumber = ''; - } - - setLicenseeNumber(licenseeNumber) { - this.licenseeNumber = licenseeNumber; - return this; - } - - getLicenseeNumber() { - return this.licenseeNumber; - } -}