Skip to content

HP-1751 Create configurations for billing types #93

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Changes from all commits
Commits
Show all changes
121 commits
Select commit Hold shift + click to select a range
01dc6ff
HP-1751 Create configurations for billing types
VadymHrechukha Nov 28, 2024
f819552
HP-1751 Created Unit test for InvoiceDescriptionsBuilder class
VadymHrechukha Nov 28, 2024
f5292a4
HP-1751 Create configurations for billing types
VadymHrechukha Dec 6, 2024
ccb0b9c
HP-1751 Create configurations for billing types
VadymHrechukha Dec 6, 2024
9f7c0da
HP-1751 Create configurations for billing types
VadymHrechukha Dec 9, 2024
83d242f
HP-1751 created product Type
VadymHrechukha Dec 9, 2024
0e26ed5
HP-1751 added stubs for all types in ServerTariff config
VadymHrechukha Dec 10, 2024
ff69913
HP-1751 tiny
VadymHrechukha Dec 10, 2024
1ac3f7d
HP-1751 tiny
VadymHrechukha Dec 10, 2024
99371a4
HP-1751 implemented BillingRegistry::getRepresentationsByType() method
VadymHrechukha Dec 10, 2024
01e778a
HP-1751 fixed the case when we pass two sql for one type in AbstractL…
VadymHrechukha Dec 10, 2024
e95efbc
HP-1751 tiny
VadymHrechukha Dec 12, 2024
1e731a9
HP-1751 added ability to extend PriceTypeDefinition class
VadymHrechukha Dec 12, 2024
ef63f8f
HP-1751 Created QuantityFormatterDefinition for storing both the $for…
VadymHrechukha Dec 17, 2024
e72ae0f
HP-1751 created formatters
VadymHrechukha Dec 17, 2024
94f7fb3
HP-1751 configured QuantityFormatter
VadymHrechukha Dec 17, 2024
93c0ea8
HP-1751 working on QuantityFormatter classes
VadymHrechukha Dec 18, 2024
7972157
HP-1751 created interface for easy get QuantityFormatter from Billing…
VadymHrechukha Dec 18, 2024
e967f1b
HP-1751 changed signature of BillingRegistry::createQuantityFormatter…
VadymHrechukha Dec 19, 2024
944f07d
HP-1751 added consumption config for TariffType
VadymHrechukha Dec 20, 2024
821f83e
HP-1751 added ability to fetch consumption columns and groups into Bi…
VadymHrechukha Dec 22, 2024
9bc5a8e
HP-1751 added consumption classes
VadymHrechukha Dec 22, 2024
b5065b0
HP-1751 created BehaviorInterface
VadymHrechukha Dec 23, 2024
0247a8b
HP-1751 added aggregation to PriceTypeDefinition
VadymHrechukha Dec 23, 2024
e2fd487
HP-1751 created BehaviorNotFoundException
VadymHrechukha Dec 23, 2024
48a032e
HP-1751 removed Consumption from billing-registry
VadymHrechukha Dec 23, 2024
bc62b19
HP-1751 created TariffType class and use it in Behavior
VadymHrechukha Dec 26, 2024
ea5c85f
HP-1751 Throw BehaviorNotFoundException instead of returning null in …
VadymHrechukha Dec 27, 2024
02b3aee
HP-1751 created ParentNodeDefinitionInterface
VadymHrechukha Dec 30, 2024
a7d1c34
HP-1751 changed directory of TariffType, Unit and FractionUnit
VadymHrechukha Dec 30, 2024
baab974
HP-1751 tiny
VadymHrechukha Dec 30, 2024
18c7690
HP-1751 tiny
VadymHrechukha Dec 30, 2024
e65d27d
HP-1751 added annotation for BillingRegistry::getBehavior() method
VadymHrechukha Dec 31, 2024
fea22bd
HP-1751 Implemented BillingRegistry::getAggregate() method
VadymHrechukha Jan 2, 2025
f6c5c1c
HP-1751 added ability to check if PriceTypeDefinition has specific be…
VadymHrechukha Jan 3, 2025
9b8bb1d
HP-1751 tiny
VadymHrechukha Jan 6, 2025
d9a5ef7
HP-1751 added TariffTypeDefinition::hasBehavior() method
VadymHrechukha Jan 6, 2025
2bb5310
HP-1751 Removed dependency php-billing package from TariffType class
VadymHrechukha Mar 11, 2025
881679f
HP-1751 Removed dependency php-billing package from Unit and Fraction…
VadymHrechukha Mar 11, 2025
1acbb7b
HP-1751 Removed dependency php-billing package from PriceTypeDefiniti…
VadymHrechukha Mar 11, 2025
0c060ab
HP-1751 Removed dependency php-billing package from Aggregate class
VadymHrechukha Mar 11, 2025
93686bb
HP-1751 Attempt to removed dependency php-billing package from Aggreg…
VadymHrechukha Mar 11, 2025
77b9efe
HP-1751 Removed dependency php-billing package from QuantityFormatter…
VadymHrechukha Mar 11, 2025
9dad8c6
HP-1751 Attempt to removed dependency php-billing package from Quanti…
VadymHrechukha Mar 12, 2025
285ae11
HP-1751 Attempt to removed dependency php-billing package from Paymen…
VadymHrechukha Mar 12, 2025
afe5a62
HP-1751 Removed dependency php-billing package from InvoiceRepresenta…
VadymHrechukha Mar 12, 2025
57394fe
HP-1751 Removed dependency php-billing package from Product class
VadymHrechukha Mar 12, 2025
b649b44
HP-1751 Applied Single Responsibility Principle to PriceTypeDefinitio…
VadymHrechukha Mar 13, 2025
2cc1971
HP-1751 tiny
VadymHrechukha Mar 13, 2025
6411325
HP-1751 tiny
VadymHrechukha Mar 13, 2025
0328f42
HP-1751 Removed dependency php-billing package from GType, PriceType …
VadymHrechukha Mar 13, 2025
1f7fb11
HP-1751 Created TariffTypeDefinitionInterface
VadymHrechukha Mar 13, 2025
1cfa210
HP-1751 tiny
VadymHrechukha Mar 14, 2025
c75b5d4
HP-1751 Added psalm template annotation
VadymHrechukha Mar 14, 2025
27c16d1
HP-1751 tiny
VadymHrechukha Mar 14, 2025
6808daf
HP-1751 fixed error during update composer
VadymHrechukha Mar 17, 2025
413f729
HP-1751 tiny
VadymHrechukha Mar 20, 2025
d7d838a
HP-1751 fixed the bug with reusing PriceTypeDefinitionCollection class
VadymHrechukha Mar 20, 2025
2c6a195
HP-1751 refactored BillingRegistry::getBehavior() method
VadymHrechukha Mar 20, 2025
6f0783b
HP-1751 added TariffTypeDefinitionInterface::getProduct() interface
VadymHrechukha Mar 20, 2025
0e0bc7c
HP-1751 tiny
VadymHrechukha Mar 20, 2025
75ee687
HP-1751 created InvalidQuantityFormatterException
VadymHrechukha Mar 20, 2025
9b25ddf
HP-1751 created InvalidRepresentationException
VadymHrechukha Mar 20, 2025
7d09102
HP-1751 fixed BillingRegistry::createQuantityFormatter() method
VadymHrechukha Mar 20, 2025
c00ea1e
HP-1751 tiny
VadymHrechukha Mar 20, 2025
4ce2b38
HP-1751 created AggregateNotDefinedException
VadymHrechukha Mar 20, 2025
7269bf9
HP-1751 fixing InvoiceDescriptionsBuilder class
VadymHrechukha Mar 20, 2025
03ee8dc
HP-1751 tiny
VadymHrechukha Mar 20, 2025
97f0d4f
HP-1751 tiny
VadymHrechukha Mar 21, 2025
179dd51
HP-1751 tiny
VadymHrechukha Mar 26, 2025
52f051c
HP-1751 tiny
VadymHrechukha Mar 26, 2025
96cf778
HP-1751 tiny
VadymHrechukha Mar 26, 2025
f220f77
HP-1751 added possibility to count elements in PriceTypeDefinitionCol…
VadymHrechukha Mar 26, 2025
29cea34
HP-1751 added a locking mechanism in TariffTypeDefinition class
VadymHrechukha Mar 26, 2025
c7a3dd8
HP-1751 created TariffTypeDefinitionTest phpunit test
VadymHrechukha Mar 26, 2025
f6b42bd
HP-1751 tiny
VadymHrechukha Mar 26, 2025
4332ccb
HP-1751 tiny
VadymHrechukha Mar 26, 2025
ef98123
HP-1751 created BillingRegistryTest phpunit test
VadymHrechukha Mar 26, 2025
00f6b67
HP-1751 tiny
VadymHrechukha Mar 26, 2025
12f688d
HP-1751 tiny
VadymHrechukha Mar 27, 2025
2cd3fe1
HP-1751 fixed BillingRegistryTest::testGetBehavior() test case
VadymHrechukha Mar 27, 2025
ceecba5
HP-1751 fixed BillingRegistryTest::testGetBehaviorThrowsExceptionWhen…
VadymHrechukha Mar 27, 2025
cd27386
HP-1751 fixed BillingRegistryTest::testAddTariffTypeAndRetrievePriceT…
VadymHrechukha Mar 27, 2025
9729080
HP-1751 tiny
VadymHrechukha Mar 27, 2025
c976b0a
HP-1751 tiny
VadymHrechukha Mar 27, 2025
47cfdda
HP-1751 moved abstract Behavior into php-billing package
VadymHrechukha Mar 27, 2025
55f53e8
HP-1751 created Test Case WithMultiplePriceTypeDefinitions
VadymHrechukha Mar 27, 2025
9d12287
HP-1751 tiny
VadymHrechukha Mar 27, 2025
38a2f4a
HP-1751 tiny
VadymHrechukha Mar 27, 2025
3aab1ee
HP-1751 created PriceTypeDefinitionInterface
VadymHrechukha Mar 27, 2025
b6aada3
HP-1751 created TariffTypeBehaviorRegistry
VadymHrechukha Mar 27, 2025
8da4e9a
HP-1751 added description to TariffTypeBehaviorRegistry class
VadymHrechukha Mar 27, 2025
8f63474
HP-1751 tiny
VadymHrechukha Apr 1, 2025
e539a12
HP-1751 tiny
VadymHrechukha Apr 1, 2025
d0666f1
HP-1751 created class for search ResourceDecoratorBehavior
VadymHrechukha Apr 1, 2025
6d5a884
HP-1751 created TariffTypeDefinitionNotFoundException
VadymHrechukha Apr 1, 2025
fe86956
HP-1751 created TariffTypeDefinitionNotFoundException
VadymHrechukha Apr 1, 2025
9dcc0aa
HP-1751 added PriceTypeDefinitionInterface::getTariffTypeDefinition()…
VadymHrechukha Apr 2, 2025
9b238bc
HP-1751 tiny
VadymHrechukha Apr 2, 2025
650d56f
HP-1751 added BillingRegistry::getTariffTypeDefinitions() method
VadymHrechukha Apr 2, 2025
a7f2110
HP-1751 created separate trait for locking feature
VadymHrechukha Apr 2, 2025
0e2bcb0
HP-1751 lock BehaviorCollections after call end() method
VadymHrechukha Apr 2, 2025
ef63e41
HP-1751 lock all possible classes after call end() method
VadymHrechukha Apr 2, 2025
d107199
HP-1751 tiny
VadymHrechukha Apr 2, 2025
b3bb340
HP-1751 removed duplicate code from BillingRegistry
VadymHrechukha Apr 3, 2025
0de987a
HP-1751 Modernized GitHub Actions workflow, updated the following:
VadymHrechukha Apr 3, 2025
6f9a0d0
HP-1751 keep using shivammathur/setup-php@v2
VadymHrechukha Apr 3, 2025
f6a891e
HP-1751 Since setup-php still supports only v2, update your workflow to:
VadymHrechukha Apr 3, 2025
3a1f816
HP-1751 Modernized GitHub Actions workflow, updated the following:
VadymHrechukha Apr 3, 2025
74446cd
HP-1751 fixed gherkin error during launching Behat tests
VadymHrechukha Apr 3, 2025
4492d45
HP-1751 changed HasLock::lock() to public
VadymHrechukha Apr 3, 2025
8c0a27e
HP-1751 removed TariffTypeTest phpunit test because it completely wrong
VadymHrechukha Apr 3, 2025
0b49dfb
HP-1751 Fixed lock feature
VadymHrechukha Apr 3, 2025
0d8bd65
HP-1751 fixed testLockPreventsModification() test case
VadymHrechukha Apr 3, 2025
9d367cd
HP-1751 complete BillingRegistryInterface
VadymHrechukha Apr 7, 2025
48e882f
HP-1751 tiny
VadymHrechukha Apr 7, 2025
dc5d281
HP-1751 renamed InvoiceRepresentationCollection to RepresentationColl…
VadymHrechukha Apr 7, 2025
42e41c7
HP-1751 ensure representation is unique in registry
VadymHrechukha Apr 7, 2025
29218ec
HP-1751 fixed RepresentationUniquenessGuard class
VadymHrechukha Apr 7, 2025
d1b60ac
HP-1751 updated documentation
VadymHrechukha Apr 8, 2025
48f501d
Merge branch 'master' into HP-1751_create_configurations_for_billing_…
VadymHrechukha Apr 16, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/behat-tests.yml
Original file line number Diff line number Diff line change
@@ -16,7 +16,7 @@ jobs:
name: PHP ${{ matrix.php }}
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v4

