Dumplie\Customer\Application\Command\ChangeShippingAddress::cartId PHP Method

cartId() public method

public cartId ( ) : string
return string
    public function cartId() : string
    {
        return $this->cartId;
    }

Usage Example

 /**
  * @param ChangeShippingAddress $command
  * @throws InvalidArgumentException
  */
 public function handle(ChangeShippingAddress $command)
 {
     $shippingAddress = new Address($command->name(), $command->street(), $command->postCode(), $command->city(), $command->countryIso2Code());
     $checkout = $this->checkouts->getForCart(new CartId($command->cartId()));
     $checkout->changeShippingAddress($shippingAddress);
 }
ChangeShippingAddress