Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
iamgergo committed May 3, 2024
1 parent 96e5a98 commit 32037d7
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/Interfaces/Buyable.php
Original file line number Diff line number Diff line change
Expand Up @@ -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.
*/
Expand Down
8 changes: 8 additions & 0 deletions src/Models/Variant.php
Original file line number Diff line number Diff line change
Expand Up @@ -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.
*/
Expand Down

0 comments on commit 32037d7

Please sign in to comment.