swap example

private readonly CartRestorer $restorer
    ) {
    }

    /** * @throws CustomerNotLoggedInException * @throws InvalidUuidException * @throws AddressNotFoundException */
    public function setDefaultBillingAddress(string $addressId, SalesChannelContext $context, CustomerEntity $customer): void
    {
        $this->switchDefaultAddressRoute->swap($addressId, AbstractSwitchDefaultAddressRoute::TYPE_BILLING, $context$customer);
    }

    /** * @throws CustomerNotLoggedInException * @throws InvalidUuidException * @throws AddressNotFoundException */
    public function setDefaultShippingAddress(string $addressId, SalesChannelContext $context, CustomerEntity $customer): void
    {
        $this->switchDefaultAddressRoute->swap($addressId, AbstractSwitchDefaultAddressRoute::TYPE_SHIPPING, $context$customer);
    }

    
Home | Imprint | This part of the site doesn't use cookies.