OrderCustomerEntity example

$address->setLastName('billing-address-last-name');
        $address->setStreet('billing-address-street');
        $address->setZipcode('billing-address-zipcode');
        $address->setCity('billing-address-city');
        $address->setCountryId('billing-address-country-id');

        return $address;
    }

    private function getOrderCustomer(): OrderCustomerEntity
    {
        $customer = new OrderCustomerEntity();
        $customer->setId('order-customer-id');
        $customer->setCustomerId('customer-id');
        $customer->setEmail('order-customer-email');
        $customer->setSalutationId('order-customer-salutation-id');
        $customer->setFirstName('order-customer-first-name');
        $customer->setLastName('order-customer-last-name');
        $customer->setCustomerNumber('order-customer-number');

        return $customer;
    }

    
static::assertInstanceOf(MailRecipientStruct::class$flow->getData(MailAware::MAIL_STRUCT));

        static::assertEquals('test', $flow->getData(MailAware::MAIL_STRUCT)->getRecipients()['firstName']);
        static::assertEquals('bcc', $flow->getData(MailAware::MAIL_STRUCT)->getBcc());
        static::assertEquals('cc', $flow->getData(MailAware::MAIL_STRUCT)->getCc());
    }

    public function testRestoreHasDataOrder(): void
    {
        $flow = new StorableFlow('test', Context::createDefaultContext()[OrderAware::ORDER_ID => Uuid::randomHex()]);
        $customer = new OrderCustomerEntity();
        $customer->setId(Uuid::randomHex());
        $customer->setFirstName('bar');
        $customer->setLastName('foo');
        $customer->setEmail('foo@bar.com');
        $order = new OrderEntity();
        $order->setOrderCustomer($customer);
        $order->setSalesChannelId(TestDefaults::SALES_CHANNEL);
        $flow->setData(OrderAware::ORDER, $order);

        $this->storer->restore($flow);

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