From 1444364e3e0442486b2d27c8b7e92ac22e9ce79c Mon Sep 17 00:00:00 2001 From: Greg Swindle Date: Thu, 11 Jul 2019 00:10:02 -0500 Subject: [PATCH] docs(product): stub models Create stubs and specs for: - lib/product/arbitrary-price - lib/product/batch - lib/product/catalog-entry - lib/product/measured-product-instance - lib/product/measured-product-type - lib/product/package - lib/product/package-instance - lib/product/package-type - lib/product/price - lib/product/pricing-strategy - lib/product/product-catalog - lib/product/product-feature-type - lib/product/product-identifier - lib/product/product-instance - lib/product/product-type #1 --- .env.defaults | 4 +- .github/ci/docs/jsdoc.json | 2 +- .github/pull_request_template.md | 50 +- README.md | 13 +- .../product/0.0.0/ArbitraryPrice.html | 436 +++++++++++ .../product/0.0.0/Price.Price.html | 457 ++++++++++++ docs/api/@archetypes/product/0.0.0/Price.html | 427 +++++++++++ .../product/0.0.0/ProductType.html | 689 ++++++++++++++++++ .../product}/0.0.0/env-config.js.html | 4 +- .../product}/0.0.0/global.html | 4 +- .../product}/0.0.0/index.html | 17 +- .../product_arbitrary-price_index.js.html | 108 +++ .../product/0.0.0/product_price_index.js.html | 151 ++++ .../0.0.0/product_product-type_index.js.html | 175 +++++ .../product}/0.0.0/scripts/app.min.js | 0 .../product}/0.0.0/scripts/linenumber.js | 0 .../scripts/prettify/Apache-License-2.0.txt | 0 .../0.0.0/scripts/prettify/lang-css.js | 0 .../0.0.0/scripts/prettify/prettify.js | 0 .../product}/0.0.0/styles/app.min.css | 0 .../product}/0.0.0/styles/prettify-jsdoc.css | 0 .../0.0.0/styles/prettify-tomorrow.css | 0 docs/developer-guide/README.md | 8 +- docs/includes/configuration-details.md | 4 +- docs/maintainer-guide/README.md | 6 +- lib/index.js | 5 +- lib/mixin-effective-dates.js | 21 +- lib/product/__tests__/package-type.test.js | 7 - lib/product/__tests__/product-catalog.test.js | 7 - lib/product/__tests__/product-type.test.js | 7 - lib/product/__tests__/product.test.js | 7 - .../__tests__/arbitrary-price.test.js | 2 +- .../index.js} | 2 +- .../{ => batch}/__tests__/batch.test.js | 2 +- lib/product/{batch.js => batch/index.js} | 0 .../__tests__/catalog-entry.test.js | 2 +- .../index.js} | 0 .../measured-product-instance.test.js | 2 +- .../index.js} | 0 .../__tests__/measured-product-type.test.js | 2 +- .../index.js} | 0 .../__tests__/package-instance.test.js | 2 +- .../index.js} | 0 lib/product/package-type.js | 5 - .../__tests__/package-type.test.js | 27 + lib/product/package-type/index.js | 56 ++ .../{ => package}/__tests__/package.test.js | 2 +- lib/product/{package.js => package/index.js} | 0 .../__tests__/price-options.test.js | 2 +- .../{ => price}/__tests__/price.test.js | 2 +- lib/product/{price.js => price/index.js} | 2 +- lib/product/{ => price}/price-options.js | 2 +- .../__tests__/pricing-strategy.test.js | 2 +- .../index.js} | 0 .../__tests__/product-catalog.test.js | 15 + .../index.js} | 4 +- .../product-feature-instance.test.js | 2 +- .../index.js} | 0 .../__tests__/product-feature-type.test.js | 2 +- lib/product/product-feature-type/index.js | 16 + .../__tests__/product-identifier.test.js | 2 +- lib/product/product-identifier/index.js | 13 + .../__tests__/product-instance.test.js | 2 +- .../index.js} | 0 .../__tests__/product-relationship.test.js | 2 +- .../index.js} | 0 .../__tests__/product-set.test.js | 2 +- .../index.js} | 0 lib/product/product-type.js | 21 - .../__tests__/product-type.test.js | 151 ++++ lib/product/product-type/index.js | 84 +++ .../mixin-product-type-properties.js | 62 ++ .../proposition-of-inclusion.test.js | 2 +- .../index.js} | 0 .../__tests__/serial-number.test.js | 2 +- .../index.js} | 0 .../__tests__/service-delivery-status.test.js | 2 +- .../index.js} | 0 .../__tests__/service-instance.test.js | 2 +- .../index.js} | 0 lib/product/service-type.js | 0 .../__tests__/service-type.test.js | 2 +- .../index.js} | 0 lib/product/service.js | 0 .../{ => service}/__tests__/service.test.js | 2 +- .../{service-instance.js => service/index.js} | 0 npm-shrinkwrap.json | 105 +-- package.json | 10 +- 88 files changed, 3034 insertions(+), 194 deletions(-) create mode 100644 docs/api/@archetypes/product/0.0.0/ArbitraryPrice.html create mode 100644 docs/api/@archetypes/product/0.0.0/Price.Price.html create mode 100644 docs/api/@archetypes/product/0.0.0/Price.html create mode 100644 docs/api/@archetypes/product/0.0.0/ProductType.html rename docs/api/{archetypes-products => @archetypes/product}/0.0.0/env-config.js.html (92%) rename docs/api/{archetypes-products => @archetypes/product}/0.0.0/global.html (93%) rename docs/api/{archetypes-products => @archetypes/product}/0.0.0/index.html (94%) create mode 100644 docs/api/@archetypes/product/0.0.0/product_arbitrary-price_index.js.html create mode 100644 docs/api/@archetypes/product/0.0.0/product_price_index.js.html create mode 100644 docs/api/@archetypes/product/0.0.0/product_product-type_index.js.html rename docs/api/{archetypes-products => @archetypes/product}/0.0.0/scripts/app.min.js (100%) rename docs/api/{archetypes-products => @archetypes/product}/0.0.0/scripts/linenumber.js (100%) rename docs/api/{archetypes-products => @archetypes/product}/0.0.0/scripts/prettify/Apache-License-2.0.txt (100%) rename docs/api/{archetypes-products => @archetypes/product}/0.0.0/scripts/prettify/lang-css.js (100%) rename docs/api/{archetypes-products => @archetypes/product}/0.0.0/scripts/prettify/prettify.js (100%) rename docs/api/{archetypes-products => @archetypes/product}/0.0.0/styles/app.min.css (100%) rename docs/api/{archetypes-products => @archetypes/product}/0.0.0/styles/prettify-jsdoc.css (100%) rename docs/api/{archetypes-products => @archetypes/product}/0.0.0/styles/prettify-tomorrow.css (100%) delete mode 100644 lib/product/__tests__/package-type.test.js delete mode 100644 lib/product/__tests__/product-catalog.test.js delete mode 100644 lib/product/__tests__/product-type.test.js delete mode 100644 lib/product/__tests__/product.test.js rename lib/product/{ => arbitrary-price}/__tests__/arbitrary-price.test.js (56%) rename lib/product/{arbitrary-price.js => arbitrary-price/index.js} (91%) rename lib/product/{ => batch}/__tests__/batch.test.js (63%) rename lib/product/{batch.js => batch/index.js} (100%) rename lib/product/{ => catalog-entry}/__tests__/catalog-entry.test.js (57%) rename lib/product/{catalog-entry.js => catalog-entry/index.js} (100%) rename lib/product/{ => measured-product-instance}/__tests__/measured-product-instance.test.js (52%) rename lib/product/{measured-product-instance.js => measured-product-instance/index.js} (100%) rename lib/product/{ => measured-product-type}/__tests__/measured-product-type.test.js (53%) rename lib/product/{measured-product-type.js => measured-product-type/index.js} (100%) rename lib/product/{ => package-instance}/__tests__/package-instance.test.js (55%) rename lib/product/{package-instance.js => package-instance/index.js} (100%) delete mode 100644 lib/product/package-type.js create mode 100644 lib/product/package-type/__tests__/package-type.test.js create mode 100644 lib/product/package-type/index.js rename lib/product/{ => package}/__tests__/package.test.js (61%) rename lib/product/{package.js => package/index.js} (100%) rename lib/product/{ => price}/__tests__/price-options.test.js (57%) rename lib/product/{ => price}/__tests__/price.test.js (95%) rename lib/product/{price.js => price/index.js} (96%) rename lib/product/{ => price}/price-options.js (63%) rename lib/product/{ => pricing-strategy}/__tests__/pricing-strategy.test.js (55%) rename lib/product/{pricing-strategy.js => pricing-strategy/index.js} (100%) create mode 100644 lib/product/product-catalog/__tests__/product-catalog.test.js rename lib/product/{product-catalog.js => product-catalog/index.js} (52%) rename lib/product/{ => product-feature-instance}/__tests__/product-feature-instance.test.js (52%) rename lib/product/{product-feature-instance.js => product-feature-instance/index.js} (100%) rename lib/product/{ => product-feature-type}/__tests__/product-feature-type.test.js (54%) create mode 100644 lib/product/product-feature-type/index.js rename lib/product/{ => product-identifier}/__tests__/product-identifier.test.js (55%) create mode 100644 lib/product/product-identifier/index.js rename lib/product/{ => product-instance}/__tests__/product-instance.test.js (55%) rename lib/product/{product-instance.js => product-instance/index.js} (100%) rename lib/product/{ => product-relationship}/__tests__/product-relationship.test.js (54%) rename lib/product/{product-feature-type.js => product-relationship/index.js} (100%) rename lib/product/{ => product-set}/__tests__/product-set.test.js (58%) rename lib/product/{product-identifier.js => product-set/index.js} (100%) delete mode 100644 lib/product/product-type.js create mode 100644 lib/product/product-type/__tests__/product-type.test.js create mode 100644 lib/product/product-type/index.js create mode 100644 lib/product/product-type/mixin-product-type-properties.js rename lib/product/{ => proposition-of-inclusion}/__tests__/proposition-of-inclusion.test.js (52%) rename lib/product/{product-relationship.js => proposition-of-inclusion/index.js} (100%) rename lib/product/{ => serial-number}/__tests__/serial-number.test.js (57%) rename lib/product/{product-set.js => serial-number/index.js} (100%) rename lib/product/{ => service-delivery-status}/__tests__/service-delivery-status.test.js (52%) rename lib/product/{proposition-of-inclusion.js => service-delivery-status/index.js} (100%) rename lib/product/{ => service-instance}/__tests__/service-instance.test.js (55%) rename lib/product/{serial-number.js => service-instance/index.js} (100%) delete mode 100644 lib/product/service-type.js rename lib/product/{ => service-type}/__tests__/service-type.test.js (58%) rename lib/product/{service-delivery-status.js => service-type/index.js} (100%) delete mode 100644 lib/product/service.js rename lib/product/{ => service}/__tests__/service.test.js (61%) rename lib/product/{service-instance.js => service/index.js} (100%) diff --git a/.env.defaults b/.env.defaults index ba4dbcd..579b4a6 100644 --- a/.env.defaults +++ b/.env.defaults @@ -12,7 +12,7 @@ # Product manifest (package.json) variables # -NPM_PACKAGE_NAME=archetypes-products +NPM_PACKAGE_NAME=@archetypes/product NPM_PACKAGE_VERSION= # @@ -35,7 +35,7 @@ K8S_SECRET_GITLAB_TOKEN= # name attribute of # @default "jest tests" -JEST_SUITE_NAME=archetypes-products tests +JEST_SUITE_NAME=@archetypes/product tests # File path to save the output. # @default "./junit.xml" diff --git a/.github/ci/docs/jsdoc.json b/.github/ci/docs/jsdoc.json index 592956f..ea985b5 100644 --- a/.github/ci/docs/jsdoc.json +++ b/.github/ci/docs/jsdoc.json @@ -25,7 +25,7 @@ "cleverLinks": false, "monospaceLinks": false, "better-docs": { - "name": "archetypes-products API Documentation", + "name": "@archetypes/product API Documentation", "logo": "docs/img/logos/logo.png", "trackingCode": null, "navigation": [ diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md index 9966ef3..38e1c28 100644 --- a/.github/pull_request_template.md +++ b/.github/pull_request_template.md @@ -95,7 +95,7 @@ $ npm test ### How to test a release -The [Pre-release test instructions](https://github.com/commonality/archetypes-products/wiki/Pre-release-test-instructions) include step-by-step guidelines for bundling, packing, and testing this module as it would be released on NPM. +The [Pre-release test instructions](https://github.com/commonality/@archetypes/product/wiki/Pre-release-test-instructions) include step-by-step guidelines for bundling, packing, and testing this module as it would be released on NPM. --- @@ -103,49 +103,49 @@ The [Pre-release test instructions](https://github.com/commonality/archetypes-pr [sonar-alert-status-badge]: - https://sonarcloud.io/api/project_badges/measure?project=commonality_archetypes-products&metric=alert_status&template=FLAT + https://sonarcloud.io/api/project_badges/measure?project=commonality_@archetypes/product&metric=alert_status&template=FLAT [sonar-alert-status-url]: - https://sonarcloud.io/dashboard?id=commonality_archetypes-products + https://sonarcloud.io/dashboard?id=commonality_@archetypes/product [sonar-bugs-badge]: - https://sonarcloud.io/api/project_badges/measure?project=commonality_archetypes-products&metric=bugs&template=FLAT + https://sonarcloud.io/api/project_badges/measure?project=commonality_@archetypes/product&metric=bugs&template=FLAT [sonar-bugs-url]: - https://sonarcloud.io/dashboard?id=commonality_archetypes-products + https://sonarcloud.io/dashboard?id=commonality_@archetypes/product [sonar-code-smells-badge]: - https://sonarcloud.io/api/project_badges/measure?project=commonality_archetypes-products&metric=code_smells&template=FLAT + https://sonarcloud.io/api/project_badges/measure?project=commonality_@archetypes/product&metric=code_smells&template=FLAT [sonar-code-smells-url]: - https://sonarcloud.io/component_measures?id=commonality_archetypes-products&metric=code_smells + https://sonarcloud.io/component_measures?id=commonality_@archetypes/product&metric=code_smells [sonar-coverage-badge]: - https://sonarcloud.io/api/project_badges/measure?project=commonality_archetypes-products&metric=coverage&template=FLAT + https://sonarcloud.io/api/project_badges/measure?project=commonality_@archetypes/product&metric=coverage&template=FLAT [sonar-coverage-url]: - https://sonarcloud.io/component_measures?id=commonality_archetypes-products&metric=coverage + https://sonarcloud.io/component_measures?id=commonality_@archetypes/product&metric=coverage [sonar-duplicated-lines-density-badge]: - https://sonarcloud.io/api/project_badges/measure?project=commonality_archetypes-products&metric=duplicated_lines_density&template=FLAT + https://sonarcloud.io/api/project_badges/measure?project=commonality_@archetypes/product&metric=duplicated_lines_density&template=FLAT [sonar-duplicated-lines-density-url]: - https://sonarcloud.io/component_measures?id=commonality_archetypes-products&metric=duplicated_lines_density + https://sonarcloud.io/component_measures?id=commonality_@archetypes/product&metric=duplicated_lines_density [sonar-ncloc-badge]: - https://sonarcloud.io/api/project_badges/measure?project=commonality_archetypes-products&metric=ncloc&template=FLAT + https://sonarcloud.io/api/project_badges/measure?project=commonality_@archetypes/product&metric=ncloc&template=FLAT [sonar-ncloc-url]: - https://sonarcloud.io/component_measures?id=commonality_archetypes-products&metric=ncloc + https://sonarcloud.io/component_measures?id=commonality_@archetypes/product&metric=ncloc [sonar-reliability-rating-badge]: - https://sonarcloud.io/api/project_badges/measure?project=commonality_archetypes-products&metric=reliability_rating&template=FLAT + https://sonarcloud.io/api/project_badges/measure?project=commonality_@archetypes/product&metric=reliability_rating&template=FLAT [sonar-reliability-rating-url]: - https://sonarcloud.io/component_measures?id=commonality_archetypes-products&metric=reliability_rating + https://sonarcloud.io/component_measures?id=commonality_@archetypes/product&metric=reliability_rating [sonar-security-rating-badge]: - https://sonarcloud.io/api/project_badges/measure?project=commonality_archetypes-products&metric=security_rating&template=FLAT + https://sonarcloud.io/api/project_badges/measure?project=commonality_@archetypes/product&metric=security_rating&template=FLAT [sonar-security-rating-url]: - https://sonarcloud.io/component_measures?id=commonality_archetypes-products&metric=security_rating + https://sonarcloud.io/component_measures?id=commonality_@archetypes/product&metric=security_rating [sonar-sqale-index-badge]: - https://sonarcloud.io/api/project_badges/measure?project=commonality_archetypes-products&metric=sqale_index&template=FLAT + https://sonarcloud.io/api/project_badges/measure?project=commonality_@archetypes/product&metric=sqale_index&template=FLAT [sonar-sqale-index-url]: - https://sonarcloud.io/component_measures?id=commonality_archetypes-products&metric=sqale_index + https://sonarcloud.io/component_measures?id=commonality_@archetypes/product&metric=sqale_index [sonar-sqale-rating-badge]: - https://sonarcloud.io/api/project_badges/measure?project=commonality_archetypes-products&metric=sqale_rating&template=FLAT + https://sonarcloud.io/api/project_badges/measure?project=commonality_@archetypes/product&metric=sqale_rating&template=FLAT [sonar-sqale-rating-url]: - https://sonarcloud.io/component_measures?id=commonality_archetypes-products&metric=sqale_rating + https://sonarcloud.io/component_measures?id=commonality_@archetypes/product&metric=sqale_rating [sonar-vulnerabilities-badge]: - https://sonarcloud.io/api/project_badges/measure?project=commonality_archetypes-products&metric=vulnerabilities&template=FLAT + https://sonarcloud.io/api/project_badges/measure?project=commonality_@archetypes/product&metric=vulnerabilities&template=FLAT [sonar-vulnerabilities-url]: - https://sonarcloud.io/component_measures?id=commonality_archetypes-products&metric=vulnerabilities + https://sonarcloud.io/component_measures?id=commonality_@archetypes/product&metric=vulnerabilities @@ -162,9 +162,9 @@ The [Pre-release test instructions](https://github.com/commonality/archetypes-pr [standardjs-logo]: https://cdn.rawgit.com/feross/standard/master/badge.svg [standardjs-url]: https://github.com/feross/standard -[eslint-logo]: https://raw.githubusercontent.com/commonality/archetypes-products/master/docs/img/logos/logo-eslint.png +[eslint-logo]: https://raw.githubusercontent.com/commonality/@archetypes/product/master/docs/img/logos/logo-eslint.png [eslint-url]: https://eslint.org/docs/user-guide/getting-started -[jest-logo]: https://raw.githubusercontent.com/commonality/archetypes-products/master/docs/img/logos/logo-jest.png +[jest-logo]: https://raw.githubusercontent.com/commonality/@archetypes/product/master/docs/img/logos/logo-jest.png [jest-url]: https://facebook.github.io/jest/docs/en/getting-started.html diff --git a/README.md b/README.md index d77167f..2312e96 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# archetypes-products +# @archetypes/product ![banner](docs/img/logos/logo.png) @@ -20,7 +20,7 @@ - [1. Overview](#1-overview) * [1.1. Standards](#11-standards) - * [1.2. **@archetypes/product** Model](#12-archetypesproduct-model) + * [1.2. **@archetypes/product** Specification](#12-archetypesproduct-specification) - [2. Installation](#2-installation) - [3. Usage](#3-usage) - [4. API](#4-api) @@ -52,6 +52,7 @@ - [5. Maintainers](#5-maintainers) - [6. Contributions](#6-contributions) - [7. License](#7-license) +- [8. Citations and References](#8-citations-and-references) @@ -71,9 +72,9 @@ _Table 1.1_ | Standard | Description | | ----------------------------- | ------------------------------------------ | -| [EAN.UCC System][ean-ucc-url] | Product identification standards. | -| [ISO 2108][iso-2108-url] | International Standard Book Number (ISBN) | -| [ISO 10957][iso-10957-url] | International Standard Music Number (ISMN) | +| [EAN.UCC System](http://www.ibcaweb.org/guide/guide_mfr/ch4.htm) | Product identification standards. | +| [ISO 2108](https://www.iso.org/standard/65483.html) | International Standard Book Number (ISBN) | +| [ISO 10957](https://www.iso.org/standard/43173.html) | International Standard Music Number (ISMN) | ### 1.2. **@archetypes/product** Specification @@ -84,7 +85,7 @@ _Figure 1: **@archetypes/product** module UML class diagram._ [^1] ## 2. Installation ```sh -npm install @archetypes/products +npm install @archetypes/product ``` [![Back to Table of contents][octicon-triangle-up] diff --git a/docs/api/@archetypes/product/0.0.0/ArbitraryPrice.html b/docs/api/@archetypes/product/0.0.0/ArbitraryPrice.html new file mode 100644 index 0000000..0c66f81 --- /dev/null +++ b/docs/api/@archetypes/product/0.0.0/ArbitraryPrice.html @@ -0,0 +1,436 @@ + + + + + + JSDoc: ArbitraryPrice + + + + + + + + + + + + + +
+
+ +
+
+
+
+ +
+
+
+

