You are here

public function StockTransactionsInterface::sellStock in Commerce Stock 8

Sell stock.

Parameters

\Drupal\commerce\PurchasableEntityInterface $entity: The purchasable entity (most likely a product variation entity).

int $location_id: The location ID.

string $zone: The zone.

float $quantity: The quantity.

float $unit_cost: The unit cost.

string $currency_code: The currency code.

int $order_id: The order ID.

int $user_id: The user ID.

string $message: The message.

1 method overrides StockTransactionsInterface::sellStock()
StockServiceManager::sellStock in src/StockServiceManager.php
Sell stock.

File

src/StockTransactionsInterface.php, line 132

Class

StockTransactionsInterface
Defines a common interface for creating stock transactions.

Namespace

Drupal\commerce_stock

Code

public function sellStock(PurchasableEntityInterface $entity, $location_id, $zone, $quantity, $unit_cost, $currency_code, $order_id, $user_id, $message = NULL);