Skip to content

Commit

Permalink
Add CartSale and CartVoucher.
Browse files Browse the repository at this point in the history
  • Loading branch information
janbarasek committed Apr 26, 2022
1 parent 33ad2a7 commit 0b32463
Show file tree
Hide file tree
Showing 3 changed files with 47 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/DTO/CartInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -53,5 +53,10 @@ public function getAllItems(): array;
*/
public function getItems(): array;

/**
* @return array<int, CartSaleInterface>
*/
public function getSales(): array;

public function getRuntimeContext(): CartRuntimeContextInterface;
}
24 changes: 24 additions & 0 deletions src/DTO/CartSaleInterface.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<?php

declare(strict_types=1);

namespace Baraja\EcommerceStandard\DTO;


interface CartSaleInterface
{
public function getId(): int;

public function getCart(): CartInterface;

public function getType(): string;

/**
* @return numeric-string
*/
public function getValue(): string;

public function getVoucher(): ?CartVoucherInterface;

public function setVoucher(?CartVoucherInterface $voucher): void;
}
18 changes: 18 additions & 0 deletions src/DTO/CartVoucherInterface.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<?php

declare(strict_types=1);

namespace Baraja\EcommerceStandard\DTO;


interface CartVoucherInterface
{
public function getId(): int;

public function getType(): string;

/**
* @return numeric-string
*/
public function getValue(): string;
}

0 comments on commit 0b32463

Please sign in to comment.