Class

+

ArbitraryPrice

+
+ + + + + + +
+ +
+ +

ArbitraryPrice()

+ +
Represents an ad hoc Price applied to a specific ProductInstance. + +• Rules-based pricing: a walk-through of a pricing process that is driven + by business rules +• Package pricing: how to represent the Price of a package
+ + +
+ +
+
+ + +
+

Constructor

+
+
+ + +

+ + + new ArbitraryPrice() + +

+ + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+ View Source + + product/arbitrary-price/index.js, line 3 + +

+ +
+ + + + + + + + + + + + + + + + + + + + + +
+
+
+ + +
+ + +

Extends

+ + + + + + + + + + + + + + + + + + + + + + +
+

Methods

+
+ +
+ + +

+ + + isValid(ruleContext, ruleOverrides) → {Boolean} + +

+ + + + + + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
ruleContext + + +RuleContext + + + + The facts applied to a RuleSet.
ruleOverrides + + +Array.<RuleOverride> + + + + Zero or more exceptions +applied to the RuleSet that determines the amount.
+ + + + + +
+ + + + + + +
Inherited From:
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + +

+ View Source + + product/price/index.js, line 52 + +

+ +
+ + + + + + + + + + + + + + + + + + +
+
+
+ + + +
+ +
- Whether or not a Price instance is valid for +a given customer's context.
+ + +
+ + +Boolean + + +
+ +
+ + +
+
+ + + + +
+ +
+
+ + + + + +
+ +
+ + + + +
+
+
+
+ + + + + + + + \ No newline at end of file diff --git a/docs/api/@archetypes/product/0.0.0/Price.Price.html b/docs/api/@archetypes/product/0.0.0/Price.Price.html new file mode 100644 index 0000000..76eb869 --- /dev/null +++ b/docs/api/@archetypes/product/0.0.0/Price.Price.html @@ -0,0 +1,457 @@ + + + + + + JSDoc: Price + + + + + + + + + + + + + +
+
+ +
+
+
+
+ +
+
+
+

