From 32037d7184f4b00df533d4a118b44458baa8170e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?D=2E=20Nagy=20Gerg=C5=91?= Date: Fri, 3 May 2024 08:09:26 +0200 Subject: [PATCH] wip --- src/Interfaces/Buyable.php | 5 +++++ src/Models/Variant.php | 8 ++++++++ 2 files changed, 13 insertions(+) diff --git a/src/Interfaces/Buyable.php b/src/Interfaces/Buyable.php index c5da89a7..d25f2b6e 100644 --- a/src/Interfaces/Buyable.php +++ b/src/Interfaces/Buyable.php @@ -6,6 +6,11 @@ interface Buyable { + /** + * Determine whether the buyable object is available for the itemable instance. + */ + public function buyable(Itemable $itemable): bool; + /** * Get the item representation of the buyable instance. */ diff --git a/src/Models/Variant.php b/src/Models/Variant.php index b779a2e7..1d0c1ceb 100644 --- a/src/Models/Variant.php +++ b/src/Models/Variant.php @@ -111,6 +111,14 @@ protected function alias(): Attribute ); } + /** + * Determine whether the buyable object is available for the itemable instance. + */ + public function buyable(Itemable $itemable): bool + { + return true; + } + /** * Get the price by the given type and currency. */