You are here

public function Shipment::setAmount in Commerce Shipping 8.2

Sets the amount.

Parameters

\Drupal\commerce_price\Price $amount: The shipment amount.

Return value

$this

Overrides ShipmentInterface::setAmount

File

src/Entity/Shipment.php, line 343

Class

Shipment
Defines the shipment entity class.

Namespace

Drupal\commerce_shipping\Entity

Code

public function setAmount(Price $amount) {
  $this
    ->set('amount', $amount);
  return $this;
}