Class

+

Price

+
+ + + + + + +
+ +
+ +

+ Price.Price(amount, optionsopt)

+ + +
+ +
+
+ + +
+

Constructor

+
+
+ + +

+ + + new Price(amount, optionsopt) + +

+ + + + +
+ Creates an instance of Price. +
+ + + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeAttributesDefaultDescription
amount + + +Money + + + + + + + + + + + + The amount of Money in a currency.
options + + +Object + + + + + + <optional>
+ + + + + +
+ + priceOptions + +
preconditions + + +RuleSet + + + + + + <optional>
+ + + + + +
+ + null + + A RuleSet that determines +or constrains pricing.
validFrom + + +Date +| + +null + + + + + + <optional>
+ + + + + +
+ + Date.now() + + The date on which +this price became effective.
validTo + + +Date +| + +null + + + + + + <optional>
+ + + + + +
+ + null + + The date on which this price +is no longer in-effect.
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+ View Source + + product/price/index.js, line 32 + +

+ +
+ + + + + + + + + + + + + + + + + + + + + +
+
+
+ + +
+ + + + + + + + + + + + + + + + + + + + +
+ +
+ + + + +
+
+
+
+ + + + + + + + \ No newline at end of file diff --git a/docs/api/@archetypes/product/0.0.0/Price.html b/docs/api/@archetypes/product/0.0.0/Price.html new file mode 100644 index 0000000..8238d29 --- /dev/null +++ b/docs/api/@archetypes/product/0.0.0/Price.html @@ -0,0 +1,427 @@ + + + + + + JSDoc: Price + + + + + + + + + + + + + +
+
+ +
+
+
+
+ +
+
+
+

