-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
4aaf4dc
commit c6a3b82
Showing
57 changed files
with
3,641 additions
and
662 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
const ow = require('ow') | ||
|
||
const mixinEffectiveDates = (object) => { | ||
/* eslint-disable accessor-pairs */ | ||
Object.defineProperties(object, { | ||
validFrom: { | ||
enumerable: true, | ||
get () { | ||
return this.validFromValue | ||
}, | ||
set (val = null) { | ||
ow(val, ow.any(ow.date, ow.null)) | ||
this.validFromValue = val | ||
} | ||
}, | ||
validFromValue: { | ||
value: null | ||
}, | ||
validTo: { | ||
enumerable: true, | ||
get () { | ||
return this.validToValue | ||
}, | ||
set (val = null) { | ||
ow(val, ow.any(ow.date, ow.null)) | ||
this.validToValue = val | ||
} | ||
}, | ||
validToValue: { | ||
value: null | ||
} | ||
}) | ||
/* eslint-enable accessor-pairs */ | ||
} | ||
|
||
module.exports = mixinEffectiveDates |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
const ArbitraryPrice = require('../arbitrary-price.js'); | ||
|
||
describe('ArbitraryPrice', () => { | ||
it('has a test', () => { | ||
|
||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
const Batch = require('../batch.js'); | ||
|
||
describe('Batch', () => { | ||
it('has a test', () => { | ||
|
||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
const CatalogEntry = require('../catalog-entry.js'); | ||
|
||
describe('CatalogEntry', () => { | ||
it('has a test', () => { | ||
|
||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
const MeasuredProductInstance = require('../measured-product-instance.js'); | ||
|
||
describe('MeasuredProductInstance', () => { | ||
it('has a test', () => { | ||
|
||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
const MeasuredProductType = require('../measured-product-type.js'); | ||
|
||
describe('MeasuredProductType', () => { | ||
it('has a test', () => { | ||
|
||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
const PackageInstance = require('../package-instance.js'); | ||
|
||
describe('PackageInstance', () => { | ||
it('has a test', () => { | ||
|
||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
const PackageType = require('../package-type.js'); | ||
|
||
describe('PackageType', () => { | ||
it('has a test', () => { | ||
|
||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
const Package = require('../package.js'); | ||
|
||
describe('Package', () => { | ||
it('has a test', () => { | ||
|
||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
const PriceOptions = require('../price-options.js'); | ||
|
||
describe('PriceOptions', () => { | ||
it('has a test', () => { | ||
|
||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
const Price = require('../price.js'); | ||
|
||
describe('Price', () => { | ||
let price = null | ||
|
||
afterEach(() => { | ||
price = null | ||
}) | ||
|
||
describe('represents the amount of money that must be paid in order to purchase a good or service', () => { | ||
|
||
describe('amount', () => { | ||
it('is monetary value', () => { | ||
price = new Price(9.98) | ||
expect(price.amount).toBe(9.98) | ||
|
||
const DEFAULT_AMOUNT = 0 | ||
price = new Price() | ||
expect(price.amount).toBe(DEFAULT_AMOUNT) | ||
}) | ||
|
||
describe('when assigned a value other than a number', () => { | ||
it('throws an ArgumentError', () => { | ||
expect(() => { | ||
price = new Price('free!') | ||
}).toThrow() | ||
|
||
expect(() => { | ||
price = new Price(null) | ||
}).toThrow() | ||
}) | ||
}) | ||
|
||
}) | ||
|
||
}) | ||
|
||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
const PricingStrategy = require('../pricing-strategy.js'); | ||
|
||
describe('PricingStrategy', () => { | ||
it('has a test', () => { | ||
|
||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
const ProductCatalog = require('../product-catalog.js'); | ||
|
||
describe('ProductCatalog', () => { | ||
it('has a test', () => { | ||
|
||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
const ProductFeatureInstance = require('../product-feature-instance.js'); | ||
|
||
describe('ProductFeatureInstance', () => { | ||
it('has a test', () => { | ||
|
||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
const ProductFeatureType = require('../product-feature-type.js'); | ||
|
||
describe('ProductFeatureType', () => { | ||
it('has a test', () => { | ||
|
||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
const ProductIdentifier = require('../product-identifier.js'); | ||
|
||
describe('ProductIdentifier', () => { | ||
it('has a test', () => { | ||
|
||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
const ProductInstance = require('../product-instance.js'); | ||
|
||
describe('ProductInstance', () => { | ||
it('has a test', () => { | ||
|
||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
const ProductRelationship = require('../product-relationship.js'); | ||
|
||
describe('ProductRelationship', () => { | ||
it('has a test', () => { | ||
|
||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
const ProductSet = require('../product-set.js'); | ||
|
||
describe('ProductSet', () => { | ||
it('has a test', () => { | ||
|
||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
const ProductType = require('../product-type.js'); | ||
|
||
describe('ProductType', () => { | ||
it('has a test', () => { | ||
|
||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
const Product = require('../product.js'); | ||
|
||
describe('Product', () => { | ||
it('has a test', () => { | ||
|
||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
const PropositionOfInclusion = require('../proposition-of-inclusion.js'); | ||
|
||
describe('PropositionOfInclusion', () => { | ||
it('has a test', () => { | ||
|
||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
const SerialNumber = require('../serial-number.js'); | ||
|
||
describe('SerialNumber', () => { | ||
it('has a test', () => { | ||
|
||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
const ServiceDeliveryStatus = require('../service-delivery-status.js'); | ||
|
||
describe('ServiceDeliveryStatus', () => { | ||
it('has a test', () => { | ||
|
||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
const ServiceInstance = require('../service-instance.js'); | ||
|
||
describe('ServiceInstance', () => { | ||
it('has a test', () => { | ||
|
||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
const ServiceType = require('../service-type.js'); | ||
|
||
describe('ServiceType', () => { | ||
it('has a test', () => { | ||
|
||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
const Service = require('../service.js'); | ||
|
||
describe('Service', () => { | ||
it('has a test', () => { | ||
|
||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
const Price = require('./price') | ||
|
||
/** | ||
* @classdesc | ||
* 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 | ||
* | ||
* @class ArbitraryPrice | ||
* @extends {Price} | ||
*/ | ||
|
||
class ArbitraryPrice extends Price {} | ||
|
||
module.exports = ArbitraryPrice |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
class Batch { | ||
|
||
} | ||
|
||
module.exports = Batch |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
class CatalogEntry { | ||
|
||
} | ||
|
||
module.exports = CatalogEntry |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
class MeasuredProductInstance { | ||
|
||
} | ||
|
||
module.exports = MeasuredProductInstance |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
class MeasuredProductType { | ||
|
||
} | ||
|
||
module.exports = MeasuredProductType |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
class PackageInstance { | ||
|
||
} | ||
|
||
module.exports = PackageInstance |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
class PackageType { | ||
|
||
} | ||
|
||
module.exports = PackageType |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
class Package { | ||
|
||
} | ||
|
||
module.exports = Package |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
const mixinEffectiveDates = require('../mixin-effective-dates') | ||
|
||
const priceOptions = { | ||
'preconditions': null | ||
} | ||
|
||
mixinEffectiveDates(priceOptions) | ||
|
||
module.exports = priceOptions |
Oops, something went wrong.