mirror of
https://github.com/kevin-DL/LaravelShoppingcart.git
synced 2026-01-15 20:34:52 +00:00
37 lines
845 B
PHP
37 lines
845 B
PHP
<?php
|
|
|
|
namespace Gloudemans\Shoppingcart\Contracts;
|
|
|
|
use Gloudemans\Shoppingcart\CartItemOptions;
|
|
use Money\Money;
|
|
|
|
interface Buyable
|
|
{
|
|
/**
|
|
* Get the identifier of the Buyable item.
|
|
*
|
|
* @return int|string
|
|
*/
|
|
public function getBuyableIdentifier(CartItemOptions $options);
|
|
|
|
/**
|
|
* Get the description or title of the Buyable item.
|
|
*/
|
|
public function getBuyableDescription(CartItemOptions $options): ?string;
|
|
|
|
/**
|
|
* Get the price of the Buyable item.
|
|
*/
|
|
public function getBuyablePrice(CartItemOptions $options): Money;
|
|
|
|
/**
|
|
* Get the weight of the Buyable item.
|
|
*/
|
|
public function getBuyableWeight(CartItemOptions $options): int;
|
|
|
|
/**
|
|
* Get the taxRate of the Buyable item.
|
|
*/
|
|
public function getBuyableTaxRate(CartItemOptions $options): float;
|
|
}
|