Class

+

Price

+
+ + + + + + +
+ +
+ +

Price()

+ +
Represents the amount of money that must be paid in order to purchase a +good or service. + +• Pricing approaches +• Price reductions: how to represent different types of price reduction
+ + +
+ +
+
+ + +
+

Constructor

+
+
+ + +

+ + + new Price() + +

+ + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+ View Source + + product/price/index.js, line 7 + +

+ +
+ + + + + + + + + + + + + + + + + + + + + +
+
+
+ + +
+ + + + + + +

Classes

+ +
+
Price
+
+
+ + + + + + + + + + + +
+

Methods

+
+ +
+ + +

+ + + isValid(ruleContext, ruleOverrides) → {Boolean} + +

+ + + + + + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
ruleContext + + +RuleContext + + + + The facts applied to a RuleSet.
ruleOverrides + + +Array.<RuleOverride> + + + + Zero or more exceptions +applied to the RuleSet that determines the amount.
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+ View Source + + product/price/index.js, line 52 + +

+ +
+ + + + + + + + + + + + + + + + + + +
+
+
+ + + +
+ +
- Whether or not a Price instance is valid for +a given customer's context.
+ + +
+ + +Boolean + + +
+ +
+ + +
+
+ + + + +
+ +
+
+ + + + + +
+ +
+ + + + +
+
+
+
+ + + + + + + + \ No newline at end of file diff --git a/docs/api/@archetypes/product/0.0.0/ProductType.html b/docs/api/@archetypes/product/0.0.0/ProductType.html new file mode 100644 index 0000000..237cfd2 --- /dev/null +++ b/docs/api/@archetypes/product/0.0.0/ProductType.html @@ -0,0 +1,689 @@ + + + + + + JSDoc: ProductType + + + + + + + + + + + + + +
+
+ +
+
+
+
+ +
+
+
+