- name: Install PHP
uses: shivammathur/setup-php@v2
@@ -28,7 +28,7 @@ jobs:

- name: Cache Composer packages
id: composer-cache
uses: actions/cache@v2
uses: actions/cache@v4
with:
path: vendor
key: ${{ matrix.php }}-composer-${{ hashFiles('composer.json') }}
4 changes: 2 additions & 2 deletions .github/workflows/phpunit-tests.yml
Original file line number Diff line number Diff line change
@@ -16,7 +16,7 @@ jobs:
name: PHP ${{ matrix.php }}
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v4

- name: Install PHP
uses: shivammathur/setup-php@v2
@@ -28,7 +28,7 @@ jobs:

- name: Cache Composer packages
id: composer-cache
uses: actions/cache@v2
uses: actions/cache@v4
with:
path: vendor
key: ${{ matrix.php }}-composer-${{ hashFiles('composer.json') }}
4 changes: 3 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
@@ -61,8 +61,10 @@
"hiqdev/hidev-hiqdev": "dev-master",
"hiqdev/php-data-mapper": "dev-master",
"vimeo/psalm": "^5.0",
"opis/closure": "3.x-dev as 3.6.x-dev",
"cache/array-adapter": "*",
"matthiasnoback/behat-expect-exception": "^v0.3.0"
"matthiasnoback/behat-expect-exception": "^v0.3.0",
"behat/gherkin": "~v4.11.0"
},
"suggest": {
"ext-intl": "intl extension is required for formula support",
8 changes: 8 additions & 0 deletions src/Exception/LogicException.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?php declare(strict_types=1);

namespace hiqdev\php\billing\Exception;

class LogicException extends \LogicException
{

}
8 changes: 8 additions & 0 deletions src/product/AggregateInterface.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?php declare(strict_types=1);

namespace hiqdev\php\billing\product;

interface AggregateInterface
{
public function isMax(): bool;
}
174 changes: 174 additions & 0 deletions src/product/BillingRegistry.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,174 @@
<?php declare(strict_types=1);

namespace hiqdev\php\billing\product;

use hiqdev\php\billing\product\behavior\InvalidBehaviorException;
use hiqdev\php\billing\product\Exception\AggregateNotFoundException;
use hiqdev\php\billing\product\invoice\InvalidRepresentationException;
use hiqdev\php\billing\product\invoice\RepresentationInterface;
use hiqdev\php\billing\product\price\PriceTypeDefinition;
use hiqdev\php\billing\product\quantity\QuantityFormatterInterface;
use hiqdev\php\billing\product\quantity\QuantityFormatterNotFoundException;
use hiqdev\php\billing\product\quantity\FractionQuantityData;
use hiqdev\php\billing\product\behavior\BehaviorInterface;
use hiqdev\php\billing\product\behavior\BehaviorNotFoundException;
use hiqdev\php\billing\product\trait\HasLock;
use hiqdev\php\billing\type\Type;
use hiqdev\php\billing\type\TypeInterface;

class BillingRegistry implements BillingRegistryInterface
{
use HasLock;

/** @var TariffTypeDefinitionInterface[] */
private array $tariffTypeDefinitions = [];
private bool $locked = false;

public function addTariffType(TariffTypeDefinitionInterface $tariffTypeDefinition): void
{
$this->ensureNotLocked();

$this->tariffTypeDefinitions[] = $tariffTypeDefinition;
}

public function priceTypes(): \Generator
{
foreach ($this->tariffTypeDefinitions as $tariffTypeDefinition) {
foreach ($tariffTypeDefinition->withPrices() as $priceTypeDefinition) {
yield $priceTypeDefinition;
}
}
}

public function getRepresentationsByType(string $representationClass): array
{
if (!class_exists($representationClass)) {
throw new InvalidRepresentationException("Class '$representationClass' does not exist");
}

if (!is_subclass_of($representationClass, RepresentationInterface::class)) {
throw new InvalidBehaviorException(
sprintf('Representation class "%s" does not implement RepresentationInterface', $representationClass)
);
}

$representations = [];
foreach ($this->priceTypes() as $priceTypeDefinition) {
foreach ($priceTypeDefinition->documentRepresentation() as $representation) {
if ($representation instanceof $representationClass) {
$representations[] = $representation;
}
}
}

return $representations;
}

public function createQuantityFormatter(
string $type,
FractionQuantityData $data,
): QuantityFormatterInterface {
$type = $this->convertStringTypeToType($type);

foreach ($this->priceTypes() as $priceTypeDefinition) {
if ($priceTypeDefinition->hasType($type)) {
return $priceTypeDefinition->createQuantityFormatter($data);
}
}

throw new QuantityFormatterNotFoundException('Quantity formatter not found');
}

private function convertStringTypeToType(string $type): TypeInterface
{
return Type::anyId($type);
}

public function getBehavior(string $type, string $behaviorClassWrapper): BehaviorInterface
{
if (!class_exists($behaviorClassWrapper)) {
throw new InvalidBehaviorException(
sprintf('Behavior class "%s" does not exist', $behaviorClassWrapper)
);
}

if (!is_subclass_of($behaviorClassWrapper, BehaviorInterface::class)) {
throw new InvalidBehaviorException(
sprintf('Behavior class "%s" does not implement BehaviorInterface', $behaviorClassWrapper)
);
}

$billingType = $this->convertStringTypeToType($type);

foreach ($this->priceTypes() as $priceTypeDefinition) {
if ($priceTypeDefinition->hasType($billingType)) {
$behavior = $this->findBehaviorInPriceType($priceTypeDefinition, $behaviorClassWrapper);

if ($behavior) {
return $behavior;
}
}
}

throw new BehaviorNotFoundException(
sprintf('Behavior of class "%s" not found for type "%s"', $behaviorClassWrapper, $type),
);
}

private function findBehaviorInPriceType(
PriceTypeDefinition $priceTypeDefinition,
string $behaviorClassWrapper
): ?BehaviorInterface {
foreach ($priceTypeDefinition->withBehaviors() as $behavior) {
if ($behavior instanceof $behaviorClassWrapper) {
return $behavior;
}
}

return null;
}

public function getBehaviors(string $behaviorClassWrapper): \Generator
{
foreach ($this->tariffTypeDefinitions as $tariffTypeDefinition) {
foreach ($tariffTypeDefinition->withBehaviors() as $behavior) {
if ($behavior instanceof $behaviorClassWrapper) {
yield $behavior;
}
}
}

foreach ($this->priceTypes() as $priceTypeDefinition) {
foreach ($priceTypeDefinition->withBehaviors() as $behavior) {
if ($behavior instanceof $behaviorClassWrapper) {
yield $behavior;
}
}
}
}

public function getAggregate(string $type): AggregateInterface
{
$type = $this->convertStringTypeToType($type);

foreach ($this->priceTypes() as $priceTypeDefinition) {
if ($priceTypeDefinition->hasType($type)) {
return $priceTypeDefinition->getAggregate();
}
}

throw new AggregateNotFoundException('Aggregate was not found');
}

public function getTariffTypeDefinitions(): \Generator
{
foreach ($this->tariffTypeDefinitions as $tariffTypeDefinition) {
yield $tariffTypeDefinition;
}
}

protected function afterLock(): void
{
$this->lockItems($this->tariffTypeDefinitions);
}
}
56 changes: 56 additions & 0 deletions src/product/BillingRegistryInterface.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
<?php declare(strict_types=1);

namespace hiqdev\php\billing\product;

use Generator;
use hiqdev\php\billing\product\behavior\BehaviorInterface;
use hiqdev\php\billing\product\behavior\BehaviorNotFoundException;
use hiqdev\php\billing\product\behavior\InvalidBehaviorException;
use hiqdev\php\billing\product\invoice\RepresentationInterface;
use hiqdev\php\billing\product\price\PriceTypeDefinitionInterface;
use hiqdev\php\billing\product\quantity\FractionQuantityData;
use hiqdev\php\billing\product\quantity\QuantityFormatterInterface;
use hiqdev\php\billing\product\trait\HasLockInterface;

interface BillingRegistryInterface extends HasLockInterface
{
/**
* @return Generator
* @psalm-return Generator<PriceTypeDefinitionInterface>
*/
public function priceTypes(): Generator;

public function addTariffType(TariffTypeDefinitionInterface $tariffTypeDefinition): void;

/**
* @param string $representationClass
* @return RepresentationInterface[]
*/
public function getRepresentationsByType(string $representationClass): array;

public function createQuantityFormatter(string $type, FractionQuantityData $data): QuantityFormatterInterface;

/**
* @param string $type - full type like 'overuse,lb_capacity_unit'
* @param string $behaviorClassWrapper
* @return BehaviorInterface
* @throws BehaviorNotFoundException
* @throws InvalidBehaviorException
*/
public function getBehavior(string $type, string $behaviorClassWrapper): BehaviorInterface;

/**
* @param string $behaviorClassWrapper
* @return Generator
* @psalm-return Generator<BehaviorInterface>
*/
public function getBehaviors(string $behaviorClassWrapper): Generator;

public function getAggregate(string $type): AggregateInterface;

/**
* @return Generator
* @psalm-return Generator<TariffTypeDefinitionInterface>
*/
public function getTariffTypeDefinitions(): Generator;
}
8 changes: 8 additions & 0 deletions src/product/DocumentRepresentationInterface.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?php declare(strict_types=1);

namespace hiqdev\php\billing\product;

interface DocumentRepresentationInterface
{

}
10 changes: 10 additions & 0 deletions src/product/Domain/Model/TariffTypeInterface.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<?php declare(strict_types=1);

namespace hiqdev\php\billing\product\Domain\Model;

interface TariffTypeInterface
{
public function name(): string;

public function label(): string;
}
8 changes: 8 additions & 0 deletions src/product/Domain/Model/Unit/FractionUnitInterface.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?php declare(strict_types=1);

namespace hiqdev\php\billing\product\Domain\Model\Unit;

interface FractionUnitInterface
{

}
12 changes: 12 additions & 0 deletions src/product/Domain/Model/Unit/UnitInterface.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<?php declare(strict_types=1);

namespace hiqdev\php\billing\product\Domain\Model\Unit;

use \hiqdev\php\units\UnitInterface as BaseUnitInterface;

interface UnitInterface
{
public function createExternalUnit(): BaseUnitInterface;

public function fractionUnit(): FractionUnitInterface;
}
10 changes: 10 additions & 0 deletions src/product/Exception/AggregateNotDefinedException.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<?php declare(strict_types=1);

namespace hiqdev\php\billing\product\Exception;

use hiqdev\php\billing\Exception\LogicException;

class AggregateNotDefinedException extends LogicException
{

}
9 changes: 9 additions & 0 deletions src/product/Exception/AggregateNotFoundException.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<?php declare(strict_types=1);

namespace hiqdev\php\billing\product\Exception;

use hiqdev\php\billing\Exception\RuntimeException;

class AggregateNotFoundException extends RuntimeException
{
}
10 changes: 10 additions & 0 deletions src/product/Exception/LockedException.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<?php declare(strict_types=1);

namespace hiqdev\php\billing\product\Exception;

use LogicException;

class LockedException extends LogicException
{

}
10 changes: 10 additions & 0 deletions src/product/Exception/ProductNotDefinedException.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<?php declare(strict_types=1);

namespace hiqdev\php\billing\product\Exception;

use hiqdev\php\billing\Exception\LogicException;

class ProductNotDefinedException extends LogicException
{

}
10 changes: 10 additions & 0 deletions src/product/Exception/TariffTypeDefinitionNotFoundException.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<?php declare(strict_types=1);

namespace hiqdev\php\billing\product\Exception;

use hiqdev\php\billing\Exception\RuntimeException;

class TariffTypeDefinitionNotFoundException extends RuntimeException
{

}
Loading