Skip to content

Commit

Permalink
Warehouse: Add WarehouseProductStatusInterface
Browse files Browse the repository at this point in the history
  • Loading branch information
janbarasek committed Nov 30, 2022
1 parent 3a2e9a8 commit e090545
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 0 deletions.
23 changes: 23 additions & 0 deletions src/DTO/WarehouseProductStatusInterface.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<?php

declare(strict_types=1);

namespace Baraja\EcommerceStandard\DTO;


interface WarehouseProductStatusInterface
{
public function isAvailable(): bool;

public function isAvailableOnBranch(): bool;

public function getProductId(): ?string;

public function getProductVariantId(): ?int;

public function getAvailableQuantity(): int;

public function getExpectedDeliveryDate(): ?\DateTimeInterface;

public function getUpdatedDate(): \DateTimeInterface;
}
6 changes: 6 additions & 0 deletions src/Service/WarehouseManagerInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
use Baraja\EcommerceStandard\DTO\WarehouseItemAvailabilityInfoInterface;
use Baraja\EcommerceStandard\DTO\WarehouseItemInterface;
use Baraja\EcommerceStandard\DTO\WarehouseItemReservationInterface;
use Baraja\EcommerceStandard\DTO\WarehouseProductStatusInterface;

interface WarehouseManagerInterface
{
Expand All @@ -32,6 +33,11 @@ public function getWarehouseItem(

public function createWarehouseItem(ProductInterface|ProductVariantInterface|string $item): WarehouseItemInterface;

public function getProductStatus(
ProductInterface $product,
?ProductVariantInterface $variant = null,
): WarehouseProductStatusInterface;

public function setLocation(WarehouseInterface $warehouse, ?string $location): void;

public function getRealCapacity(ProductInterface|ProductVariantInterface|WarehouseItemInterface|string $item): int;
Expand Down

0 comments on commit e090545

Please sign in to comment.