Class

+

ProductType

+
+ + + + + + +
+ +
+ +

ProductType()

+ + +
+ +
+
+ + +
+

Constructor

+
+
+ + +

+ + + new ProductType() + +

+ + + + + + + + + + + + + + + + + +
Properties:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
description + + +string + + + + Description.
name + + +string + + + + Name.
mandatoryProductFeatureTypes + + +Array.<ProductFeatureType> + + + + Mandatory features.
optionalProductFeatureTypes + + +Array.<ProductFeatureType> + + + + Optional features.
productIdentifier + + +ProductIdentifier + + + + ProductIdentifier.
possiblePrices + + +Array.<Price> + + + + Possible Prices.
+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+ View Source + + product/product-type/index.js, line 8 + +

+ +
+ + + + + + + + + + + + + + + + + + + + + +
+
+
+ + +
+ + + + + + + + + + + + + + + + + + + + +
+ +
+ + + + + + + +
+ +
+ +

ProductType()

+ + +
+ +
+
+ + +
+

Constructor

+
+
+ + +

+ + + new ProductType() + +

+ + + + + + + + + + + + + + + + + +
Properties:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
description + + +string + + + + Description.
name + + +string + + + + Name.
mandatoryProductFeatureTypes + + +Array.<ProductFeatureType> + + + + Mandatory features.
optionalProductFeatureTypes + + +Array.<ProductFeatureType> + + + + Optional features.
productIdentifier + + +ProductIdentifier + + + + ProductIdentifier.
possiblePrices + + +Array.<Price> + + + + Possible Prices.
+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+ View Source + + product/product-type/index.js, line 8 + +

+ +
+ + + + + + + + + + + + + + + + + + + + + +
+
+
+ + +
+ + + + + + + + + + + + + + + + + + + + +
+ +
+ + + + +
+
+
+
+ + + + + + + + \ No newline at end of file diff --git a/docs/api/archetypes-products/0.0.0/env-config.js.html b/docs/api/@archetypes/product/0.0.0/env-config.js.html similarity index 92% rename from docs/api/archetypes-products/0.0.0/env-config.js.html rename to docs/api/@archetypes/product/0.0.0/env-config.js.html index 1c6a797..b095e32 100644 --- a/docs/api/archetypes-products/0.0.0/env-config.js.html +++ b/docs/api/@archetypes/product/0.0.0/env-config.js.html @@ -44,7 +44,7 @@

Documentation

@@ -128,7 +128,7 @@

env-config.js